Jdlrobson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/205296
Change subject: Adjust messages for empty collections based on user viewing it
......................................................................
Adjust messages for empty collections based on user viewing it
Bug: T95740
Change-Id: I3ba70a20f53b0b8f0352fdb809f0bc349116714b
---
M i18n/en.json
M i18n/qqq.json
M includes/views/Collection.php
3 files changed, 7 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather
refs/changes/96/205296/1
diff --git a/i18n/en.json b/i18n/en.json
index 0a61fca..5997b08 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -82,7 +82,8 @@
"gather-hidden": "Hidden",
"gather-article-count": "$1 {{PLURAL:$1|page|pages}}",
"gather-empty": "Nothing in this collection yet...",
- "gather-empty-footer": "Create a collection by clicking on the star
icon while reading a {{SITENAME}} page.",
+ "gather-empty-footer-mine": "Add pages to this collection by clicking
the edit button.",
+ "gather-empty-footer": "This is an empty collection.",
"gather-edit-button": "Edit",
"gather-delete-button": "Delete",
"gather-overlay-continue": "Next",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 2e56a26..cb2d9dc 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -86,7 +86,8 @@
"gather-hidden": "Label for a collection when it has been hidden from
the public by an administrator\n{{Identical|Hidden}}",
"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 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-empty-footer-mine": "Footnote shown on an empty collection on
[[Special:Gather]] when the collection belongs to them.",
+ "gather-empty-footer": "Footnote shown on an empty collection on
[[Special:Gather]] for a collection that doesn't belong to them.",
"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}}",
"gather-overlay-continue": "Label for button inside overlay to take you
to another screen.",
diff --git a/includes/views/Collection.php b/includes/views/Collection.php
index 4aa2a7a..e5fb7bd 100644
--- a/includes/views/Collection.php
+++ b/includes/views/Collection.php
@@ -123,11 +123,12 @@
* @return string HTML
*/
private function getEmptyCollectionMessage() {
- // FIXME: i18n this messagesinclude 'Collection.php';
+ $key = $this->collection->isOwner( $this->user ) ?
'gather-empty-footer-mine' :
+ 'gather-empty-footer';
return Html::openElement( 'div', array( 'class' =>
'collection-empty' ) ) .
Html::element( 'h3', array(), wfMessage( 'gather-empty'
)->text() ) .
Html::element( 'div', array(),
- wfMessage( 'gather-empty-footer' )->parse() ) .
+ wfMessage( $key )->text() ) .
Html::closeElement( 'div' );
}
--
To view, visit https://gerrit.wikimedia.org/r/205296
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ba70a20f53b0b8f0352fdb809f0bc349116714b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits