Catrope has uploaded a new change for review.
https://gerrit.wikimedia.org/r/259531
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(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageTriage
refs/changes/31/259531/1
diff --git
a/includes/Notifications/PageTriageAddDeletionTagPresentationModel.php
b/includes/Notifications/PageTriageAddDeletionTagPresentationModel.php
index ffe6818..41ac1d5 100644
--- a/includes/Notifications/PageTriageAddDeletionTagPresentationModel.php
+++ b/includes/Notifications/PageTriageAddDeletionTagPresentationModel.php
@@ -45,7 +45,6 @@
* @return array [(string) tag list, (int) amount of tags]
*/
protected function getTagsForOutput() {
- global $wgContLang;
$eventData = $this->event->getExtra();
@@ -53,6 +52,6 @@
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: newchange
Gerrit-Change-Id: I7748f9dd126c22158f13c42298400a9e280e3113
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageTriage
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits