View Issue Details

IDProjectCategoryView StatusLast Update
0004236mantisbtcustomizationpublic2004-08-29 01:49
ReporterWandererAssigned Tothraxisp  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformAnyOSAnyOS VersionAny
Product Versiongit trunk 
Fixed in Version0.19.0rc1 
Summary0004236: 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

TagsNo tags attached.

Relationships

child of 0003987 closedvboctor Mantis 0.19.0 Release 

Activities

Wanderer

Wanderer

2004-07-31 21:22

developer   ~0006511

As discovered - lang_api revision 1.26 is "bad boy"

vboctor

vboctor

2004-07-31 21:36

manager   ~0006514

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.

jlatour

jlatour

2004-08-06 11:44

reporter   ~0006721

So this is still broken?

Wanderer

Wanderer

2004-08-07 06:30

developer   ~0006746

Last lang_api now yet
lang_api.php,v 1.28 2004/07/10 15:40:21
and yes, it can't be used - I live with 1.25

jlatour

jlatour

2004-08-07 08:43

reporter   ~0006749

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.

thraxisp

thraxisp

2004-08-11 18:50

reporter   ~0006949

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).

Wanderer

Wanderer

2004-08-12 01:56

developer   ~0006954

Changing to $g_active_language cured problem
Issue can be resolved

jlatour

jlatour

2004-08-12 04:10

reporter   ~0006957

Let's leave this open until the documentation is updated to point to lang_peek?

Wanderer

Wanderer

2004-08-12 04:30

developer   ~0006961

At least I can't find this function :-) in sources

thraxisp

thraxisp

2004-08-12 11:06

reporter   ~0006966

Alex, the patch from 4147 is yet to be applied.

Victor, should I rename/create lang_get_current() as part of the 4147 fix?

thraxisp

thraxisp

2004-08-15 17:24

reporter   ~0006995

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.