mirror of https://github.com/vector-im/riot-web
s/tabs/spaces/
parent
f412552c2c
commit
a95f3252b8
|
@ -43,16 +43,16 @@ export default class LanguageDropdown extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
const languageKeys = SdkConfig.get().languages;
|
const languageKeys = SdkConfig.get().languages;
|
||||||
|
|
||||||
// Build const LANGUAGES in a way that counterpart allows translation inside object:
|
// Build const LANGUAGES in a way that counterpart allows translation inside object:
|
||||||
languageKeys.forEach(function(languageKey) {
|
languageKeys.forEach(function(languageKey) {
|
||||||
var l = {};
|
var l = {};
|
||||||
l.id = "language";
|
l.id = "language";
|
||||||
l.label = _t(languageKey);
|
l.label = _t(languageKey);
|
||||||
l.value = languageKey;
|
l.value = languageKey;
|
||||||
LANGUAGES.push(l);
|
LANGUAGES.push(l);
|
||||||
});
|
});
|
||||||
|
|
||||||
LANGUAGES = LANGUAGES.sort(function(a, b){
|
LANGUAGES = LANGUAGES.sort(function(a, b){
|
||||||
if(a.label < b.label) return -1;
|
if(a.label < b.label) return -1;
|
||||||
|
@ -60,9 +60,9 @@ export default class LanguageDropdown extends React.Component {
|
||||||
return 0;
|
return 0;
|
||||||
})
|
})
|
||||||
|
|
||||||
for (const l of LANGUAGES) {
|
for (const l of LANGUAGES) {
|
||||||
LANGUAGES_BY_VALUE[l.value] = l;
|
LANGUAGES_BY_VALUE[l.value] = l;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!this.props.value) {
|
if (!this.props.value) {
|
||||||
|
|
Loading…
Reference in New Issue