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:
David Baker 2017-05-24 11:27:06 +01:00
parent ff1567ed2a
commit d5425b62a1
1 changed files with 1 additions and 12 deletions

View File

@ -65,7 +65,7 @@ var UpdateChecker = require("./updater");
var q = require('q'); var q = require('q');
var request = require('browser-request'); var request = require('browser-request');
import * as UserSettingsStore from 'matrix-react-sdk/lib/UserSettingsStore'; 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'; import url from 'url';
@ -268,17 +268,6 @@ async function loadApp() {
configError = e; 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')) { if (window.localStorage && window.localStorage.getItem('mx_accepts_unsupported_browser')) {
console.log('User has previously accepted risks in using an unsupported browser'); console.log('User has previously accepted risks in using an unsupported browser');
validBrowser = true; validBrowser = true;