[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-1-0' - 2 commits - loleaflet/dist loleaflet/Makefile loleaflet/src

Andras Timar andras.timar at collabora.com
Tue May 31 14:58:39 UTC 2016


 loleaflet/Makefile          |    3 ++-
 loleaflet/dist/loading.html |    7 +++++++
 loleaflet/src/map/Map.js    |    6 +++---
 3 files changed, 12 insertions(+), 4 deletions(-)

New commits:
commit 2c4fd41f13da54d234f1b416daec9da3895b68eb
Author: Andras Timar <andras.timar at collabora.com>
Date:   Tue May 31 16:57:20 2016 +0200

    loleaflet: l10n of loading.html
    
    (cherry picked from commit fdc109d002f7c705a1e10bfad12f9c913e1a0dde)

diff --git a/loleaflet/dist/loading.html b/loleaflet/dist/loading.html
index 64cc1de..61a5eda 100644
--- a/loleaflet/dist/loading.html
+++ b/loleaflet/dist/loading.html
@@ -20,14 +20,21 @@
         height: 100px;
       }
     </style>
+    <link rel="localizations" href="/loleaflet/dist/l10n/localizations.json" type="application/vnd.oftn.l10n+json"/>
   </head>
   <body>
+    <script src="/loleaflet/dist/l10n/json2.min.js"></script>
+    <script src="/loleaflet/dist/l10n/l10n.min.js"></script>
     <div class="spinner">
       <canvas id="spinner" class="leaflet-progress-spinner-canvas"></canvas>
       <h4>Loading...</h4>
     </div>
   </body>
   <script>
+    var translatableContent = document.getElementsByTagName("h4");
+    for (var i=0, max=translatableContent.length; i < max; i++) {
+        translatableContent[i].firstChild.nodeValue = translatableContent[i].firstChild.nodeValue.toLocaleString();
+    }
     var spinnerInterval = window.parent.L.LOUtil.startSpinner(document.getElementById('spinner'), 1.5);
   </script>
 </html>
commit 60e55d1204c74fbf7ef75c121526ea080280b7f2
Author: Andras Timar <andras.timar at collabora.com>
Date:   Tue May 31 16:36:21 2016 +0200

    loleaflet: mark-up strings for l10n in src/map/Map.js
    
    (cherry picked from commit 611bbe3814a01c610fd4aad6b2ef5b4bce8350b2)

diff --git a/loleaflet/Makefile b/loleaflet/Makefile
index fc53e67..e11b8a4 100644
--- a/loleaflet/Makefile
+++ b/loleaflet/Makefile
@@ -35,7 +35,8 @@ pot:
 		dist/toolbar/toolbar.js \
 		src/control/Control.Tabs.js \
 		src/control/Control.Menubar.js \
-		src/core/Socket.js
+		src/core/Socket.js \
+		src/map/Map.js
 	html2po --pot --input=dist/loleaflet-help.html --output=po/loleaflet-help.pot
 
 l10n: pot
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 60d0372..162c1c0 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -113,7 +113,7 @@ L.Map = L.Evented.extend({
 			this.setPermission(options.permission);
 		}
 
-		this.showBusy('Initializing...', false);
+		this.showBusy(_('Initializing...'), false);
 		this.on('statusindicator', this._onUpdateProgress, this);
 	},
 
@@ -799,10 +799,10 @@ L.Map = L.Evented.extend({
 		if (e.statusType === 'start') {
 			if (this._socket.readyState === 1) {
 				// auto-save
-				this.showBusy('Saving...', true);
+				this.showBusy(_('Saving...'), true);
 			}
 			else {
-				this.showBusy('Loading...', true);
+				this.showBusy(_('Loading...'), true);
 			}
 		}
 		else if (e.statusType === 'setvalue') {


More information about the Libreoffice-commits mailing list