[Libreoffice-commits] online.git: loleaflet/src

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Aug 3 19:16:24 UTC 2018


 loleaflet/src/control/Control.ContextMenu.js |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d2610ce1a4a69dfac7e59645a7dd8386c7799903
Author:     Andras Timar <andras.timar at collabora.com>
AuthorDate: Fri Aug 3 13:09:16 2018 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Aug 3 21:16:05 2018 +0200

    loleaflet: fix l10n of context menus
    
    Change-Id: I96ea9d572288796587bc2be194c94c83a9b53f8d
    Reviewed-on: https://gerrit.libreoffice.org/58558
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/loleaflet/src/control/Control.ContextMenu.js b/loleaflet/src/control/Control.ContextMenu.js
index 3c5eaa71b..08eec4031 100644
--- a/loleaflet/src/control/Control.ContextMenu.js
+++ b/loleaflet/src/control/Control.ContextMenu.js
@@ -154,8 +154,8 @@ L.Control.ContextMenu = L.Control.extend({
 
 				isLastItemText = true;
 			} else if (item.type === 'menu') {
-				itemName = item.text.replace('~', '');
-				if (itemName === 'Paste Special') {
+				itemName = item.text;
+				if (itemName.replace('~', '') === 'Paste Special') {
 					itemName = _('Internal Paste Special');
 				}
 				var submenu = this._createContextMenuStructure(item);
@@ -165,7 +165,7 @@ L.Control.ContextMenu = L.Control.extend({
 				}
 
 				contextMenu[item.command] = {
-					name: _(itemName),
+					name: _(itemName).replace(/\(~[A-Za-z]\)/, '').replace('~', ''),
 					items: submenu
 				};
 				isLastItemText = true;


More information about the Libreoffice-commits mailing list