From da5fc08a30bb93dbfd805331379490f45b0b2959 Mon Sep 17 00:00:00 2001 From: Marcel Radzio Date: Wed, 5 Apr 2017 22:13:15 +0200 Subject: [PATCH] [translations] fixed default lang bug --- src/components/structures/MatrixChat.js | 2 ++ src/components/structures/UserSettings.js | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 82c402ba45f..a62651ac2ec 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -766,6 +766,8 @@ module.exports = React.createClass({ counterpart.registerTranslations('de', require('../../i18n/global/de-de')); counterpart.setFallbackLocale('en'); + console.log("got event"); + if (!language){ var language = navigator.language || navigator.userLanguage; counterpart.setLocale(language); diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js index e6b01ef0809..21c05511425 100644 --- a/src/components/structures/UserSettings.js +++ b/src/components/structures/UserSettings.js @@ -29,8 +29,6 @@ var AddThreepid = require('../../AddThreepid'); var SdkConfig = require('../../SdkConfig'); import AccessibleButton from '../views/elements/AccessibleButton'; -var counterpart = require('counterpart'); - // if this looks like a release, use the 'version' from package.json; else use // the git sha. const REACT_SDK_VERSION =