SI standards for time units
authorFederico Leva <federicoleva@tiscali.it>
Thu, 27 Sep 2012 18:24:19 +0000 (20:24 +0200)
committerFederico Leva <federicoleva@tiscali.it>
Sat, 13 Oct 2012 16:03:08 +0000 (18:03 +0200)
* Use "min" rather than "m".
* Add normal spaces to avoid hassles, no wrapping here anyway.

<https://translatewiki.net/wiki/Thread:Support/Abbreviation_for_'minute'>

Change-Id: I07f7aff41a831c88b82d6ddc53914372d6aec023

languages/messages/MessagesEn.php
tests/phpunit/languages/LanguageTest.php

index 1ab27bf..12575a4 100644 (file)
@@ -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}}',
index 7025449..95d8fde 100644 (file)
@@ -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(