diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-11-14 22:20:26 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-11-14 22:20:26 +0200 |
commit | d368b2b41bf45b3a3a8a2ab5f8b61fb3dac5b7ea (patch) | |
tree | f1390e1fd47f044ba5a94069756875cc110c765a /src/ui/util.c | |
parent | 7de74d5ed0b1424defcbe41342f6c544f0a813a2 (diff) |
Localized language names in Preferences
Each dropdown item now uses its own language. This avoids the need to translate all language names to every language, and also helps the user to find the language(s) they understand.
The name strings are incorporated as C11 u8"" string literals, which hopefully won't cause compatibility issues as the_Foundation already requires C11.
Note that the Translation dialog retains the localized language labels because the user may not speak the source language, so they need to see it in their own language.
IssueID #391
Diffstat (limited to 'src/ui/util.c')
-rw-r--r-- | src/ui/util.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/ui/util.c b/src/ui/util.c index 88348ff8..2624bf2b 100644 --- a/src/ui/util.c +++ b/src/ui/util.c | |||
@@ -2199,27 +2199,27 @@ iWidget *makeDialog_Widget(const char *id, | |||
2199 | 2199 | ||
2200 | iWidget *makePreferences_Widget(void) { | 2200 | iWidget *makePreferences_Widget(void) { |
2201 | /* Common items. */ | 2201 | /* Common items. */ |
2202 | const iMenuItem langItems[] = { { "${lang.cs} - cs", 0, 0, "uilang id:cs" }, | 2202 | const iMenuItem langItems[] = { { u8"Čeština - cs", 0, 0, "uilang id:cs" }, |
2203 | { "${lang.de} - de", 0, 0, "uilang id:de" }, | 2203 | { u8"Deutsch - de", 0, 0, "uilang id:de" }, |
2204 | { "${lang.en} - en", 0, 0, "uilang id:en" }, | 2204 | { u8"English - en", 0, 0, "uilang id:en" }, |
2205 | { "${lang.es} - es", 0, 0, "uilang id:es" }, | 2205 | { u8"Español - es", 0, 0, "uilang id:es" }, |
2206 | { "${lang.es.mx} - es", 0, 0, "uilang id:es_MX" }, | 2206 | { u8"Español (México) - es", 0, 0, "uilang id:es_MX" }, |
2207 | { "${lang.eo} - eo", 0, 0, "uilang id:eo" }, | 2207 | { u8"Esperanto - eo", 0, 0, "uilang id:eo" }, |
2208 | { "${lang.fi} - fi", 0, 0, "uilang id:fi" }, | 2208 | { u8"Suomi - fi", 0, 0, "uilang id:fi" }, |
2209 | { "${lang.fr} - fr", 0, 0, "uilang id:fr" }, | 2209 | { u8"Français - fr", 0, 0, "uilang id:fr" }, |
2210 | { "${lang.gl} - gl", 0, 0, "uilang id:gl" }, | 2210 | { u8"Galego - gl", 0, 0, "uilang id:gl" }, |
2211 | { "${lang.hu} - hu", 0, 0, "uilang id:hu" }, | 2211 | { u8"Magyar - hu", 0, 0, "uilang id:hu" }, |
2212 | { "${lang.ia} - ia", 0, 0, "uilang id:ia" }, | 2212 | { u8"Interlingua - ia", 0, 0, "uilang id:ia" }, |
2213 | { "${lang.ie} - ie", 0, 0, "uilang id:ie" }, | 2213 | { u8"Interlingue - ie", 0, 0, "uilang id:ie" }, |
2214 | { "${lang.isv} - isv", 0, 0, "uilang id:isv" }, | 2214 | { u8"Interslavic - isv", 0, 0, "uilang id:isv" }, |
2215 | { "${lang.pl} - pl", 0, 0, "uilang id:pl" }, | 2215 | { u8"Polski - pl", 0, 0, "uilang id:pl" }, |
2216 | { "${lang.ru} - ru", 0, 0, "uilang id:ru" }, | 2216 | { u8"Русский - ru", 0, 0, "uilang id:ru" }, |
2217 | { "${lang.sk} - sk", 0, 0, "uilang id:sk" }, | 2217 | { u8"Slovak - sk", 0, 0, "uilang id:sk" }, |
2218 | { "${lang.sr} - sr", 0, 0, "uilang id:sr" }, | 2218 | { u8"Српски - sr", 0, 0, "uilang id:sr" }, |
2219 | { "${lang.tok} - tok", 0, 0, "uilang id:tok" }, | 2219 | { u8"Toki pona - tok", 0, 0, "uilang id:tok" }, |
2220 | { "${lang.uk} - uk", 0, 0, "uilang id:uk" }, | 2220 | { u8"Українська - uk", 0, 0, "uilang id:uk" }, |
2221 | { "${lang.zh.hans} - zh", 0, 0, "uilang id:zh_Hans" }, | 2221 | { u8"简体中文 - zh", 0, 0, "uilang id:zh_Hans" }, |
2222 | { "${lang.zh.hant} - zh", 0, 0, "uilang id:zh_Hant" }, | 2222 | { u8"繁體/正體中文 - zh", 0, 0, "uilang id:zh_Hant" }, |
2223 | { NULL } }; | 2223 | { NULL } }; |
2224 | const iMenuItem returnKeyBehaviors[] = { | 2224 | const iMenuItem returnKeyBehaviors[] = { |
2225 | { "${prefs.returnkey.linebreak} " uiTextAction_ColorEscape shift_Icon return_Icon | 2225 | { "${prefs.returnkey.linebreak} " uiTextAction_ColorEscape shift_Icon return_Icon |