mirror of
https://github.com/LibreOffice/online.git
synced 2025-08-16 17:42:05 +00:00
loleaflet: Expose some context menu item for comments
Change-Id: I242755c67f904ffbaaac63db24d735a9bfaa6bca
This commit is contained in:
@ -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)
|
||||
};
|
||||
|
Reference in New Issue
Block a user