From 917229b9881a1e58959a6c027bd986c10ffd2300 Mon Sep 17 00:00:00 2001 From: heroesiiifan <77574150+heroesiiifan@users.noreply.github.com> Date: Fri, 28 Jul 2023 00:29:57 +0000 Subject: [PATCH 1/6] Update Languages.h --- lib/Languages.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Languages.h b/lib/Languages.h index 245430857..6bcd7c618 100644 --- a/lib/Languages.h +++ b/lib/Languages.h @@ -30,6 +30,7 @@ enum class ELanguages SWEDISH, TURKISH, UKRAINIAN, + VIETNAMESE, // Pseudo-languages, that have no translations but can define H3 encoding to use OTHER_CP1250, @@ -80,6 +81,7 @@ inline const auto & getLanguageList() { "swedish", "Swedish", "Svenska", "CP1252", "sv", true }, { "turkish", "Turkish", "Türkçe", "CP1254", "tr", true }, { "ukrainian", "Ukrainian", "Українська", "CP1251", "uk", true }, + { "vietnamese", "Vietnamese", "Tiếng Việt", "UTF-8", "vi", true }, // Fan translation uses special encoding { "other_cp1250", "Other (East European)", "", "CP1250", "", false }, { "other_cp1251", "Other (Cyrillic Script)", "", "CP1251", "", false }, From 840d5afe179b8dd6b6b32be28607f117bb27f77f Mon Sep 17 00:00:00 2001 From: heroesiiifan <77574150+heroesiiifan@users.noreply.github.com> Date: Fri, 28 Jul 2023 00:31:07 +0000 Subject: [PATCH 2/6] Update languages.cpp --- launcher/languages.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/launcher/languages.cpp b/launcher/languages.cpp index 8c7174df3..670faa345 100644 --- a/launcher/languages.cpp +++ b/launcher/languages.cpp @@ -18,7 +18,7 @@ #include // list of language names, for generation of translations. Do not use directly, use Languages namespace instead -static const std::array languageTranslatedNamesGenerator = { +static const std::array languageTranslatedNamesGenerator = { { QT_TRANSLATE_NOOP("Language", "Czech"), QT_TRANSLATE_NOOP("Language", "Chinese"), @@ -36,6 +36,7 @@ static const std::array languageTranslatedNamesGenerator = { QT_TRANSLATE_NOOP("Language", "Swedish"), QT_TRANSLATE_NOOP("Language", "Turkish"), QT_TRANSLATE_NOOP("Language", "Ukrainian"), + QT_TRANSLATE_NOOP("Language", "Vietnamese"), QT_TRANSLATE_NOOP("Language", "Other (East European)"), QT_TRANSLATE_NOOP("Language", "Other (Cyrillic Script)"), QT_TRANSLATE_NOOP("Language", "Other (West European)"), From da7f1f4620d8fdb23c46c1823638712d985e1a2c Mon Sep 17 00:00:00 2001 From: heroesiiifan <77574150+heroesiiifan@users.noreply.github.com> Date: Fri, 28 Jul 2023 00:31:59 +0000 Subject: [PATCH 3/6] Update LanguageSettingDialog.java --- .../main/java/eu/vcmi/vcmi/settings/LanguageSettingDialog.java | 1 + 1 file changed, 1 insertion(+) diff --git a/android/vcmi-app/src/main/java/eu/vcmi/vcmi/settings/LanguageSettingDialog.java b/android/vcmi-app/src/main/java/eu/vcmi/vcmi/settings/LanguageSettingDialog.java index 98bbcd9b2..aed0a60d3 100644 --- a/android/vcmi-app/src/main/java/eu/vcmi/vcmi/settings/LanguageSettingDialog.java +++ b/android/vcmi-app/src/main/java/eu/vcmi/vcmi/settings/LanguageSettingDialog.java @@ -30,6 +30,7 @@ public class LanguageSettingDialog extends LauncherSettingDialog AVAILABLE_LANGUAGES.add("swedish"); AVAILABLE_LANGUAGES.add("turkish"); AVAILABLE_LANGUAGES.add("ukrainian"); + AVAILABLE_LANGUAGES.add("vietnamese"); AVAILABLE_LANGUAGES.add("other_cp1250"); AVAILABLE_LANGUAGES.add("other_cp1251"); AVAILABLE_LANGUAGES.add("other_cp1252"); From ddfeeb152d5d7833e9cf8e961b0cd42abde5de10 Mon Sep 17 00:00:00 2001 From: heroesiiifan <77574150+heroesiiifan@users.noreply.github.com> Date: Fri, 28 Jul 2023 00:33:42 +0000 Subject: [PATCH 4/6] Update settings.json --- config/schemas/settings.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/schemas/settings.json b/config/schemas/settings.json index ef234a135..ca30b8c02 100644 --- a/config/schemas/settings.json +++ b/config/schemas/settings.json @@ -63,12 +63,12 @@ }, "language" : { "type" : "string", - "enum" : [ "english", "czech", "chinese", "finnish", "french", "german", "hungarian", "italian", "korean", "polish", "portuguese", "russian", "spanish", "swedish", "turkish", "ukrainian" ], + "enum" : [ "english", "czech", "chinese", "finnish", "french", "german", "hungarian", "italian", "korean", "polish", "portuguese", "russian", "spanish", "swedish", "turkish", "ukrainian", "vietnamese" ], "default" : "english" }, "gameDataLanguage" : { "type" : "string", - "enum" : [ "auto", "english", "czech", "chinese", "finnish", "french", "german", "hungarian", "italian", "korean", "polish", "portuguese", "russian", "spanish", "swedish", "turkish", "ukrainian", "other_cp1250", "other_cp1251", "other_cp1252" ], + "enum" : [ "auto", "english", "czech", "chinese", "finnish", "french", "german", "hungarian", "italian", "korean", "polish", "portuguese", "russian", "spanish", "swedish", "turkish", "ukrainian", "vietnamese", "other_cp1250", "other_cp1251", "other_cp1252" ], "default" : "auto" }, "lastSave" : { From 648f7344c792eddd0d2865c493bb6cd121b89287 Mon Sep 17 00:00:00 2001 From: heroesiiifan <77574150+heroesiiifan@users.noreply.github.com> Date: Fri, 28 Jul 2023 00:34:28 +0000 Subject: [PATCH 5/6] Update mod.json --- config/schemas/mod.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/schemas/mod.json b/config/schemas/mod.json index 9c0d5b4e3..2c1fc8501 100644 --- a/config/schemas/mod.json +++ b/config/schemas/mod.json @@ -153,7 +153,7 @@ "language" : { "type" : "string", "description" : "Base language of the mod, before applying localizations. By default vcmi assumes English", - "enum" : [ "czech", "chinese", "english", "finnish", "french", "german", "hungarian", "italian", "korean", "polish", "portuguese", "russian", "spanish", "swedish", "turkish", "ukrainian" ] + "enum" : [ "czech", "chinese", "english", "finnish", "french", "german", "hungarian", "italian", "korean", "polish", "portuguese", "russian", "spanish", "swedish", "turkish", "ukrainian", "vietnamese" ] }, "czech" : { "$ref" : "#/definitions/localizable" @@ -203,6 +203,9 @@ "ukrainian" : { "$ref" : "#/definitions/localizable" }, + "vietnamese" : { + "$ref" : "#/definitions/localizable" + }, "translations" : { "type" : "array", "description" : "List of files with translations for this language", From bee59b3c1c9ccf3ad57cc080330163c7d771a24d Mon Sep 17 00:00:00 2001 From: heroesiiifan <77574150+heroesiiifan@users.noreply.github.com> Date: Fri, 28 Jul 2023 00:48:06 +0000 Subject: [PATCH 6/6] Update Languages.h --- lib/Languages.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Languages.h b/lib/Languages.h index 6bcd7c618..d00ce6ff7 100644 --- a/lib/Languages.h +++ b/lib/Languages.h @@ -63,7 +63,7 @@ struct Options inline const auto & getLanguageList() { - static const std::array languages + static const std::array languages { { { "czech", "Czech", "Čeština", "CP1250", "cs", true }, { "chinese", "Chinese", "简体中文", "GBK", "zh", true }, // Note: actually Simplified Chinese