From 43344b56b01b1bb3a7e9b7e5cb6e97573c09e5cc Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Thu, 22 Feb 2018 16:01:44 -0800 Subject: [PATCH] VisualEditor: Describe reflist responsiveness changes too Bug: T160589 Change-Id: Idb590bf0f3edbe8d056f544a148323da30211467 --- includes/CiteHooks.php | 2 ++ modules/ve-cite/i18n/en.json | 2 ++ modules/ve-cite/i18n/qqq.json | 2 ++ modules/ve-cite/ve.dm.MWReferencesListNode.js | 8 ++++++++ 4 files changed, 14 insertions(+) diff --git a/includes/CiteHooks.php b/includes/CiteHooks.php index 06dbc92d4..4fb90dee4 100644 --- a/includes/CiteHooks.php +++ b/includes/CiteHooks.php @@ -163,6 +163,8 @@ class CiteHooks { "cite-ve-changedesc-reflist-group-from", "cite-ve-changedesc-reflist-group-to", "cite-ve-changedesc-reflist-item-id", + "cite-ve-changedesc-reflist-responsive-set", + "cite-ve-changedesc-reflist-responsive-unset", "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 3e0663a22..f11d47f6b 100644 --- a/modules/ve-cite/i18n/en.json +++ b/modules/ve-cite/i18n/en.json @@ -28,6 +28,8 @@ "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-responsive-set": "References list changed to display in responsive columns", + "cite-ve-changedesc-reflist-responsive-unset": "References list changed to display in only one column", "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", diff --git a/modules/ve-cite/i18n/qqq.json b/modules/ve-cite/i18n/qqq.json index 4a80e3cf6..e54c4b926 100644 --- a/modules/ve-cite/i18n/qqq.json +++ b/modules/ve-cite/i18n/qqq.json @@ -40,6 +40,8 @@ "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-responsive-set": "Description of a references list changing responsiveness to on", + "cite-ve-changedesc-reflist-responsive-unset": "Description of a references list changing responsiveness to off", "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", diff --git a/modules/ve-cite/ve.dm.MWReferencesListNode.js b/modules/ve-cite/ve.dm.MWReferencesListNode.js index 976020a8e..396097e60 100644 --- a/modules/ve-cite/ve.dm.MWReferencesListNode.js +++ b/modules/ve-cite/ve.dm.MWReferencesListNode.js @@ -207,6 +207,14 @@ ve.dm.MWReferencesListNode.static.describeChange = function ( key, change ) { } return ve.msg( 'cite-ve-changedesc-reflist-group-to', change.to ); } + + if ( key === 'isResponsive' ) { + if ( change.from ) { + return ve.msg( 'cite-ve-changedesc-reflist-responsive-unset' ); + } + return ve.msg( 'cite-ve-changedesc-reflist-responsive-set' ); + } + if ( key === 'originalMw' ) { return null; }