diff --git a/config/schemas/mod.json b/config/schemas/mod.json index 1d677b38b..4b05a1ce9 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", "french", "german", "italian", "korean", "polish", "russian", "spanish", "ukrainian" ] + "enum" : [ "czech, "chinese", "english", "french", "german", "hungarian", "italian", "korean", "polish", "russian", "spanish", "ukrainian" ] }, "czech" : { "$ref" : "#/definitions/localizable" @@ -170,6 +170,9 @@ "german" : { "$ref" : "#/definitions/localizable" }, + "hungarian" : { + "$ref" : "#/definitions/localizable" + }, "italian" : { "$ref" : "#/definitions/localizable" }, diff --git a/launcher/languages.cpp b/launcher/languages.cpp index 2c3bc2498..8c7174df3 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"), @@ -26,6 +26,7 @@ static const std::array languageTranslatedNamesGenerator = { QT_TRANSLATE_NOOP("Language", "Finnish"), QT_TRANSLATE_NOOP("Language", "French"), QT_TRANSLATE_NOOP("Language", "German"), + QT_TRANSLATE_NOOP("Language", "Hungarian"), QT_TRANSLATE_NOOP("Language", "Italian"), QT_TRANSLATE_NOOP("Language", "Korean"), QT_TRANSLATE_NOOP("Language", "Polish"), diff --git a/lib/Languages.h b/lib/Languages.h index 79724c1d1..ec532b05c 100644 --- a/lib/Languages.h +++ b/lib/Languages.h @@ -20,6 +20,7 @@ enum class ELanguages FINNISH, FRENCH, GERMAN, + HUNGARIAN, ITALIAN, KOREAN, POLISH, @@ -61,7 +62,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 @@ -69,6 +70,7 @@ inline const auto & getLanguageList() { "finnish", "Finnish", "Suomi", "CP1252", "fi", true }, { "french", "French", "Français", "CP1252", "fr", true }, { "german", "German", "Deutsch", "CP1252", "de", true }, + { "hungarian", "Hungarian", "Magyar", "CP1252", "hu", true }, { "italian", "Italian", "Italiano", "CP1250", "it", true }, { "korean", "Korean", "한국어", "CP949", "ko", true }, { "polish", "Polish", "Polski", "CP1250", "pl", true },