make image page respect different sizes of individual frames, as suggested by Markus...
[lhc/web/wiklou.git] / languages / Language.php
index 0fbba3b..41619f7 100644 (file)
@@ -1934,7 +1934,14 @@ class Language {
         * This is language-specific for performance reasons only.
         */
        function normalize( $s ) {
-               return UtfNormal::cleanUp( $s );
+               global $wgAllUnicodeFixes;
+               $s = UtfNormal::cleanUp( $s );
+               if ( $wgAllUnicodeFixes ) {
+                       $s = $this->transformUsingPairFile( 'normalize-ar.ser', $s );
+                       $s = $this->transformUsingPairFile( 'normalize-ml.ser', $s );
+               }
+
+               return $s;
        }
 
        /**
@@ -2410,7 +2417,7 @@ class Language {
                                        }
                                } else {
                                        if ( $ch == '&' ) {
-                                               $entityState = 1; // entity found, (e.g. " ")
+                                               $entityState = 1; // entity found, (e.g. " ")
                                        } else {
                                                $displayLen++; // this char is displayed
                                                // Add on the other display text after this...
@@ -2843,9 +2850,9 @@ class Language {
 
        function formatTimePeriod( $seconds ) {
                if ( $seconds < 10 ) {
-                       return $this->formatNum( sprintf( "%.1f", $seconds ) ) . ' ' . wfMsg( 'seconds-abbrev' );
+                       return $this->formatNum( sprintf( "%.1f", $seconds ) ) . $this->getMessageFromDB( 'seconds-abbrev' );
                } elseif ( $seconds < 60 ) {
-                       return $this->formatNum( round( $seconds ) ) . ' ' . wfMsg( 'seconds-abbrev' );
+                       return $this->formatNum( round( $seconds ) ) . $this->getMessageFromDB( 'seconds-abbrev' );
                } elseif ( $seconds < 3600 ) {
                        $minutes = floor( $seconds / 60 );
                        $secondsPart = round( fmod( $seconds, 60 ) );
@@ -2853,8 +2860,8 @@ class Language {
                                $secondsPart = 0;
                                $minutes++;
                        }
-                       return $this->formatNum( $minutes ) . ' ' . wfMsg( 'minutes-abbrev' ) . ' ' .
-                               $this->formatNum( $secondsPart ) . ' ' . wfMsg( 'seconds-abbrev' );
+                       return $this->formatNum( $minutes ) . $this->getMessageFromDB( 'minutes-abbrev' ) . ' ' .
+                               $this->formatNum( $secondsPart ) . $this->getMessageFromDB( 'seconds-abbrev' );
                } else {
                        $hours = floor( $seconds / 3600 );
                        $minutes = floor( ( $seconds - $hours * 3600 ) / 60 );
@@ -2867,9 +2874,9 @@ class Language {
                                $minutes = 0;
                                $hours++;
                        }
-                       return $this->formatNum( $hours ) . ' ' . wfMsg( 'hours-abbrev' ) . ' ' .
-                               $this->formatNum( $minutes ) . ' ' . wfMsg( 'minutes-abbrev' ) . ' ' .
-                               $this->formatNum( $secondsPart ) . ' ' . wfMsg( 'seconds-abbrev' );
+                       return $this->formatNum( $hours ) . $this->getMessageFromDB( 'hours-abbrev' ) . ' ' .
+                               $this->formatNum( $minutes ) . $this->getMessageFromDB( 'minutes-abbrev' ) . ' ' .
+                               $this->formatNum( $secondsPart ) . $this->getMessageFromDB( 'seconds-abbrev' );
                }
        }