loleaflet/Makefile | 2 +- loleaflet/src/core/Socket.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-)
New commits: commit 63cc475ffc1c3095fd82034ac25924b11faf1a64 Author: Andras Timar <[email protected]> Date: Mon Feb 15 10:06:10 2016 +0100 loleaflet: enable l10n of socket error messages diff --git a/loleaflet/Makefile b/loleaflet/Makefile index beda56e..a0ebe1d 100644 --- a/loleaflet/Makefile +++ b/loleaflet/Makefile @@ -30,7 +30,7 @@ dist: all rm -rf loleaflet-$(VERSION) pot: - xgettext --keyword=_ --output=po/loleaflet-toolbar.pot dist/toolbar/toolbar.js src/control/Control.Tabs.js + xgettext --keyword=_ --output=po/loleaflet-toolbar.pot dist/toolbar/toolbar.js src/control/Control.Tabs.js src/core/Socket.js html2po --pot --input=dist/loleaflet-help.html --output=po/loleaflet-help.pot l10n: pot diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js index a287cbd..af793a6 100644 --- a/loleaflet/src/core/Socket.js +++ b/loleaflet/src/core/Socket.js @@ -10,7 +10,7 @@ L.Socket = L.Class.extend({ try { this.socket = new WebSocket(map.options.server); } catch (e) { - this.fire('error', {msg: 'Socket connection error', cmd: 'socket', kind: 'failed', id: 3}); + this.fire('error', {msg: _('Socket connection error'), cmd: 'socket', kind: 'failed', id: 3}); return null; } this._msgQueue = []; @@ -97,11 +97,11 @@ L.Socket = L.Class.extend({ if (textMsg.startsWith('loolserver ')) { // This must be the first message. if (this._map._docLayer) { - this.fire('error', {msg: 'Unexpected loolserver message.'}); + this.fire('error', {msg: _('Unexpected loolserver message.')}); } // TODO: For now we expect perfect match. if (textMsg.substring(11) !== this.ProtocolVersionNumber) { - this.fire('error', {msg: 'Unsupported server version.'}); + this.fire('error', {msg: _('Unsupported server version.')}); } } else if (!textMsg.startsWith('tile:') && !textMsg.startsWith('renderfont:')) { @@ -196,11 +196,11 @@ L.Socket = L.Class.extend({ }, _onSocketError: function () { - this.fire('error', {msg: 'Socket connection error', cmd: 'socket', kind: 'failed', id: 3}); + this.fire('error', {msg: _('Socket connection error'), cmd: 'socket', kind: 'failed', id: 3}); }, _onSocketClose: function () { - this.fire('error', {msg: 'Socket connection closed', cmd: 'socket', kind: 'closed', id: 4}); + this.fire('error', {msg: _('Socket connection closed'), cmd: 'socket', kind: 'closed', id: 4}); }, parseServerCmd: function (msg) { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
