summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-03-25 09:21:42 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-03-25 09:21:42 +0200
commitd6ea59b310cdc072c33cd638c904cacb164eb2bb (patch)
treef3e12e7bd5016dfc252ba7b1d78d5c33add46794 /src
parentd68479867961dc4f6c3b06fcbd34c259974ffae5 (diff)
Lang: Added Chinese (Simplified)
IssueID #192
Diffstat (limited to 'src')
-rw-r--r--src/lang.c15
-rw-r--r--src/ui/util.c9
2 files changed, 13 insertions, 11 deletions
diff --git a/src/lang.c b/src/lang.c
index 5399d97b..50c9b78f 100644
--- a/src/lang.c
+++ b/src/lang.c
@@ -52,16 +52,17 @@ static void clear_Lang_(iLang *d) {
52static void load_Lang_(iLang *d, const char *id) { 52static void load_Lang_(iLang *d, const char *id) {
53 /* Load compiled language strings from an embedded blob. */ 53 /* Load compiled language strings from an embedded blob. */
54 iUnused(id); 54 iUnused(id);
55 const iBlock *data = equal_CStr(id, "fi") ? &blobFi_Embedded 55 const iBlock *data = equal_CStr(id, "fi") ? &blobFi_Embedded
56 : equal_CStr(id, "ru") ? &blobRu_Embedded 56 : equal_CStr(id, "ru") ? &blobRu_Embedded
57 : equal_CStr(id, "de") ? &blobDe_Embedded 57 : equal_CStr(id, "de") ? &blobDe_Embedded
58 : &blobEn_Embedded; 58 : equal_CStr(id, "zh_Hans") ? &blobZh_Hans_Embedded
59 : &blobEn_Embedded;
59 if (data == &blobRu_Embedded) { 60 if (data == &blobRu_Embedded) {
60 d->pluralType = slavic_PluralType; 61 d->pluralType = slavic_PluralType;
61 } 62 }
62// else if (data == &blobZhHans_Embedded) { 63 else if (data == &blobZh_Hans_Embedded) {
63// d->pluralType = none_PluralType; 64 d->pluralType = none_PluralType;
64// } 65 }
65 else { 66 else {
66 d->pluralType = notEqualToOne_PluralType; 67 d->pluralType = notEqualToOne_PluralType;
67 } 68 }
diff --git a/src/ui/util.c b/src/ui/util.c
index 70795686..61f09924 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -1828,10 +1828,11 @@ iWidget *makePreferences_Widget(void) {
1828 /* UI languages. */ { 1828 /* UI languages. */ {
1829 iArray *uiLangs = collectNew_Array(sizeof(iMenuItem)); 1829 iArray *uiLangs = collectNew_Array(sizeof(iMenuItem));
1830 const iMenuItem langItems[] = { 1830 const iMenuItem langItems[] = {
1831 { "${lang.en}", 0, 0, "uilang id:en" }, 1831 { "${lang.en} (en)", 0, 0, "uilang id:en" },
1832 { "${lang.fi}", 0, 0, "uilang id:fi" }, 1832 { "${lang.fi} (fi)", 0, 0, "uilang id:fi" },
1833 { "${lang.ru}", 0, 0, "uilang id:ru" }, 1833 { "${lang.ru} (ru)", 0, 0, "uilang id:ru" },
1834 { "${lang.de}", 0, 0, "uilang id:de" }, 1834 { "${lang.de} (de)", 0, 0, "uilang id:de" },
1835 { "${lang.zh_Hans} (zh_Hans)", 0, 0, "uilang id:zh_Hans" },
1835 }; 1836 };
1836 pushBackN_Array(uiLangs, langItems, iElemCount(langItems)); 1837 pushBackN_Array(uiLangs, langItems, iElemCount(langItems));
1837 sort_Array(uiLangs, cmp_MenuItem_); 1838 sort_Array(uiLangs, cmp_MenuItem_);