From d368b2b41bf45b3a3a8a2ab5f8b61fb3dac5b7ea Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sun, 14 Nov 2021 22:20:26 +0200 Subject: 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 --- src/ui/util.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'src') 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, iWidget *makePreferences_Widget(void) { /* Common items. */ - const iMenuItem langItems[] = { { "${lang.cs} - cs", 0, 0, "uilang id:cs" }, - { "${lang.de} - de", 0, 0, "uilang id:de" }, - { "${lang.en} - en", 0, 0, "uilang id:en" }, - { "${lang.es} - es", 0, 0, "uilang id:es" }, - { "${lang.es.mx} - es", 0, 0, "uilang id:es_MX" }, - { "${lang.eo} - eo", 0, 0, "uilang id:eo" }, - { "${lang.fi} - fi", 0, 0, "uilang id:fi" }, - { "${lang.fr} - fr", 0, 0, "uilang id:fr" }, - { "${lang.gl} - gl", 0, 0, "uilang id:gl" }, - { "${lang.hu} - hu", 0, 0, "uilang id:hu" }, - { "${lang.ia} - ia", 0, 0, "uilang id:ia" }, - { "${lang.ie} - ie", 0, 0, "uilang id:ie" }, - { "${lang.isv} - isv", 0, 0, "uilang id:isv" }, - { "${lang.pl} - pl", 0, 0, "uilang id:pl" }, - { "${lang.ru} - ru", 0, 0, "uilang id:ru" }, - { "${lang.sk} - sk", 0, 0, "uilang id:sk" }, - { "${lang.sr} - sr", 0, 0, "uilang id:sr" }, - { "${lang.tok} - tok", 0, 0, "uilang id:tok" }, - { "${lang.uk} - uk", 0, 0, "uilang id:uk" }, - { "${lang.zh.hans} - zh", 0, 0, "uilang id:zh_Hans" }, - { "${lang.zh.hant} - zh", 0, 0, "uilang id:zh_Hant" }, + const iMenuItem langItems[] = { { u8"Čeština - cs", 0, 0, "uilang id:cs" }, + { u8"Deutsch - de", 0, 0, "uilang id:de" }, + { u8"English - en", 0, 0, "uilang id:en" }, + { u8"Español - es", 0, 0, "uilang id:es" }, + { u8"Español (México) - es", 0, 0, "uilang id:es_MX" }, + { u8"Esperanto - eo", 0, 0, "uilang id:eo" }, + { u8"Suomi - fi", 0, 0, "uilang id:fi" }, + { u8"Français - fr", 0, 0, "uilang id:fr" }, + { u8"Galego - gl", 0, 0, "uilang id:gl" }, + { u8"Magyar - hu", 0, 0, "uilang id:hu" }, + { u8"Interlingua - ia", 0, 0, "uilang id:ia" }, + { u8"Interlingue - ie", 0, 0, "uilang id:ie" }, + { u8"Interslavic - isv", 0, 0, "uilang id:isv" }, + { u8"Polski - pl", 0, 0, "uilang id:pl" }, + { u8"Русский - ru", 0, 0, "uilang id:ru" }, + { u8"Slovak - sk", 0, 0, "uilang id:sk" }, + { u8"Српски - sr", 0, 0, "uilang id:sr" }, + { u8"Toki pona - tok", 0, 0, "uilang id:tok" }, + { u8"Українська - uk", 0, 0, "uilang id:uk" }, + { u8"简体中文 - zh", 0, 0, "uilang id:zh_Hans" }, + { u8"繁體/正體中文 - zh", 0, 0, "uilang id:zh_Hant" }, { NULL } }; const iMenuItem returnKeyBehaviors[] = { { "${prefs.returnkey.linebreak} " uiTextAction_ColorEscape shift_Icon return_Icon -- cgit v1.2.3