Skip to content

Commit

Permalink
Update translations
Browse files Browse the repository at this point in the history
+ add Korean translation and Noto font for korean characters
  • Loading branch information
dimkanovikov committed May 31, 2022
1 parent 1fcba40 commit d57781d
Show file tree
Hide file tree
Showing 71 changed files with 38,267 additions and 22,060 deletions.
6 changes: 6 additions & 0 deletions src/core/management_layer/application_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,11 @@ void ApplicationManager::Implementation::setTranslation(QLocale::Language _langu
break;
}

case QLocale::Korean: {
translation = "ko";
break;
}

case QLocale::Persian: {
translation = "fa";
break;
Expand Down Expand Up @@ -1451,6 +1456,7 @@ ApplicationManager::ApplicationManager(QObject* _parent)
fontDatabase.addApplicationFont(":/fonts/noto-sans-tamil-light");
fontDatabase.addApplicationFont(":/fonts/noto-sans-tamil-medium");
fontDatabase.addApplicationFont(":/fonts/noto-sans-tamil-regular");
fontDatabase.addApplicationFont(":/fonts/noto-sans-korean-regular");
//
fontDatabase.addApplicationFont(":/fonts/arial");
fontDatabase.addApplicationFont(":/fonts/arial-bold");
Expand Down
1 change: 1 addition & 0 deletions src/core/translations.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@
<file>translations/translation_zh_CN.qm</file>
<file>translations/translation_ar.qm</file>
<file>translations/translation_ta.qm</file>
<file>translations/translation_ko.qm</file>
</qresource>
</RCC>
1,585 changes: 925 additions & 660 deletions src/core/translations/_en_source.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_ar.qm
Binary file not shown.
1,621 changes: 943 additions & 678 deletions src/core/translations/translation_ar.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_az.qm
Binary file not shown.
1,727 changes: 996 additions & 731 deletions src/core/translations/translation_az.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_be.qm
Binary file not shown.
1,693 changes: 979 additions & 714 deletions src/core/translations/translation_be.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_ca.qm
Binary file not shown.
1,985 changes: 1,125 additions & 860 deletions src/core/translations/translation_ca.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_da_DK.qm
Binary file not shown.
1,803 changes: 1,034 additions & 769 deletions src/core/translations/translation_da_DK.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_de.qm
Binary file not shown.
1,693 changes: 979 additions & 714 deletions src/core/translations/translation_de.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_en.qm
Binary file not shown.
1,583 changes: 926 additions & 657 deletions src/core/translations/translation_en.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_eo.qm
Binary file not shown.
1,597 changes: 931 additions & 666 deletions src/core/translations/translation_eo.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_es.qm
Binary file not shown.
1,695 changes: 980 additions & 715 deletions src/core/translations/translation_es.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_fa.qm
Binary file not shown.
1,699 changes: 982 additions & 717 deletions src/core/translations/translation_fa.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_fr.qm
Binary file not shown.
1,693 changes: 979 additions & 714 deletions src/core/translations/translation_fr.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_gl_ES.qm
Binary file not shown.
1,963 changes: 1,114 additions & 849 deletions src/core/translations/translation_gl_ES.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_he.qm
Binary file not shown.
1,749 changes: 1,007 additions & 742 deletions src/core/translations/translation_he.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_hi.qm
Binary file not shown.
1,647 changes: 956 additions & 691 deletions src/core/translations/translation_hi.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_hr.qm
Binary file not shown.
1,693 changes: 979 additions & 714 deletions src/core/translations/translation_hr.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_hu.qm
Binary file not shown.
1,659 changes: 962 additions & 697 deletions src/core/translations/translation_hu.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_id.qm
Binary file not shown.
1,595 changes: 930 additions & 665 deletions src/core/translations/translation_id.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_it.qm
Binary file not shown.
1,629 changes: 947 additions & 682 deletions src/core/translations/translation_it.ts

Large diffs are not rendered by default.

Binary file added src/core/translations/translation_ko.qm
Binary file not shown.
7,961 changes: 7,961 additions & 0 deletions src/core/translations/translation_ko.ts

Large diffs are not rendered by default.

1,585 changes: 925 additions & 660 deletions src/core/translations/translation_nl.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_pl.qm
Binary file not shown.
1,641 changes: 953 additions & 688 deletions src/core/translations/translation_pl.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_pt_BR.qm
Binary file not shown.
1,701 changes: 983 additions & 718 deletions src/core/translations/translation_pt_BR.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_pt_PT.qm
Binary file not shown.
1,613 changes: 939 additions & 674 deletions src/core/translations/translation_pt_PT.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_ro_RO.qm
Binary file not shown.
1,693 changes: 979 additions & 714 deletions src/core/translations/translation_ro_RO.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_ru.qm
Binary file not shown.
1,727 changes: 996 additions & 731 deletions src/core/translations/translation_ru.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_sl.qm
Binary file not shown.
1,705 changes: 985 additions & 720 deletions src/core/translations/translation_sl.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_ta.qm
Binary file not shown.
1,651 changes: 958 additions & 693 deletions src/core/translations/translation_ta.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_tl_PH.qm
Binary file not shown.
1,639 changes: 952 additions & 687 deletions src/core/translations/translation_tl_PH.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_tr.qm
Binary file not shown.
1,659 changes: 962 additions & 697 deletions src/core/translations/translation_tr.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_uk.qm
Binary file not shown.
1,727 changes: 996 additions & 731 deletions src/core/translations/translation_uk.ts

Large diffs are not rendered by default.

Binary file modified src/core/translations/translation_zh_CN.qm
Binary file not shown.
1,595 changes: 930 additions & 665 deletions src/core/translations/translation_zh_CN.ts

Large diffs are not rendered by default.

45 changes: 24 additions & 21 deletions src/core/ui/onboarding/onboarding_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,40 +99,41 @@ void OnboardingView::Implementation::initLanguagePage()
languageButtons.append(languageButton);
return languageButton;
};
PercentRadioButton* arabicLanguage = initLanguageButton("اَلْعَرَبِيَّةُ", QLocale::Arabic, 22);
PercentRadioButton* arabicLanguage = initLanguageButton("اَلْعَرَبِيَّةُ", QLocale::Arabic, 21);
PercentRadioButton* azerbaijaniLanguage
= initLanguageButton("Azərbaycan", QLocale::Azerbaijani, 100);
PercentRadioButton* belarusianLanguage
= initLanguageButton("Беларуский", QLocale::Belarusian, 66);
PercentRadioButton* catalanLanguage = initLanguageButton("Català", QLocale::Catalan, 70);
= initLanguageButton("Беларуский", QLocale::Belarusian, 65);
PercentRadioButton* catalanLanguage = initLanguageButton("Català", QLocale::Catalan, 79);
PercentRadioButton* chineseLanguage = initLanguageButton("汉语", QLocale::Chinese, 8);
PercentRadioButton* croatianLanguage = initLanguageButton("Hrvatski", QLocale::Croatian, 84);
PercentRadioButton* danishLanguage = initLanguageButton("Dansk", QLocale::Danish, 98);
PercentRadioButton* croatianLanguage = initLanguageButton("Hrvatski", QLocale::Croatian, 82);
PercentRadioButton* danishLanguage = initLanguageButton("Dansk", QLocale::Danish, 100);
PercentRadioButton* englishLanguage = initLanguageButton("English", QLocale::English, 100);
PercentRadioButton* esperantoLanguage = initLanguageButton("Esperanto", QLocale::Esperanto, 12);
PercentRadioButton* frenchLanguage = initLanguageButton("Français", QLocale::French, 80);
PercentRadioButton* galicianLanguage = initLanguageButton("Galego", QLocale::Galician, 82);
PercentRadioButton* germanLanguage = initLanguageButton("Deutsch", QLocale::German, 87);
PercentRadioButton* hebrewLanguage = initLanguageButton("עִבְרִית", QLocale::Hebrew, 95);
PercentRadioButton* hindiLanguage = initLanguageButton("हिन्दी", QLocale::Hindi, 50);
PercentRadioButton* hungarianLanguage = initLanguageButton("Magyar", QLocale::Hungarian, 48);
PercentRadioButton* esperantoLanguage = initLanguageButton("Esperanto", QLocale::Esperanto, 11);
PercentRadioButton* frenchLanguage = initLanguageButton("Français", QLocale::French, 79);
PercentRadioButton* galicianLanguage = initLanguageButton("Galego", QLocale::Galician, 91);
PercentRadioButton* germanLanguage = initLanguageButton("Deutsch", QLocale::German, 85);
PercentRadioButton* hebrewLanguage = initLanguageButton("עִבְרִית", QLocale::Hebrew, 100);
PercentRadioButton* hindiLanguage = initLanguageButton("हिन्दी", QLocale::Hindi, 48);
PercentRadioButton* hungarianLanguage = initLanguageButton("Magyar", QLocale::Hungarian, 47);
PercentRadioButton* indonesianLanguage
= initLanguageButton("Indonesian", QLocale::Indonesian, 13);
PercentRadioButton* italianLanguage = initLanguageButton("Italiano", QLocale::Italian, 40);
PercentRadioButton* persianLanguage = initLanguageButton("فارسی", QLocale::Persian, 85);
PercentRadioButton* polishLanguage = initLanguageButton("Polski", QLocale::Polish, 43);
PercentRadioButton* italianLanguage = initLanguageButton("Italiano", QLocale::Italian, 38);
PercentRadioButton* koreanLanguage = initLanguageButton("한국어", QLocale::Korean, 51);
PercentRadioButton* persianLanguage = initLanguageButton("فارسی", QLocale::Persian, 83);
PercentRadioButton* polishLanguage = initLanguageButton("Polski", QLocale::Polish, 41);
PercentRadioButton* portugueseLanguage = initLanguageButton(
"Português", static_cast<QLocale::Language>(QLocale::LastLanguage + 1), 17);
PercentRadioButton* portugueseBrazilLanguage
= initLanguageButton("Português Brasileiro", QLocale::Portuguese, 91);
PercentRadioButton* romanianLanguage = initLanguageButton("Română", QLocale::Romanian, 84);
= initLanguageButton("Português Brasileiro", QLocale::Portuguese, 88);
PercentRadioButton* romanianLanguage = initLanguageButton("Română", QLocale::Romanian, 82);
PercentRadioButton* russianLanguage = initLanguageButton("Русский", QLocale::Russian, 100);
PercentRadioButton* slovenianLanguage
= initLanguageButton("Slovenski", QLocale::Slovenian, 100);
PercentRadioButton* spanishLanguage = initLanguageButton("Español", QLocale::Spanish, 87);
= initLanguageButton("Slovenski", QLocale::Slovenian, 97);
PercentRadioButton* spanishLanguage = initLanguageButton("Español", QLocale::Spanish, 84);
PercentRadioButton* tagalogLanguage = initLanguageButton("Tagalog", QLocale::Filipino, 24);
PercentRadioButton* tamilLanguage = initLanguageButton("தமிழ்", QLocale::Tamil, 61);
PercentRadioButton* turkishLanguage = initLanguageButton("Türkçe", QLocale::Turkish, 48);
PercentRadioButton* tamilLanguage = initLanguageButton("தமிழ்", QLocale::Tamil, 59);
PercentRadioButton* turkishLanguage = initLanguageButton("Türkçe", QLocale::Turkish, 46);
PercentRadioButton* ukrainianLanguage
= initLanguageButton("Українська", QLocale::Ukrainian, 100);
//
Expand Down Expand Up @@ -199,6 +200,7 @@ void OnboardingView::Implementation::initLanguagePage()
hindiLanguage,
persianLanguage,
tamilLanguage,
koreanLanguage,
});

