diff --git a/VisualEditor.i18n.php b/VisualEditor.i18n.php index c3b4ddc80d..73c1fec2a2 100644 --- a/VisualEditor.i18n.php +++ b/VisualEditor.i18n.php @@ -166,7 +166,8 @@ $messages['en'] = array( 'visualeditor-preference-experimental-description' => 'Enable the latest features inside VisualEditor. As we develop tools and make changes for the editor, we make them available for testing ahead of general release. Please remember to always review your changes before saving when using experimental features.', 'visualeditor-preference-experimental-label' => 'VisualEditor experimental features', 'visualeditor-reference-input-placeholder' => 'What do you want to reference?', - 'visualeditor-referencelist-isempty' => 'There are no references with the group "$1" on this page.', + 'visualeditor-referencelist-isempty' => 'There are no references with the group "$1" on this page to include in this list.', + 'visualeditor-referencelist-isempty-default' => 'There are no references on this page to include in this list.', 'visualeditor-referencelist-missingref' => 'This reference is defined in a template or other generated block, and for now can only be edited in source mode.', 'visualeditor-savedialog-error-badtoken' => 'We could not process your edit because the session was no longer valid.', 'visualeditor-savedialog-identify-anon' => "Do you want to save this page as an anonymous user instead? Your IP address will be recorded in this page's edit history.", @@ -551,6 +552,7 @@ The description for this checkbox is: Parameters: * $1 - reference-group name', + 'visualeditor-referencelist-isempty-default' => 'Message that appears in the references list when there are no references on the page in the default group.', 'visualeditor-referencelist-missingref' => 'Message that appears in the references list, and as a tooltip on the reference itself, for references that are generated by a template or are otherwise uneditable. See also: diff --git a/VisualEditor.php b/VisualEditor.php index 25c1d28073..1d11fa5587 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -662,6 +662,7 @@ $wgResourceModules += array( 'visualeditor-parameter-search-unknown', 'visualeditor-reference-input-placeholder', 'visualeditor-referencelist-isempty', + 'visualeditor-referencelist-isempty-default', 'visualeditor-referencelist-missingref', 'visualeditor-savedialog-error-badtoken', 'visualeditor-savedialog-label-create', diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWReferenceListNode.js b/modules/ve-mw/ce/nodes/ve.ce.MWReferenceListNode.js index 77567adb1d..b93f9a0599 100644 --- a/modules/ve-mw/ce/nodes/ve.ce.MWReferenceListNode.js +++ b/modules/ve-mw/ce/nodes/ve.ce.MWReferenceListNode.js @@ -142,7 +142,11 @@ ve.ce.MWReferenceListNode.prototype.update = function () { this.$refmsg.detach(); if ( !nodes || !nodes.indexOrder.length ) { - this.$refmsg.text( ve.msg( 'visualeditor-referencelist-isempty', refGroup ) ); + if ( refGroup !== '' ) { + this.$refmsg.text( ve.msg( 'visualeditor-referencelist-isempty', refGroup ) ); + } else { + this.$refmsg.text( ve.msg( 'visualeditor-referencelist-isempty-default' ) ); + } this.$.append( this.$refmsg ); } else { for ( i = 0, iLen = nodes.indexOrder.length; i < iLen; i++ ) {