From d5425b62a18c55821e4dc3215f2c775a5624856d Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 24 May 2017 11:27:06 +0100 Subject: [PATCH] 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. --- src/vector/index.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/vector/index.js b/src/vector/index.js index ad1592e8..f1ddfd66 100644 --- a/src/vector/index.js +++ b/src/vector/index.js @@ -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;