summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-03-25 14:05:32 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-03-25 14:05:32 +0200
commit6197186db8824bf95b2f0b9412b473c759bba90f (patch)
tree2a6582b229876899545055b81a3b47562febb6f1
parent70a3d7ceefa8005c8a7e75979fd23ef18755a0f4 (diff)
Preferences: Revised language selection dropdown
Visible IDs since the language names are also localized.
-rw-r--r--po/en.po3
-rw-r--r--res/lang/en.binbin15487 -> 15521 bytes
-rw-r--r--src/ui/util.c14
3 files changed, 10 insertions, 7 deletions
diff --git a/po/en.po b/po/en.po
index c580d059..d8c13619 100644
--- a/po/en.po
+++ b/po/en.po
@@ -663,6 +663,9 @@ msgstr "Arabic"
663msgid "lang.zh" 663msgid "lang.zh"
664msgstr "Chinese" 664msgstr "Chinese"
665 665
666msgid "lang.zh.hans"
667msgstr "Chinese (Simplified)"
668
666msgid "lang.en" 669msgid "lang.en"
667msgstr "English" 670msgstr "English"
668 671
diff --git a/res/lang/en.bin b/res/lang/en.bin
index 427ce70b..6d3df947 100644
--- a/res/lang/en.bin
+++ b/res/lang/en.bin
Binary files differ
diff --git a/src/ui/util.c b/src/ui/util.c
index 61f09924..51696287 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -1828,14 +1828,14 @@ 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} (en)", 0, 0, "uilang id:en" }, 1831 { "${lang.de} - " uiTextAction_ColorEscape "de", 0, 0, "uilang id:de" },
1832 { "${lang.fi} (fi)", 0, 0, "uilang id:fi" }, 1832 { "${lang.en} - " uiTextAction_ColorEscape "en", 0, 0, "uilang id:en" },
1833 { "${lang.ru} (ru)", 0, 0, "uilang id:ru" }, 1833 { "${lang.fi} - " uiTextAction_ColorEscape "fi", 0, 0, "uilang id:fi" },
1834 { "${lang.de} (de)", 0, 0, "uilang id:de" }, 1834 { "${lang.ru} - " uiTextAction_ColorEscape "ru", 0, 0, "uilang id:ru" },
1835 { "${lang.zh_Hans} (zh_Hans)", 0, 0, "uilang id:zh_Hans" }, 1835 { "${lang.zh.hans} - " uiTextAction_ColorEscape "zh_Hans", 0, 0, "uilang id:zh_Hans" },
1836 }; 1836 };
1837 pushBackN_Array(uiLangs, langItems, iElemCount(langItems)); 1837 pushBackN_Array(uiLangs, langItems, iElemCount(langItems));
1838 sort_Array(uiLangs, cmp_MenuItem_); 1838 //sort_Array(uiLangs, cmp_MenuItem_);
1839 /* TODO: Add an arrange flag for resizing parent to widest child. */ 1839 /* TODO: Add an arrange flag for resizing parent to widest child. */
1840 int widest = 0; 1840 int widest = 0;
1841 size_t widestPos = iInvalidPos; 1841 size_t widestPos = iInvalidPos;
@@ -1855,7 +1855,7 @@ iWidget *makePreferences_Widget(void) {
1855 value_Array(uiLangs, widestPos, iMenuItem).label, 1855 value_Array(uiLangs, widestPos, iMenuItem).label,
1856 data_Array(uiLangs), 1856 data_Array(uiLangs),
1857 size_Array(uiLangs))), 1857 size_Array(uiLangs))),
1858 0), 1858 alignLeft_WidgetFlag),
1859 "prefs.uilang"); 1859 "prefs.uilang");
1860 } 1860 }
1861#if defined (iPlatformApple) || defined (iPlatformMSys) 1861#if defined (iPlatformApple) || defined (iPlatformMSys)