jenkins-bot has submitted this change and it was merged.

Change subject: Stop the unicode nonsense
......................................................................


Stop the unicode nonsense

Bug: T144952
Change-Id: Idf25a9ff66d706aacab684876a3d585262402168
---
M includes/BannerRenderer.php
1 file changed, 3 insertions(+), 4 deletions(-)

Approvals:
  Ejegg: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/BannerRenderer.php b/includes/BannerRenderer.php
index 0919aae..663b699 100644
--- a/includes/BannerRenderer.php
+++ b/includes/BannerRenderer.php
@@ -132,15 +132,14 @@
                }
 
                $bannerKey = $this->banner->getDbKey();
-               $bannerHtml = $this->context->msg( $bannerKey )->inLanguage( 
$parentLang )->text();
-               if ( $bannerHtml === "<{$bannerKey}>"
-                       || $bannerHtml === "\u29fc{$bannerKey}\u29fd"
-               ) {
+               $bannerContentMessage = $this->context->msg( $bannerKey 
)->inLanguage( $parentLang );
+               if ( !$bannerContentMessage->exists() ) {
                        // Translation subsystem failure
                        throw new RuntimeException(
                                "Banner message key $bannerKey could not be 
found in {$parentLang->getCode()}"
                        );
                }
+               $bannerHtml = $bannerContentMessage->text();
                $bannerHtml .= $this->getResourceLoaderHtml();
                $bannerHtml = $this->substituteMagicWords( $bannerHtml );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idf25a9ff66d706aacab684876a3d585262402168
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Awight <awi...@wikimedia.org>
Gerrit-Reviewer: AndyRussG <andrew.green...@gmail.com>
Gerrit-Reviewer: Cdentinger <cdentin...@wikimedia.org>
Gerrit-Reviewer: Ejegg <eeggles...@wikimedia.org>
Gerrit-Reviewer: Ssmith <ssm...@wikimedia.org>
Gerrit-Reviewer: XenoRyet <dkozlow...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to