From ea5282f50870b14b978d315142798ff17614cd26 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Sat, 26 Sep 2015 20:17:32 +0200 Subject: [PATCH 1/3] Add support for Russian --- src/localisation/language.cpp | 12 ++++++++++-- src/localisation/language.h | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/localisation/language.cpp b/src/localisation/language.cpp index eba6a6af0f..678d178e46 100644 --- a/src/localisation/language.cpp +++ b/src/localisation/language.cpp @@ -61,12 +61,19 @@ static TTFFontSetDescriptor TTFFontSimSun = {{ { "simsun.ttc", 13, 1, 0, 20, nullptr }, }}; -static TTFFontSetDescriptor TTFFontMalgun = { { +static TTFFontSetDescriptor TTFFontMalgun = {{ { "malgun.ttf", 8, -1, -3, 6, nullptr }, { "malgun.ttf", 11, 1, -2, 14, nullptr }, { "malgun.ttf", 12, 1, -4, 14, nullptr }, { "malgun.ttf", 13, 1, 0, 20, nullptr }, -} }; +}}; + +static TTFFontSetDescriptor TTFFontArial = {{ + { "arial.ttf", 8, -1, -3, 6, nullptr }, + { "arial.ttf", 11, 1, -2, 14, nullptr }, + { "arial.ttf", 12, 1, -4, 14, nullptr }, + { "arial.ttf", 13, 1, 0, 20, nullptr }, +}}; const language_descriptor LanguagesDescriptors[LANGUAGE_COUNT] = { { "", "", "", "", FONT_OPENRCT2_SPRITE, RCT2_LANGUAGE_ID_ENGLISH_UK }, // LANGUAGE_UNDEFINED @@ -85,6 +92,7 @@ const language_descriptor LanguagesDescriptors[LANGUAGE_COUNT] = { { "zh-Hans", "Chinese (Simplified)", "Chinese (Simplified)", "chinese_simplified", &TTFFontSimSun, RCT2_LANGUAGE_ID_CHINESE_SIMPLIFIED }, // LANGUAGE_CHINESE_SIMPLIFIED { "fi-FI", "Finnish", "Suomi", "finnish", FONT_OPENRCT2_SPRITE, RCT2_LANGUAGE_ID_ENGLISH_UK }, // LANGUAGE_FINNISH { "kr-KR", "Korean", "Korean", "korean", &TTFFontMalgun, RCT2_LANGUAGE_ID_KOREAN }, // LANGUAGE_KOREAN + { "ru-RU", "Russian", "ру́сский язы́к", "russian", &TTFFontArial, RCT2_LANGUAGE_ID_ENGLISH_UK }, // LANGUAGE_RUSSIAN }; int gCurrentLanguage = LANGUAGE_UNDEFINED; diff --git a/src/localisation/language.h b/src/localisation/language.h index 4b76850447..9dbb1ff889 100644 --- a/src/localisation/language.h +++ b/src/localisation/language.h @@ -41,6 +41,7 @@ enum { LANGUAGE_CHINESE_SIMPLIFIED, LANGUAGE_FINNISH, LANGUAGE_KOREAN, + LANUGAGE_RUSSIAN, LANGUAGE_COUNT }; From b7a09cca0c1de89f2d24c301b972514d8c63c652 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Sun, 8 Nov 2015 12:26:49 +0100 Subject: [PATCH 2/3] Adjust Arial placement and sizes --- src/localisation/language.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/localisation/language.cpp b/src/localisation/language.cpp index 678d178e46..4ed859df83 100644 --- a/src/localisation/language.cpp +++ b/src/localisation/language.cpp @@ -69,10 +69,10 @@ static TTFFontSetDescriptor TTFFontMalgun = {{ }}; static TTFFontSetDescriptor TTFFontArial = {{ - { "arial.ttf", 8, -1, -3, 6, nullptr }, - { "arial.ttf", 11, 1, -2, 14, nullptr }, - { "arial.ttf", 12, 1, -4, 14, nullptr }, - { "arial.ttf", 13, 1, 0, 20, nullptr }, + { "arial.ttf", 8, 0, -1, 6, nullptr }, + { "arial.ttf", 10, 0, -1, 12, nullptr }, + { "arial.ttf", 11, 0, -1, 12, nullptr }, + { "arial.ttf", 12, 0, -1, 20, nullptr }, }}; const language_descriptor LanguagesDescriptors[LANGUAGE_COUNT] = { @@ -87,12 +87,12 @@ const language_descriptor LanguagesDescriptors[LANGUAGE_COUNT] = { { "es-ES", "Spanish", "Espa\xC3\xB1ol", "spanish_sp", FONT_OPENRCT2_SPRITE, RCT2_LANGUAGE_ID_SPANISH }, // LANGUAGE_SPANISH { "sv-SE", "Swedish", "Svenska", "swedish", FONT_OPENRCT2_SPRITE, RCT2_LANGUAGE_ID_SWEDISH }, // LANGUAGE_SWEDISH { "it-IT", "Italian", "Italiano", "italian", FONT_OPENRCT2_SPRITE, RCT2_LANGUAGE_ID_ITALIAN }, // LANGUAGE_ITALIAN - { "pt-BR", "Portuguese (BR)", "Portugu\xC3\xAAs (BR)", "portuguese_br", FONT_OPENRCT2_SPRITE, RCT2_LANGUAGE_ID_PORTUGUESE }, // LANGUAGE_PORTUGUESE_BR + { "pt-BR", "Portuguese (BR)", "Portugu\xC3\xAAs (BR)", "portuguese_br", FONT_OPENRCT2_SPRITE, RCT2_LANGUAGE_ID_PORTUGUESE }, // LANGUAGE_PORTUGUESE_BR { "zh-Hant", "Chinese (Traditional)", "Chinese (Traditional)", "chinese_traditional", &TTFFontMingLiu, RCT2_LANGUAGE_ID_CHINESE_TRADITIONAL }, // LANGUAGE_CHINESE_TRADITIONAL { "zh-Hans", "Chinese (Simplified)", "Chinese (Simplified)", "chinese_simplified", &TTFFontSimSun, RCT2_LANGUAGE_ID_CHINESE_SIMPLIFIED }, // LANGUAGE_CHINESE_SIMPLIFIED { "fi-FI", "Finnish", "Suomi", "finnish", FONT_OPENRCT2_SPRITE, RCT2_LANGUAGE_ID_ENGLISH_UK }, // LANGUAGE_FINNISH { "kr-KR", "Korean", "Korean", "korean", &TTFFontMalgun, RCT2_LANGUAGE_ID_KOREAN }, // LANGUAGE_KOREAN - { "ru-RU", "Russian", "ру́сский язы́к", "russian", &TTFFontArial, RCT2_LANGUAGE_ID_ENGLISH_UK }, // LANGUAGE_RUSSIAN + { "ru-RU", "Russian", "Russian", "russian", &TTFFontArial, RCT2_LANGUAGE_ID_ENGLISH_UK }, // LANGUAGE_RUSSIAN }; int gCurrentLanguage = LANGUAGE_UNDEFINED; From 6413052cbb6cf56f706e11f9a0b20862692b4e38 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Sun, 8 Nov 2015 12:49:25 +0100 Subject: [PATCH 3/3] Use language codes for Korean and Russian --- src/config.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/config.c b/src/config.c index 40e83036fa..11a5175fe2 100644 --- a/src/config.c +++ b/src/config.c @@ -142,6 +142,8 @@ config_enum_definition _languageEnum[] = { { "zh-Hant", LANGUAGE_CHINESE_TRADITIONAL }, { "zh-Hans", LANGUAGE_CHINESE_SIMPLIFIED }, { "fi-FI", LANGUAGE_FINNISH }, + { "ko", LANGUAGE_KOREAN }, + { "ru-RU", LANUGAGE_RUSSIAN }, END_OF_ENUM };