languageTranslationProgressLink = new Body1LinkLabel(languagePage);
Expand Down Expand Up @@ -255,6 +257,7 @@ void OnboardingView::Implementation::initLanguagePage()
languagePageLayout->addWidget(hindiLanguage, rowForFifthColumn++, 3);
languagePageLayout->addWidget(persianLanguage, rowForFifthColumn++, 3);
languagePageLayout->addWidget(tamilLanguage, rowForFifthColumn++, 3);
languagePageLayout->addWidget(koreanLanguage, rowForFifthColumn++, 3);
languagePageLayout->setRowStretch(row++, 1);
languagePageLayout->setColumnStretch(4, 1);
languagePageLayout->addWidget(languageTranslationProgressLink, row++, 0, 1, 5);
Expand Down
58 changes: 32 additions & 26 deletions src/core/ui/settings/language_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class LanguageDialog::Implementation
PercentRadioButton* hungarian = nullptr;
PercentRadioButton* indonesian = nullptr;
PercentRadioButton* italian = nullptr;
PercentRadioButton* korean = nullptr;
PercentRadioButton* persian = nullptr;
PercentRadioButton* polish = nullptr;
PercentRadioButton* portuguese = nullptr;
Expand All @@ -66,34 +67,35 @@ class LanguageDialog::Implementation
};

