View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004236 | mantisbt | customization | public | 2004-07-31 21:21 | 2004-08-29 01:49 |
Reporter | Assigned To | thraxisp | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Any | OS | Any | OS Version | Any |
Product Version | git trunk | ||||
Fixed in Version | 0.19.0rc1 | ||||
Summary | 0004236: Support of custom_strings_inc.php broken somehow | ||||
Description | After update to latest HEAD custom strings, defined in custom_strings_inc.php ignored | ||||
Steps To Reproduce | Test instalation with lang_api Rev.1.24 and 1.28 with custom statuses defined | ||||
Tags | No tags attached. | ||||
As discovered - lang_api revision 1.26 is "bad boy" |
|
I hate this, I think everyone who changes the way lang_api works comes up with a more creative name for the global variable. The last one who changed this was Andre. However, I can't blame such changes. I think the reason this keeps breaking custom_strings_inc.php is due to lack of encapsulation. What we need is to add an API like lang_get_current() which returns the language that should be used by custom strings. |
|
So this is still broken? |
|
Last lang_api now yet |
|
OK, I do indeed see a couple of different names for this. If we add lang_get_current(), will that fix the problem? I can't think of any way to warn users that they should use this though. |
|
In 1.26, the language key changed from $g_current_language to $g_active_language. The documentation also references an older $g_lang_current. It also appears not to be set right before the custom file is loaded. What variable are you using? (On a side note, the fix for 0004147 may address this. I added a function "lang_peek" that will return the current language). |
|
Changing to $g_active_language cured problem |
|
Let's leave this open until the documentation is updated to point to lang_peek? |
|
At least I can't find this function :-) in sources |
|
Alex, the patch from 4147 is yet to be applied. Victor, should I rename/create lang_get_current() as part of the 4147 fix? |
|
with the commit for 0004147, there is now a function "lang_get_current()" that will return the current language for the load. $g_active_language is also set. |
|