jenkins-bot has submitted this change and it was merged. Change subject: Implement privacy label on Special:Gather ......................................................................
Implement privacy label on Special:Gather Not sure why this wasn't done... Bug: T92587 Change-Id: If7eab03352feb12758857aae8066f9654db71d91 --- M i18n/en.json M i18n/qqq.json M includes/views/CollectionsListItemCard.php 3 files changed, 12 insertions(+), 3 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index 94976b7..6154180 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -34,6 +34,7 @@ "gather-lists-title": "Collections", "gather-read-more": "Read more", "gather-private": "Private", + "gather-public": "Public", "gather-article-count": "$1 {{PLURAL:$1|article|articles}}", "gather-empty": "Nothing in this collection yet...", "gather-empty-footer": "I don't know how you got here but this is a sad place.", diff --git a/i18n/qqq.json b/i18n/qqq.json index a97bd5e..bc252fa 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -37,6 +37,7 @@ "gather-lists-title": "Note: Experimental feature. Messages and UI may change radically at any time. Translate at your own risk.\n Title for [[Special:Gather]] when displaying user curated lists.\n{{Identical|Collection}}", "gather-read-more": "Note: Experimental feature. Messages and UI may change radically at any time. Translate at your own risk.\n Label for the read more link used on [[Special:Gather]].\n{{Identical|Read more}}", "gather-private": "Note: Experimental feature. Messages and UI may change radically at any time. Translate at your own risk.\n Label for a collection when it is not publicly visible\n{{Identical|Private}}", + "gather-public": "Note: Experimental feature. Messages and UI may change radically at any time. Translate at your own risk.\n Label for a collection when it is publicly visible\n{{Identical|Public}}", "gather-article-count": "Note: Experimental feature. Messages and UI may change radically at any time. Translate at your own risk.\n Expression of the number of articles in a collection. Parameter:\n* $1 - number of articles in the collection\n{{Identical|Article}}", "gather-empty": "Note: Experimental feature. Messages and UI may change radically at any time. Translate at your own risk.\n Message shown on an empty rendered collection on [[Special:Gather]].", "gather-empty-footer": "Note: Experimental feature. Messages and UI may change radically at any time. Translate at your own risk.\n Footnote shown on an empty rendered collection on [[Special:Gather]].", diff --git a/includes/views/CollectionsListItemCard.php b/includes/views/CollectionsListItemCard.php index cd1ebb7..49ada64 100644 --- a/includes/views/CollectionsListItemCard.php +++ b/includes/views/CollectionsListItemCard.php @@ -41,6 +41,14 @@ } /** + * Gets the privacy message + */ + public function getPrivacyMsg() { + $status = $this->collection->isPublic() ? 'gather-public' : 'gather-private'; + return wfMessage( $status )->text(); + } + + /** * @inheritdoc */ public function getHtml() { @@ -48,8 +56,7 @@ 'gather-article-count', $this->collection->getCount() )->text(); - // FIXME: should consider privacy in collection - $followingMsg = wfMessage( 'gather-private' )->text(); + $followingMsg = $this->getPrivacyMsg(); $collectionUrl = $this->collection->getUrl(); $hasImage = $this->collection->hasImage(); @@ -66,7 +73,7 @@ Html::element( 'a', array( 'href' => $collectionUrl ), $this->getTitle() ) . Html::closeElement( 'div' ) . Html::element( 'span', array( 'class' => 'collection-card-following' ), $followingMsg ) . - Html::element( 'span', array( 'class' => 'collection-card-following' ), '•' ) . + Html::element( 'span', array(), '•' ) . Html::element( 'span', array( 'class' => 'collectoin-card-article-count' ), $articleCountMsg ) . Html::closeElement( 'div' ) . Html::closeElement( 'div' ); -- To view, visit https://gerrit.wikimedia.org/r/196561 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If7eab03352feb12758857aae8066f9654db71d91 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Gather Gerrit-Branch: master Gerrit-Owner: Jhernandez <jhernan...@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