LanguageDialog::Implementation::Implementation(QWidget* _parent)
: arabic(new PercentRadioButton(_parent, 22))
: arabic(new PercentRadioButton(_parent, 21))
, azerbaijani(new PercentRadioButton(_parent, 100))
, belarusian(new PercentRadioButton(_parent, 66))
, catalan(new PercentRadioButton(_parent, 70))
, belarusian(new PercentRadioButton(_parent, 65))
, catalan(new PercentRadioButton(_parent, 79))
, chinese(new PercentRadioButton(_parent, 8))
, croatian(new PercentRadioButton(_parent, 84))
, danish(new PercentRadioButton(_parent, 98))
, croatian(new PercentRadioButton(_parent, 82))
, danish(new PercentRadioButton(_parent, 100))
, english(new PercentRadioButton(_parent, 100))
, esperanto(new PercentRadioButton(_parent, 12))
, french(new PercentRadioButton(_parent, 80))
, galician(new PercentRadioButton(_parent, 82))
, german(new PercentRadioButton(_parent, 87))
, hebrew(new PercentRadioButton(_parent, 95))
, hindi(new PercentRadioButton(_parent, 50))
, hungarian(new PercentRadioButton(_parent, 48))
, esperanto(new PercentRadioButton(_parent, 11))
, french(new PercentRadioButton(_parent, 79))
, galician(new PercentRadioButton(_parent, 91))
, german(new PercentRadioButton(_parent, 85))
, hebrew(new PercentRadioButton(_parent, 100))
, hindi(new PercentRadioButton(_parent, 48))
, hungarian(new PercentRadioButton(_parent, 47))
, indonesian(new PercentRadioButton(_parent, 13))
, italian(new PercentRadioButton(_parent, 40))
, persian(new PercentRadioButton(_parent, 85))
, polish(new PercentRadioButton(_parent, 43))
, italian(new PercentRadioButton(_parent, 38))
, korean(new PercentRadioButton(_parent, 51))
, persian(new PercentRadioButton(_parent, 83))
, polish(new PercentRadioButton(_parent, 41))
, portuguese(new PercentRadioButton(_parent, 17))
, portugueseBrazil(new PercentRadioButton(_parent, 91))
, romanian(new PercentRadioButton(_parent, 84))
, portugueseBrazil(new PercentRadioButton(_parent, 88))
, romanian(new PercentRadioButton(_parent, 82))
, russian(new PercentRadioButton(_parent, 100))
, slovenian(new PercentRadioButton(_parent, 100))
, spanish(new PercentRadioButton(_parent, 87))
, slovenian(new PercentRadioButton(_parent, 97))
, spanish(new PercentRadioButton(_parent, 84))
, tagalog(new PercentRadioButton(_parent, 24))
, tamil(new PercentRadioButton(_parent, 61))
, turkish(new PercentRadioButton(_parent, 48))
, tamil(new PercentRadioButton(_parent, 59))
, turkish(new PercentRadioButton(_parent, 46))
, ukrainian(new PercentRadioButton(_parent, 100))
, languageHowToAddLink(new Body1LinkLabel(_parent))
, translationProgressLabel(new Body2Label(_parent))
Expand Down Expand Up @@ -135,6 +137,8 @@ LanguageDialog::Implementation::Implementation(QWidget* _parent)
indonesian->setProperty(kLanguageKey, QLocale::Indonesian);
italian->setText("Italiano");
italian->setProperty(kLanguageKey, QLocale::Italian);
korean->setText("한국어");
korean->setProperty(kLanguageKey, QLocale::Korean);
persian->setText("فارسی");
persian->setProperty(kLanguageKey, QLocale::Persian);
polish->setText("Polski");
Expand Down Expand Up @@ -181,11 +185,11 @@ LanguageDialog::Implementation::Implementation(QWidget* _parent)
std::vector<PercentRadioButton*> LanguageDialog::Implementation::languages() const
{
return {
arabic, azerbaijani, belarusian, catalan, chinese, croatian, danish,
english, esperanto, french, galician, german, hebrew, hindi,
hungarian, indonesian, italian, persian, polish, portuguese, portugueseBrazil,
romanian, russian, slovenian, spanish, tagalog, tamil, turkish,
ukrainian,
arabic, azerbaijani, belarusian, catalan, chinese, croatian, danish,
english, esperanto, french, galician, german, hebrew, hindi,
hungarian, indonesian, italian, korean, persian, polish, portuguese,
portugueseBrazil, romanian, russian, slovenian, spanish, tagalog, tamil,
turkish, ukrainian,
};
}

