jenkins-bot has submitted this change and it was merged. Change subject: Better explanations in error messages ......................................................................
Better explanations in error messages bug: T93817 Change-Id: I48d03c8846331a201485ef63c894b70816a74023 --- M i18n/en.json M i18n/qqq.json M includes/views/Collection.php M resources/Resources.php M resources/ext.gather.watchstar/CollectionsContentOverlay.js 5 files changed, 9 insertions(+), 6 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index 9bf04b9..b5d022b 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -35,7 +35,7 @@ "gather-edit-collection-label-description": "Description", "gather-edit-collection-label-privacy": "Private collection", "gather-edit-collection-save-label": "Done", - "gather-edit-collection-failed-error": "There was a problem saving the changes.", + "gather-edit-collection-failed-error": "There was an issue with your attempted change, please try something else.", "gather-delete-collection-confirm": "Are you sure you want to delete this collection?", "gather-delete-collection-heading": "Delete collection", "gather-delete-collection-delete-label": "Delete", @@ -53,7 +53,8 @@ "gather-add-toast": "The page has been added to your \"$1\" collection.", "gather-new-collection-failed-toast": "There was a problem creating your \"$1\" collection.", "gather-add-failed-toast": "There was a problem adding the item to your \"$1\" collection.", - "gather-add-to-collection-summary": "Would you like to add $1 to a collection?", + "gather-add-title-invalid-toast": "There was an issue with the title you entered. Please try something else", + "gather-add-to-collection-summary": "Add $1 to a collection of pages you can share with the world!", "gather-add-to-collection-confirm": "Add to collection", "gather-add-to-collection-cancel": "No thanks", "gather-remove-toast": "The page has been removed from your \"$1\" collection.", @@ -73,7 +74,7 @@ "gather-public": "Public", "gather-article-count": "$1 {{PLURAL:$1|page|pages}}", "gather-empty": "Nothing in this collection yet...", - "gather-empty-footer": "I don't know how you got here but this is a sad place.", + "gather-empty-footer": "Create a collection by clicking on the star icon while reading a {{SITENAME}} page.", "gather-edit-button": "Edit", "gather-delete-button": "Delete", "right-gather-hidelist": "Force a public user list to become hidden", diff --git a/i18n/qqq.json b/i18n/qqq.json index 80c350c..3b3ea2e 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -58,6 +58,7 @@ "gather-add-toast": "Message displayed when you add an item to a collection. Parameters:\n* $1 - Name of collection.", "gather-new-collection-failed-toast": "Message displayed when creating a new collection fails. Parameters:\n* $1 - Name of collection.", "gather-add-failed-toast": "Message displayed when adding an item to a collection fails. Parameters:\n* $1 - Name of collection.", + "gather-add-title-invalid-toast": "Message displayed to a user when editing or creating a collection fails because of an invalid title.", "gather-add-to-collection-summary": "Text for a tutorial overlay presented to a user the first time they see the collections watchstar asking them if they would like to add the current page to a collection.\n\nParameters:\n* $1 - page title", "gather-add-to-collection-confirm": "Label for button that user can click if they would like to add the current page to a collection", "gather-add-to-collection-cancel": "Label for button that user can click if they do not want to add to a collection.\n{{Identical|No thanks}}", @@ -78,7 +79,7 @@ "gather-public": "Label for a collection when it is publicly visible\n{{Identical|Public}}", "gather-article-count": "Expression of the number of pages in a collection. Parameter:\n* $1 - number of pages in the collection\n{{Identical|Page}}", "gather-empty": "Message shown on an empty rendered collection on [[Special:Gather]].", - "gather-empty-footer": "Footnote shown on an empty rendered collection on [[Special:Gather]].", + "gather-empty-footer": "Footnote shown on an empty collection on [[Special:Gather]] which instructs to the user how to add articles to a collection on their wiki. \nParameters: $1 - Name of site", "gather-edit-button": "Label for a button that enables editing a collection.\n{{Identical|Edit}}", "gather-delete-button": "Label for a button that enables deleting a collection.\n{{Identical|Delete}}", "right-gather-hidelist": "With gather, users can create lists and make them public. This right gives admins a way to hide or restore a list that violates WP policy.\n\n{{Doc-right|gather-hidelist}}", diff --git a/includes/views/Collection.php b/includes/views/Collection.php index ca59750..df13789 100644 --- a/includes/views/Collection.php +++ b/includes/views/Collection.php @@ -132,7 +132,7 @@ return Html::openElement( 'div', array( 'class' => 'collection-empty' ) ) . Html::element( 'h3', array(), wfMessage( 'gather-empty' )->text() ) . Html::element( 'div', array(), - wfMessage( 'gather-empty-footer' )->text() ) . + wfMessage( 'gather-empty-footer' )->parse() ) . Html::closeElement( 'div' ); } diff --git a/resources/Resources.php b/resources/Resources.php index 80ca8d7..85e9d27 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -135,6 +135,7 @@ 'gather-watchlist-title', 'gather-add-toast', 'gather-add-failed-toast', + 'gather-add-title-invalid-toast', 'gather-remove-toast', 'gather-anon-cta', 'gather-collection-member', diff --git a/resources/ext.gather.watchstar/CollectionsContentOverlay.js b/resources/ext.gather.watchstar/CollectionsContentOverlay.js index 71d55be..44e719e 100644 --- a/resources/ext.gather.watchstar/CollectionsContentOverlay.js +++ b/resources/ext.gather.watchstar/CollectionsContentOverlay.js @@ -190,7 +190,7 @@ this.addCollection( title, page ); } else { - toast.show( mw.msg( 'gather-add-failed-toast', title ), 'toast' ); + toast.show( mw.msg( 'gather-add-title-invalid-toast' ), 'toast error' ); } }, /** -- To view, visit https://gerrit.wikimedia.org/r/202612 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I48d03c8846331a201485ef63c894b70816a74023 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Gather Gerrit-Branch: master Gerrit-Owner: Robmoen <rm...@wikimedia.org> Gerrit-Reviewer: Jdlrobson <jrob...@wikimedia.org> Gerrit-Reviewer: Siebrand <siebr...@kitano.nl> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits