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 11:55:10

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 11:59:37

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

Issue History

Date Modified Username Field Change
2016-07-05 11:40 cproensa New Issue
2020-02-26 13:17 dregad Assigned To => dregad
2020-02-26 13:17 dregad Status new => assigned
2020-02-26 13:17 dregad Note Added: 0063699
2020-02-26 13:17 dregad Target Version => 2.24.0
2020-02-26 13:24 dregad Note Added: 0063700
2020-02-26 13:35 dregad Relationship added related to 0012732
2020-02-26 13:37 dregad Relationship replaced has duplicate 0012732
2020-03-03 04:29 dregad Changeset attached => MantisBT master 8d6784e0
2020-03-03 04:29 dregad Changeset attached => MantisBT master 710a466d
2020-03-03 04:29 dregad Status assigned => resolved
2020-03-03 04:29 dregad Resolution open => fixed
2020-03-03 04:29 dregad Fixed in Version => 2.24.0
2020-03-03 10:25 dregad Relationship added related to 0026747
2020-03-15 15:23 vboctor Status resolved => closed