diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2011-06-22 11:28:20 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2011-06-22 11:28:20 +0200 |
commit | 9db190c7e736ec8d063187d4241b59feaf7dc2d1 (patch) | |
tree | 46d1a0dee7febef5c2d57a9f7b972be16a163b3d /languages/classes/LanguageZh_hans.php | |
parent | 78677c7bbdcc9739f6c10c75935898a20e1acd9e (diff) |
update to MediaWiki 1.17.0
Diffstat (limited to 'languages/classes/LanguageZh_hans.php')
-rw-r--r-- | languages/classes/LanguageZh_hans.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/languages/classes/LanguageZh_hans.php b/languages/classes/LanguageZh_hans.php index 5b03d731..a65162bc 100644 --- a/languages/classes/LanguageZh_hans.php +++ b/languages/classes/LanguageZh_hans.php @@ -1,6 +1,8 @@ <?php /** + * Simplified Chinese + * * @ingroup Language */ class LanguageZh_hans extends Language { @@ -13,21 +15,21 @@ class LanguageZh_hans extends Language { * for now just treat each character as a word. * @todo Fixme: only do this for Han characters... */ - function wordSegmentation( $string ) { + function segmentByWord( $string ) { $reg = "/([\\xc0-\\xff][\\x80-\\xbf]*)/"; $s = self::insertSpace( $string, $reg ); return $s; } - function normalizeForSearch( $string ) { + function normalizeForSearch( $s ) { wfProfileIn( __METHOD__ ); // Double-width roman characters - $s = self::convertDoubleWidth( $string ); - $s = trim( $s ); $s = parent::normalizeForSearch( $s ); + $s = trim( $s ); + $s = $this->segmentByWord( $s ); wfProfileOut( __METHOD__ ); return $s; } -}
\ No newline at end of file +} |