[MediaWiki-commits] [Gerrit] Prevent PHP notices and broken time displays - change (mediawiki...cldr)

2014-11-15 Thread Reedy (Code Review)
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 re...@wikimedia.org
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com

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


[MediaWiki-commits] [Gerrit] Prevent PHP notices and broken time displays - change (mediawiki...cldr)

2014-11-15 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

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(-)

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



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: merged
Gerrit-Change-Id: I69c22e8b61e65fe2ec881f6401e4eb9e809900dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/cldr
Gerrit-Branch: wmf/1.25wmf7
Gerrit-Owner: Reedy re...@wikimedia.org
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Prevent PHP notices and broken time displays - change (mediawiki...cldr)

2014-11-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

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(-)

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



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/171805
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I69c22e8b61e65fe2ec881f6401e4eb9e809900dd
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/cldr
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: KartikMistry kartik.mis...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Prevent PHP notices and broken time displays - change (mediawiki...cldr)

2014-11-06 Thread Nikerabbit (Code Review)
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