Robmoen has uploaded a new change for review. https://gerrit.wikimedia.org/r/202612
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, 10 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather refs/changes/12/202612/1 diff --git a/i18n/en.json b/i18n/en.json index a1ab6ad..78f78ed 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -32,7 +32,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", @@ -50,7 +50,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 articles 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.", @@ -70,7 +71,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 $1 article.", "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 5d58ec4..4f177a1 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -55,6 +55,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}}", @@ -75,7 +76,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..6154622 100644 --- a/includes/views/Collection.php +++ b/includes/views/Collection.php @@ -128,11 +128,12 @@ * @return string HTML */ private function getEmptyCollectionMessage() { + global $wgSitename; // FIXME: i18n this messagesinclude 'Collection.php'; 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', $wgSitename )->text() ) . Html::closeElement( 'div' ); } diff --git a/resources/Resources.php b/resources/Resources.php index dad06ff..b0b0922 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -134,6 +134,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: newchange Gerrit-Change-Id: I48d03c8846331a201485ef63c894b70816a74023 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Gather Gerrit-Branch: master Gerrit-Owner: Robmoen <rm...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits