From: Max Semenik Date: Tue, 23 Mar 2010 08:57:59 +0000 (+0000) Subject: Tweaked LanguageConverter to use spaces in formatTimePeriod, things like "1h23m45s... X-Git-Tag: 1.31.0-rc.0~37384 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=02729fedab8980414842329f3fd6c02153257475;p=lhc%2Fweb%2Fwiklou.git Tweaked LanguageConverter to use spaces in formatTimePeriod, things like "1h23m45s" look really ugly --- diff --git a/languages/Language.php b/languages/Language.php index 1b2ede570e..3e3415c119 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -2711,19 +2711,19 @@ class Language { function formatTimePeriod( $seconds ) { if ( $seconds < 10 ) { - return $this->formatNum( sprintf( "%.1f", $seconds ) ) . wfMsg( 'seconds-abbrev' ); + return $this->formatNum( sprintf( "%.1f", $seconds ) ) . ' ' . wfMsg( 'seconds-abbrev' ); } elseif ( $seconds < 60 ) { - return $this->formatNum( round( $seconds ) ) . wfMsg( 'seconds-abbrev' ); + return $this->formatNum( round( $seconds ) ) . ' ' . wfMsg( 'seconds-abbrev' ); } elseif ( $seconds < 3600 ) { - return $this->formatNum( floor( $seconds / 60 ) ) . wfMsg( 'minutes-abbrev' ) . - $this->formatNum( round( fmod( $seconds, 60 ) ) ) . wfMsg( 'seconds-abbrev' ); + return $this->formatNum( floor( $seconds / 60 ) ) . ' ' . wfMsg( 'minutes-abbrev' ) . ' ' . + $this->formatNum( round( fmod( $seconds, 60 ) ) ) . ' ' . wfMsg( 'seconds-abbrev' ); } else { $hours = floor( $seconds / 3600 ); $minutes = floor( ( $seconds - $hours * 3600 ) / 60 ); $secondsPart = round( $seconds - $hours * 3600 - $minutes * 60 ); - return $this->formatNum( $hours ) . wfMsg( 'hours-abbrev' ) . - $this->formatNum( $minutes ) . wfMsg( 'minutes-abbrev' ) . - $this->formatNum( $secondsPart ) . wfMsg( 'seconds-abbrev' ); + return $this->formatNum( $hours ) . ' ' . wfMsg( 'hours-abbrev' ) . ' ' . + $this->formatNum( $minutes ) . ' ' . wfMsg( 'minutes-abbrev' ) . ' ' . + $this->formatNum( $secondsPart ) . ' ' . wfMsg( 'seconds-abbrev' ); } }