View Issue Details

IDProjectCategoryView StatusLast Update
0005261The Dark ModDesign/Codingpublic12.12.2020 17:45
Reporterstgatilov Assigned To 
PrioritylowSeverityminorReproducibilityN/A
Status newResolutionopen 
Product VersionTDM 2.08 
Target VersionTDM 2.10 
Summary0005261: Extend localization system to understand string placeholders
DescriptionCurrently 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 InformationSee discussion:
  https://forums.thedarkmod.com/index.php?/topic/20391-ultrawide-monitor-support/&do=findComment&comment=447446
TagsNo tags attached.

Activities

stgatilov

stgatilov

23.05.2020 07:02

administrator   ~0012544

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

stgatilov

05.12.2020 11:36

administrator   ~0013097

Also probably review the generation script?...
stgatilov

stgatilov

11.12.2020 15:48

administrator   ~0013117

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

stgatilov

12.12.2020 17:45

administrator   ~0013118

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.

Issue History

Date Modified Username Field Change
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