Skip to content

Commit ae63bc2

Browse files
committed
Fix translation of mapped text strings. Thanks to Nicolas Riendeau for pointing it out.
1 parent 0840578 commit ae63bc2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

mythtv/libs/libmythui/mythuitext.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,15 @@ void MythUIText::SetTextFromMap(QHash<QString, QString> &map)
157157
if (!newText.isEmpty() && newText.contains(regexp))
158158
{
159159
int pos = 0;
160-
QString tempString = newText;
161160

162-
while ((pos = regexp.indexIn(newText, pos)) != -1)
161+
QString translatedTemplate = qApp->translate("ThemeUI",
162+
newText.toUtf8(),
163+
NULL,
164+
QCoreApplication::UnicodeUTF8);
165+
166+
QString tempString = translatedTemplate;
167+
168+
while ((pos = regexp.indexIn(translatedTemplate, pos)) != -1)
163169
{
164170
QString key = regexp.cap(4).toLower().trimmed();
165171
QString replacement;

0 commit comments

Comments
 (0)