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
cybersphinx 2012-04-09 23:26:47 +02:00
parent c01be7695c
commit 56599111e2
2 changed files with 3 additions and 1 deletions

View File

@ -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"

View File

@ -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;