Skip to content
Browse files

Backport [23970] to 0.23-fixes. Fix the display of non-Latin1 strings…

… in the UI when no translation was available. Fixes #7815

git-svn-id: http://svn.mythtv.org/svn/branches/release-0-23-fixes@25145 7dbf422c-18fa-0310-86e9-fd20926502f2
  • Loading branch information...
1 parent 51a9c12 commit d5cd5ea87899c612a28a5079768b54bc54f87c6f @stuartm stuartm committed
Showing with 7 additions and 5 deletions.
  1. +7 −5 mythtv/libs/libmythui/mythuitext.cpp
View
12 mythtv/libs/libmythui/mythuitext.cpp
@@ -347,13 +347,14 @@ void MythUIText::FillCutMessage()
if (isNumber && m_TemplateText.contains("%n"))
{
m_CutMessage = qApp->translate("ThemeUI",
- qPrintable(m_TemplateText), "",
- QCoreApplication::CodecForTr,
- qAbs(value));
+ m_TemplateText.toUtf8(), NULL,
+ QCoreApplication::UnicodeUTF8,
+ qAbs(value));
}
else if (m_TemplateText.contains("%1"))
{
- QString tmp = qApp->translate("ThemeUI", qPrintable(m_TemplateText));
+ QString tmp = qApp->translate("ThemeUI", m_TemplateText.toUtf8(),
+ NULL, QCoreApplication::UnicodeUTF8);
m_CutMessage = tmp.arg(m_Message);
}
}
@@ -577,7 +578,8 @@ bool MythUIText::ParseElement(
if (element.attribute("lang","").isEmpty())
{
m_Message = qApp->translate("ThemeUI",
- qPrintable(getFirstText(element)));
+ getFirstText(element).toUtf8(), NULL,
+ QCoreApplication::UnicodeUTF8);
}
else if (element.attribute("lang","").toLower() ==
GetMythUI()->GetLanguageAndVariant())

0 comments on commit d5cd5ea

Please sign in to comment.
Something went wrong with that request. Please try again.