Nikerabbit has uploaded a new change for review.

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

Change subject: Prevent PHP notices and broken time displays
......................................................................

Prevent PHP notices and broken time displays

Bug: 73111
Change-Id: I69c22e8b61e65fe2ec881f6401e4eb9e809900dd
---
M TimeUnits.body.php
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/cldr 
refs/changes/05/171805/1

diff --git a/TimeUnits.body.php b/TimeUnits.body.php
index 1cbe531..f138e14 100644
--- a/TimeUnits.body.php
+++ b/TimeUnits.body.php
@@ -169,6 +169,11 @@
                        $timeUnitKey = "{$unit}-{$tense}-other";
                }
 
+               // Not all languages have translations for everything
+               if ( !isset( $timeUnits[$timeUnitKey] ) ) {
+                       return true
+               }
+
                // Select the appropriate template for the timestamp.
                $timeUnit = $timeUnits[$timeUnitKey];
                // Replace the placeholder with the number.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I69c22e8b61e65fe2ec881f6401e4eb9e809900dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/cldr
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <niklas.laxst...@gmail.com>
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