mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-24 10:48:42 +00:00
CommandHelpDialog: Move insertions into a separate group
Also add table and comment insertions. Change-Id: If87261bf3d01854ab1f7ce1b447589fa8098dcf2
This commit is contained in:
parent
91152e2c05
commit
17898270ee
|
@ -1102,6 +1102,7 @@
|
|||
"visualeditor-saveerror",
|
||||
"visualeditor-saveerror-titleblacklist",
|
||||
"visualeditor-serializeerror",
|
||||
"visualeditor-shortcuts-insert",
|
||||
"visualeditor-recreate",
|
||||
"visualeditor-toolbar-cite-label",
|
||||
"visualeditor-toolbar-savedialog",
|
||||
|
|
|
@ -325,6 +325,7 @@
|
|||
"visualeditor-saveerror-titleblacklist": "Error saving page: This page's title is blacklisted",
|
||||
"visualeditor-serializeerror": "Error loading data from server: $1.",
|
||||
"visualeditor-settings-tool": "Page settings",
|
||||
"visualeditor-shortcuts-insert": "Insert",
|
||||
"visualeditor-special-characters-group-other": "Often used",
|
||||
"visualeditor-timeout":"It looks like this editor is currently unavailable. Would you like to edit in source mode instead?",
|
||||
"visualeditor-toolbar-cite-label": "Cite",
|
||||
|
|
|
@ -335,6 +335,7 @@
|
|||
"visualeditor-saveerror-titleblacklist": "Text shown when the editor fails to save properly due to the TitleBlacklist extension.",
|
||||
"visualeditor-serializeerror": "Text shown when the editor fails to load the wikitext for saving.\n\nParameters:\n* $1 is an error message, in English.",
|
||||
"visualeditor-settings-tool": "Text of tool in the toolbar the lets users set specific page settings.\n{{Identical|Page settings}}",
|
||||
"visualeditor-shortcuts-insert": "Heading for insertion shortcuts",
|
||||
"visualeditor-special-characters-group-other": "Label of the special character group shown if the wiki has visualeditor-quick-access-characters.json set up.",
|
||||
"visualeditor-timeout": "Text (JavaScript confirm()) shown when the editor fails to load properly due to a 504 Gateway Timeout error.",
|
||||
"visualeditor-toolbar-cite-label": "Label text for the toolbar button for inserting customized references.\n{{Identical|Cite}}",
|
||||
|
|
|
@ -23,6 +23,17 @@ ve.ui.MWCommandHelpDialog = function VeUiMWCommandHelpDialog( config ) {
|
|||
|
||||
OO.inheritClass( ve.ui.MWCommandHelpDialog, ve.ui.CommandHelpDialog );
|
||||
|
||||
/* Static properties */
|
||||
|
||||
ve.ui.MWCommandHelpDialog.static.commandGroups = ve.extendObject( ve.ui.CommandHelpDialog.static.commandGroups, {
|
||||
insert: {
|
||||
title: 'visualeditor-shortcuts-insert',
|
||||
commands: {},
|
||||
promote: [],
|
||||
demote: []
|
||||
}
|
||||
} );
|
||||
|
||||
/* Registration */
|
||||
|
||||
ve.ui.windowFactory.register( ve.ui.MWCommandHelpDialog );
|
||||
|
@ -38,14 +49,22 @@ ve.ui.windowFactory.register( ve.ui.MWCommandHelpDialog );
|
|||
sequence: [ 'wikitextHeading' ],
|
||||
msg: 'visualeditor-formatdropdown-format-heading2'
|
||||
} );
|
||||
ve.ui.MWCommandHelpDialog.static.registerCommand( 'other', 'template', {
|
||||
ve.ui.MWCommandHelpDialog.static.registerCommand( 'insert', 'template', {
|
||||
sequence: [ 'wikitextTemplate' ],
|
||||
msg: 'visualeditor-dialog-transclusion-add-template'
|
||||
msg: 'visualeditor-dialog-template-title'
|
||||
} );
|
||||
ve.ui.MWCommandHelpDialog.static.registerCommand( 'other', 'ref', {
|
||||
ve.ui.MWCommandHelpDialog.static.registerCommand( 'insert', 'ref', {
|
||||
sequence: [ 'wikitextRef' ],
|
||||
msg: 'visualeditor-dialog-reference-title'
|
||||
} );
|
||||
ve.ui.MWCommandHelpDialog.static.registerCommand( 'insert', 'table', {
|
||||
sequence: [ 'wikitextTable' ],
|
||||
msg: 'visualeditor-table-insert-table'
|
||||
} );
|
||||
ve.ui.MWCommandHelpDialog.static.registerCommand( 'insert', 'comment', {
|
||||
sequence: [ 'wikitextComment' ],
|
||||
msg: 'visualeditor-commentinspector-title'
|
||||
} );
|
||||
|
||||
if ( save !== '-' && save !== '' ) {
|
||||
ve.ui.MWCommandHelpDialog.static.registerCommand( 'other', 'save', {
|
||||
|
|
Loading…
Reference in a new issue