From 1131ef0172c5c2999fe685908b5c593ff4d26e4f Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 18 Sep 2017 14:26:54 +0200 Subject: [PATCH] Fix language selection in sandboxed iframes --- customize.dist/messages.js | 1 + www/code/inner.html | 2 +- www/common/cryptpad-common.js | 3 +++ www/common/migrate-user-object.js | 14 ++++++++++++++ www/common/sframe-boot.js | 1 + www/common/sframe-common-outer.js | 2 +- www/file/inner.html | 2 +- www/filepicker/inner.html | 2 +- www/pad/inner.html | 2 +- www/slide/inner.html | 2 +- 10 files changed, 25 insertions(+), 6 deletions(-) diff --git a/customize.dist/messages.js b/customize.dist/messages.js index 2f31a516e..916afe135 100644 --- a/customize.dist/messages.js +++ b/customize.dist/messages.js @@ -15,6 +15,7 @@ var map = { var getStoredLanguage = function () { return localStorage.getItem(LS_LANG); }; var getBrowserLanguage = function () { return navigator.language || navigator.userLanguage; }; var getLanguage = function () { + if (window.cryptpadLanguage) { return window.cryptpadLanguage; } if (getStoredLanguage()) { return getStoredLanguage(); } var l = getBrowserLanguage() || ''; if (Object.keys(map).indexOf(l) !== -1) { diff --git a/www/code/inner.html b/www/code/inner.html index 485e06455..2ac5b56f8 100644 --- a/www/code/inner.html +++ b/www/code/inner.html @@ -2,7 +2,7 @@ - +