View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005261||The Dark Mod||Design/Coding||public||23.05.2020 07:00||18.02.2021 11:58|
|Product Version||TDM 2.08|
|Target Version||TDM 2.10|
|Summary||0005261: Extend localization system to understand string placeholders|
|Description||Currently localized strings have format #str_02389, which is a big pain to work with.|
When I see such string in debugger, I have no idea what it means.
Perhaps it's better to allow string keywords in localization system.
Of course, it means some performance loss due to dictionary search, but I think strings should not take too much time anyway.
|Additional Information||See discussion:|
|Tags||No tags attached.|
I suggest extending keywords to anything of format #str_lockpicking_difficulty
I.e. allow any string starting with five characters "#str_" and 1-50 alphanum characters (0-9a-zA-Z_) after that.
|Also probably review the generation script?...|
Actually, the game engine works perfectly well with something like "#str_frontend_parallel".
The perl script does not let it pass, which can be fixed pretty easily.
So... I have no idea why we are stuck with those unreadable numbers.
I found something like this on forums:
Darkradiant currently does not support the dictionaries, so strings will look like "#str_07118" instead of the "OK".
Along with much shit regarding localization framework and process =(
Also I see the following test in all.lang:
FM specific strings have the ID 20000 .. 89999 and are NOT to be
stored in this file. Instead they go into "strings/fm/[language].lang".
So I guess there is some convention about ID ranges.
Obviously, similar convention must be made for arbitrary strings too.
DarkRadiant does not do anything with these #str_ string, it just displays them "as is".
It does not care if placeholders is integer or string.
So I guess there is no reason to use numbers actually.
After 2.09 is over, I'll try to fix the script and use some strings for graphics menu.
Obviously, FM-specific strings should start with #str_fm_ to avoid accidental name conflicts.
|23.05.2020 07:00||stgatilov||New Issue|
|23.05.2020 07:01||stgatilov||Description Updated||View Revisions|
|23.05.2020 07:02||stgatilov||Note Added: 0012544|
|05.12.2020 11:36||stgatilov||Note Added: 0013097|
|05.12.2020 11:36||stgatilov||Target Version||TDM 2.09 => TDM 2.10|
|11.12.2020 15:48||stgatilov||Note Added: 0013117|
|12.12.2020 17:45||stgatilov||Note Added: 0013118|
|18.02.2021 11:58||stgatilov||Assigned To||=> stgatilov|
|18.02.2021 11:58||stgatilov||Status||new => assigned|