[Libreoffice-commits] online.git: loleaflet/js loleaflet/util

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Mon Sep 16 15:37:12 UTC 2019


 loleaflet/js/global.js               |    7 ++++++-
 loleaflet/util/create-l10n-all-js.pl |    2 --
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 6892259703be1298b9e6ee63ef786c0355fcf136
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Fri Aug 16 18:09:58 2019 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Sep 16 17:36:53 2019 +0200

    tdf#126971: Fix localisation of tunnelled dialogs in the iOS app
    
    This used to work fine, but at some stage it had regressed. I did not
    bother bisecting to find the culprit. Anyway, now the JS part needs to
    send a lang parameter in the load message, too, for the corrent
    language to be used in the tunnelled dialogs. (Likely it affects also
    other things in core.)
    
    Change-Id: I339cddb28357978414669964106cb6fa472c967f
    Reviewed-on: https://gerrit.libreoffice.org/77599
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Tested-by: Tor Lillqvist <tml at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/79023

diff --git a/loleaflet/js/global.js b/loleaflet/js/global.js
index a8e5eb8f5..9e603b3d6 100644
--- a/loleaflet/js/global.js
+++ b/loleaflet/js/global.js
@@ -134,12 +134,17 @@
 	}
 
 	global.queueMsg = [];
+	if (window.ThisIsTheiOSApp)
+		window.LANG = window.getParameterByName('lang');
 	if (global.socket && global.socket.readyState !== 3) {
 		global.socket.onopen = function () {
 			if (global.socket.readyState === 1) {
 				var ProtocolVersionNumber = '0.1';
 				global.socket.send('loolclient ' + ProtocolVersionNumber);
-				global.socket.send('load url=' + encodeURIComponent(global.docURL));
+				if (window.ThisIsTheiOSApp)
+					global.socket.send('load url=' + encodeURIComponent(global.docURL) + ' lang=' + window.LANG);
+				else
+					global.socket.send('load url=' + encodeURIComponent(global.docURL));
 			}
 		}
 
diff --git a/loleaflet/util/create-l10n-all-js.pl b/loleaflet/util/create-l10n-all-js.pl
index 013f340b3..0cdba7db2 100644
--- a/loleaflet/util/create-l10n-all-js.pl
+++ b/loleaflet/util/create-l10n-all-js.pl
@@ -29,8 +29,6 @@ sub insert($) {
 # woefully incomplete translation is worse than no translation at all.
 
 print "\
-window.LANG = window.getParameterByName('lang');
-window.postMobileDebug('LANG is ' + window.LANG);
 
 var onlylang = window.LANG;
 var hyphen = onlylang.indexOf('-');


More information about the Libreoffice-commits mailing list