Update template dialog title when multiple transclusions present

Bug: T276568
Change-Id: I530a6cd8aea4f9fcafe7a03fc5050883f1f4b37c
This commit is contained in:
Andrew Kostka 2021-05-27 11:13:24 +02:00
parent d4eee82701
commit 67e48a26ef
4 changed files with 5 additions and 5 deletions

View file

@ -2211,10 +2211,10 @@
"visualeditor-dialog-transclusion-required-parameter-dialog-title",
"visualeditor-dialog-transclusion-required-parameter-is-blank",
"visualeditor-dialog-transclusion-single-mode",
"visualeditor-dialog-transclusion-title",
"visualeditor-dialog-transclusion-title-insert-template",
"visualeditor-dialog-transclusion-title-insert-known-template",
"visualeditor-dialog-transclusion-title-edit-known-template",
"visualeditor-dialog-transclusion-title-edit-transclusion",
"visualeditor-dialog-transclusion-template-search",
"visualeditor-dialog-transclusion-template-search-help",
"visualeditor-dialog-transclusion-templates-menu-aria-label",

View file

@ -201,10 +201,10 @@
"visualeditor-dialog-transclusion-required-parameter-dialog-title": "Required {{PLURAL:$1|field|fields}} missing",
"visualeditor-dialog-transclusion-required-parameter-is-blank": "Are you sure you want to continue without filling the $1 {{PLURAL:$2|field|fields}}?",
"visualeditor-dialog-transclusion-single-mode": "Hide options",
"visualeditor-dialog-transclusion-title": "Transclusion",
"visualeditor-dialog-transclusion-title-insert-template": "Insert a template",
"visualeditor-dialog-transclusion-title-insert-known-template": "Insert: $1",
"visualeditor-dialog-transclusion-title-edit-known-template": "Edit: $1",
"visualeditor-dialog-transclusion-title-edit-transclusion": "Template content",
"visualeditor-dialog-transclusion-template-search": "Template search",
"visualeditor-dialog-transclusion-template-search-help": "Find the template you want to insert by searching for an identifying keyword. Templates that have descriptions are more likely to work well with this editor (VisualEditor).",
"visualeditor-dialog-transclusion-templates-menu-aria-label": "Template fields setup menu",

View file

@ -219,10 +219,10 @@
"visualeditor-dialog-transclusion-required-parameter-dialog-title": "Title for the confirmation dialog opened if the user tries to insert/edit a template without filling all required fields.\n\nParameters:\n* $1 - Number of parameters missing, for PLURAL support.",
"visualeditor-dialog-transclusion-required-parameter-is-blank": "Label for the confirmation dialog opened if the user tries to insert/edit a template without filling all required fields.\n\nParameters:\n* $1 - Parameters missing, as a list using {{msg-mw|and}}, {{msg-mw|comma-separator}} and {{msg-mw|word-separator}}.\n* $2 - Number of parameters missing, for PLURAL support.",
"visualeditor-dialog-transclusion-single-mode": "Label for button that hides advanced options in transclusion dialog",
"visualeditor-dialog-transclusion-title": "{{Identical|Transclusion}}",
"visualeditor-dialog-transclusion-title-insert-template": "Label for the transclusion dialog when selecting a transclusion to insert.",
"visualeditor-dialog-transclusion-title-insert-known-template": "Label for the transclusion dialog when editing a transclusion to insert.\n\nParameters:\n* $1 - Transclusion name.",
"visualeditor-dialog-transclusion-title-edit-known-template": "Label for the transclusion dialog when editing an existing transclusion.\n\nParameters:\n* $1 - Transclusion name.",
"visualeditor-dialog-transclusion-title-edit-transclusion": "Label for the transclusion dialog when editing more than a single template.",
"visualeditor-dialog-transclusion-template-search": "Dialog and fieldset label to search for a template.",
"visualeditor-dialog-transclusion-template-search-help": "Inline help for the template search field.",
"visualeditor-dialog-transclusion-templates-menu-aria-label": "ARIA label for screen readers on template fields setup menu.",

View file

@ -85,7 +85,7 @@ OO.inheritClass( ve.ui.MWTransclusionDialog, ve.ui.MWTemplateDialog );
ve.ui.MWTransclusionDialog.static.name = 'transclusion';
ve.ui.MWTransclusionDialog.static.title =
OO.ui.deferMsg( 'visualeditor-dialog-transclusion-title' );
OO.ui.deferMsg( 'visualeditor-dialog-transclusion-title-edit-transclusion' );
ve.ui.MWTransclusionDialog.static.actions = ve.ui.MWTemplateDialog.static.actions.concat( [
{
@ -308,7 +308,7 @@ ve.ui.MWTransclusionDialog.prototype.setMode = function ( mode ) {
* Update the dialog title.
*/
ve.ui.MWTransclusionDialog.prototype.updateTitle = function () {
if ( this.mode === 'multiple' ) {
if ( !this.isSingleTemplateTransclusion() ) {
this.title.setLabel( this.constructor.static.title );
} else {
// Parent method