i18n: Add line-break in email notificaton for minor edits
authorDerick Alangi <alangiderick@gmail.com>
Wed, 13 Feb 2019 11:11:46 +0000 (12:11 +0100)
committerThiemo Kreuz (WMDE) <thiemo.kreuz@wikimedia.de>
Mon, 18 Mar 2019 12:40:18 +0000 (12:40 +0000)
Added missing line-break in email notification specifically after
page summary or immediately before $PAGEMINOREDIT (for minor edits).
In addition, if the edit is not marked as a "minor edit", avoid the
line break.

Bug: T176595
Change-Id: I68cc249c3546eb7fed0834063f15304e3c245e55

includes/mail/EmailNotification.php

index 4d1b855..987239b 100644 (file)
@@ -328,8 +328,9 @@ class EmailNotification {
 
                $keys['$PAGETITLE'] = $this->title->getPrefixedText();
                $keys['$PAGETITLE_URL'] = $this->title->getCanonicalURL();
-               $keys['$PAGEMINOREDIT'] = "\n" . ( $this->minorEdit ?
-                       wfMessage( 'enotif_minoredit' )->inContentLanguage()->text() : '' );
+               $keys['$PAGEMINOREDIT'] = $this->minorEdit ?
+                       "\n\n" . wfMessage( 'enotif_minoredit' )->inContentLanguage()->text() :
+                       '';
                $keys['$UNWATCHURL'] = $this->title->getCanonicalURL( 'action=unwatch' );
 
                if ( $this->editor->isAnon() ) {