diff --git a/VisualEditor.php b/VisualEditor.php index 2b34f71723..50b6210c0a 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -540,8 +540,6 @@ $wgResourceModules += array( 'visualeditor-inspector-close-tooltip', 'visualeditor-inspector-remove-tooltip', 'visualeditor-linkinspector-title', - 'visualeditor-linknodeinspector-title', - 'visualeditor-linknodeinspector-add-label', 'visualeditor-listbutton-bullet-tooltip', 'visualeditor-listbutton-number-tooltip', 'visualeditor-mediasizewidget-button-originaldimensions', @@ -838,12 +836,15 @@ $wgResourceModules += array( 'ext.visualEditor.mwcore', ), 'messages' => array( + 'visualeditor-annotationbutton-linknode-tooltip', 'visualeditor-linkinspector-illegal-title', 'visualeditor-linkinspector-suggest-external-link', 'visualeditor-linkinspector-suggest-matching-page', 'visualeditor-linkinspector-suggest-disambig-page', 'visualeditor-linkinspector-suggest-redirect-page', 'visualeditor-linkinspector-suggest-new-page', + 'visualeditor-linknodeinspector-title', + 'visualeditor-linknodeinspector-add-label', ), 'targets' => array( 'desktop', 'mobile' ), ), diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWNumberedExternalLinkNode.js b/modules/ve-mw/ce/nodes/ve.ce.MWNumberedExternalLinkNode.js index 3efe8914e5..27e9ae314f 100644 --- a/modules/ve-mw/ce/nodes/ve.ce.MWNumberedExternalLinkNode.js +++ b/modules/ve-mw/ce/nodes/ve.ce.MWNumberedExternalLinkNode.js @@ -33,6 +33,7 @@ ve.ce.MWNumberedExternalLinkNode = function VeCeMWNumberedExternalLinkNode( mode this.$link = this.$( '' ) // CSS for numbering needs rel=mw:ExtLink .attr( 'rel', 'mw:ExtLink' ) + .addClass( 'external' ) .appendTo( this.$element ); // Events @@ -56,7 +57,7 @@ ve.ce.MWNumberedExternalLinkNode.static.name = 'link/mwNumberedExternal'; ve.ce.MWNumberedExternalLinkNode.static.tagName = 'span'; -ve.ce.MWNumberedExternalLinkNode.static.primaryCommandName = 'link'; +ve.ce.MWNumberedExternalLinkNode.static.primaryCommandName = 'linkNode'; /* Methods */ diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json index 67265af5d9..66414495fa 100644 --- a/modules/ve-mw/i18n/en.json +++ b/modules/ve-mw/i18n/en.json @@ -22,6 +22,7 @@ "tooltip-ca-editsource": "Edit the source code of this page", "tooltip-ca-ve-edit": "Edit this page with VisualEditor", "visualeditor-advancedsettings-tool": "Advanced settings", + "visualeditor-annotationbutton-linknode-tooltip": "Simple link", "visualeditor-beta-appendix": "beta", "visualeditor-beta-label": "beta", "visualeditor-beta-warning": "VisualEditor is in 'beta'. You may encounter software issues, and you may not be able to edit parts of the page. To switch back to source editing at any time without losing your changes, open the dropdown next to \"{{int:visualeditor-toolbar-cancel}}\" and select \"{{int:visualeditor-mweditmodesource-title}}\".", diff --git a/modules/ve-mw/i18n/qqq.json b/modules/ve-mw/i18n/qqq.json index 8063278d01..fb2a041666 100644 --- a/modules/ve-mw/i18n/qqq.json +++ b/modules/ve-mw/i18n/qqq.json @@ -27,6 +27,7 @@ "tooltip-ca-editsource": "Tooltip of the {{msg-mw|Visualeditor-ca-editsource}} tab, used if the page already exists.\n\nSee also:\n* {{msg-mw|Tooltip-ca-createsource}} - tooltip of the {{msg-mw|Visualeditor-ca-createsource}} tab, used if the page does not exist", "tooltip-ca-ve-edit": "Tooltip of the dedicated VisualEditor \"Edit\" tab.", "visualeditor-advancedsettings-tool": "Tool for opening the advanced settings section of the meta dialog.\n{{Identical|Advanced settings}}", + "visualeditor-annotationbutton-linknode-tooltip": "Tooltip text for link button for auto-numbered, labelless, external links.\n{{Related|Visualeditor-annotationbutton}}\n{{Related|visualeditor-linknodeinspector-title}}", "visualeditor-beta-appendix": "Used in {{msg-mw|Guidedtour-tour-firsteditve-edit-page-description}}.\n{{Identical|Beta}}", "visualeditor-beta-label": "Text of tool in the toolbar that highlights that VisualEditor is still in beta.\n{{Identical|Beta}}", "visualeditor-beta-warning": "Note shown when user clicks on 'beta' label in VisualEditor, warning users that the software may have issues.\n\nRefers to:\n* {{msg-mw|Visualeditor-toolbar-cancel}}\n* {{msg-mw|Visualeditor-mweditmodesource-title}}\nSee also:\n* {{msg-mw|Visualeditor-wikitext-warning}}", diff --git a/modules/ve-mw/ui/tools/ve.ui.MWLinkNodeInspectorTool.js b/modules/ve-mw/ui/tools/ve.ui.MWLinkNodeInspectorTool.js index d032dd4d7c..e99dc024e7 100644 --- a/modules/ve-mw/ui/tools/ve.ui.MWLinkNodeInspectorTool.js +++ b/modules/ve-mw/ui/tools/ve.ui.MWLinkNodeInspectorTool.js @@ -19,6 +19,10 @@ ve.ui.MWLinkNodeInspectorTool = function VeUiMWLinkNodeInspectorTool( toolGroup, }; OO.inheritClass( ve.ui.MWLinkNodeInspectorTool, ve.ui.LinkInspectorTool ); ve.ui.MWLinkNodeInspectorTool.static.name = 'linkNode'; +ve.ui.MWLinkNodeInspectorTool.static.title = + OO.ui.deferMsg( 'visualeditor-annotationbutton-linknode-tooltip' ); ve.ui.MWLinkNodeInspectorTool.static.modelClasses = [ ve.dm.MWNumberedExternalLinkNode ]; ve.ui.MWLinkNodeInspectorTool.static.commandName = 'linkNode'; +ve.ui.MWLinkNodeInspectorTool.static.autoAddToGroup = false; +ve.ui.MWLinkNodeInspectorTool.static.autoAddToCatchall = false; ve.ui.toolFactory.register( ve.ui.MWLinkNodeInspectorTool );