View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003017 | FSSCP | localization | public | 2014-03-09 18:37 | 2022-06-11 02:14 |
Reporter | Yarn | Assigned To | karajorma | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | x64 | OS | Windows 7 | ||
Product Version | 3.7.1 | ||||
Summary | 0003017: Localization "hacks" no longer used | ||||
Description | Ever since Karajorma's strings.tbl addition was implemented at revision 9761, certain localization features (such as translating the ETS labels and fixing certain non-English letters) stopped working. This happens because the code no longer changes the values of the lcl_?? variables in localize.cpp, even though those features still read from thess variables. | ||||
Additional Information | I have attached a patch that provides a possible fix for this bug. | ||||
Tags | No tags attached. | ||||
|
mantis3017.patch (1,452 bytes)
Index: code/localization/localize.cpp =================================================================== --- code/localization/localize.cpp (revision 10481) +++ code/localization/localize.cpp (working copy) @@ -470,6 +470,19 @@ // flag the proper language as being active Lcl_special_chars = Lcl_languages[Lcl_current_lang].special_char_indexes[0]; + Lcl_fr = 0; + Lcl_gr = 0; + Lcl_pl = 0; + Lcl_english = 0; + if (!strcmp(Lcl_languages[Lcl_current_lang].lang_name, Lcl_builtin_languages[LCL_ENGLISH].lang_name)) { + Lcl_english = 1; + } else if (!strcmp(Lcl_languages[Lcl_current_lang].lang_name, Lcl_builtin_languages[LCL_FRENCH].lang_name)) { + Lcl_fr = 1; + } else if (!strcmp(Lcl_languages[Lcl_current_lang].lang_name, Lcl_builtin_languages[LCL_GERMAN].lang_name)) { + Lcl_gr = 1; + } else if (!strcmp(Lcl_languages[Lcl_current_lang].lang_name, Lcl_builtin_languages[LCL_POLISH].lang_name)) { + Lcl_pl = 1; + } // set to 0, so lcl_ext_open() knows to reset file pointers Lcl_pointer_count = 0; Index: code/localization/localize.h =================================================================== --- code/localization/localize.h (revision 10481) +++ code/localization/localize.h (working copy) @@ -19,6 +19,11 @@ // LOCALIZE DEFINES/VARS // +// language defines +#define LCL_ENGLISH 0 +#define LCL_GERMAN 1 +#define LCL_FRENCH 2 +#define LCL_POLISH 3 #define FS2_OPEN_DEFAULT_LANGUAGE 0 |
|
Fix committed to trunk@10496. |
fs2open: trunk r10496 2014-03-16 08:28 Ported: N/A Details Diff |
Yarn's fix for Mantis 3017 (Certain HUD elements don't work after the changes to strings.tbl). Not very happy with the way it fixes thing (it only solves problems for French, German and Polish, which kinda makes the changes to strings.tbl in r9761 somewhat pointless) but it makes sense to wait for SDL and truetype support and then fix everything properly then. |
Affected Issues 0003017 |
|
mod - /trunk/fs2_open/code/localization/localize.cpp | Diff File | ||
mod - /trunk/fs2_open/code/localization/localize.h | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-03-09 18:37 | Yarn | New Issue | |
2014-03-09 18:37 | Yarn | File Added: mantis3017.patch | |
2014-03-09 19:03 | Yarn | Description Updated | |
2014-03-12 08:10 | Goober5000 | Assigned To | => karajorma |
2014-03-12 08:10 | Goober5000 | Status | new => assigned |
2014-03-16 13:25 | karajorma | Changeset attached | => fs2open trunk r10496 |
2014-03-16 13:25 | karajorma | Note Added: 0015664 | |
2014-03-16 13:25 | karajorma | Status | assigned => resolved |
2014-03-16 13:25 | karajorma | Resolution | open => fixed |
2014-03-16 13:26 | karajorma | Status | resolved => acknowledged |
2022-06-11 02:14 | Goober5000 | Status | acknowledged => resolved |