From 1a43dbe1fee9ef92478fc8e361326a2aab4c6c92 Mon Sep 17 00:00:00 2001 From: Quincy Morgan <2046746+quincylvania@users.noreply.github.com> Date: Fri, 6 Nov 2020 17:36:32 -0500 Subject: [PATCH] Use the actual dropdown label for the localized name language input label (re: #8165) --- modules/ui/fields/localized.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/ui/fields/localized.js b/modules/ui/fields/localized.js index fd50fd209..9126aad8f 100644 --- a/modules/ui/fields/localized.js +++ b/modules/ui/fields/localized.js @@ -567,7 +567,11 @@ export function uiFieldLocalized(field, context) { }); utilGetSetValue(entries.select('.localized-lang'), function(d) { - return localizer.languageName(d.lang); + var langItem = _languagesArray.find(function(item) { + return item.code === d.lang; + }); + if (langItem) return langItem.label; + return d.lang; }); utilGetSetValue(entries.select('.localized-value'), function(d) {