Skip to content

Commit d5425b6

Browse files
committed
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.
1 parent ff1567e commit d5425b6

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

‎src/vector/index.js‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ var UpdateChecker = require("./updater");
6565
var q = require('q');
6666
var request = require('browser-request');
6767
import * as UserSettingsStore from 'matrix-react-sdk/lib/UserSettingsStore';
68-
import languageHandler from 'matrix-react-sdk/lib/languageHandler';
68+
import * as languageHandler from 'matrix-react-sdk/lib/languageHandler';
6969

7070
import url from 'url';
7171

@@ -268,17 +268,6 @@ async function loadApp() {
268268
configError = e;
269269
}
270270

271-
if (!configJson.languages) {
272-
let languages;
273-
try {
274-
languages = await languageHandler.getAllLanguageKeysFromJson();
275-
} catch (e) {
276-
console.log("couldn't load languages from languages.json: error = "+e);
277-
languages = ['en'];
278-
}
279-
configJson.languages = languages;
280-
}
281-
282271
if (window.localStorage && window.localStorage.getItem('mx_accepts_unsupported_browser')) {
283272
console.log('User has previously accepted risks in using an unsupported browser');
284273
validBrowser = true;

0 commit comments

Comments
 (0)