Merge "Template dialog button title toggles between Insert/Edit"

This commit is contained in:
jenkins-bot 2021-06-02 10:34:53 +00:00 committed by Gerrit Code Review
commit 7fe5b6a433
4 changed files with 9 additions and 1 deletions

View file

@ -2179,6 +2179,7 @@
"visualeditor-changedesc-mwtransclusion",
"visualeditor-dialog-template-insert",
"visualeditor-dialog-template-title",
"visualeditor-dialog-transclusion-action-save",
"visualeditor-dialog-transclusion-add-content",
"visualeditor-dialog-transclusion-add-param",
"visualeditor-dialog-transclusion-add-template",

View file

@ -169,6 +169,7 @@
"visualeditor-dialog-table-wikitable": "Styled (wikitable)",
"visualeditor-dialog-template-insert": "Insert a template",
"visualeditor-dialog-template-title": "Template",
"visualeditor-dialog-transclusion-action-save": "Save",
"visualeditor-dialog-transclusion-absent-template": "The \"$1\" template doesn't yet exist.",
"visualeditor-dialog-transclusion-add-content": "Add content",
"visualeditor-dialog-transclusion-add-param": "Add more information",

View file

@ -187,6 +187,7 @@
"visualeditor-dialog-table-wikitable": "Label for toggle to make a table a wikitable",
"visualeditor-dialog-template-insert": "Title for the template dialog to insert a new template.",
"visualeditor-dialog-template-title": "{{Identical|Template}}",
"visualeditor-dialog-transclusion-action-save": "Label for button that saves changes when editing an existing transclusion in the transclusion dialog.",
"visualeditor-dialog-transclusion-absent-template": "Message to user that the template they have selected does not exist on this wiki.\n\nParameters:\n* $1 - the title of the template",
"visualeditor-dialog-transclusion-add-content": "Label for button that adds parameter content to a transclusion.",
"visualeditor-dialog-transclusion-add-param": "Label for button that adds a parameter to a transcluded template.",

View file

@ -412,7 +412,12 @@ ve.ui.MWTransclusionDialog.prototype.getActionProcess = function ( action ) {
*/
ve.ui.MWTransclusionDialog.prototype.updateActionSet = function () {
var veConfig = mw.config.get( 'wgVisualEditorConfig' ),
backButton = this.actions.get( { flags: [ 'back' ] } ).pop();
backButton = this.actions.get( { flags: [ 'back' ] } ).pop(),
saveButton = this.actions.get( { actions: [ 'done' ] } ).pop();
if ( saveButton && this.getMode() === 'edit' ) {
saveButton.setLabel( ve.msg( 'visualeditor-dialog-transclusion-action-save' ) );
}
if ( backButton ) {
// Todo: this won't be needed if https://gerrit.wikimedia.org/r/c/oojs/ui/+/686439 is resolved