display language name in user locale selector - make it consistent with admin (#5424)

This commit is contained in:
Maja Komel 2017-12-13 22:17:36 +01:00 committed by Sam
parent 1b4483c942
commit 0f4ed2e070
2 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ export default Ember.Controller.extend(PreferencesTabController, {
@computed()
availableLocales() {
return this.siteSettings.available_locales.split('|').map(s => ({ name: s, value: s }));
return JSON.parse(this.siteSettings.available_locales);
},
@computed()

View File

@ -30,7 +30,7 @@ class SiteSetting < ActiveRecord::Base
client_settings << :available_locales
def self.available_locales
LocaleSiteSetting.values.map { |e| e[:value] }.join('|')
LocaleSiteSetting.values.to_json
end
def self.topic_title_length