From 0875578d5147fbeecf5b62f3f71f762d9d57b430 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Tue, 23 Mar 2021 21:47:13 +0200 Subject: Lang: Added Russian to resources IssueID #192 --- CMakeLists.txt | 1 + res/lang/ru.bin | Bin 6172 -> 12959 bytes src/lang.c | 4 +++- src/ui/util.c | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1af98fef..429efb4e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,6 +75,7 @@ set (EMBED_RESOURCES res/fonts/Symbola.ttf res/lang/en.bin res/lang/fi.bin + res/lang/ru.bin res/shadow.png ) if ((UNIX AND NOT APPLE) OR MSYS) diff --git a/res/lang/ru.bin b/res/lang/ru.bin index 4e9bb058..3ac97a94 100644 Binary files a/res/lang/ru.bin and b/res/lang/ru.bin differ diff --git a/src/lang.c b/src/lang.c index db28e318..f85d193a 100644 --- a/src/lang.c +++ b/src/lang.c @@ -32,7 +32,9 @@ static void clear_Lang_(iLang *d) { static void load_Lang_(iLang *d, const char *id) { /* Load compiled language strings from an embedded blob. */ iUnused(id); - const iBlock *data = equal_CStr(id, "fi") ? &blobFi_Embedded : &blobEn_Embedded; + const iBlock *data = equal_CStr(id, "fi") ? &blobFi_Embedded + : equal_CStr(id, "ru") ? &blobRu_Embedded + : &blobEn_Embedded; iMsgStr msg; for (const char *ptr = constBegin_Block(data); ptr != constEnd_Block(data); ptr++) { msg.id.start = ptr; diff --git a/src/ui/util.c b/src/ui/util.c index 8c0b0138..d61601f5 100644 --- a/src/ui/util.c +++ b/src/ui/util.c @@ -1830,6 +1830,7 @@ iWidget *makePreferences_Widget(void) { const iMenuItem langItems[] = { { "${lang.en}", 0, 0, "uilang id:en" }, { "${lang.fi}", 0, 0, "uilang id:fi" }, + //{ "${lang.ru}", 0, 0, "uilang id:ru" }, }; pushBackN_Array(uiLangs, langItems, iElemCount(langItems)); sort_Array(uiLangs, cmp_MenuItem_); -- cgit v1.2.3