Index: trunk/phase3/languages/Language.php |
— | — | @@ -3806,11 +3806,14 @@ |
3807 | 3807 | } |
3808 | 3808 | |
3809 | 3809 | /** |
| 3810 | + * Format a bitrate for output, using an appropriate |
| 3811 | + * unit (bps, kbps, Mbps, Gbps, Tbps, Pbps, Ebps, Zbps or Ybps) according to the magnitude in question |
| 3812 | + * |
3810 | 3813 | * @param $bps int |
3811 | 3814 | * @return string |
3812 | 3815 | */ |
3813 | 3816 | function formatBitrate( $bps ) { |
3814 | | - $units = array( 'bps', 'kbps', 'Mbps', 'Gbps', 'Tbps', 'Pbps', 'Ebps', 'Zbps', 'Ybps' ); |
| 3817 | + $units = array( '', 'kibi', 'mebi', 'gibi', 'tebi', 'pebi', 'exbi', 'zebi', 'yobi' ); |
3815 | 3818 | if ( $bps <= 0 ) { |
3816 | 3819 | return $this->formatNum( $bps ) . $units[0]; |
3817 | 3820 | } |
— | — | @@ -3821,7 +3824,9 @@ |
3822 | 3825 | } else { |
3823 | 3826 | $mantissa = round( $mantissa ); |
3824 | 3827 | } |
3825 | | - return $this->formatNum( $mantissa ) . $units[$unitIndex]; |
| 3828 | + $msg = "bitrate-{$units[$unitIndex]}bits"; |
| 3829 | + $text = $this->getMessageFromDB( $msg ); |
| 3830 | + return str_replace( '$1', $this->formatNum( $mantissa ), $text ); |
3826 | 3831 | } |
3827 | 3832 | |
3828 | 3833 | /** |