jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/371588 )
Change subject: VisualDiff: Show less information about ref nodes
..
VisualDiff: Show less information about ref nodes
If a ref node is highlighted as changed because its index
has changed (e.g. because an earlier reference was inserted
or removed), describe this more elegantly.
Bug: T170235
Bug: T171377
Change-Id: I2513bb82099a92529516e4e217e61a2d0a2dd43b
---
M includes/CiteHooks.php
M modules/ve-cite/i18n/en.json
M modules/ve-cite/i18n/qqq.json
M modules/ve-cite/ve.dm.MWReferenceNode.js
4 files changed, 8 insertions(+), 4 deletions(-)
Approvals:
Esanders: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/CiteHooks.php b/includes/CiteHooks.php
index 1fa414e..06bbba1 100644
--- a/includes/CiteHooks.php
+++ b/includes/CiteHooks.php
@@ -160,6 +160,7 @@
"cite-ve-changedesc-reflist-group-both",
"cite-ve-changedesc-reflist-group-from",
"cite-ve-changedesc-reflist-group-to",
+ "cite-ve-changedesc-reflist-item-id",
"cite-ve-dialog-reference-editing-reused",
"cite-ve-dialog-reference-options-group-label",
"cite-ve-dialog-reference-options-group-placeholder",
diff --git a/modules/ve-cite/i18n/en.json b/modules/ve-cite/i18n/en.json
index 2f311bb..5f6e0e8 100644
--- a/modules/ve-cite/i18n/en.json
+++ b/modules/ve-cite/i18n/en.json
@@ -28,6 +28,7 @@
"cite-ve-changedesc-reflist-group-both": "References list group changed
from \"$1\" to \"$2\"",
"cite-ve-changedesc-reflist-group-from": "References list group changed
from \"$1\" to the general group",
"cite-ve-changedesc-reflist-group-to": "References list group changed
from the general group to \"$1\"",
+ "cite-ve-changedesc-reflist-item-id": "Reference index changed",
"cite-ve-dialog-reference-editing-reused": "This reference is used $1
{{PLURAL:$1|times}} on this page.",
"cite-ve-dialog-reference-options-group-label": "Use this group",
"cite-ve-dialog-reference-options-group-placeholder": "General
references",
diff --git a/modules/ve-cite/i18n/qqq.json b/modules/ve-cite/i18n/qqq.json
index deaf013..f993de8 100644
--- a/modules/ve-cite/i18n/qqq.json
+++ b/modules/ve-cite/i18n/qqq.json
@@ -40,6 +40,7 @@
"cite-ve-changedesc-reflist-group-both": "Description of a references
list changing group\n\nParameters:\n* $1 – the name of the group it was
before\n* $2 – the name of the group it is now",
"cite-ve-changedesc-reflist-group-from": "Description of a references
list changing group to the general group\n\nParameters:\n* $1 – the name of the
group it was before",
"cite-ve-changedesc-reflist-group-to": "Description of a references
list changing group from the general group\n\nParameters:\n* $1 – the name of
the group it is now",
+ "cite-ve-changedesc-reflist-item-id": "Description of the visible index
of a reference changing",
"cite-ve-dialog-reference-editing-reused": "Text shown at the top of
the reference dialog when editing a reference that is used multiple
times.\n\nParameters:\n* $1 - Number of times used. This is always greater than
1.",
"cite-ve-dialog-reference-options-group-label": "Label for the
reference group input",
"cite-ve-dialog-reference-options-group-placeholder": "Placeholder for
the reference group input",
diff --git a/modules/ve-cite/ve.dm.MWReferenceNode.js
b/modules/ve-cite/ve.dm.MWReferenceNode.js
index de55223..fa0d6cb 100644
--- a/modules/ve-cite/ve.dm.MWReferenceNode.js
+++ b/modules/ve-cite/ve.dm.MWReferenceNode.js
@@ -323,6 +323,9 @@
return clone;
};
+/**
+ * @inheritdoc
+ */
ve.dm.MWReferenceNode.static.describeChange = function ( key, change ) {
if ( key === 'refGroup' ) {
if ( change.from ) {
@@ -334,11 +337,9 @@
}
return ve.msg( 'cite-ve-changedesc-reflist-group-to', change.to
);
}
- if ( key === 'listGroup' || key === 'originalMw' ) {
- return null;
+ if ( key === 'refListItemId' ) {
+ return ve.msg( 'cite-ve-changedesc-reflist-item-id' );
}
-
- return ve.dm.MWReferenceNode.parent.static.describeChange.apply( this,
arguments );
};
/* Methods */
--
To view, visit https://gerrit.wikimedia.org/r/371588
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2513bb82099a92529516e4e217e61a2d0a2dd43b
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Cite
Gerrit-Branch: master
Gerrit-Owner: Tchanders
Gerrit-Reviewer: Esanders
Gerrit-Reviewer: Jackmcbarn