r114079 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114078‎ | r114079 | r114080 >
Date:22:14, 17 March 2012
Author:reedy
Status:reverted
Tags:gerritmigration 
Comment:
Followup r114067

Add centuries because the messages were already there but not used

Add decade and millennia for the luls/completeness
Modified paths:
  • /trunk/phase3/languages/Language.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -3693,7 +3693,9 @@
36943694 'duration-days',
36953695 'duration-weeks',
36963696 'duration-years',
 3697+ 'duration-decades',
36973698 'duration-centuries',
 3699+ 'duration-millenniums'
36983700 ),
36993701 );
37003702
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -4827,6 +4827,7 @@
48284828 'duration-days' => '$1 {{PLURAL:$1|day|days}}',
48294829 'duration-weeks' => '$1 {{PLURAL:$1|week|weeks}}',
48304830 'duration-years' => '$1 {{PLURAL:$1|year|years}}',
 4831+'duration-decades' => '$1 {{PLURAL:$1|decade|decades}}',
48314832 'duration-centuries' => '$1 {{PLURAL:$1|century|centuries}}',
4832 -
 4833+'duration-millennia' => '$1 {{PLURAL:$1|millennium|millennia}}',
48334834 );
Index: trunk/phase3/languages/Language.php
@@ -1919,8 +1919,11 @@
19201920 *
19211921 * @return string
19221922 */
1923 - public function duration( $seconds, array $chosenIntervals = array( 'years', 'days', 'hours', 'minutes', 'seconds' ) ) {
 1923+ public function duration( $seconds, array $chosenIntervals = array( 'millennia', 'centuries', 'decades', 'years', 'days', 'hours', 'minutes', 'seconds' ) ) {
19241924 $intervals = array(
 1925+ 'millennia' => 1000 * 31557600,
 1926+ 'centuries' => 100 * 31557600,
 1927+ 'decades' => 10 * 31557600,
19251928 'years' => 31557600, // 86400 * 365.25
19261929 'weeks' => 604800,
19271930 'days' => 86400,

Follow-up revisions

RevisionCommit summaryAuthorDate
r114118Bug 35309 - formatDuration message missing/inconsistent...reedy23:22, 18 March 2012
r114326Revert r114067, r114071, r114075, r114079, r114081, r114082, r114084, r114086......catrope23:03, 20 March 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r114067adding a duration function to language that converts seconds to textjeroendedauw20:58, 17 March 2012

Status & tagging log