[pve-devel] [PATCH pve-widget-toolkit 1/2] Translated language dropdown menu in web interface

Noel Ullreich n.ullreich at proxmox.com
Thu Mar 23 15:44:24 CET 2023


Translated the languages in the web interface dropdown menu. Languages
used to be in English, now they are in their native language and
writing system along with their translation in the currently selected
language.

Signed-off-by: Noel Ullreich <n.ullreich at proxmox.com>
---
 src/Utils.js | 50 +++++++++++++++++++++++++-------------------------
 1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/src/Utils.js b/src/Utils.js
index 7b7a83a..3510590 100644
--- a/src/Utils.js
+++ b/src/Utils.js
@@ -62,31 +62,31 @@ utilities: {
     stateText: gettext('State'),
     groupText: gettext('Group'),
 
-    language_map: {
-	ar: 'Arabic',
-	ca: 'Catalan',
-	zh_CN: 'Chinese (Simplified)',
-	zh_TW: 'Chinese (Traditional)',
-	da: 'Danish',
-	nl: 'Dutch',
-	en: 'English',
-	eu: 'Euskera (Basque)',
-	fr: 'French',
-	de: 'German',
-	he: 'Hebrew',
-	it: 'Italian',
-	ja: 'Japanese',
-	kr: 'Korean',
-	nb: 'Norwegian (Bokmal)',
-	nn: 'Norwegian (Nynorsk)',
-	fa: 'Persian (Farsi)',
-	pl: 'Polish',
-	pt_BR: 'Portuguese (Brazil)',
-	ru: 'Russian',
-	sl: 'Slovenian',
-	es: 'Spanish',
-	sv: 'Swedish',
-	tr: 'Turkish',
+    language_map: { //language map is sorted alphabetically by iso 639-1
+	ar: 'العربية - '+gettext("Arabic"),
+	ca: 'Català - '+gettext("Catalan"),
+	da: 'Dansk - '+gettext("Danish"),
+	de: 'Deutsch - '+gettext("German"),
+	en: 'English - '+gettext("English"),
+	es: 'Español - '+gettext("Spanish"),
+	eu: 'Euskera (Basque) - '+gettext("Euskera (Basque)"),
+	fa: 'فارسی - '+gettext("Persian (Farsi)"),
+	fr: 'Français - '+gettext("French"),
+	he: 'עברית - '+gettext("Hebrew"),
+	it: 'Italiano - '+gettext("Italian"),
+	ja: '日本語 - '+gettext("Japanese"),
+	kr: '한국어 - '+gettext("Korean"),
+	nb: 'Bokmål - '+gettext("Norwegian (Bokmal)"),
+	nl: 'Nederlands - '+gettext("Dutch"),
+	nn: 'Nynorsk - '+gettext("Norwegian (Nynorsk)"),
+	pl: 'Polski - '+gettext("Polish"),
+	pt_BR: 'Português Brasileiro - '+gettext("Portuguese (Brazil)"),
+	ru: 'Русский - '+gettext("Russian"),
+	sl: 'Slovenščina - '+gettext("Slovenian"),
+	sv: 'Svenska - '+gettext("Swedish"),
+	tr: 'Türkçe - '+gettext("Turkish"),
+	zh_CN: '中文(简体) - '+gettext("Chinese (Simplified)"),
+	zh_TW: '中文(繁體) - '+gettext("Chinese (Traditional)"),
     },
 
     render_language: function(value) {
-- 
2.30.2






More information about the pve-devel mailing list