[Libreoffice-commits] online.git: loleaflet/html loleaflet/Makefile.am

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Mar 5 18:56:49 UTC 2019


 loleaflet/Makefile.am            |    4 ++++
 loleaflet/html/loleaflet.html.m4 |   12 ++++++++++--
 2 files changed, 14 insertions(+), 2 deletions(-)

New commits:
commit 70bdc4660e53154540781f32007cb044bce131b2
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Thu Jan 31 15:33:46 2019 -0400
Commit:     Henry Castro <hcastro at collabora.com>
CommitDate: Tue Mar 5 14:56:19 2019 -0400

    loleaflet: expand l10n files
    
    Change-Id: I091cfefb57c7c5aad7a8256ae2192d62606c773f

diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am
index 8abde148f..ca8f63f3c 100644
--- a/loleaflet/Makefile.am
+++ b/loleaflet/Makefile.am
@@ -264,6 +264,10 @@ $(builddir)/dist/loleaflet.html: $(srcdir)/html/loleaflet.html.m4 $(LOLEAFLET_HT
 		-DBUNDLE_CSS="$(abs_builddir)/dist/bundle.css" \
 		-DGLOBAL_JS="$(abs_builddir)/dist/global.js" \
 		-DL10N_JS="$(abs_builddir)/dist/l10n.js" \
+		-DLOCALIZATION_JSON="$(abs_builddir)/dist/l10n/localizations.json" \
+		-DLOCORE_LOCALIZATION_JSON="$(abs_builddir)/dist/l10n/locore-localizations.json" \
+		-DHELP_LOCALIZATION_JSON="$(abs_builddir)/dist/l10n/help-localizations.json" \
+		-DUNO_LOCALIZATION_JSON="$(abs_builddir)/dist/l10n/uno-localizations.json" \
 		-DLOLEAFLET_JS="$(subst $(SPACE),$(COMMA),$(NODE_MODULES_JS) \
 		$(call LOLEAFLET_JS,$(srcdir)/build/build.js) \
 		$(patsubst %.js,plugins/draw-$(DRAW_VERSION)/%.js,$(call LOLEAFLET_JS,$(srcdir)/plugins/draw-$(DRAW_VERSION)/build/build.js)) \
diff --git a/loleaflet/html/loleaflet.html.m4 b/loleaflet/html/loleaflet.html.m4
index 85105634d..cdd52297d 100644
--- a/loleaflet/html/loleaflet.html.m4
+++ b/loleaflet/html/loleaflet.html.m4
@@ -19,7 +19,7 @@ ifelse(GTKAPP,[true],[define([MOBILEAPP],[true])])
 ifelse(ANDROIDAPP,[true],[define([MOBILEAPP],[true])])
 
 ifelse(MOBILEAPP,[],
-  // Start listening for Host_PostmessageReady message and save the
+[  // Start listening for Host_PostmessageReady message and save the
   // result for future
   window.WOPIpostMessageReady = false;
   var PostMessageReadyListener = function(e) {
@@ -30,7 +30,11 @@ ifelse(MOBILEAPP,[],
     }
   };
   window.addEventListener('message', PostMessageReadyListener, false);
-)dnl
+  window.__globalL10n = syscmd([cat ]LOCALIZATION_JSON);
+  window.__locoreL10n = syscmd([cat ]LOCORE_LOCALIZATION_JSON);
+  window.__helpL10n = syscmd([cat ]HELP_LOCALIZATION_JSON);
+  window.__unoL10n = syscmd([cat ]UNO_LOCALIZATION_JSON);
+])dnl
 
 var Base64ToArrayBuffer = function(base64Str) {
   var binStr = atob(base64Str);
@@ -174,6 +178,10 @@ ifelse(MOBILEAPP,[true],
       window.tileSize = 256;])
 syscmd([cat ]GLOBAL_JS)dnl
 syscmd([cat ]L10N_JS)dnl
+      delete window.__globalL10n;
+      delete window.__locoreL10n;
+      delete window.__helpL10n;
+      delete window.__unoL10n;
     </script>
   <script defer>
 


More information about the Libreoffice-commits mailing list