Expand Down Expand Up @@ -238,6 +242,7 @@ LanguageDialog::LanguageDialog(QWidget* _parent)
d->hindi,
d->persian,
d->tamil,
d->korean,
});

int row = 0;
Expand Down Expand Up @@ -275,6 +280,7 @@ LanguageDialog::LanguageDialog(QWidget* _parent)
contentsLayout()->addWidget(d->hindi, rowForFifthColumn++, 3);
contentsLayout()->addWidget(d->persian, rowForFifthColumn++, 3);
contentsLayout()->addWidget(d->tamil, rowForFifthColumn++, 3);
contentsLayout()->addWidget(d->korean, rowForFifthColumn++, 3);
//
contentsLayout()->setRowStretch(row++, 1);
contentsLayout()->setColumnStretch(4, 1);
Expand Down
3 changes: 3 additions & 0 deletions src/core/ui/settings/settings_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2047,6 +2047,9 @@ void SettingsView::setApplicationLanguage(int _language)
case QLocale::Italian: {
return "Italiano";
}
case QLocale::Korean: {
return "한국어";
}
case QLocale::Persian: {
return "فارسی";
}
Expand Down
1 change: 1 addition & 0 deletions src/corelib/fonts.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@
<file alias="montserrat-italic">fonts/montserrat-italic.ttf</file>
<file alias="montserrat-regular">fonts/montserrat-regular.ttf</file>
<file alias="sf-movie-poster">fonts/sf-movie-poster.ttf</file>
<file alias="noto-sans-korean-regular">fonts/noto-sans-korean-regular.otf</file>
</qresource>
</RCC>
Binary file added src/corelib/fonts/noto-sans-korean-regular.otf
Binary file not shown.
6 changes: 6 additions & 0 deletions src/corelib/ui/design_system/design_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,12 @@ DesignSystem::Font::Implementation::Implementation(qreal _scaleFactor)
break;
}

case QLocale::Korean: {
fontFamilies.prepend(QLatin1String("Noto Sans"));
fontFamilies.prepend(QLatin1String("Noto Sans KR"));
break;
}

default: {
break;
}
Expand Down
1 change: 1 addition & 0 deletions src/starc.pro
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ TRANSLATIONS += \
core/translations/translation_hu.ts \
core/translations/translation_id.ts \
core/translations/translation_it.ts \
core/translations/translation_ko.ts \
core/translations/translation_nl.ts \
core/translations/translation_pl.ts \
core/translations/translation_pt_BR.ts \
Expand Down

0 comments on commit d57781d

Please sign in to comment.