MtDu has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/263210

Change subject: Add GENDER to some Newsletter messages
......................................................................

Add GENDER to some Newsletter messages

Added 'name' parameter in SpecialNewsletter

Deleted unused parameter from flyout message

Added GENDER to flyout, email-batch-body, and title messages

Change-Id: Iedb7e40e1fc839c082aaa4c3a1bb7e95c521f387
---
M Newsletter.hooks.php
M i18n/en.json
M i18n/qqq.json
M includes/specials/SpecialNewsletter.php
4 files changed, 11 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter 
refs/changes/10/263210/1

diff --git a/Newsletter.hooks.php b/Newsletter.hooks.php
index 0b231b7..380f503 100755
--- a/Newsletter.hooks.php
+++ b/Newsletter.hooks.php
@@ -35,13 +35,14 @@
                        'presentation-model' => 
'EchoNewsletterPresentationModel',
                        'formatter-class' => 'EchoNewsletterFormatter',
                        'title-message' => 'newsletter-notification-title',
-                       'title-params' => array( 'newsletter', 'title', 'agent' 
),
+                       'title-params' => array( 'newsletter', 'title', 
'agent', 'name' ),
                        'flyout-message' => 'newsletter-notification-flyout',
+                       'flyout-params' => array( 'newsletter', 'agent', 'name' 
),
                        'payload' => array( 'summary' ),
                        'email-subject-message' => 'newsletter-email-subject',
                        'email-subject-params' => array( 'newsletter' ),
                        'email-body-batch-message' => 
'newsletter-email-batch-body',
-                       'email-body-batch-params' =>  array( 'newsletter' , 
'agent' ),
+                       'email-body-batch-params' =>  array( 'newsletter', 
'agent', 'name' ),
                );
 
                return true;
diff --git a/i18n/en.json b/i18n/en.json
index 007a6ad..b0e8a11 100755
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -83,12 +83,12 @@
        "newsletter-list-search-none-found": "No newsletters match your query.",
        "echo-category-title-newsletter": "Newsletters",
        "echo-pref-tooltip-newsletter": "Notify me when any of the newsletters 
to which I have subscribed to announces a new issue.",
-       "newsletter-notification-title": "[[User:$3|$3]] has announced a 
[[$2|new issue]] of \"$1\".",
-       "newsletter-notification-flyout": "$3 has announced a new issue of $1.",
+       "newsletter-notification-title": "[[User:$3|$3]] {{GENDER:$4|has 
announced}} a [[$2|new issue]] of \"$1\".",
+       "newsletter-notification-flyout": "$2 {{GENDER:$3|has announced}} a new 
issue of $1.",
        "newsletter-notification-link-text-new-issue": "View new issue",
        "newsletter-notification-link-text-view-newsletter": "View newsletter",
        "newsletter-email-subject": "A new issue of $1 has been announced.",
-       "newsletter-email-batch-body": "$2 has announced a new issue of $1.",
+       "newsletter-email-batch-body": "$2 {{GENDER:$3|has announced}} a new 
issue of $1.",
        "newsletter-header-name": "Name of newsletter",
        "newsletter-header-description": "Description",
        "newsletter-header-action": "Subscribed?",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 775d00a..4df3bd8 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -87,12 +87,12 @@
        "newsletter-list-search-none-found": "Error message shown on 
[[Special:Newsletters]] if no newsletters found after user searches the table 
using filters",
        "echo-category-title-newsletter": "Title of the notification category 
used by Newsletter 
extension.\n{{Related|Echo-category-title}}\n{{Identical|Newsletter}}",
        "echo-pref-tooltip-newsletter": "Short description of the newsletter 
notification category.\n{{Related|Echo-pref-tooltip}}",
-       "newsletter-notification-title": "Header text for a notification when a 
new issue of a newsletter is announced. Parameters:\n* $1 is the name of the 
newsletter.\n* $2 is title of the issue page.\n* $3 is the username of the user 
who announced the new issue.",
-       "newsletter-notification-flyout": "Used as a Echo notification flyout 
message when a new issue of a newsletter is announced. \n* $1 is the name of 
the newsletter.\n* $2 is title of the issue page.\n* $3 is the username of the 
user who announced the new issue.",
+       "newsletter-notification-title": "Header text for a notification when a 
new issue of a newsletter is announced. Parameters:\n* $1 is the name of the 
newsletter.\n* $2 is title of the issue page.\n* $3 is the username of the user 
who announced the new issue, not used for GENDER\n* $4 is the username of the 
user who announced the issue, used for GENDER",
+       "newsletter-notification-flyout": "Used as a Echo notification flyout 
message when a new issue of a newsletter is announced. \n* $1 is the name of 
the newsletter.\n* $2 is the username of the user who announced the new issue, 
not used for GENDER\n* $3 is the username of the user who announced the new 
issue, used for GENDER",
        "newsletter-notification-link-text-new-issue": "Label of the primary 
link of the notification-newsletter-flyout, which on clicking navigates the 
user to the newly announced issue of a newsletter.",
        "newsletter-notification-link-text-view-newsletter": "Label for button 
that links to the newsletter page.",
        "newsletter-email-subject": "Text of the email subject when a new 
newsletter is announced Parameters:\n* $1 is the name of the newsletter.",
-       "newsletter-email-batch-body": "First line of the email body when a new 
newsletter is announced Parameters:\n* $1 is the name of the newsletter.\n* $2 
is the username of the user who announced the new issue.",
+       "newsletter-email-batch-body": "First line of the email body when a new 
newsletter is announced Parameters:\n* $1 is the name of the newsletter.\n* $2 
is the username of the user who announced the new issue, not used for GENDER\n* 
$3 is the username of the user who announced the new issue, used for GENDER",
        "newsletter-header-name": "Label of the newsletter name column of table 
in [[Special:Newsletters]] which lists the names of newsletters",
        "newsletter-header-description": "Label of the description column of 
table in [[Special:Newsletters]] which displays a description about the 
newsletter\n{{Identical|Description}}",
        "newsletter-header-action": "Label of the subscribe column of table in 
[[Special:Newsletters]] which provides radio buttons to subscribe/unsubscribe 
newsletters\n{{Identical|Subscribed}}",
diff --git a/includes/specials/SpecialNewsletter.php 
b/includes/specials/SpecialNewsletter.php
index aff4632..0183963 100644
--- a/includes/specials/SpecialNewsletter.php
+++ b/includes/specials/SpecialNewsletter.php
@@ -454,7 +454,8 @@
                                        'section-text' => trim( 
$data['summary'] ),
                                        'notifyAgent' => true,
                                ),
-                               'agent' => $this->getUser()
+                               'agent' => $this->getUser(),
+                               'name' => $this->getUser()->getName()
                        )
                );
 

-- 
To view, visit https://gerrit.wikimedia.org/r/263210
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iedb7e40e1fc839c082aaa4c3a1bb7e95c521f387
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: MtDu <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to