Prevent % in research messages from breaking translations.
Translate research messages on loading, and replace %% with %. Research messages should now use %% for % in ambiguous cases. Fixes #3376.master
parent
c01be7695c
commit
56599111e2
|
@ -232,7 +232,7 @@ sequenceName = "res_struttech.ogg"
|
|||
text = \
|
||||
_("Production Improved"),\
|
||||
_("Factory module enables medium and large bodies"),\
|
||||
_("Factory output speed +100% per module"),\
|
||||
_("Factory output speed +100%% per module"),\
|
||||
_("Use a truck to add modules to a factory")
|
||||
|
||||
imdName = "MICAPSUL.pie"
|
||||
|
|
|
@ -714,6 +714,8 @@ const char *loadResearchViewData(const char* fileName)
|
|||
v->textMsg[j].remove('\t');
|
||||
v->textMsg[j].remove(0, 2); // initial _(
|
||||
v->textMsg[j].remove(v->textMsg[j].length() - 1, 1); // final )
|
||||
v->textMsg[j] = QString(_(v->textMsg[j].toUtf8().constData()));
|
||||
v->textMsg[j].replace("%%", "%");
|
||||
}
|
||||
v->type = VIEW_RES;
|
||||
v->pData = r;
|
||||
|
|
Loading…
Reference in New Issue