diff --git a/extension.json b/extension.json index f229b60211..76db67501f 100644 --- a/extension.json +++ b/extension.json @@ -2203,6 +2203,7 @@ "visualeditor-dialog-transclusion-add-wikitext", "visualeditor-dialog-transclusion-add-param", "visualeditor-dialog-transclusion-add-param-help", + "visualeditor-dialog-transclusion-add-param-placeholder", "visualeditor-dialog-transclusion-add-param-save", "visualeditor-dialog-transclusion-add-template", "visualeditor-dialog-transclusion-add-undocumented-param", diff --git a/i18n/ve-mw/en.json b/i18n/ve-mw/en.json index fb68d72453..60d17b936a 100644 --- a/i18n/ve-mw/en.json +++ b/i18n/ve-mw/en.json @@ -174,7 +174,8 @@ "visualeditor-dialog-transclusion-add-content": "Add content", "visualeditor-dialog-transclusion-add-wikitext": "Add wikitext", "visualeditor-dialog-transclusion-add-param": "Add more information", - "visualeditor-dialog-transclusion-add-param-help": "If known, enter undocumented parameter names. If the parameter is not already part of the template, adding it will have no effect. You may find information about existing parameters on the [[$1|template's page]].", + "visualeditor-dialog-transclusion-add-param-help": "If known, enter undocumented parameter names. Note that only parameters known by the template will have an effect. You may find information about existing parameters on the [[$1|template's page]].", + "visualeditor-dialog-transclusion-add-param-placeholder": "Parameter name", "visualeditor-dialog-transclusion-add-param-save": "Add parameter", "visualeditor-dialog-transclusion-add-template": "Add template", "visualeditor-dialog-transclusion-add-undocumented-param": "Add undocumented parameter", diff --git a/i18n/ve-mw/qqq.json b/i18n/ve-mw/qqq.json index deac7ccad9..d6f71b08f5 100644 --- a/i18n/ve-mw/qqq.json +++ b/i18n/ve-mw/qqq.json @@ -193,6 +193,7 @@ "visualeditor-dialog-transclusion-add-wikitext": "Label for button that adds parameter wikitext to a transclusion.", "visualeditor-dialog-transclusion-add-param": "Label for button that adds a parameter to a transcluded template.", "visualeditor-dialog-transclusion-add-param-help": "Help text for new undocumented parameter input field.\n\nParameters:\n* $1 - The title of the template.", + "visualeditor-dialog-transclusion-add-param-placeholder": "Placeholder in the input field that adds a new undocumented parameter to a transcluded template.", "visualeditor-dialog-transclusion-add-param-save": "Label for save button that adds a new undocumented parameter to a transcluded template.", "visualeditor-dialog-transclusion-add-template": "Label for button that adds the specified template to the page.\n{{Identical|Add template}}", "visualeditor-dialog-transclusion-add-undocumented-param": "Label for button that adds a new undocumented parameter to a transcluded template.", diff --git a/modules/ve-mw/ui/pages/ve.ui.MWAddParameterPage.js b/modules/ve-mw/ui/pages/ve.ui.MWAddParameterPage.js index 70673f81fc..6ae7b8b914 100644 --- a/modules/ve-mw/ui/pages/ve.ui.MWAddParameterPage.js +++ b/modules/ve-mw/ui/pages/ve.ui.MWAddParameterPage.js @@ -32,7 +32,10 @@ ve.ui.MWAddParameterPage = function VeUiMWAddParameterPage( parameter, name, con .connect( this, { click: 'togglePlaceholder' } ); // Input field and button - this.paramInputField = new OO.ui.TextInputWidget().connect( this, { enter: 'onParameterInput' } ); + this.paramInputField = new OO.ui.TextInputWidget( { + placeholder: ve.msg( 'visualeditor-dialog-transclusion-add-param-placeholder' ) + } ) + .connect( this, { enter: 'onParameterInput' } ); var saveButton = new OO.ui.ButtonWidget( { label: ve.msg( 'visualeditor-dialog-transclusion-add-param-save' ), flags: [ 'primary', 'progressive' ] @@ -45,17 +48,20 @@ ve.ui.MWAddParameterPage = function VeUiMWAddParameterPage( parameter, name, con { classes: [ 've-ui-mwTransclusionDialog-addParameterFieldset-input' ] } ); + var $helpText = mw.message( + 'visualeditor-dialog-transclusion-add-param-help', + this.template.getTitle() || this.template.getTarget().wt + ).parseDom(); this.addParameterFieldset = new OO.ui.FieldsetLayout( { label: this.addParameterInputHeader.$element, helpInline: true, - help: mw.message( - 'visualeditor-dialog-transclusion-add-param-help', - this.template.getTitle() || this.template.getTarget().wt - ).parseDom(), + help: $helpText, classes: [ 've-ui-mwTransclusionDialog-addParameterFieldset' ], $content: this.addParameterInputField.$element } ); + ve.targetLinksToNewWindow( this.addParameterFieldset.$element[ 0 ] ); + // Init visibility this.togglePlaceholder( false );