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 <t...@collabora.com>
AuthorDate: Fri Aug 16 18:09:58 2019 +0300
Commit:     Tor Lillqvist <t...@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 <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Tor Lillqvist <t...@collabora.com>
    Tested-by: Tor Lillqvist <t...@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('-');
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to