jenkins-bot has submitted this change and it was merged.
Change subject: Use user language instead of content language for list
formatting in notifications
......................................................................
Use user language instead of content language for list formatting in
notifications
Language::listToText() outputs a comma-separated list ending with "and".
Notifications were using listToText() in the content language, which
meant that if you were using a different interface language, the
word "and" would not be translated even though the rest of the
notification would be.
Change-Id: I7748f9dd126c22158f13c42298400a9e280e3113
---
M includes/Notifications/PageTriageAddDeletionTagPresentationModel.php
M includes/Notifications/PageTriageAddMaintenanceTagPresentationModel.php
2 files changed, 2 insertions(+), 6 deletions(-)
Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git
a/includes/Notifications/PageTriageAddDeletionTagPresentationModel.php
b/includes/Notifications/PageTriageAddDeletionTagPresentationModel.php
index ffe6818..6af1903 100644
--- a/includes/Notifications/PageTriageAddDeletionTagPresentationModel.php
+++ b/includes/Notifications/PageTriageAddDeletionTagPresentationModel.php
@@ -45,14 +45,12 @@
* @return array [(string) tag list, (int) amount of tags]
*/
protected function getTagsForOutput() {
- global $wgContLang;
-
$eventData = $this->event->getExtra();
if ( !is_array( $eventData ) ) {
return array( '', 0 );
}
- return array( $wgContLang->listToText( $eventData ), count( $eventData
) );
+ return array( $this->language->listToText( $eventData ), count(
$eventData ) );
}
}
diff --git
a/includes/Notifications/PageTriageAddMaintenanceTagPresentationModel.php
b/includes/Notifications/PageTriageAddMaintenanceTagPresentationModel.php
index c5382e9..dc59e18 100644
--- a/includes/Notifications/PageTriageAddMaintenanceTagPresentationModel.php
+++ b/includes/Notifications/PageTriageAddMaintenanceTagPresentationModel.php
@@ -45,14 +45,12 @@
* @return array [(string) tag list, (int) amount of tags]
*/
protected function getTagsForOutput() {
- global $wgContLang;
-
$eventData = $this->event->getExtra();
if ( !is_array( $eventData ) ) {
return array( '', 0 );
}
- return array( $wgContLang->listToText( $eventData ), count( $eventData
) );
+ return array( $this->language->listToText( $eventData ), count(
$eventData ) );
}
}
--
To view, visit https://gerrit.wikimedia.org/r/259531
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7748f9dd126c22158f13c42298400a9e280e3113
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/PageTriage
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Matthias Mullie <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits