View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0027241 | mantisbt | localization | public | 2020-09-05 06:37 | 2021-03-07 18:29 |
Reporter | dregad | Assigned To | dregad | ||
Priority | normal | Severity | tweak | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Target Version | 2.25.0 | Fixed in Version | 2.25.0 | ||
Summary | 0027241: Improve handling of missing language strings | ||||
Description | When a language string is missing, MantisBT currently displays an empty string Additionally, if $g_display_error settings for E_USER_WARNING are set to DISPLAY_ERROR_INLINE, an alert is displayed on screen, e.g.
So we know which string is missing, but not where it was referenced as the error is always triggered from Lang API. Even though it is not a normal scenario to have missing strings, this behavior is not very user-friendly to
| ||||
Tags | No tags attached. | ||||
MantisBT: master 6ef1734d 2020-09-05 02:45 Details Diff |
Print lang string if English localization missing When an English language string is missing, MantisBT currently displays an empty string; this is not very friendly to the user, who may be missing important information (e.g. a button label). If English string is missing, display the language string itself (i.e. the $p_string parameter to lang_get()). Fixes 0027241 |
Affected Issues 0027241 |
|
mod - core/lang_api.php | Diff File | ||
MantisBT: master 60004349 2020-09-06 04:49 Details Diff |
Special handling for missing lang string errors If the error type is 300 (ERROR_LANG_STRING_NOT_FOUND), we retrieve the details (file name and line number) of the parent error. Properly handles the case when user's language is not English, by going through the error stack trace until the first lang_get() call is found. This allows printing information about the actual location of the missing string, instead of a not-so-useful reference to lang_get(). Fixes 0027241 |
Affected Issues 0027241 |
|
mod - core/error_api.php | Diff File |