Code Duplication    Length = 22-24 lines in 2 locations

languages/classes/LanguageAr.php 1 location

@@ 30-51 (lines=22) @@
27
 *
28
 * @ingroup Language
29
 */
30
class LanguageAr extends Language {
31
32
	/**
33
	 * Temporary hack for bug 9413: replace Arabic presentation forms with their
34
	 * standard equivalents.
35
	 *
36
	 * @todo FIXME: This is language-specific for now only to avoid the negative
37
	 * performance impact of enabling it for all languages.
38
	 *
39
	 * @param string $s
40
	 *
41
	 * @return string
42
	 */
43
	function normalize( $s ) {
44
		global $wgFixArabicUnicode;
45
		$s = parent::normalize( $s );
46
		if ( $wgFixArabicUnicode ) {
47
			$s = $this->transformUsingPairFile( 'normalize-ar.ser', $s );
48
		}
49
		return $s;
50
	}
51
}
52

languages/classes/LanguageMl.php 1 location

@@ 29-52 (lines=24) @@
26
 *
27
 * @ingroup Language
28
 */
29
class LanguageMl extends Language {
30
	/**
31
	 * Temporary hack for the issue described at
32
	 * http://permalink.gmane.org/gmane.science.linguistics.wikipedia.technical/46396
33
	 * Convert Unicode 5.0 style Malayalam input to Unicode 5.1. Similar to
34
	 * bug 9413. Also fixes miscellaneous problems due to mishandling of ZWJ,
35
	 * e.g. bug 11162.
36
	 *
37
	 * @todo FIXME: This is language-specific for now only to avoid the negative
38
	 * performance impact of enabling it for all languages.
39
	 *
40
	 * @param string $s
41
	 *
42
	 * @return string
43
	 */
44
	function normalize( $s ) {
45
		global $wgFixMalayalamUnicode;
46
		$s = parent::normalize( $s );
47
		if ( $wgFixMalayalamUnicode ) {
48
			$s = $this->transformUsingPairFile( 'normalize-ml.ser', $s );
49
		}
50
		return $s;
51
	}
52
}
53