View Issue Details

IDProjectCategoryView StatusLast Update
0021201mantisbtlocalizationpublic2020-03-15 15:23
Reportercproensa Assigned Todregad  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.3.0-rc.2 
Target Version2.24.0Fixed in Version2.24.0 
Summary0021201: lang_get_defaulted does not search for fallback language
Description

the function lang_get_defaulted, with the default parameters:
1) searchs for a string in the current language set.
2) if the string is not found, it returns either the provided default, or the string itself.

It should also search on the system fallback language, after (1), and before (2).
to be consistent with core behaviour.

TagsNo tags attached.

Relationships

has duplicate 0012732 closeddregad Problem with replacing non-translating strings 
related to 0026747 closeddregad No equivalent to lang_get_defaulted() in plugin_api() 

Activities

dregad

dregad

2020-02-26 13:17

developer   ~0063699

This was also recently reported by @obmsch in https://github.com/mantisbt-plugins/source-integration/issues/337

dregad

dregad

2020-02-26 13:24

developer   ~0063700

PR https://github.com/mantisbt/mantisbt/pull/1625

Related Changesets

MantisBT: master 8d6784e0

2020-02-20 06:55

dregad


Details Diff
lang_ensure_loaded(): load current plugin's strings

Move the code to load the currently active plugin's strings from
lang_get() to lang_ensure_loaded().

This is in preparation for fixing issue 0021201, as this code would then
be duplicated in lang_get_defaulted().
Affected Issues
0021201
mod - core/lang_api.php Diff File

MantisBT: master 710a466d

2020-02-20 06:59

dregad


Details Diff
Recursive lang_get_defaulted() for English fallback

Follows the same logic as in lang_get().

Fixes 0021201
Affected Issues
0021201
mod - core/lang_api.php Diff File