[MediaWiki-commits] [Gerrit] Build lego message for HTML email footer - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Build lego message for HTML email footer .. Build lego message for HTML email footer Change-Id: Ic750ff3eb4e97c0cd23dd39a998c60860a49cf45 --- M i18n/en.json M i18n/qqq.json M includes/formatters/EchoHtmlEmailFormatter.php 3 files changed, 20 insertions(+), 8 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index 16a99e2..d74a4ae 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -197,7 +197,8 @@ "echo-email-footer-default-html": "To control which emails we send you, check your preferences.\n$1", "echo-email-footer-default": "$2\n\nTo control which emails we send you, check your preferences:\n{{canonicalurl:{{#special:Preferences}}#mw-prefsection-echo}}\n\n$1", "echo-email-plain-footer": "To control which emails we send you, check your preferences:", - "echo-email-html-footer": "To control which emails we send you, check your preferences.\n$1", + "echo-email-html-footer-preference-link-text": "check your preferences", + "echo-email-html-footer-with-link": "To control which emails we send you, $1.", "echo-notification-alert": "{{PLURAL:$1|Alert ($1)|Alerts ($1)|100=Alerts (99+)}}", "echo-notification-message": "{{PLURAL:$1|Message ($1)|Messages ($1)|100=Messages (99+)}}", "echo-notification-alert-text-only": "Alerts", diff --git a/i18n/qqq.json b/i18n/qqq.json index bb0233e..51c540e 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -188,7 +188,8 @@ "echo-email-footer-default-html": "Default footer content for Echo html e-mail notifications. Parameters:\n* $1 - the address of the organization that sent the email\n* $2 - the URL to the notification preference page\nFor plain-text version, see {{msg-mw|Echo-email-footer-default}}.", "echo-email-footer-default": "Default footer content for Echo text e-mail notifications. Parameters:\n* $1 - the address of the organization that sent the email\n* $2 - \"---...\" ({{msg-mw|echo-email-batch-separator}})\n\nFor HTML version, see {{msg-mw|echo-email-footer-default-html}}.", "echo-email-plain-footer": "Footer content for Echo text e-mail notifications.\n\nFor HTML version, see {{msg-mw|echo-email-html-footer}}.", - "echo-email-html-footer": "Default footer content for Echo html e-mail notifications. Parameters:\n* $1 - the address of the organization that sent the email\n* $2 - the URL to the notification preference page\nFor plain-text version, see {{msg-mw|Echo-email-footer-default}}.", + "echo-email-html-footer-preference-link-text": "Text of link to the preference page in the footer of HTML emails.", + "echo-email-html-footer-with-link": "Footer content of the HTML email.\n* $1 - complete HTML link to the preference page.\n\nSee {{msg-mw|echo-email-html-footer-preference-link-text}} for the text of the link.", "echo-notification-alert": "Label for alert notifications (= non discussion notifications) tab in Echo overlay. Parameters:\n* $1 - the number of unread alerts. The number cannot be higher than 100.\nSee also:\n* {{msg-mw|Echo-notification-message}}\n{{Identical|Alert}}", "echo-notification-message": "Label for message notifications (= discussion notifications) tab in Echo overlay. Parameters:\n* $1 - the number of unread messages. The number cannot be higher than 100.\nSee also:\n* {{msg-mw|Echo-notification-alert}}\n{{Identical|Message}}", "echo-notification-alert-text-only": "Label for alert notifications (= non discussion notifications) tab in Echo overlay without alert notification count next to it\n{{Identical|Alert}}", diff --git a/includes/formatters/EchoHtmlEmailFormatter.php b/includes/formatters/EchoHtmlEmailFormatter.php index c97c217..ef622ad 100644 --- a/includes/formatters/EchoHtmlEmailFormatter.php +++ b/includes/formatters/EchoHtmlEmailFormatter.php @@ -125,13 +125,23 @@ public function getFooter() { global $wgEchoEmailFooterAddress; - $prefsUrl = SpecialPage::getTitleFor( 'Preferences', false, 'mw-prefsection-echo' ) - ->getFullURL( '', false, PROTO_CANONICAL ); + $preferenceLink = $this->renderLink( + array( + 'label' => $this->msg( 'echo-email-html-footer-preference-link-text' )->text(), + 'url' => SpecialPage::getTitleFor( 'Preferences', false, 'mw-prefsection-echo' )->getFullURL( '', false, PROTO_CANONICAL ), + ), + 'text-decoration: none; color: #3868B0;' + ); - return $this->msg( 'echo-email-html-footer' ) - ->params( $wgEchoEmailFooterAddress, $prefsUrl ) - // This is a raw
[MediaWiki-commits] [Gerrit] Build lego message for HTML email footer - change (mediawiki...Echo)
Sbisson has uploaded a new change for review. https://gerrit.wikimedia.org/r/289552 Change subject: Build lego message for HTML email footer .. Build lego message for HTML email footer Change-Id: Ic750ff3eb4e97c0cd23dd39a998c60860a49cf45 --- M i18n/en.json M i18n/qqq.json M includes/formatters/EchoHtmlEmailFormatter.php 3 files changed, 19 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/52/289552/1 diff --git a/i18n/en.json b/i18n/en.json index 16a99e2..d74a4ae 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -197,7 +197,8 @@ "echo-email-footer-default-html": "To control which emails we send you, check your preferences.\n$1", "echo-email-footer-default": "$2\n\nTo control which emails we send you, check your preferences:\n{{canonicalurl:{{#special:Preferences}}#mw-prefsection-echo}}\n\n$1", "echo-email-plain-footer": "To control which emails we send you, check your preferences:", - "echo-email-html-footer": "To control which emails we send you, check your preferences.\n$1", + "echo-email-html-footer-preference-link-text": "check your preferences", + "echo-email-html-footer-with-link": "To control which emails we send you, $1.", "echo-notification-alert": "{{PLURAL:$1|Alert ($1)|Alerts ($1)|100=Alerts (99+)}}", "echo-notification-message": "{{PLURAL:$1|Message ($1)|Messages ($1)|100=Messages (99+)}}", "echo-notification-alert-text-only": "Alerts", diff --git a/i18n/qqq.json b/i18n/qqq.json index bb0233e..15037be 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -188,7 +188,8 @@ "echo-email-footer-default-html": "Default footer content for Echo html e-mail notifications. Parameters:\n* $1 - the address of the organization that sent the email\n* $2 - the URL to the notification preference page\nFor plain-text version, see {{msg-mw|Echo-email-footer-default}}.", "echo-email-footer-default": "Default footer content for Echo text e-mail notifications. Parameters:\n* $1 - the address of the organization that sent the email\n* $2 - \"---...\" ({{msg-mw|echo-email-batch-separator}})\n\nFor HTML version, see {{msg-mw|echo-email-footer-default-html}}.", "echo-email-plain-footer": "Footer content for Echo text e-mail notifications.\n\nFor HTML version, see {{msg-mw|echo-email-html-footer}}.", - "echo-email-html-footer": "Default footer content for Echo html e-mail notifications. Parameters:\n* $1 - the address of the organization that sent the email\n* $2 - the URL to the notification preference page\nFor plain-text version, see {{msg-mw|Echo-email-footer-default}}.", + "echo-email-html-footer-preference-link-text": "Text of link to the preference page in the footer of HTML emails.", + "echo-email-html-footer-with-link": "Footer content of the HTML email.\n* $1 - complete HTML link to the preference page.\n\nSee {{msg-mw:echo-email-html-footer-preference-link-text}} for the text of the link.", "echo-notification-alert": "Label for alert notifications (= non discussion notifications) tab in Echo overlay. Parameters:\n* $1 - the number of unread alerts. The number cannot be higher than 100.\nSee also:\n* {{msg-mw|Echo-notification-message}}\n{{Identical|Alert}}", "echo-notification-message": "Label for message notifications (= discussion notifications) tab in Echo overlay. Parameters:\n* $1 - the number of unread messages. The number cannot be higher than 100.\nSee also:\n* {{msg-mw|Echo-notification-alert}}\n{{Identical|Message}}", "echo-notification-alert-text-only": "Label for alert notifications (= non discussion notifications) tab in Echo overlay without alert notification count next to it\n{{Identical|Alert}}", diff --git a/includes/formatters/EchoHtmlEmailFormatter.php b/includes/formatters/EchoHtmlEmailFormatter.php index c97c217..21caefc 100644 --- a/includes/formatters/EchoHtmlEmailFormatter.php +++ b/includes/formatters/EchoHtmlEmailFormatter.php @@ -125,13 +125,24 @@ public function getFooter() { global $wgEchoEmailFooterAddress; - $prefsUrl = SpecialPage::getTitleFor( 'Preferences', false, 'mw-prefsection-echo' ) - ->getFullURL( '', false, PROTO_CANONICAL ); + $preferenceLink = $this->renderLink( + array( + 'label' => $this->msg( 'echo-email-html-footer-preference-link-text' )->text(), + 'url' => SpecialPage::getTitleFor( 'Preferences', false, 'mw-prefsection-echo' )->getFullURL( '', false, PROTO_CANONICAL ), + ), + 'text-decoration: none; color: #3868B0;' + ); - return $this->msg( 'echo-email-html-footer' ) - ->params( $wgEchoEmailFooterAddress,