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
This commit is contained in:
Thalia 2017-08-11 19:26:02 -04:00
parent c7623f6c09
commit ed8b563add
4 changed files with 8 additions and 4 deletions

View file

@ -160,6 +160,7 @@ class CiteHooks {
"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",

View file

@ -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",

View file

@ -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",

View file

@ -323,6 +323,9 @@ ve.dm.MWReferenceNode.static.cloneElement = function () {
return clone;
};
/**
* @inheritdoc
*/
ve.dm.MWReferenceNode.static.describeChange = function ( key, change ) {
if ( key === 'refGroup' ) {
if ( change.from ) {
@ -334,11 +337,9 @@ ve.dm.MWReferenceNode.static.describeChange = function ( key, change ) {
}
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 */