1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Added Finnish, Portuguese, Swedish, Turkish languages

This commit is contained in:
Ivan Savenko 2023-06-30 12:53:47 +03:00
parent ca17145575
commit bcc335e0a8
2 changed files with 25 additions and 13 deletions

View File

@ -18,18 +18,22 @@
#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, 14> languageTranslatedNamesGenerator = { static const std::array<std::string, 18> languageTranslatedNamesGenerator = {
{ {
QT_TRANSLATE_NOOP("Language", "Czech"), 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", "Finnish"),
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", "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", "Portuguese"),
QT_TRANSLATE_NOOP("Language", "Russian"), QT_TRANSLATE_NOOP("Language", "Russian"),
QT_TRANSLATE_NOOP("Language", "Spanish"), QT_TRANSLATE_NOOP("Language", "Spanish"),
QT_TRANSLATE_NOOP("Language", "Swedish"),
QT_TRANSLATE_NOOP("Language", "Turkish"),
QT_TRANSLATE_NOOP("Language", "Ukrainian"), QT_TRANSLATE_NOOP("Language", "Ukrainian"),
QT_TRANSLATE_NOOP("Language", "Other (East European)"), QT_TRANSLATE_NOOP("Language", "Other (East European)"),
QT_TRANSLATE_NOOP("Language", "Other (Cyrillic Script)"), QT_TRANSLATE_NOOP("Language", "Other (Cyrillic Script)"),

View File

@ -17,13 +17,17 @@ enum class ELanguages
CZECH, CZECH,
CHINESE, CHINESE,
ENGLISH, ENGLISH,
FINNISH,
FRENCH, FRENCH,
GERMAN, GERMAN,
ITALIAN, ITALIAN,
KOREAN, KOREAN,
POLISH, POLISH,
PORTUGUESE,
RUSSIAN, RUSSIAN,
SPANISH, SPANISH,
SWEDISH,
TURKISH,
UKRAINIAN, UKRAINIAN,
// Pseudo-languages, that have no translations but can define H3 encoding to use // Pseudo-languages, that have no translations but can define H3 encoding to use
@ -57,19 +61,23 @@ struct Options
inline const auto & getLanguageList() inline const auto & getLanguageList()
{ {
static const std::array<Options, 14> languages static const std::array<Options, 18> languages
{ { { {
{ "czech", "Czech", "Čeština", "CP1250", "cs", true }, { "czech", "Czech", "Čeština", "CP1250", "cs", true },
{ "chinese", "Chinese", "简体中文", "GBK", "zh", true }, // Note: actually Simplified Chinese { "chinese", "Chinese", "简体中文", "GBK", "zh", true }, // Note: actually Simplified Chinese
{ "english", "English", "English", "CP1252", "en", true }, { "english", "English", "English", "CP1252", "en", true },
{ "french", "French", "Français", "CP1252", "fr", true }, { "finnish", "Finnish", "Suomi", "CP1252", "fi", true },
{ "german", "German", "Deutsch", "CP1252", "de", true }, { "french", "French", "Français", "CP1252", "fr", true },
{ "italian", "Italian", "Italiano", "CP1250", "it", true }, { "german", "German", "Deutsch", "CP1252", "de", true },
{ "korean", "Korean", "한국어", "CP949", "ko", true }, { "italian", "Italian", "Italiano", "CP1250", "it", true },
{ "polish", "Polish", "Polski", "CP1250", "pl", true }, { "korean", "Korean", "한국어", "CP949", "ko", true },
{ "russian", "Russian", "Русский", "CP1251", "ru", true }, { "polish", "Polish", "Polski", "CP1250", "pl", true },
{ "spanish", "Spanish", "Español", "CP1252", "es", true }, { "portuguese", "Portuguese", "Português", "CP1252", "pt", true }, // Note: actually Brazilian Portuguese
{ "ukrainian", "Ukrainian", "Українська", "CP1251", "uk", true }, { "russian", "Russian", "Русский", "CP1251", "ru", true },
{ "spanish", "Spanish", "Español", "CP1252", "es", true },
{ "swedish", "Swedish", "Svenska", "CP1252", "sv", true },
{ "turkish", "Turkish", "Türkçe", "CP1254", "tr", true },
{ "ukrainian", "Ukrainian", "Українська", "CP1251", "uk", true },
{ "other_cp1250", "Other (East European)", "", "CP1251", "", false }, { "other_cp1250", "Other (East European)", "", "CP1251", "", false },
{ "other_cp1251", "Other (Cyrillic Script)", "", "CP1250", "", false }, { "other_cp1251", "Other (Cyrillic Script)", "", "CP1250", "", false },