It looks like the issue is more deep rooted and requires further changes.
{{combo-box valueAttribute="value" content=availableLocales value=model.locale none="user.locale.default"}}
This populates data from the availableLocales
which is defined like this:
availableLocales() {
return this.siteSettings.available_locales.split('|').map(s => ({ name: s, value: s }));
}
Which is a pipe separated string of language values.
pry(main)> SiteSetting.available_locales
=> "ar|bs_BA|cs|da|de|en|es|et|fa_IR|fi|fr|gl|he|id|it|ja|ko|nb_NO|nl|pl_PL|pt|pt_BR|ro|ru|sk|sq|sv|te|tr_TR|uk|vi|zh_CN|zh_TW"
Because it is generated like this:
def self.available_locales
LocaleSiteSetting.values.map{ |e| e[:value] }.join('|')
end
On the the names and values both were available, but only values were pushed in the client_settings
.
pry(main)> LocaleSiteSetting.values
=> [{:name=>"اللغة العربية", :value=>"ar"},
{:name=>"bosanski jezik", :value=>"bs_BA"},
{:name=>"čeština", :value=>"cs"},
{:name=>"dansk", :value=>"da"},
{:name=>"Deutsch", :value=>"de"},
{:name=>"English", :value=>"en"},
{:name=>"Español", :value=>"es"},
{:name=>"eesti", :value=>"et"},
{:name=>"فارسی", :value=>"fa_IR"},
{:name=>"suomi", :value=>"fi"},
{:name=>"Français", :value=>"fr"},
{:name=>"galego", :value=>"gl"},
{:name=>"עברית", :value=>"he"},
{:name=>"Indonesian", :value=>"id"},
{:name=>"Italiano", :value=>"it"},
{:name=>"日本語", :value=>"ja"},
{:name=>"한국어", :value=>"ko"},
{:name=>"Norsk bokmål", :value=>"nb_NO"},
{:name=>"Nederlands", :value=>"nl"},
{:name=>"język polski", :value=>"pl_PL"},
{:name=>"Português", :value=>"pt"},
{:name=>"Português (BR)", :value=>"pt_BR"},
{:name=>"limba română", :value=>"ro"},
{:name=>"Русский", :value=>"ru"},
{:name=>"slovenčina", :value=>"sk"},
{:name=>"Shqip", :value=>"sq"},
{:name=>"svenska", :value=>"sv"},
{:name=>"తెలుగు", :value=>"te"},
{:name=>"Türkçe", :value=>"tr_TR"},
{:name=>"українська мова", :value=>"uk"},
{:name=>"Việt Nam", :value=>"vi"},
{:name=>"中文", :value=>"zh_CN"},
{:name=>"中文 (TW)", :value=>"zh_TW"}]