X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=languages%2Fclasses%2FLanguageAr.php;h=553ff077cd6fd900a86ebc340e8c00da1a3178ae;hb=f0d05fb674c9490df1e325fde2da9398db0c333c;hp=514ff028c62d45d8e7688871a47a640386616492;hpb=a15c419b3d130248f2556b9d00643ba9666a4189;p=lhc%2Fweb%2Fwiklou.git diff --git a/languages/classes/LanguageAr.php b/languages/classes/LanguageAr.php index 514ff028c6..553ff077cd 100644 --- a/languages/classes/LanguageAr.php +++ b/languages/classes/LanguageAr.php @@ -1,27 +1,51 @@ 2 ) { - $index = 2; - } elseif( $count % 100 == 0) { - $index = 3; - } else { - $index = 4; + /** + * Temporary hack for bug 9413: replace Arabic presentation forms with their + * standard equivalents. + * + * @todo FIXME: This is language-specific for now only to avoid the negative + * performance impact of enabling it for all languages. + * + * @param $s string + * + * @return string + */ + function normalize( $s ) { + global $wgFixArabicUnicode; + $s = parent::normalize( $s ); + if ( $wgFixArabicUnicode ) { + $s = $this->transformUsingPairFile( 'normalize-ar.ser', $s ); } - return $forms[$index]; + return $s; } - } -