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

New commits:
commit 861c252d5204dfac7b8f5fb4505efcc29eafeb3d
Author: Jan Holesovsky <ke...@collabora.com>
Date:   Thu Dec 7 22:49:39 2017 +0100

    l10n: Translate also the right-click menu .uno: commands.
    
    Change-Id: Ie5cedaaa10febe78ba319f9e9b03fdd44c94f468
    Reviewed-on: https://gerrit.libreoffice.org/46048
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>
    Tested-by: Andras Timar <andras.ti...@collabora.com>

diff --git a/loleaflet/src/control/Control.ContextMenu.js 
b/loleaflet/src/control/Control.ContextMenu.js
index 218cbb4b..666b4904 100644
--- a/loleaflet/src/control/Control.ContextMenu.js
+++ b/loleaflet/src/control/Control.ContextMenu.js
@@ -2,7 +2,7 @@
 * Control.ContextMenu
 */
 
-/* global $ map _ */
+/* global $ map _ _UNO */
 L.Control.ContextMenu = L.Control.extend({
        options: {
                SEPARATOR: '---------',
@@ -121,15 +121,8 @@ L.Control.ContextMenu = L.Control.extend({
                                        continue;
                                }
 
-                               itemName = item.text.replace('~', '');
-                               itemName = itemName.replace('°', '°'); // 
bccu#1813 double encoding in cp-5.0 branch only
-                               if (commandName === 'DeleteAuthor') {
-                                       // In some versions of libreoffice, 
context menu callback returns 'Delete All Comments by $1'
-                                       // while in some it returns the actual 
username replacing $1.
-                                       // Also, the translations in LO core 
are for 'Delete All Comments by This Author'
-                                       // Lets use the later for simplicity 
and to leverage the core translations in online
-                                       itemName = 
itemName.replace(itemName.substring('Delete All Comments by '.length), 'This 
Author');
-                               }
+                               // Get the translated text associated with the 
command
+                               itemName = _UNO(item.command);
 
                                switch (commandName) {
                                case 'Cut':
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to