Reedy has uploaded a new change for review.
https://gerrit.wikimedia.org/r/173495
Change subject: Prevent PHP notices and broken time displays
......................................................................
Prevent PHP notices and broken time displays
Bug: 73111
Change-Id: I69c22e8b61e65fe2ec881f6401e4eb9e809900dd
(cherry picked from commit 932738df9ba179b3c9d10b13fbe764c2aac8f62d)
---
M TimeUnits.body.php
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/cldr
refs/changes/95/173495/1
diff --git a/TimeUnits.body.php b/TimeUnits.body.php
index 1cbe531..df7f2a6 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/173495
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: wmf/1.25wmf7
Gerrit-Owner: Reedy <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits