Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/86656
Change subject: Add specific message for empty ref group list ...................................................................... Add specific message for empty ref group list Currently we just say 'group ""' which is a bit weird, so instead have a specific message which talks about the 'default group'. Change-Id: I4a17f15ee18175fac11b36b102a06cc9714426ee --- M VisualEditor.i18n.php M VisualEditor.php M modules/ve-mw/ce/nodes/ve.ce.MWReferenceListNode.js 3 files changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/56/86656/1 diff --git a/VisualEditor.i18n.php b/VisualEditor.i18n.php index c3b4ddc..3dce864 100644 --- a/VisualEditor.i18n.php +++ b/VisualEditor.i18n.php @@ -167,6 +167,7 @@ '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-default' => 'There are no references in the default group on this page.', '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 @@ 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 25c1d28..1d11fa5 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -662,6 +662,7 @@ '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 77567ad..b93f9a0 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 @@ 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++ ) { -- To view, visit https://gerrit.wikimedia.org/r/86656 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4a17f15ee18175fac11b36b102a06cc9714426ee Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders <esand...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits