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@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/79023
diff --git a/loleaflet/js/global.js b/loleaflet/js/global.js
index a8e5eb8..9e603b3 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 013f340..0cdba7d 100644
--- a/loleaflet/util/create-l10n-all-js.pl
+++ b/loleaflet/util/create-l10n-all-js.pl
@@ -29,8 +29,6 @@
# 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('-');