loleaflet/src/control/Control.ContextMenu.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
New commits: commit ba23ab2927da87f9e24514156056d87d25c4c922 Author: Pranav Kant <pran...@collabora.co.uk> Date: Fri Oct 21 21:10:09 2016 +0530 loleaflet: Expose some context menu item for comments Change-Id: I242755c67f904ffbaaac63db24d735a9bfaa6bca diff --git a/loleaflet/src/control/Control.ContextMenu.js b/loleaflet/src/control/Control.ContextMenu.js index c0a5722..60c4a32 100644 --- a/loleaflet/src/control/Control.ContextMenu.js +++ b/loleaflet/src/control/Control.ContextMenu.js @@ -32,7 +32,8 @@ L.Control.ContextMenu = L.Control.extend({ 'TableDeleteMenu', 'DeleteRows', 'DeleteColumns', 'DeleteTable', 'MergeCells', 'SetOptimalColumnWidth', 'SetOptimalRowWidth', - 'UpdateCurIndex','RemoveTableOf'], + 'UpdateCurIndex','RemoveTableOf', + 'ReplyComment', 'DeleteComment', 'DeleteAuthor', 'DeleteAllNotes'], spreadsheet: ['MergeCells', 'SplitCells', 'InsertAnnotation', 'EditAnnotation', 'DeleteNote', 'ShowNote', 'HideNote'], @@ -120,6 +121,13 @@ L.Control.ContextMenu = L.Control.extend({ 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'); + } contextMenu[item.command] = { name: _(itemName) };
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits