loleaflet/dist/toolbar/toolbar.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
New commits: commit 34aed93d839f99f46874ae744fa95c269f086d9e Author: Pranav Kant <pran...@collabora.co.uk> Date: Fri Feb 2 21:37:58 2018 +0530 loleaflet: Don't try to translate command names Command names are sent to loleaflet in already translated form when there are appropriate langpacks installed in the system. Only translate when we can. Change-Id: I92dc5865da85c76bd5a2529b0e6df994937c4c28 diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index aa9034e4..5683c6ed 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -1399,7 +1399,12 @@ function updateCommandValues() { data = data.concat({text: '\u2500\u2500\u2500\u2500\u2500\u2500', disabled: true}); commands.forEach(function (command) { - data = data.concat({id: command.id, text: L.Styles.styleMappings[command.text].toLocaleString()}); + var translated = command.text; + if (L.Styles.styleMappings[command.text]) { + // if it's in English, translate it + translated = L.Styles.styleMappings[command.text].toLocaleString(); + } + data = data.concat({id: command.id, text: translated }); }, this); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits