Don't inject languages into the config
If we're defaulting this it should really be by the component itself or with the other defaukts in SdkConfig, but we've decided to leave out support for reading languages from the config file as it's only useful for a Riot admin to restrict the choice of languages available to users which is of debateable use.
This commit is contained in:
parent
ff1567ed2a
commit
d5425b62a1
1 changed files with 1 additions and 12 deletions
|
@ -65,7 +65,7 @@ var UpdateChecker = require("./updater");
|
|||
var q = require('q');
|
||||
var request = require('browser-request');
|
||||
import * as UserSettingsStore from 'matrix-react-sdk/lib/UserSettingsStore';
|
||||
import languageHandler from 'matrix-react-sdk/lib/languageHandler';
|
||||
import * as languageHandler from 'matrix-react-sdk/lib/languageHandler';
|
||||
|
||||
import url from 'url';
|
||||
|
||||
|
@ -268,17 +268,6 @@ async function loadApp() {
|
|||
configError = e;
|
||||
}
|
||||
|
||||
if (!configJson.languages) {
|
||||
let languages;
|
||||
try {
|
||||
languages = await languageHandler.getAllLanguageKeysFromJson();
|
||||
} catch (e) {
|
||||
console.log("couldn't load languages from languages.json: error = "+e);
|
||||
languages = ['en'];
|
||||
}
|
||||
configJson.languages = languages;
|
||||
}
|
||||
|
||||
if (window.localStorage && window.localStorage.getItem('mx_accepts_unsupported_browser')) {
|
||||
console.log('User has previously accepted risks in using an unsupported browser');
|
||||
validBrowser = true;
|
||||
|
|
Loading…
Reference in a new issue