Merge "(bug 42750) Save button says "Create page" when creating a new page"

This commit is contained in:
jenkins-bot 2012-12-06 01:43:14 +00:00 committed by Gerrit Code Review
commit 488131e04b
3 changed files with 8 additions and 1 deletions

View file

@ -15,6 +15,7 @@ $messages['en'] = array(
'visualeditor-ca-ve-edit' => 'VisualEditor',
'visualeditor-ca-ve-create' => 'VisualEditor',
'visualeditor-restore-page' => 'Restore page',
'visualeditor-create-page' => 'Create page',
'visualeditor-editnotices-button' => '$1 {{PLURAL:$1|notice|notices}}',
'tooltip-ca-ve-edit' => 'Edit this page with VisualEditor',
'accesskey-ca-ve-edit' => '',
@ -76,6 +77,7 @@ Link text of the dedicated VisualEditor Edit tab.
{{Identical|visualeditor}}',
'visualeditor-ca-ve-create' => 'Link text of the dedicated VisualEditor Create tab.',
'visualeditor-restore-page' => 'Label text for save button when the user is editing a previous revision',
'visualeditor-create-page' => 'Label text for save button when the user is creating a new page',
'visualeditor-editnotices-button' => 'Text of button in the toolbar that shows edit notices (such as MediaWiki:editnotice-0 and [[MediaWiki:editnotice-8/en]]) as a pop-up',
'tooltip-ca-ve-edit' => 'Tooltip of the dedicated VisualEditor Edit tab.',
'accesskey-ca-ve-edit' => '{{Ignore}}',

View file

@ -144,6 +144,7 @@ $wgResourceModules += array(
'visualeditor-editsummary',
'visualeditor-editnotices-button',
'visualeditor-restore-page',
'visualeditor-create-page',
),
),
'ext.visualEditor.base' => $wgVisualEditorResourceTemplate + array(

View file

@ -678,7 +678,11 @@ ve.init.mw.ViewPageTarget.prototype.setupToolbarButtons = function () {
this.$toolbarSaveButton
.append(
$( '<span class="ve-init-mw-viewPageTarget-toolbar-saveButton-label"></span>' )
.text( ve.msg( this.restoring ? 'visualeditor-restore-page': 'savearticle' ) )
.text( ve.msg(
this.restoring ? 'visualeditor-restore-page': (
this.pageExists ? 'savearticle' : 'visualeditor-create-page'
)
) )
)
.on( {
'mousedown': function ( e ) {