From 31cb4c6b03ca1f8646d9adc2fbed4b82a3dbe617 Mon Sep 17 00:00:00 2001 From: Federico Leva Date: Thu, 27 Sep 2012 20:24:19 +0200 Subject: [PATCH] SI standards for time units * Use "min" rather than "m". * Add normal spaces to avoid hassles, no wrapping here anyway. Change-Id: I07f7aff41a831c88b82d6ddc53914372d6aec023 --- languages/messages/MessagesEn.php | 8 +++---- tests/phpunit/languages/LanguageTest.php | 30 ++++++++++++------------ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 1ab27bf5d8..12575a4143 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -3850,10 +3850,10 @@ By executing it, your system may be compromised.", # Video information, used by Language::formatTimePeriod() to format lengths in the above messages 'video-dims' => '$1, $2 × $3', # only translate this message to other languages if you have to change it -'seconds-abbrev' => '$1s', # only translate this message to other languages if you have to change it -'minutes-abbrev' => '$1m', # only translate this message to other languages if you have to change it -'hours-abbrev' => '$1h', # only translate this message to other languages if you have to change it -'days-abbrev' => '$1d', # only translate this message to other languages if you have to change it +'seconds-abbrev' => '$1 s', # only translate this message to other languages if you have to change it +'minutes-abbrev' => '$1 min', # only translate this message to other languages if you have to change it +'hours-abbrev' => '$1 h', # only translate this message to other languages if you have to change it +'days-abbrev' => '$1 d', # only translate this message to other languages if you have to change it 'seconds' => '{{PLURAL:$1|$1 second|$1 seconds}}', 'minutes' => '{{PLURAL:$1|$1 minute|$1 minutes}}', 'hours' => '{{PLURAL:$1|$1 hour|$1 hours}}', diff --git a/tests/phpunit/languages/LanguageTest.php b/tests/phpunit/languages/LanguageTest.php index 70254490d6..95d8fde4dc 100644 --- a/tests/phpunit/languages/LanguageTest.php +++ b/tests/phpunit/languages/LanguageTest.php @@ -36,7 +36,7 @@ class LanguageTest extends MediaWikiTestCase { array( 9.45, array(), - '9.5s', + '9.5 s', 'formatTimePeriod() rounding (<10s)' ), array( @@ -48,7 +48,7 @@ class LanguageTest extends MediaWikiTestCase { array( 9.95, array(), - '10s', + '10 s', 'formatTimePeriod() rounding (<10s)' ), array( @@ -60,7 +60,7 @@ class LanguageTest extends MediaWikiTestCase { array( 59.55, array(), - '1m 0s', + '1 min 0 s', 'formatTimePeriod() rounding (<60s)' ), array( @@ -72,7 +72,7 @@ class LanguageTest extends MediaWikiTestCase { array( 119.55, array(), - '2m 0s', + '2 min 0 s', 'formatTimePeriod() rounding (<1h)' ), array( @@ -84,7 +84,7 @@ class LanguageTest extends MediaWikiTestCase { array( 3599.55, array(), - '1h 0m 0s', + '1 h 0 min 0 s', 'formatTimePeriod() rounding (<1h)' ), array( @@ -96,7 +96,7 @@ class LanguageTest extends MediaWikiTestCase { array( 7199.55, array(), - '2h 0m 0s', + '2 h 0 min 0 s', 'formatTimePeriod() rounding (>=1h)' ), array( @@ -108,7 +108,7 @@ class LanguageTest extends MediaWikiTestCase { array( 7199.55, 'avoidseconds', - '2h 0m', + '2 h 0 min', 'formatTimePeriod() rounding (>=1h), avoidseconds' ), array( @@ -120,7 +120,7 @@ class LanguageTest extends MediaWikiTestCase { array( 7199.55, 'avoidminutes', - '2h 0m', + '2 h 0 min', 'formatTimePeriod() rounding (>=1h), avoidminutes' ), array( @@ -132,7 +132,7 @@ class LanguageTest extends MediaWikiTestCase { array( 172799.55, 'avoidseconds', - '48h 0m', + '48 h 0 min', 'formatTimePeriod() rounding (=48h), avoidseconds' ), array( @@ -144,7 +144,7 @@ class LanguageTest extends MediaWikiTestCase { array( 259199.55, 'avoidminutes', - '3d 0h', + '3 d 0 h', 'formatTimePeriod() rounding (>48h), avoidminutes' ), array( @@ -156,7 +156,7 @@ class LanguageTest extends MediaWikiTestCase { array( 176399.55, 'avoidseconds', - '2d 1h 0m', + '2 d 1 h 0 min', 'formatTimePeriod() rounding (>48h), avoidseconds' ), array( @@ -168,7 +168,7 @@ class LanguageTest extends MediaWikiTestCase { array( 176399.55, 'avoidminutes', - '2d 1h', + '2 d 1 h', 'formatTimePeriod() rounding (>48h), avoidminutes' ), array( @@ -180,7 +180,7 @@ class LanguageTest extends MediaWikiTestCase { array( 259199.55, 'avoidseconds', - '3d 0h 0m', + '3 d 0 h 0 min', 'formatTimePeriod() rounding (>48h), avoidseconds' ), array( @@ -192,7 +192,7 @@ class LanguageTest extends MediaWikiTestCase { array( 172801.55, 'avoidseconds', - '2d 0h 0m', + '2 d 0 h 0 min', 'formatTimePeriod() rounding, (>48h), avoidseconds' ), array( @@ -204,7 +204,7 @@ class LanguageTest extends MediaWikiTestCase { array( 176460.55, array(), - '2d 1h 1m 1s', + '2 d 1 h 1 min 1 s', 'formatTimePeriod() rounding, recursion, (>48h)' ), array( -- 2.20.1