r69009 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69008‎ | r69009 | r69010 >
Date:16:35, 4 July 2010
Author:maxsem
Status:ok
Tags:
Comment:
Revert r64063, will use a different approach for selected languages later
Modified paths:
  • /trunk/phase3/languages/Language.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/Language.php
@@ -2843,9 +2843,9 @@
28442844
28452845 function formatTimePeriod( $seconds ) {
28462846 if ( $seconds < 10 ) {
2847 - return $this->formatNum( sprintf( "%.1f", $seconds ) ) . ' ' . $this->getMessageFromDB( 'seconds-abbrev' );
 2847+ return $this->formatNum( sprintf( "%.1f", $seconds ) ) . $this->getMessageFromDB( 'seconds-abbrev' );
28482848 } elseif ( $seconds < 60 ) {
2849 - return $this->formatNum( round( $seconds ) ) . ' ' . $this->getMessageFromDB( 'seconds-abbrev' );
 2849+ return $this->formatNum( round( $seconds ) ) . $this->getMessageFromDB( 'seconds-abbrev' );
28502850 } elseif ( $seconds < 3600 ) {
28512851 $minutes = floor( $seconds / 60 );
28522852 $secondsPart = round( fmod( $seconds, 60 ) );
@@ -2853,8 +2853,8 @@
28542854 $secondsPart = 0;
28552855 $minutes++;
28562856 }
2857 - return $this->formatNum( $minutes ) . ' ' . $this->getMessageFromDB( 'minutes-abbrev' ) . ' ' .
2858 - $this->formatNum( $secondsPart ) . ' ' . $this->getMessageFromDB( 'seconds-abbrev' );
 2857+ return $this->formatNum( $minutes ) . $this->getMessageFromDB( 'minutes-abbrev' ) . ' ' .
 2858+ $this->formatNum( $secondsPart ) . $this->getMessageFromDB( 'seconds-abbrev' );
28592859 } else {
28602860 $hours = floor( $seconds / 3600 );
28612861 $minutes = floor( ( $seconds - $hours * 3600 ) / 60 );
@@ -2867,9 +2867,9 @@
28682868 $minutes = 0;
28692869 $hours++;
28702870 }
2871 - return $this->formatNum( $hours ) . ' ' . $this->getMessageFromDB( 'hours-abbrev' ) . ' ' .
2872 - $this->formatNum( $minutes ) . ' ' . $this->getMessageFromDB( 'minutes-abbrev' ) . ' ' .
2873 - $this->formatNum( $secondsPart ) . ' ' . $this->getMessageFromDB( 'seconds-abbrev' );
 2871+ return $this->formatNum( $hours ) . $this->getMessageFromDB( 'hours-abbrev' ) . ' ' .
 2872+ $this->formatNum( $minutes ) . $this->getMessageFromDB( 'minutes-abbrev' ) . ' ' .
 2873+ $this->formatNum( $secondsPart ) . $this->getMessageFromDB( 'seconds-abbrev' );
28742874 }
28752875 }
28762876

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r64063Tweaked LanguageConverter to use spaces in formatTimePeriod, things like "1h2...maxsem08:57, 23 March 2010

Status & tagging log