Skip to content

Commit

Permalink
NOISSUE Add small workaround for presenting Japanese with Kanji
Browse files Browse the repository at this point in the history
  • Loading branch information
peterix committed Dec 8, 2021
1 parent dba4c45 commit 80beccb
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion launcher/translations/TranslationsModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@ struct Language
updated = (key == defaultLangCode);
}

QString languageName() const {
QString result;
if(key == "ja_KANJI") {
result = locale.nativeLanguageName() + u8" (漢字)";
qDebug() << result;
}
else {
result = locale.nativeLanguageName();
}
return result;
}

float percentTranslated() const
{
if (total == 0)
Expand Down Expand Up @@ -340,7 +352,7 @@ QVariant TranslationsModel::data(const QModelIndex& index, int role) const
{
case Column::Language:
{
return lang.locale.nativeLanguageName();
return lang.languageName();
}
case Column::Completeness:
{
Expand Down

0 comments on commit 80beccb

Please sign in to comment.