mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Merge pull request #2435 from heroesiiifan/patch-4
Vietnamese language support
This commit is contained in:
commit
5caf987894
@ -30,6 +30,7 @@ public class LanguageSettingDialog extends LauncherSettingDialog<String>
|
||||
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");
|
||||
|
@ -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",
|
||||
|
@ -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" : {
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <QListWidget>
|
||||
|
||||
// list of language names, for generation of translations. Do not use directly, use Languages namespace instead
|
||||
static const std::array<std::string, 19> languageTranslatedNamesGenerator = {
|
||||
static const std::array<std::string, 20> languageTranslatedNamesGenerator = {
|
||||
{
|
||||
QT_TRANSLATE_NOOP("Language", "Czech"),
|
||||
QT_TRANSLATE_NOOP("Language", "Chinese"),
|
||||
@ -36,6 +36,7 @@ static const std::array<std::string, 19> 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)"),
|
||||
|
@ -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,
|
||||
@ -62,7 +63,7 @@ struct Options
|
||||
|
||||
inline const auto & getLanguageList()
|
||||
{
|
||||
static const std::array<Options, 19> languages
|
||||
static const std::array<Options, 20> languages
|
||||
{ {
|
||||
{ "czech", "Czech", "Čeština", "CP1250", "cs", true },
|
||||
{ "chinese", "Chinese", "简体中文", "GBK", "zh", true }, // Note: actually Simplified Chinese
|
||||
@ -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 },
|
||||
|
Loading…
Reference in New Issue
Block a user