[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3-0' - loleaflet/src loleaflet/unocommands.js scripts/unocommands.py

Jan Holesovsky kendy at collabora.com
Fri Dec 8 09:39:16 UTC 2017


 loleaflet/src/control/Control.Menubar.js |  140 +++++++++++++++----------------
 loleaflet/unocommands.js                 |   30 ++++++
 scripts/unocommands.py                   |   12 +-
 3 files changed, 108 insertions(+), 74 deletions(-)

New commits:
commit 70ecee2bb6398aafdf6c71aeecf6e9eb6330fb70
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Thu Dec 7 11:49:56 2017 +0100

    l10n: Further decrease the use of own Online strings...
    
    ...if those can be deducted from .uno: commands.
    
    Change-Id: I9c2459a12ee95e936a7ec37f6270012d811cdf86
    Reviewed-on: https://gerrit.libreoffice.org/46018
    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.Menubar.js b/loleaflet/src/control/Control.Menubar.js
index 44d82157..afb6422a 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -7,17 +7,17 @@ L.Control.Menubar = L.Control.extend({
 	// TODO: Some mechanism to stop the need to copy duplicate menus (eg. Help)
 	options: {
 		initial: [
-			{name: _('File'), disabled: true},
-			{name: _('Edit'), disabled: true},
-			{name: _('View'), disabled: true},
-			{name: _('Insert'), disabled: true},
-			{name: _('Tools'), disabled: true},
+			{name: _UNO('.uno:PickList'), disabled: true},
+			{name: _UNO('.uno:EditMenu'), disabled: true},
+			{name: _UNO('.uno:ViewMenu'), disabled: true},
+			{name: _UNO('.uno:InsertMenu'), disabled: true},
+			{name: _UNO('.uno:ToolsMenu'), disabled: true},
 		],
 		text:  [
-			{name: _('File'), id: 'file', type: 'menu', menu: [
-				{name: _('Save'), id: 'save', type: 'action'},
-				{name: _('Save As'), id: 'saveas', type: 'action'},
-				{name: _('Print'), id: 'print', type: 'action'},
+			{name: _UNO('.uno:PickList'), id: 'file', type: 'menu', menu: [
+				{name: _UNO('.uno:Save'), id: 'save', type: 'action'},
+				{name: _UNO('.uno:SaveAs'), id: 'saveas', type: 'action'},
+				{name: _UNO('.uno:Print'), id: 'print', type: 'action'},
 				{name: _('See revision history'), id: 'rev-history', type: 'action'},
 				{name: _('Download as'), id: 'downloadas', type: 'menu', menu: [
 					{name: _('PDF Document (.pdf)'), id: 'downloadas-pdf', type: 'action'},
@@ -25,7 +25,7 @@ L.Control.Menubar = L.Control.extend({
 					{name: _('Microsoft Word 2003 (.doc)'), id: 'downloadas-doc', type: 'action'},
 					{name: _('Microsoft Word (.docx)'), id: 'downloadas-docx', type: 'action'}]}]
 			},
-			{name: _('Edit'), type: 'menu', menu: [
+			{name: _UNO('.uno:EditMenu'), type: 'menu', menu: [
 				{uno: '.uno:Undo'},
 				{uno: '.uno:Redo'},
 				{name: _('Repair'), id: 'repair',  type: 'action'},
@@ -37,7 +37,7 @@ L.Control.Menubar = L.Control.extend({
 				{type: 'separator'},
 				{uno: '.uno:SearchDialog'},
 				{type: 'separator'},
-				{name: _('Track Changes'), type: 'menu', menu: [
+				{name: _UNO('.uno:ChangesMenu'), type: 'menu', menu: [
 					{uno: '.uno:TrackChanges'},
 					{uno: '.uno:ShowTrackedChanges'},
 					{type: 'separator'},
@@ -49,19 +49,19 @@ L.Control.Menubar = L.Control.extend({
 				]},
 				{uno: '.uno:EditStyle'},
 			]},
-			{name: _('View'), id: 'view', type: 'menu', menu: [
-				{name: _('Full screen'), id: 'fullscreen', type: 'action'},
+			{name: _UNO('.uno:ViewMenu'), id: 'view', type: 'menu', menu: [
+				{name: _UNO('.uno:FullScreen'), id: 'fullscreen', type: 'action'},
 				{type: 'separator'},
-				{name: _('Zoom in'), id: 'zoomin', type: 'action'},
-				{name: _('Zoom out'), id: 'zoomout', type: 'action'},
+				{name: _UNO('.uno:ZoomPlus'), id: 'zoomin', type: 'action'},
+				{name: _UNO('.uno:ZoomMinus'), id: 'zoomout', type: 'action'},
 				{name: _('Reset zoom'), id: 'zoomreset', type: 'action'},
 				{type: 'separator'},
 				{uno: '.uno:ControlCodes'},
 			]
 			},
-			{name: _('Insert'), type: 'menu', menu: [
-				{name: _('Image'), id: 'insertgraphic', type: 'action'},
-				{name: _('Comment...'), id: 'insertcomment', type: 'action'},
+			{name: _UNO('.uno:InsertMenu'), type: 'menu', menu: [
+				{name: _UNO('.uno:InsertGraphic'), id: 'insertgraphic', type: 'action'},
+				{name: _UNO('.uno:InsertAnnotation'), id: 'insertcomment', type: 'action'},
 				{type: 'separator'},
 				{uno: '.uno:InsertFootnote'},
 				{uno: '.uno:InsertEndnote'},
@@ -70,8 +70,8 @@ L.Control.Menubar = L.Control.extend({
 				{uno: '.uno:InsertColumnBreak'},
 				{type: 'separator'},
 				{uno: '.uno:HyperlinkDialog'},
-				{name: _('Special character...'), id: 'specialcharacter', type: 'action'},
-				{name: _('Formatting mark'), type: 'menu', menu: [
+				{name: _UNO('.uno:InsertSymbol'), id: 'specialcharacter', type: 'action'},
+				{name: _UNO('.uno:FormattingMarkMenu'), type: 'menu', menu: [
 					{uno: '.uno:InsertNonBreakingSpace'},
 					{uno: '.uno:InsertHardHyphen'},
 					{uno: '.uno:InsertSoftHyphen'},
@@ -82,8 +82,8 @@ L.Control.Menubar = L.Control.extend({
 				{uno: '.uno:InsertIndexesEntry'}
 			]
 			},
-			{name: _('Format'), type: 'menu', menu: [
-				{name: _('Text'), type: 'menu', menu: [
+			{name: _UNO('.uno:FormatMenu'), type: 'menu', menu: [
+				{name: _UNO('.uno:FormatTextMenu'), type: 'menu', menu: [
 					{uno: '.uno:Bold'},
 					{uno: '.uno:Italic'},
 					{uno: '.uno:Underline'},
@@ -111,7 +111,7 @@ L.Control.Menubar = L.Control.extend({
 				{name: _('Text orientation'), type: 'menu', menu: [
 					{uno: '.uno:ParaLeftToRight'},
 					{uno: '.uno:ParaRightToLeft'}]},
-				{name: _('Spacing'), type: 'menu', menu: [
+				{name: _UNO('.uno:FormatSpacingMenu'), type: 'menu', menu: [
 					{uno: '.uno:SpacePara1'},
 					{uno: '.uno:SpacePara15'},
 					{uno: '.uno:SpacePara2'},
@@ -121,7 +121,7 @@ L.Control.Menubar = L.Control.extend({
 					{type: 'separator'},
 					{uno: '.uno:IncrementIndent'},
 					{uno: '.uno:DecrementIndent'}]},
-				{name: _('Align'), type: 'menu', menu: [
+				{name: _UNO('.uno:TextAlign'), type: 'menu', menu: [
 					{uno: '.uno:CommonAlignLeft'},
 					{uno: '.uno:CommonAlignHorizontalCenter'},
 					{uno: '.uno:CommonAlignRight'},
@@ -130,7 +130,7 @@ L.Control.Menubar = L.Control.extend({
 					{uno: '.uno:CommonAlignTop'},
 					{uno: '.uno:CommonAlignVerticalCenter'},
 					{uno: '.uno:CommonAlignBottom'}]},
-				{name: _('Lists'), type: 'menu', menu: [
+				{name: _UNO('.uno:FormatBulletsMenu'), type: 'menu', menu: [
 					{uno: '.uno:DefaultBullet'},
 					{uno: '.uno:DefaultNumbering'},
 					{type: 'separator'},
@@ -166,18 +166,18 @@ L.Control.Menubar = L.Control.extend({
 					{name: 'Legal, ' + _('Portrait'), type: 'action', id: 'legalportrait'},
 					{name: 'Legal, ' + _('Landscape'), type: 'action', id: 'legallandscape'}]}]
 			},
-			{name: _('Tables'), type: 'menu', menu: [
-				{name: _('Insert'), type: 'menu', menu: [
+			{name: _UNO('.uno:TableMenu'), type: 'menu', menu: [
+				{name: _UNO('.uno:TableInsertMenu'), type: 'menu', menu: [
 					{uno: '.uno:InsertRowsBefore'},
 					{uno: '.uno:InsertRowsAfter'},
 					{type: 'separator'},
 					{uno: '.uno:InsertColumnsBefore'},
 					{uno: '.uno:InsertColumnsAfter'}]},
-				{name: _('Delete'), type: 'menu', menu: [
+				{name: _UNO('.uno:TableDeleteMenu'), type: 'menu', menu: [
 					{uno: '.uno:DeleteRows'},
 					{uno: '.uno:DeleteColumns'},
 					{uno: '.uno:DeleteTable'}]},
-				{name: _('Select'), type: 'menu', menu: [
+				{name: _UNO('.uno:TableSelectMenu'), type: 'menu', menu: [
 					{uno: '.uno:SelectTable'},
 					{uno: '.uno:EntireRow'},
 					{uno: '.uno:EntireColumn'},
@@ -186,7 +186,7 @@ L.Control.Menubar = L.Control.extend({
 				{type: 'separator'},
 				{uno: '.uno:TableDialog'}
 			]},
-			{name: _('Tools'), id: 'tools', type: 'menu', menu: [
+			{name: _UNO('.uno:ToolsMenu'), id: 'tools', type: 'menu', menu: [
 				{uno: '.uno:SpellingAndGrammarDialog'},
 				{uno: '.uno:SpellOnline'},
 				{name: _('Language for selection'), type: 'menu', menu: [
@@ -197,7 +197,7 @@ L.Control.Menubar = L.Control.extend({
 					{name: _('None (Do not check spelling)'), id: 'nonelanguage', uno: '.uno:LanguageStatus?Language:string=Default_LANGUAGE_NONE'}]},
 				{uno: '.uno:WordCountDialog'}
 			]},
-			{name: _('Help'), id: 'help', type: 'menu', menu: [
+			{name: _UNO('.uno:HelpMenu'), id: 'help', type: 'menu', menu: [
 				{name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action'},
 				{name: _('About'), id: 'about', type: 'action'}]
 			},
@@ -205,10 +205,10 @@ L.Control.Menubar = L.Control.extend({
 		],
 
 		presentation: [
-			{name: _('File'), id: 'file', type: 'menu', menu: [
-				{name: _('Save'), id: 'save', type: 'action'},
-				{name: _('Save As'), id: 'saveas', type: 'action'},
-				{name: _('Print'), id: 'print', type: 'action'},
+			{name: _UNO('.uno:PickList'), id: 'file', type: 'menu', menu: [
+				{name: _UNO('.uno:Save'), id: 'save', type: 'action'},
+				{name: _UNO('.uno:SaveAs'), id: 'saveas', type: 'action'},
+				{name: _UNO('.uno:Print'), id: 'print', type: 'action'},
 				{name: _('See revision history'), id: 'rev-history', type: 'action'},
 				{name: _('Download as'), id: 'downloadas', type: 'menu', menu: [
 					{name: _('PDF Document (.pdf)'), id: 'downloadas-pdf', type: 'action'},
@@ -216,7 +216,7 @@ L.Control.Menubar = L.Control.extend({
 					{name: _('Microsoft Powerpoint 2003 (.ppt)'), id: 'downloadas-ppt', type: 'action'},
 					{name: _('Microsoft Powerpoint (.pptx)'), id: 'downloadas-pptx', type: 'action'}]}]
 			},
-			{name: _('Edit'), type: 'menu', menu: [
+			{name: _UNO('.uno:EditMenu'), type: 'menu', menu: [
 				{uno: '.uno:Undo'},
 				{uno: '.uno:Redo'},
 				{name: _('Repair'), id: 'repair',  type: 'action'},
@@ -228,47 +228,47 @@ L.Control.Menubar = L.Control.extend({
 				{type: 'separator'},
 				{uno: '.uno:SearchDialog'}
 			]},
-			{name: _('View'), id: 'view', type: 'menu', menu: [
-				{name: _('Full screen'), id: 'fullscreen', type: 'action'},
+			{name: _UNO('.uno:ViewMenu'), id: 'view', type: 'menu', menu: [
+				{name: _UNO('.uno:FullScreen'), id: 'fullscreen', type: 'action'},
 				{type: 'separator'},
-				{name: _('Zoom in'), id: 'zoomin', type: 'action'},
-				{name: _('Zoom out'), id: 'zoomout', type: 'action'},
+				{name: _UNO('.uno:ZoomPlus'), id: 'zoomin', type: 'action'},
+				{name: _UNO('.uno:ZoomMinus'), id: 'zoomout', type: 'action'},
 				{name: _('Reset zoom'), id: 'zoomreset', type: 'action'}]
 			},
-			{name: _('Insert'), type: 'menu', menu: [
-				{name: _('Image'), id: 'insertgraphic', type: 'action'},
-				{name: _('Comment...'), id: 'insertcomment', type: 'action'},
+			{name: _UNO('.uno:InsertMenu'), type: 'menu', menu: [
+				{name: _UNO('.uno:InsertGraphic'), id: 'insertgraphic', type: 'action'},
+				{name: _UNO('.uno:InsertAnnotation'), id: 'insertcomment', type: 'action'},
 				{type: 'separator'},
-				{name: _('Special character...'), id: 'specialcharacter', type: 'action'}]
+				{name: _UNO('.uno:InsertSymbol'), id: 'specialcharacter', type: 'action'}]
 			},
-			{name: _('Format'), type: 'menu', menu: [
+			{name: _UNO('.uno:FormatMenu'), type: 'menu', menu: [
 				{uno: '.uno:EditStyle'}
 			]},
-			{name: _('Tables'), type: 'menu', menu: [
-				{name: _('Insert'), type: 'menu', menu: [
+			{name: _UNO('.uno:TableMenu'), type: 'menu', menu: [
+				{name: _UNO('.uno:TableInsertMenu'), type: 'menu', menu: [
 					{uno: '.uno:InsertRowsBefore'},
 					{uno: '.uno:InsertRowsAfter'},
 					{type: 'separator'},
 					{uno: '.uno:InsertColumnsBefore'},
 					{uno: '.uno:InsertColumnsAfter'}]},
-				{name: _('Delete'), type: 'menu', menu: [
+				{name: _UNO('.uno:TableDeleteMenu'), type: 'menu', menu: [
 					{uno: '.uno:DeleteRows'},
 					{uno: '.uno:DeleteColumns'}]},
 				{uno: '.uno:MergeCells'}]
 			},
-			{name: _('Slide'), type: 'menu', menu: [
-				{name: _('New slide'), id: 'insertpage', type: 'action'},
-				{name: _('Duplicate slide'), id: 'duplicatepage', type: 'action'},
-				{name: _('Delete slide'), id: 'deletepage', type: 'action'},
+			{name: _UNO('.uno:SlideMenu'), type: 'menu', menu: [
+				{name: _UNO('.uno:InsertSlide'), id: 'insertpage', type: 'action'},
+				{name: _UNO('.uno:DuplicateSlide'), id: 'duplicatepage', type: 'action'},
+				{name: _UNO('.uno:DeleteSlide'), id: 'deletepage', type: 'action'},
 				{type: 'separator', id: 'fullscreen-presentation-separator'},
 				{name: _('Fullscreen presentation'), id: 'fullscreen-presentation', type: 'action'}]
 			},
-			{name: _('Tools'), id: 'tools', type: 'menu', menu: [
+			{name: _UNO('.uno:ToolsMenu'), id: 'tools', type: 'menu', menu: [
 				{uno: '.uno:SpellOnline'},
 				{name: _('Language'), type: 'menu', menu: [
 					{name: _('None (Do not check spelling)'), id: 'nonelanguage', uno: '.uno:LanguageStatus?Language:string=Default_LANGUAGE_NONE'}]}
 			]},
-			{name: _('Help'), id: 'help', type: 'menu', menu: [
+			{name: _UNO('.uno:HelpMenu'), id: 'help', type: 'menu', menu: [
 				{name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action'},
 				{name: _('About'), id: 'about', type: 'action'}]
 			},
@@ -276,10 +276,10 @@ L.Control.Menubar = L.Control.extend({
 		],
 
 		spreadsheet: [
-			{name: _('File'), id: 'file', type: 'menu', menu: [
-				{name: _('Save'), id: 'save', type: 'action'},
-				{name: _('Save As'), id: 'saveas', type: 'action'},
-				{name: _('Print'), id: 'print', type: 'action'},
+			{name: _UNO('.uno:PickList'), id: 'file', type: 'menu', menu: [
+				{name: _UNO('.uno:Save'), id: 'save', type: 'action'},
+				{name: _UNO('.uno:SaveAs'), id: 'saveas', type: 'action'},
+				{name: _UNO('.uno:Print'), id: 'print', type: 'action'},
 				{name: _('See revision history'), id: 'rev-history', type: 'action'},
 				{name: _('Download as'), id:'downloadas', type: 'menu', menu: [
 					{name: _('PDF Document (.pdf)'), id: 'downloadas-pdf', type: 'action'},
@@ -287,7 +287,7 @@ L.Control.Menubar = L.Control.extend({
 					{name: _('Microsoft Excel 2003 (.xls)'), id: 'downloadas-xls', type: 'action'},
 					{name: _('Microsoft Excel (.xlsx)'), id: 'downloadas-xlsx', type: 'action'}]}
 			]},
-			{name: _('Edit'), type: 'menu', menu: [
+			{name: _UNO('.uno:EditMenu'), type: 'menu', menu: [
 				{uno: '.uno:Undo'},
 				{uno: '.uno:Redo'},
 				{name: _('Repair'), id: 'repair',  type: 'action'},
@@ -299,30 +299,30 @@ L.Control.Menubar = L.Control.extend({
 				{type: 'separator'},
 				{uno: '.uno:SearchDialog'}
 			]},
-			{name: _('View'), id: 'view', type: 'menu', menu: [
-				{name: _('Full screen'), id: 'fullscreen', type: 'action'}
+			{name: _UNO('.uno:ViewMenu'), id: 'view', type: 'menu', menu: [
+				{name: _UNO('.uno:FullScreen'), id: 'fullscreen', type: 'action'}
 			]},
-			{name: _('Insert'), type: 'menu', menu: [
-				{name: _('Image'), id: 'insertgraphic', type: 'action'},
-				{name: _('Comment...'), id: 'insertcomment', type: 'action'},
+			{name: _UNO('.uno:InsertMenu'), type: 'menu', menu: [
+				{name: _UNO('.uno:InsertGraphic'), id: 'insertgraphic', type: 'action'},
+				{name: _UNO('.uno:InsertAnnotation'), id: 'insertcomment', type: 'action'},
 				{type: 'separator'},
 				{uno: '.uno:InsertRows'},
 				{uno: '.uno:InsertColumns'},
 				{type: 'separator'},
-				{name: _('Special character...'), id: 'specialcharacter', type: 'action'}
+				{name: _UNO('.uno:InsertSymbol'), id: 'specialcharacter', type: 'action'}
 			]},
-			{name: _('Format'), type: 'menu', menu: [
+			{name: _UNO('.uno:FormatMenu'), type: 'menu', menu: [
 				{uno: '.uno:ResetAttributes'},
 				{uno: '.uno:FormatCellDialog'}
 			]},
-			{name: _('Sheet'), type: 'menu', menu: [
+			{name: _UNO('.uno:SheetMenu'), type: 'menu', menu: [
 				{uno: '.uno:InsertRows'},
 				{uno: '.uno:InsertColumns'},
 				{type: 'separator'},
 				{uno: '.uno:DeleteRows'},
 				{uno: '.uno:DeleteColumns'}
 			]},
-			{name: _('Data'), type: 'menu', menu: [
+			{name: _UNO('.uno:DataMenu'), type: 'menu', menu: [
 				{uno: '.uno:Group'},
 				{uno: '.uno:Ungroup'},
 				{type: 'separator'},
@@ -331,12 +331,12 @@ L.Control.Menubar = L.Control.extend({
 				{uno: '.uno:ShowDetail'},
 				{uno: '.uno:HideDetail'}
 			]},
-			{name: _('Tools'), id: 'tools', type: 'menu', menu: [
+			{name: _UNO('.uno:ToolsMenu'), id: 'tools', type: 'menu', menu: [
 				{uno: '.uno:SpellOnline'},
 				{name: _('Language'), type: 'menu', menu: [
 					{name: _('None (Do not check spelling)'), id: 'nonelanguage', uno: '.uno:LanguageStatus?Language:string=Default_LANGUAGE_NONE'}]}
 			]},
-			{name: _('Help'), id: 'help', type: 'menu', menu: [
+			{name: _UNO('.uno:HelpMenu'), id: 'help', type: 'menu', menu: [
 				{name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action'},
 				{name: _('About'), id: 'about', type: 'action'}]
 			},
diff --git a/loleaflet/unocommands.js b/loleaflet/unocommands.js
index b2c0c736..712069cf 100644
--- a/loleaflet/unocommands.js
+++ b/loleaflet/unocommands.js
@@ -14,6 +14,7 @@ var unoCommandsArray = {
     ChangeCaseToTitleCase: _('~Capitalize Every Word'),
     ChangeCaseToToggleCase: _('~tOGGLE cASE'),
     ChangeCaseToUpper: _('~UPPERCASE'),
+    ChangesMenu: _('Track Chan~ges'),
     ClearOutline: _('~Remove Outline'),
     CommonAlignBottom: _('Bottom'),
     CommonAlignHorizontalCenter: _('Centered'),
@@ -27,6 +28,7 @@ var unoCommandsArray = {
     Copy: _('~Copy'),
     CopyHyperlinkLocation: _('Copy Link Location'),
     Cut: _('~Cut'),
+    DataMenu: _('~Data'),
     DecrementIndent: _('Decrease'),
     DecrementLevel: _('Demote One Level'),
     DecrementSubLevels: _('Demote One Level With Subpoints'),
@@ -37,29 +39,42 @@ var unoCommandsArray = {
     DeleteColumns: _('Delete Columns'),
     DeleteComment: _('Delete Comment'),
     DeleteRows: _('Delete Rows'),
+    DeleteSlide: _('D~elete Slide'),
     DeleteTable: _('Delete Table'),
+    DuplicateSlide: _('Duplicate ~Slide'),
+    EditMenu: _('~Edit'),
     EditStyle: _('E~dit Style...'),
     EntireCell: _('Select Cell'),
     EntireColumn: _('Select Column'),
     EntireRow: _('Select Rows'),
     FontDialog: _('Character...'),
+    FormatBulletsMenu: _('Lis~ts'),
     FormatCellDialog: _('Format ~Cells...'),
+    FormatMenu: _('F~ormat'),
+    FormatSpacingMenu: _('~Spacing'),
+    FormatTextMenu: _('Te~xt'),
+    FormattingMarkMenu: _('Formatting Mark'),
+    FullScreen: _('F~ull Screen'),
     Group: _('~Group...'),
     Grow: _('Increase'),
+    HelpMenu: _('~Help'),
     HideDetail: _('~Hide Details'),
     HyperlinkDialog: _('~Link...'),
     IncrementIndent: _('Increase'),
     IncrementLevel: _('Promote One Level'),
     IncrementSubLevels: _('Promote One Level With Subpoints'),
+    InsertAnnotation: _('Comm~ent'),
     InsertColumnBreak: _('Insert ~Column Break'),
     InsertColumns: _('Insert Co~lumns Left'),
     InsertColumnsAfter: _('Insert Co~lumns Right'),
     InsertColumnsBefore: _('Insert Co~lumns Left'),
     InsertEndnote: _('~Endnote'),
     InsertFootnote: _('~Footnote'),
+    InsertGraphic: _('~Image...'),
     InsertHardHyphen: _('Non-br~eaking hyphen'),
     InsertIndexesEntry: _('~Index Entry...'),
     InsertLRM: _('~Left-to-right mark'),
+    InsertMenu: _('~Insert'),
     InsertNeutralParagraph: _('Insert Unnumbered Entry'),
     InsertNonBreakingSpace: _('~Non-breaking space'),
     InsertPagebreak: _('~Page Break'),
@@ -67,7 +82,9 @@ var unoCommandsArray = {
     InsertRows: _('Insert ~Rows Above'),
     InsertRowsAfter: _('Insert ~Rows Below'),
     InsertRowsBefore: _('Insert ~Rows Above'),
+    InsertSlide: _('New Slid~e'),
     InsertSoftHyphen: _('S~oft hyphen'),
+    InsertSymbol: _('Symbol'),
     InsertZWNBSP: _('No-width no ~break'),
     InsertZWSP: _('No-~width optional break'),
     Italic: _('Italic'),
@@ -94,7 +111,9 @@ var unoCommandsArray = {
     Paste: _('~Paste'),
     PasteSpecialMenu: _('Paste ~Special'),
     PasteUnformatted: _('Paste Unformatted Text'),
+    PickList: _('~File'),
     PreviousTrackedChange: _('Pr~evious'),
+    Print: _('~Print...'),
     RecalcPivotTable: _('~Refresh Pivot Table'),
     Redo: _('~Redo'),
     RejectAllTrackedChanges: _('Reject All'),
@@ -105,6 +124,8 @@ var unoCommandsArray = {
     RotateLeft: _('Rotate 90° ~Left'),
     RotateMenu: _('Rot~ate'),
     RotateRight: _('Rotate 90° ~Right'),
+    Save: _('~Save'),
+    SaveAs: _('Save ~As...'),
     SearchDialog: _('Find & Rep~lace...'),
     SelectAll: _('Select ~All'),
     SelectTable: _('Select Table'),
@@ -117,9 +138,11 @@ var unoCommandsArray = {
     SetOptimalColumnWidth: _('~Optimal Column Width...'),
     SetOptimalRowHeight: _('~Optimal Row Height...'),
     Shadowed: _('Shadow'),
+    SheetMenu: _('~Sheet'),
     ShowDetail: _('~Show Details'),
     ShowTrackedChanges: _('~Show'),
     Shrink: _('Decrease'),
+    SlideMenu: _('S~lide'),
     SmallCaps: _('Small capitals'),
     SpacePara1: _('Line Spacing: 1'),
     SpacePara15: _('Line Spacing: 1.5'),
@@ -133,12 +156,17 @@ var unoCommandsArray = {
     TableDeleteMenu: _('~Delete'),
     TableDialog: _('Ta~ble Properties...'),
     TableInsertMenu: _('~Insert'),
+    TableMenu: _('T~able'),
+    TableSelectMenu: _('~Select'),
+    TextAlign: _('Alig~n'),
+    ToolsMenu: _('~Tools'),
     TrackChanges: _('~Record'),
     Underline: _('Underline'),
     UnderlineDouble: _('Underline: Double'),
     Undo: _('Undo'),
     Ungroup: _('~Ungroup...'),
     UpdateCurIndex: _('Update Index'),
+    ViewMenu: _('~View'),
     WordCountDialog: _('~Word Count'),
     WrapAnchorOnly: _('Wrap First Paragraph'),
     WrapContour: _('Wrap Contour On'),
@@ -150,6 +178,8 @@ var unoCommandsArray = {
     WrapRight: _('Wrap Right'),
     WrapThrough: _('~Wrap Through'),
     WrapThroughTransparent: _('In ~Background'),
+    ZoomMinus: _('Zoom Out'),
+    ZoomPlus: _('Zoom In'),
 };
 
 global._UNO = function(string) {
diff --git a/scripts/unocommands.py b/scripts/unocommands.py
index 7146be69..f00280dd 100755
--- a/scripts/unocommands.py
+++ b/scripts/unocommands.py
@@ -48,13 +48,15 @@ def commandsFromLine(line):
 
 # Extract uno commands name from lines like "  {uno: '.uno:Command3',"
 def commandFromMenuLine(line):
-    commands = []
-
     m = re.search(r"\buno: *'\.uno:([^']*)'", line)
     if m:
-        commands = [ m.group(1) ]
+        return [ m.group(1) ]
 
-    return commands
+    m = re.search(r"\b_UNO\('.uno:([^']*)'", line)
+    if m:
+        return [ m.group(1) ]
+
+    return []
 
 # Extract all the uno commands we are using in the Online
 def extractCommands(path):
@@ -80,6 +82,8 @@ def extractCommands(path):
     for line in f:
         if line.find("uno:") >= 0 and line.find("name:") < 0:
             commands += commandFromMenuLine(line)
+        elif line.find("_UNO(") >= 0:
+            commands += commandFromMenuLine(line)
 
     # may the list unique
     return set(commands)


More information about the Libreoffice-commits mailing list