Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/276099
Change subject: Corresponding changes for Echo 99+ refactoring ...................................................................... Corresponding changes for Echo 99+ refactoring Also fixed this for newtopic bundle which says it has a cap of 250, but did not actually AFAICT. Change-Id: Ibfa56b1af9e8c56b4c5f900e0d487bc09688b2a2 Depends-On: Iabeaae747f99980c0610d552f6b38f89d940b890 --- M i18n/en.json M i18n/qqq.json M includes/Notifications/FlowPresentationModel.php M includes/Notifications/Formatter.php M includes/Notifications/NewTopicPresentationModel.php M includes/Notifications/PostReplyPresentationModel.php 6 files changed, 37 insertions(+), 31 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/99/276099/1 diff --git a/i18n/en.json b/i18n/en.json index 7727cf8..ca9f636 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -266,20 +266,20 @@ "flow-last-modified": "Last modified about $1", "flow-workflow": "workflow", "flow-notification-reply": "<span class=\"plainlinks mw-echo-title-heading\">[$5 $2]</span><br />$1 {{GENDER:$1|responded}} on '''$4'''.", - "flow-notification-reply-bundle": "<span class=\"plainlinks mw-echo-title-heading\">[$4 $2]</span><br />$1 and $5 {{PLURAL:$6|other|others}} {{GENDER:$1|responded}} on '''$3'''.", + "flow-notification-reply-bundle": "<span class=\"plainlinks mw-echo-title-heading\">[$4 $2]</span><br />$1 and {{PLURAL:$5|one other|$5 others|100=99+ others}} {{GENDER:$1|responded}} on '''$3'''.", "flow-notification-edit": "<span class=\"plainlinks mw-echo-title-heading\">[$6 $2]</span><br />$1 has {{GENDER:$1|edited}} your <span class=\"plainlinks\">[$5 post]</span> on [[$3|$4]].", - "flow-notification-edit-bundle": "$1 and $5 {{PLURAL:$6|other|others}} {{GENDER:$1|edited}} a <span class=\"plainlinks\">[$4 post]</span> in \"$2\" on \"$3\".", + "flow-notification-edit-bundle": "$1 and {{PLURAL:$5|one other|$5 others|100=99+ others}} {{GENDER:$1|edited}} a <span class=\"plainlinks\">[$4 post]</span> in \"$2\" on \"$3\".", "notification-header-flow-new-topic-v2": "New topic created on '''$3''': \"'''$4'''\".", - "notification-bundle-header-flow-new-topic": "$1 new {{PLURAL:$2|topic|topics}} on '''$3'''.", + "notification-bundle-header-flow-new-topic": "$1 new {{PLURAL:$1|topic|topics}} on '''$3'''.", "notification-body-flow-new-topic-v2": "$1", "notification-header-flow-new-topic-user-talk": "A new topic was created on '''your talk page''': \"'''$4'''\".", - "notification-bundle-header-flow-new-topic-user-talk": "$1 new {{PLURAL:$2|topic|topics}} on '''your talk page'''.", + "notification-bundle-header-flow-new-topic-user-talk": "$1 new {{PLURAL:$1|topic|topics}} on '''your talk page'''.", "notification-body-flow-new-topic-user-talk": "$1", "notification-header-flow-post-reply": "$1 {{GENDER:$2|replied}} in \"'''$4'''\".", - "notification-bundle-header-flow-post-reply-v2": "$1 new {{PLURAL:$2|reply|replies}} in \"'''$3'''\".", + "notification-bundle-header-flow-post-reply-v2": "$1 new {{PLURAL:$1|reply|replies}} in \"'''$3'''\".", "notification-body-flow-post-reply-v2": "$1", "notification-header-flow-post-reply-user-talk": "$1 {{GENDER:$2|posted}} a reply on '''your talk page''' in \"'''$4'''\".", - "notification-bundle-header-flow-post-reply-user-talk": "$1 new {{PLURAL:$2|reply|replies}} on '''your talk page''' in \"'''$3'''\".", + "notification-bundle-header-flow-post-reply-user-talk": "$1 new {{PLURAL:$1|reply|replies}} on '''your talk page''' in \"'''$3'''\".", "notification-body-flow-post-reply-user-talk": "$1", "notification-header-flow-post-edited-v2": "{{GENDER:$2|Your}} post in \"'''$1'''\" was edited.", "notification-bundle-header-flow-post-edited-v2": "{{GENDER:$2|Your}} post in \"'''$1'''\" was edited multiple times.", @@ -299,7 +299,7 @@ "notification-body-flow-summary-edited-user-talk": "$1", "notification-email-subject-flow-summary-edited": "$1 {{GENDER:$1|updated}} the summary on $2.", "notification-email-batch-body-flow-summary-edited": "$1 {{GENDER:$1|updated}} the summary on $2.", - "notification-email-batch-bundle-body-flow-summary-edited": "$1 and $3 {{PLURAL:$4|other|others}} {{GENDER:$1|updated}} the summary on $2", + "notification-email-batch-bundle-body-flow-summary-edited": "$1 and {{PLURAL:$3|one other|$3 others|100=99+ others}} {{GENDER:$1|updated}} the summary on $2", "notification-header-flow-mention-post": "$1 {{GENDER:$2|mentioned}} {{GENDER:$4|you}} in \"'''$5'''\".", "notification-header-flow-mention-header": "$1 {{GENDER:$2|mentioned}} {{GENDER:$4|you}} in the description of '''$3'''.", "notification-header-flow-mention-post-summary": "$1 {{GENDER:$2|mentioned}} {{GENDER:$4|you}} in \"'''$5'''\".", @@ -314,9 +314,9 @@ "notification-links-flow-description-edited-view-page": "{{GENDER:$1|View}} page", "notification-email-subject-flow-description-edited": "$1 {{GENDER:$1|edited}} the description on $2.", "notification-email-batch-body-flow-description-edited": "$1 {{GENDER:$1|edited}} the description on $2.", - "notification-email-batch-bundle-body-flow-description-edited": "$1 and $3 {{PLURAL:$4|other|others}} {{GENDER:$1|edited}} the description on $2", + "notification-email-batch-bundle-body-flow-description-edited": "$1 and {{PLURAL:$3|one other|$3 others|100=99+ others}} {{GENDER:$1|edited}} the description on $2", "flow-notification-newtopic": "<span class=\"mw-echo-title-heading plainlinks\">[$5 $4]</span><br />$1 {{GENDER:$1|created}} a new topic on '''$3'''.", - "flow-notification-newtopic-bundle": "{{PLURAL:$1|$1 new topic|$1 new topics|250=250+ new topics}} on '''<span class=\"plainlinks\">[$3 $2]</span>'''", + "flow-notification-newtopic-bundle": "{{PLURAL:$1|$1 new topic|$1 new topics|250=249+ new topics}} on '''<span class=\"plainlinks\">[$3 $2]</span>'''", "flow-notification-rename": "$1 {{GENDER:$1|changed}} the title of <span class=\"plainlinks\">[$2 $3]</span> to \"$4\" on [[$5|$6]].", "flow-notification-mention": "$1 {{GENDER:$1|mentioned}} {{GENDER:$5|you}} in {{GENDER:$1|his|her|their}} <span class=\"plainlinks\">[$2 post]</span> in \"$3\" on \"$4\".", "flow-notification-link-text-view-post": "View post", @@ -324,17 +324,17 @@ "flow-notification-link-text-view-topics": "View topics", "flow-notification-reply-email-subject": "$2 on $3", "flow-notification-reply-email-batch-body": "$1 {{GENDER:$1|responded}} to \"$2\" on $3", - "flow-notification-reply-email-batch-bundle-body": "$1 and $4 {{PLURAL:$5|other|others}} {{GENDER:$1|responded}} to \"$2\" on $3", + "flow-notification-reply-email-batch-bundle-body": "$1 and {{PLURAL:$4|one other|$4 others|100=99+ others}} {{GENDER:$1|responded}} to \"$2\" on $3", "flow-notification-mention-email-subject": "$1 {{GENDER:$1|mentioned}} {{GENDER:$3|you}} on $2", "flow-notification-mention-email-batch-body": "$1 {{GENDER:$1|mentioned}} {{GENDER:$4|you}} in {{GENDER:$1|his|her|their}} post in \"$2\" on $3", "flow-notification-edit-email-subject": "$1 {{GENDER:$1|edited}} a post", "flow-notification-edit-email-batch-body": "$1 {{GENDER:$1|edited}} a post in \"$2\" on $3", - "flow-notification-edit-email-batch-bundle-body": "$1 and $4 {{PLURAL:$5|other|others}} {{GENDER:$1|edited}} a post in \"$2\" on $3", + "flow-notification-edit-email-batch-bundle-body": "$1 and {{PLURAL:$4|one other|$4 others|100=99+ others}} {{GENDER:$1|edited}} a post in \"$2\" on $3", "flow-notification-rename-email-subject": "$1 {{GENDER:$1|renamed}} your topic", "flow-notification-rename-email-batch-body": "$1 {{GENDER:$1|renamed}} your topic \"$2\" to \"$3\" on $4", "flow-notification-newtopic-email-subject": "$1 {{GENDER:$1|created}} a new topic on $2", "flow-notification-newtopic-email-batch-body": "$1 {{GENDER:$1|created}} a new topic with the title \"$2\" on $3", - "flow-notification-newtopic-email-batch-bundle-body": "{{PLURAL:$1|$1 new topic|$1 new topics|250=250+ new topics}} on $2", + "flow-notification-newtopic-email-batch-bundle-body": "{{PLURAL:$1|$1 new topic|$1 new topics|250=249+ new topics}} on $2", "echo-category-title-flow-discussion": "Flow", "echo-pref-tooltip-flow-discussion": "Notify me when actions related to me occur in Flow.", "flow-link-post": "post", diff --git a/i18n/qqq.json b/i18n/qqq.json index b1921cd..22cd8f9 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -276,20 +276,20 @@ "flow-last-modified": "Followed by the timestamp.\n\nParameters:\n* $1 - date and timestamp. {{Doc-human-timestamp|12:00|10}}", "flow-workflow": "Anchor link text for linking to a workflow.\n{{Identical|Workflow}}", "flow-notification-reply": "Notification text for when a user receives a reply. Parameters:\n* $1 - username of the person who replied\n* $2 - title of the topic\n* $3 - (Unused) title for the Flow board, this parameter is not used for the message at this moment\n* $4 - title for the page that the Flow board is attached to\n* $5 - permanent URL for the post\n{{Related|Flow-notification}}", - "flow-notification-reply-bundle": "Notification text for when a user receives replies from multiple users on the same topic.\n\nParameters:\n* $1 - username of the person who replied\n* $2 - title of the topic\n* $3 - title for the page that the Flow board is attached to\n* $4 - permantent URL for the post\n* $5 - the count of other action performers, could be number or {{msg-mw|Echo-notification-count}}. e.g. 7 others or 99+ others\n* $6 - a number used for plural support\nSee also:\n* {{msg-mw|Flow-notification-reply-email-batch-bundle-body}}\n{{Related|Flow-notification}}", + "flow-notification-reply-bundle": "Notification text for when a user receives replies from multiple users on the same topic.\n\nParameters:\n* $1 - username of the person who replied\n* $2 - title of the topic\n* $3 - title for the page that the Flow board is attached to\n* $4 - permanent URL for the post\n* $5 - The count of other action performers, except that if the count is greater than 99, this value will be 100; uses standard number formatting and used for PLURAL.\n* $6 - Unused\nSee also:\n* {{msg-mw|Flow-notification-reply-email-batch-bundle-body}}\n{{Related|Flow-notification}}", "flow-notification-edit": "Notification text for when a user's post is edited. Parameters:\n* $1 - username of the person who edited the post\n* $2 - title of the topic\n* $3 - title for the Flow board\n* $4 - title for the page that the Flow board is attached to\n* $5 - permanent URL for the post\n* $6 - permanent URL for the topic\n{{Related|Flow-notification}}", - "flow-notification-edit-bundle": "Notification text for when a user receives post edits from multiple users on the same topic.\n\nParameters:\n* $1 - username of the person who edited post\n* $2 - title of the topic\n* $3 - title for the page that the Flow board is attached to\n* $4 - permantent URL for the topic\n* $5 - the count of other action performers, could be number or {{msg-mw|Echo-notification-count}}. e.g. 7 others or 99+ others\n* $6 - a number used for plural support\nSee also:\n* {{msg-mw|Flow-notification-edit-email-batch-bundle-body}}\n{{Related|Flow-notification}}", + "flow-notification-edit-bundle": "Notification text for when a user receives post edits from multiple users on the same topic.\n\nParameters:\n* $1 - username of the person who edited post\n* $2 - title of the topic\n* $3 - title for the page that the Flow board is attached to\n* $4 - permanent URL for the topic\n* $5 - the count of other action performers, except that if the count is greater than 99, this value will be 100; uses standard number formatting and used for PLURAL.\n* $6 - Unused\nSee also:\n* {{msg-mw|Flow-notification-edit-email-batch-bundle-body}}\n{{Related|Flow-notification}}", "notification-header-flow-new-topic-v2": "Notification header text for when a new topic is created. Parameters:\n* $1 - the formatted username of the user who created the topic\n* $2 - the username for gender purposes\n* $3 - title of the Flow board\n* $4 - title of the topic.\n{{Related|Notification-header-flow}}", - "notification-bundle-header-flow-new-topic": "Notification text for when multiple new topics are created on the same page. Parameters:\n* $1 - The number of topics that were created for display purposes. This can be a number or '99+' if it is 99 or more\n* $2 - The number of new topics created for PLURAL purposes\n* $3 - The title of the page the topics were created on\n{{Related|Notification-bundle}}", + "notification-bundle-header-flow-new-topic": "Notification text for when multiple new topics are created on the same page. Parameters:\n* $1 - The number of topics that were created, except that if the count is greater than 99, this value will be 100; uses standard number formatting and used for PLURAL.\n* $2 - Unused\n* $3 - The title of the page the topics were created on\n{{Related|Notification-bundle}}", "notification-body-flow-new-topic-v2": "Notification body text for when a new topic is created. Parameters:\n$1 - a snippet of the content of the new topic.\n{{Related|Flow-notification}} {{notranslate}}", "notification-header-flow-new-topic-user-talk": "Notification header text for when a new topic is created on a user's talk page. Parameters:\n$1 - the formatted username of the user who created the topic\n* $2 - the username for gender purposes\n* $3 - title of the Flow board\n* $4 - title of the topic.\n{{Related|Notification-header-flow}}", - "notification-bundle-header-flow-new-topic-user-talk": "Notification text for when multiple new topics are created on a user's talk page. Parameters:\n* $1 - The number of topics that were created for display purposes. This can be a number or '99+' if it is 99 or more\n* $2 - The number of new topics created for PLURAL purposes\n* $3 - The title of the page the topics were created on\n{{Related|Notification-bundle}}", + "notification-bundle-header-flow-new-topic-user-talk": "Notification text for when multiple new topics are created on a user's talk page. Parameters:\n* $1 - The number of topics that were created, except that if the count is greater than 99, this value will be 100; uses standard number formatting and used for PLURAL.\n* $2 - Unused\n* $3 - The title of the page the topics were created on\n{{Related|Notification-bundle}}", "notification-body-flow-new-topic-user-talk": "Notification body text for when a new topic is created on a user's talk page. Parameters:\n$1 - a snippet of the content of the new topic.\n{{Related|Flow-notification}} {{notranslate}}", "notification-header-flow-post-reply": "Notification header text for when there is a reply on a topic. Parameters:\n* $1 - the formatted username of the user who replied to the topic\n* $2 - the username for gender purposes\n* $3 - title of the Flow board\n* $4 - title of the topic.\n{{Related|Notification-header-flow}}", - "notification-bundle-header-flow-post-reply-v2": "Notification header text for when there is a multiple replies on a topic. Parameters:\n* $1 - the number of replies for display\n* $2 - the raw number of replies, for PLURAL\n* $3 - title of the topic.\n{{Related|Flow-notification}}", + "notification-bundle-header-flow-post-reply-v2": "Notification header text for when there is a multiple replies on a topic. Parameters:\n* $1 - the number of replies, except that if the count is greater than 99, this value will be 100; uses standard number formatting and used for PLURAL.\n* $2 - Unused\n* $3 - title of the topic.\n{{Related|Flow-notification}}", "notification-body-flow-post-reply-v2": "Notification body text for when there is a reply on a topic. Parameters:\n* $1 - a snippet of the content of the reply.\n{{Related|Flow-notification}} {{notranslate}}", "notification-header-flow-post-reply-user-talk": "Notification header text for when there is a reply on a topic on a user's talk page. Parameters:\n* $1 - the formatted username of the user who replied to the topic\n* $2 - the username for gender purposes\n* $3 - title of the Flow board\n* $4 - title of the topic.\n{{Related|Notification-header-flow}}", - "notification-bundle-header-flow-post-reply-user-talk": "Notification header text for when there is a multiple replies on a topic on a user's talk page. Parameters:\n* $1 - the number of replies for display\n* $2 - the raw number of replies, for PLURAL\n* $3 - title of the topic.\n{{Related|Flow-notification}}", + "notification-bundle-header-flow-post-reply-user-talk": "Notification header text for when there is a multiple replies on a topic on a user's talk page. Parameters:\n* $1 - the number of replies, except that if the count is greater than 99, this value will be 100; uses standard number formatting and used for PLURAL.\n* $2 - Unused\n* $3 - title of the topic.\n{{Related|Flow-notification}}", "notification-body-flow-post-reply-user-talk": "Notification body text for when there is a reply on a topic on a user's talk page. Parameters:\n* $1 - a snippet of the content of the reply.\n{{Related|Flow-notification}} {{notranslate}}", "notification-header-flow-post-edited-v2": "Notification header text for when a post is edited. Parameters:\n* $1 - title of the topic.\n* $2 - name of the user viewing the notification, can be used for GENDER.\n{{Related|Notification-header-flow}}", "notification-bundle-header-flow-post-edited-v2": "Notification bundle header text for when a user receives post edits from multiple users on the same topic. Parameters:\n* $1 - title of the topic.\n* $2 - name of the user viewing the notification, can be used for GENDER.\nSee also: {{msg-mw|Flow-notification-edit-email-batch-bundle-body}}\n\n{{Related|Notification-bundle}}", @@ -309,7 +309,7 @@ "notification-body-flow-summary-edited-user-talk": "Notification body text for when a topic summary is edited on a user's talk page. Parameters:\n$1 - snippet of the post\n{{notranslate}}", "notification-email-subject-flow-summary-edited": "Subject line of notification email for the topic summary being edited. Parameters:\n* $1 - name of the user that edited the summary\n* $2 - title of the topic", "notification-email-batch-body-flow-summary-edited": "Email notification for the topic summary being edited. Parameters:\n* $1 - name of the user that edited the summary\n* $2 - title of the topic", - "notification-email-batch-bundle-body-flow-summary-edited": "Email notification body when a topic summary is edited multiple times, this message is used in both single email and email digest.\n\nParameters:\n* $1 - username of the person who edited the summary\n* $2 - title for the topic\n* $3 - the count of other action performers, could be number or {{msg-mw|Echo-notification-count}}. e.g. 7 others or 99+ others\n* $4 - a number used for plural support", + "notification-email-batch-bundle-body-flow-summary-edited": "Email notification body when a topic summary is edited multiple times, this message is used in both single email and email digest.\n\nParameters:\n* $1 - username of the person who edited the summary\n* $2 - title for the topic\n* $3 - the count of other action performers, except that if the count is greater than 99, this value will be 100; uses standard number formatting and used for PLURAL.\n* $4 - Unused", "notification-header-flow-mention-post": "{{doc-singularthey}}\nNotification header text for when a user is mentioned in a post or topic title. Parameters:\n* $1 - the formatted username of the person who made the post\n* $2 - the username of the user who mentioned the viewing user, can be used for GENDER\n* $3 - title of the Flow board\n* $4 - username of the person who receives the notification, can be used for GENDER\n* $5 - title of the topic\n{{Related|Notification-header-flow}}", "notification-header-flow-mention-header": "{{doc-singularthey}}\nNotification header text for when a user is mentioned in the board description. Parameters:\n* $1 - the formatted username of the person who made the post\n* $2 - the username for gender purposes\n* $3 - title of the Flow board\n* $4 - username of the person who receives the notification, can be used for GENDER\n{{Related|Notification-header-flow}}", "notification-header-flow-mention-post-summary": "Notification header text for when a user is mentioned in a post summary. Parameters:\n* $1 - the formatted username of the person who made the post\n* $2 - the username of the user who mentioned the viewing user, can be used for GENDER\n* $4 - username of the person who receives the notification, can be used for GENDER\n* $5 - title of the topic\n{{Related|Notification-header-flow}}", @@ -324,7 +324,7 @@ "notification-links-flow-description-edited-view-page": "Text for the link to the board", "notification-email-subject-flow-description-edited": "Subject line of notification email for the description being edited. Parameters:\n* $1 - name of the user that edited the description\n* $2 - title of the page", "notification-email-batch-body-flow-description-edited": "Email notification for the description being edited. Parameters:\n* $1 - name of the user that edited the description\n* $2 - title of the page", - "notification-email-batch-bundle-body-flow-description-edited": "Email notification body when a board description is edited multiple times, this message is used in both single email and email digest.\n\nParameters:\n* $1 - username of the person who edited the description\n* $2 - title for the page\n* $3 - the count of other action performers, could be number or {{msg-mw|Echo-notification-count}}. e.g. 7 others or 99+ others\n* $4 - a number used for plural support", + "notification-email-batch-bundle-body-flow-description-edited": "Email notification body when a board description is edited multiple times, this message is used in both single email and email digest.\n\nParameters:\n* $1 - username of the person who edited the description\n* $2 - title for the page\n* $3 - the count of other action performers, except that if the count is greater than 99, this value will be 100; uses standard number formatting and used for PLURAL.\n* $4 - Unused", "flow-notification-newtopic": "Notification text for when a new topic is created. Parameters:\n* $1 - username of the person who created the topic\n* $2 - (Unused) title for the Flow board\n* $3 - title for the page that the Flow board is attached to\n* $4 - title of the topic\n* $5 - Fully qualified url to view the created topic.\n{{Related|Flow-notification}}", "flow-notification-newtopic-bundle": "Notification text for when multiple new topics are created on the same page. Parameters:\n* $1 - The number of topics that were created. This value is capped to 250. When this value is 250 it means 250 or more topics have been created.\n* $2 - The title of the page the topics were created on\n* $3 - Fully qualified url to view the related board sorted by newest topics.\n{{Related|Flow-notification}}", "flow-notification-rename": "Notification text for when the subject of a topic is changed. Parameters:\n* $1 - username of the person who edited the title, can be used for GENDER\n* $2 - permalink to the topic\n* $3 - old topic subject\n* $4 - new topic subject\n* $5 - title for the Flow board\n* $6 - title for the page that the Flow board is attached to\n{{Related|Flow-notification}}", @@ -334,12 +334,12 @@ "flow-notification-link-text-view-topics": "Link text for the view topics button in a notification", "flow-notification-reply-email-subject": "Email notification subject when a user receives a reply. Parameters:\n* $1 - username of the person who replied (Unused now)\n* $2 - the topic title being replied to\n* $3 - title of the page the topic belongs to\n{{Related|Flow-notification-email}}\n{{Identical|On}}", "flow-notification-reply-email-batch-body": "Email notification body when a user receives a reply, this message is used in both single email and email digest.\n\nParameters:\n* $1 - username of the person who replied\n* $2 - title of the topic\n* $3 - title for the page that the Flow board is attached to\n{{Related|Flow-notification-email}}", - "flow-notification-reply-email-batch-bundle-body": "Email notification body when a user receives reply from multiple users, this message is used in both single email and email digest.\n\nParameters:\n* $1 - username of the person who replied\n* $2 - title of the topic\n* $3 - title for the page that the Flow board is attached to\n* $4 - the count of other action performers, could be number or {{msg-mw|Echo-notification-count}}. e.g. 7 others or 99+ others\n* $5 - a number used for plural support\n{{Related|Flow-notification-email}}", + "flow-notification-reply-email-batch-bundle-body": "Email notification body when a user receives reply from multiple users, this message is used in both single email and email digest.\n\nParameters:\n* $1 - username of the person who replied\n* $2 - title of the topic\n* $3 - title for the page that the Flow board is attached to\n* $4 - the count of other action performers, except that if the count is greater than 99, this value will be 100; uses standard number formatting and used for PLURAL.\n* $5 - Unused\n{{Related|Flow-notification-email}}", "flow-notification-mention-email-subject": "Email notification subject when a user is mentioned in a post. Parameters:\n* $1 - username of the person who mentions other users, can be used for GENDER\n* $2 - flow title text\n* $3 - username of the person who receives the notification, can be used for GENDER\n{{Related|Flow-notification-email}}", "flow-notification-mention-email-batch-body": "{{doc-singularthey}}\nEmail notification body when a user is mentioned in a post, this message is used in both single email and email digest.\n\nParameters:\n* $1 - username of the person who mentions other users, can be used for GENDER\n* $2 - title of the topic\n* $3 - title for the page that the Flow board is attached to\n* $4 - username of the person who receives the notification, can be used for GENDER\n{{Related|Flow-notification-email}}", "flow-notification-edit-email-subject": "Subject line of notification email for post being edited. Parameters:\n* $1 - name of the user that edited the post\n{{Related|Flow-notification-email}}", "flow-notification-edit-email-batch-body": "Email notification for post being edited. Parameters:\n* $1 - name of the user that edited the post\n* $2 - name of the topic the edited post belongs to\n* $3 - title of the page the topic belongs to\n{{Related|Flow-notification-email}}", - "flow-notification-edit-email-batch-bundle-body": "Email notification body when a user receives post edits from multiple users, this message is used in both single email and email digest.\n\nParameters:\n* $1 - username of the person who replied\n* $2 - title of the topic\n* $3 - title for the page that the Flow board is attached to\n* $4 - the count of other action performers, could be number or {{msg-mw|Echo-notification-count}}. e.g. 7 others or 99+ others\n* $5 - a number used for plural support\n{{Related|Flow-notification-email}}", + "flow-notification-edit-email-batch-bundle-body": "Email notification body when a user receives post edits from multiple users, this message is used in both single email and email digest.\n\nParameters:\n* $1 - username of the person who replied\n* $2 - title of the topic\n* $3 - title for the page that the Flow board is attached to\n* $4 - the count of other action performers, except that if the count is greater than 99, this value will be 100; uses standard number formatting and used for PLURAL.\n* $5 - Unused\n{{Related|Flow-notification-email}}", "flow-notification-rename-email-subject": "Subject line of notification email for topic being renamed. Parameters:\n* $1 - name of the user that renamed the topic\n{{Related|Flow-notification-email}}", "flow-notification-rename-email-batch-body": "Email notification for topic being renamed. Parameters:\n* $1 - name of the user that renamed the topic\n* $2 - the original topic title\n* $3 - the new topic title\n* $4 - title of the page the topic belongs to\n{{Related|Flow-notification-email}}", "flow-notification-newtopic-email-subject": "Subject line of notification email for new topic creation. Parameters:\n* $1 - name of the user that created a new topic\n* $2 - title\n{{Related|Flow-notification-email}}", diff --git a/includes/Notifications/FlowPresentationModel.php b/includes/Notifications/FlowPresentationModel.php index 95425d5..8be0fa1 100644 --- a/includes/Notifications/FlowPresentationModel.php +++ b/includes/Notifications/FlowPresentationModel.php @@ -98,10 +98,6 @@ return $agent->isAnon() ? $agent->getName() : $agent->getId(); } - protected function getOtherAgentsCountForOutput() { - return $this->getNotificationCountForOutput( false, array( $this, 'getEventUser' )); - } - protected function getViewTopicLink() { $title = Title::newFromText( $this->event->getExtraParam( 'topic-workflow' )->getAlphadecimal(), NS_TOPIC ); return array( diff --git a/includes/Notifications/Formatter.php b/includes/Notifications/Formatter.php index c3ca4ec..ba9bacb 100644 --- a/includes/Notifications/Formatter.php +++ b/includes/Notifications/Formatter.php @@ -219,6 +219,9 @@ * only needs to specify what iterator to use */ class NewTopicFormatter extends NotificationFormatter { + // Maximum topic count that is displayed exactly. Beyond this, it shows + + // to indicate there are more than that. + const MAX_EXACT_TOPIC_COUNT = 249; /** * New Topic user 'event' as the iterator @@ -244,7 +247,10 @@ protected function processParam( $event, $param, $message, $user ) { switch ( $param ) { case 'event-count': - $message->numParams( $this->bundleData['event-count'] ); + $cappedCount = $this->bundleData['event-count'] <= self::MAX_EXACT_TOPIC_COUNT ? + $this->bundleData['event-count'] : + ( self::MAX_EXACT_TOPIC_COUNT + 1 ); + $message->numParams( $cappedCount ); break; default: parent::processParam( $event, $param, $message, $user ); diff --git a/includes/Notifications/NewTopicPresentationModel.php b/includes/Notifications/NewTopicPresentationModel.php index 9c46fc4..ac58495 100644 --- a/includes/Notifications/NewTopicPresentationModel.php +++ b/includes/Notifications/NewTopicPresentationModel.php @@ -56,8 +56,10 @@ public function getHeaderMessage() { if ( $this->isBundled() ) { $msg = $this->msg( "notification-bundle-header-{$this->type}" ); - list( $countForOutput, $countForPlural ) = $this->getNotificationCountForOutput(); - $msg->params( $countForOutput, $countForPlural ); + $count = $this->getNotificationCountForOutput(); + + // Repeat is B/C until unused parameter is removed from translations + $msg->numParams( $count, $count ); $msg->params( $this->getTruncatedTitleText( $this->event->getTitle(), true) ); return $msg; } else { diff --git a/includes/Notifications/PostReplyPresentationModel.php b/includes/Notifications/PostReplyPresentationModel.php index 9facbfc..ba2fa3d 100644 --- a/includes/Notifications/PostReplyPresentationModel.php +++ b/includes/Notifications/PostReplyPresentationModel.php @@ -55,9 +55,11 @@ public function getHeaderMessage() { if ( $this->isBundled() ) { - list( $formattedCount, $countForPlural ) = $this->getNotificationCountForOutput(); + $count = $this->getNotificationCountForOutput(); $msg = $this->msg( $this->getHeaderMessageKey() ); - $msg->params( $formattedCount, $countForPlural ); + + // Repeat is B/C until unused parameter is removed from translations + $msg->numParams( $count, $count ); $msg->plaintextParams( $this->getTopicTitle() ); return $msg; } else { -- To view, visit https://gerrit.wikimedia.org/r/276099 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibfa56b1af9e8c56b4c5f900e0d487bc09688b2a2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Mattflaschen <mflasc...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits