mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
Added new languages: Czech, Italian, Korean
This commit is contained in:
parent
aa5a32f9c4
commit
4b366e1fe8
@ -153,7 +153,10 @@
|
|||||||
"language" : {
|
"language" : {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
"description" : "Base language of the mod, before applying localizations. By default vcmi assumes English",
|
"description" : "Base language of the mod, before applying localizations. By default vcmi assumes English",
|
||||||
"enum" : [ "chinese", "english", "korean", "german", "polish", "russian", "spanish", "ukrainian" ]
|
"enum" : [ "czech, "chinese", "english", "french", "german", "italian", "korean", "polish", "russian", "spanish", "ukrainian" ]
|
||||||
|
},
|
||||||
|
"czech" : {
|
||||||
|
"$ref" : "#/definitions/localizable"
|
||||||
},
|
},
|
||||||
"chinese" : {
|
"chinese" : {
|
||||||
"$ref" : "#/definitions/localizable"
|
"$ref" : "#/definitions/localizable"
|
||||||
@ -161,9 +164,15 @@
|
|||||||
"english" : {
|
"english" : {
|
||||||
"$ref" : "#/definitions/localizable"
|
"$ref" : "#/definitions/localizable"
|
||||||
},
|
},
|
||||||
|
"french" : {
|
||||||
|
"$ref" : "#/definitions/localizable"
|
||||||
|
},
|
||||||
"german" : {
|
"german" : {
|
||||||
"$ref" : "#/definitions/localizable"
|
"$ref" : "#/definitions/localizable"
|
||||||
},
|
},
|
||||||
|
"italian" : {
|
||||||
|
"$ref" : "#/definitions/localizable"
|
||||||
|
},
|
||||||
"korean" : {
|
"korean" : {
|
||||||
"$ref" : "#/definitions/localizable"
|
"$ref" : "#/definitions/localizable"
|
||||||
},
|
},
|
||||||
|
@ -58,12 +58,12 @@
|
|||||||
},
|
},
|
||||||
"language" : {
|
"language" : {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
"enum" : [ "english", "chinese", "german", "polish", "russian", "spanish", "ukrainian" ],
|
"enum" : [ "english", "czech", "chinese", "german", "italian", "korean", "polish", "russian", "spanish", "ukrainian" ],
|
||||||
"default" : "english"
|
"default" : "english"
|
||||||
},
|
},
|
||||||
"gameDataLanguage" : {
|
"gameDataLanguage" : {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
"enum" : [ "auto", "english", "chinese", "german", "korean", "polish", "russian", "spanish", "ukrainian", "other_cp1250", "other_cp1251", "other_cp1252" ],
|
"enum" : [ "auto", "english", "czech", "chinese", "german", "italian", "korean", "polish", "russian", "spanish", "ukrainian", "other_cp1250", "other_cp1251", "other_cp1252" ],
|
||||||
"default" : "auto"
|
"default" : "auto"
|
||||||
},
|
},
|
||||||
"lastSave" : {
|
"lastSave" : {
|
||||||
|
@ -18,12 +18,14 @@
|
|||||||
#include <QListWidget>
|
#include <QListWidget>
|
||||||
|
|
||||||
// list of language names, for generation of translations. Do not use directly, use Languages namespace instead
|
// list of language names, for generation of translations. Do not use directly, use Languages namespace instead
|
||||||
static const std::array<std::string, 12> languageTranslatedNamesGenerator = {
|
static const std::array<std::string, 14> languageTranslatedNamesGenerator = {
|
||||||
{
|
{
|
||||||
|
QT_TRANSLATE_NOOP("Language", "Czech"),
|
||||||
QT_TRANSLATE_NOOP("Language", "Chinese"),
|
QT_TRANSLATE_NOOP("Language", "Chinese"),
|
||||||
QT_TRANSLATE_NOOP("Language", "English"),
|
QT_TRANSLATE_NOOP("Language", "English"),
|
||||||
QT_TRANSLATE_NOOP("Language", "French"),
|
QT_TRANSLATE_NOOP("Language", "French"),
|
||||||
QT_TRANSLATE_NOOP("Language", "German"),
|
QT_TRANSLATE_NOOP("Language", "German"),
|
||||||
|
QT_TRANSLATE_NOOP("Language", "Italian"),
|
||||||
QT_TRANSLATE_NOOP("Language", "Korean"),
|
QT_TRANSLATE_NOOP("Language", "Korean"),
|
||||||
QT_TRANSLATE_NOOP("Language", "Polish"),
|
QT_TRANSLATE_NOOP("Language", "Polish"),
|
||||||
QT_TRANSLATE_NOOP("Language", "Russian"),
|
QT_TRANSLATE_NOOP("Language", "Russian"),
|
||||||
|
@ -14,11 +14,13 @@ namespace Languages
|
|||||||
|
|
||||||
enum class ELanguages
|
enum class ELanguages
|
||||||
{
|
{
|
||||||
|
CZECH,
|
||||||
CHINESE,
|
CHINESE,
|
||||||
ENGLISH,
|
ENGLISH,
|
||||||
FRENCH,
|
FRENCH,
|
||||||
GERMAN,
|
GERMAN,
|
||||||
KOREAN, // currently has no translations or detection
|
ITALIAN,
|
||||||
|
KOREAN,
|
||||||
POLISH,
|
POLISH,
|
||||||
RUSSIAN,
|
RUSSIAN,
|
||||||
SPANISH,
|
SPANISH,
|
||||||
@ -49,30 +51,29 @@ struct Options
|
|||||||
/// primary IETF language tag
|
/// primary IETF language tag
|
||||||
std::string tagIETF;
|
std::string tagIETF;
|
||||||
|
|
||||||
/// VCMI is capable of detecting H3 install in this language
|
|
||||||
bool hasDetection = false;
|
|
||||||
|
|
||||||
/// VCMI supports translations into this language
|
/// VCMI supports translations into this language
|
||||||
bool hasTranslation = false;
|
bool hasTranslation = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline const auto & getLanguageList()
|
inline const auto & getLanguageList()
|
||||||
{
|
{
|
||||||
static const std::array<Options, 12> languages
|
static const std::array<Options, 14> languages
|
||||||
{ {
|
{ {
|
||||||
{ "chinese", "Chinese", "简体中文", "GBK", "zh", true, true }, // Note: actually Simplified Chinese
|
{ "czech", "Czech", "Čeština", "CP1250", "cs", true },
|
||||||
{ "english", "English", "English", "CP1252", "en", true, true },
|
{ "chinese", "Chinese", "简体中文", "GBK", "zh", true }, // Note: actually Simplified Chinese
|
||||||
{ "french", "French", "Français", "CP1252", "fr", true, true },
|
{ "english", "English", "English", "CP1252", "en", true },
|
||||||
{ "german", "German", "Deutsch", "CP1252", "de", true, true },
|
{ "french", "French", "Français", "CP1252", "fr", true },
|
||||||
{ "korean", "Korean", "한국어", "CP949", "ko", false, false },
|
{ "german", "German", "Deutsch", "CP1252", "de", true },
|
||||||
{ "polish", "Polish", "Polski", "CP1250", "pl", true, true },
|
{ "italian", "Italian", "Italiano", "CP1250", "it", true },
|
||||||
{ "russian", "Russian", "Русский", "CP1251", "ru", true, true },
|
{ "korean", "Korean", "한국어", "CP949", "ko", true },
|
||||||
{ "spanish", "Spanish", "Español", "CP1252", "es", false, true },
|
{ "polish", "Polish", "Polski", "CP1250", "pl", true },
|
||||||
{ "ukrainian", "Ukrainian", "Українська", "CP1251", "uk", true, true },
|
{ "russian", "Russian", "Русский", "CP1251", "ru", true },
|
||||||
|
{ "spanish", "Spanish", "Español", "CP1252", "es", true },
|
||||||
|
{ "ukrainian", "Ukrainian", "Українська", "CP1251", "uk", true },
|
||||||
|
|
||||||
{ "other_cp1250", "Other (East European)", "", "CP1251", "", false, false },
|
{ "other_cp1250", "Other (East European)", "", "CP1251", "", false },
|
||||||
{ "other_cp1251", "Other (Cyrillic Script)", "", "CP1250", "", false, false },
|
{ "other_cp1251", "Other (Cyrillic Script)", "", "CP1250", "", false },
|
||||||
{ "other_cp1252", "Other (West European)", "", "CP1252", "", false, false }
|
{ "other_cp1252", "Other (West European)", "", "CP1252", "", false }
|
||||||
} };
|
} };
|
||||||
static_assert(languages.size() == static_cast<size_t>(ELanguages::COUNT), "Languages array is missing a value!");
|
static_assert(languages.size() == static_cast<size_t>(ELanguages::COUNT), "Languages array is missing a value!");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user