Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/118394
Change subject: Make references list dialog small, and vary 'insert' vs. 'apply' button text ...................................................................... Make references list dialog small, and vary 'insert' vs. 'apply' button text Change-Id: I4bbe60ae6a978e73ca55bf55cddbdaca05c56414 --- M VisualEditor.php M modules/ve-mw/i18n/en.json M modules/ve-mw/i18n/qqq.json M modules/ve-mw/ui/dialogs/ve.ui.MWReferenceListDialog.js 4 files changed, 16 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/94/118394/1 diff --git a/VisualEditor.php b/VisualEditor.php index 47f0009..85fbdd3 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -868,6 +868,7 @@ 'visualeditor-dialog-reference-title', 'visualeditor-dialog-reference-useexisting-label', 'visualeditor-dialog-referencelist-title', + 'visualeditor-dialog-referencelist-insert-button', 'visualeditor-dialogbutton-reference-tooltip', 'visualeditor-dialogbutton-referencelist-tooltip', 'visualeditor-reference-input-placeholder', diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json index 7635244..c4d8f01 100644 --- a/modules/ve-mw/i18n/en.json +++ b/modules/ve-mw/i18n/en.json @@ -109,6 +109,7 @@ "visualeditor-dialog-reference-options-section": "Options", "visualeditor-dialog-reference-title": "Reference", "visualeditor-dialog-reference-useexisting-label": "Use an existing reference", + "visualeditor-dialog-referencelist-insert-button": "Insert references list", "visualeditor-dialog-referencelist-title": "References list", "visualeditor-dialog-template-title": "Template", "visualeditor-dialog-transclusion-add-content": "Add content", diff --git a/modules/ve-mw/i18n/qqq.json b/modules/ve-mw/i18n/qqq.json index 0e67166..1adc2d4 100644 --- a/modules/ve-mw/i18n/qqq.json +++ b/modules/ve-mw/i18n/qqq.json @@ -106,7 +106,7 @@ "visualeditor-dialog-meta-settings-toc-force": "Label for the TOC behavior option to always show.\n{{Related|Visualeditor-dialog-meta-settings-toc}}", "visualeditor-dialog-meta-settings-toc-label": "Prompt to let the user set the Table Of Contents (TOC) behaviour.", "visualeditor-dialog-meta-title": "Text of the title for the meta dialog to set categories, language links and other page settings.\n{{Identical|Options}}", - "visualeditor-dialog-reference-insert-button": "Used as label for the button.\n{{Identical|Insert reference}}", + "visualeditor-dialog-reference-insert-button": "Used as label for the button to insert a new reference.\n{{Identical|Insert reference}}", "visualeditor-dialog-reference-insert-title": "Reference insert dialog title text.\n{{Identical|Insert reference}}", "visualeditor-dialog-reference-options-group-label": "Label for the reference group input", "visualeditor-dialog-reference-options-group-placeholder": "Placeholder for the reference group input", @@ -114,6 +114,7 @@ "visualeditor-dialog-reference-options-section": "Label for the reference options sub-section.\n{{Identical|Options}}", "visualeditor-dialog-reference-title": "{{Identical|Reference}}", "visualeditor-dialog-reference-useexisting-label": "Label for button in reference dialog to insert a re-use of an existing reference", + "visualeditor-dialog-referencelist-insert-button": "Used as label for the button to insert a new references list.\n{{Identical|Insert references list}}", "visualeditor-dialog-referencelist-title": "{{Identical|References list}}", "visualeditor-dialog-template-title": "{{Identical|Template}}", "visualeditor-dialog-transclusion-add-content": "Label for button that adds parameter content to a transclusion.", diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWReferenceListDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWReferenceListDialog.js index 546df5f..bc5a8aa 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWReferenceListDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWReferenceListDialog.js @@ -16,8 +16,14 @@ * @param {Object} [config] Configuration options */ ve.ui.MWReferenceListDialog = function VeUiMWReferenceListDialog( surface, config ) { + // Configuration initialization + config = ve.extendObject( { 'size': 'small' }, config ); + // Parent constructor ve.ui.MWDialog.call( this, surface, config ); + + // Properties + this.inserting = false; }; /* Inheritance */ @@ -64,7 +70,11 @@ this.applyButton = new OO.ui.ButtonWidget( { '$': this.$, - 'label': ve.msg( 'visualeditor-dialog-action-apply' ), + 'label': ve.msg ( + !this.inserting ? + 'visualeditor-dialog-action-apply' : + 'visualeditor-dialog-referencelist-insert-button' + ), 'flags': ['primary'] } ); @@ -95,6 +105,7 @@ } else { refGroup = ''; + this.inserting = true; } this.groupInput.setValue( refGroup ); -- To view, visit https://gerrit.wikimedia.org/r/118394 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4bbe60ae6a978e73ca55bf55cddbdaca05c56414 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester <jforres...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits