diff options
author | Timo Tijhof <krinklemail@gmail.com> | 2021-07-31 22:23:21 +0100 |
---|---|---|
committer | Timo Tijhof <krinklemail@gmail.com> | 2021-08-04 23:44:46 +0100 |
commit | 7c39f764520f60109dedbcb904fe8327aa5ddedb (patch) | |
tree | 9e99e5a055f7a97f4cde265ecb90cb45f0bb3ab4 /includes/languages/LanguageMl.php | |
parent | def349289f899f9f8e3884cc79dc2751997b09d1 (diff) | |
download | mediawikicore-7c39f764520f60109dedbcb904fe8327aa5ddedb.tar.gz mediawikicore-7c39f764520f60109dedbcb904fe8327aa5ddedb.zip |
Move Language subclasses to includes/
Depending on which namespace we want these classes to have after
T166010 they could either stay in includes/languages/ (plural) in
their own MediaWiki\Languages\-namespace dedicated to Language
subclasses, or they could go in into a subdirectory like
`includes/language/languages/` if we want to keep them in the same
top-level namespace as other Language classes and services, but in
a more nested namespace.
For now, I've made the smaller change and kept the Language subclasses
in their own directory directly under includes/, not nested further.
Bug: T225756
Change-Id: I01015424707b442853879fd50c97f00215e5c2fa
Diffstat (limited to 'includes/languages/LanguageMl.php')
-rw-r--r-- | includes/languages/LanguageMl.php | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/includes/languages/LanguageMl.php b/includes/languages/LanguageMl.php new file mode 100644 index 000000000000..f8189ac8ea70 --- /dev/null +++ b/includes/languages/LanguageMl.php @@ -0,0 +1,50 @@ +<?php +/** + * Malayalam (മലയാളം) specific code. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * + * @file + * @ingroup Language + */ + +/** + * Malayalam (മലയാളം) + * + * @ingroup Language + */ +class LanguageMl extends Language { + /** + * Temporary hack for the issue described at + * http://permalink.gmane.org/gmane.science.linguistics.wikipedia.technical/46396 + * Convert Unicode 5.0 style Malayalam input to Unicode 5.1. Similar to + * T11413. Also fixes miscellaneous problems due to mishandling of ZWJ, + * e.g. T13162. + * + * @todo FIXME: This is language-specific for now only to avoid the negative + * performance impact of enabling it for all languages. + * + * @param string $s + * + * @return string + */ + public function normalize( $s ) { + global $IP; + $s = parent::normalize( $s ); + $s = $this->transformUsingPairFile( 'normalize-ml.php', $s, $IP ); + return $s; + } +} |