diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2014-12-27 15:41:37 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2014-12-31 11:43:28 +0100 |
commit | c1f9b1f7b1b77776192048005dcc66dcf3df2bfb (patch) | |
tree | 2b38796e738dd74cb42ecd9bfd151803108386bc /languages/classes/LanguageTyv.php | |
parent | b88ab0086858470dd1f644e64cb4e4f62bb2be9b (diff) |
Update to MediaWiki 1.24.1
Diffstat (limited to 'languages/classes/LanguageTyv.php')
-rw-r--r-- | languages/classes/LanguageTyv.php | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/languages/classes/LanguageTyv.php b/languages/classes/LanguageTyv.php index fc1e8a81..429d0a62 100644 --- a/languages/classes/LanguageTyv.php +++ b/languages/classes/LanguageTyv.php @@ -33,8 +33,8 @@ class LanguageTyv extends Language { * Grammatical transformations, needed for inflected languages * Invoked by putting {{grammar:case|word}} in a message * - * @param $word string - * @param $case string + * @param string $word + * @param string $case * @return string */ function convertGrammar( $word, $case ) { @@ -44,7 +44,8 @@ class LanguageTyv extends Language { } // Set up some constants... - $allVowels = array( "е", "и", "э", "ө", "ү", "а", "ё", "о", "у", "ы", "ю", "я", "a", "e", "i", "o", "ö", "u", "ü", "y" ); + $allVowels = array( "е", "и", "э", "ө", "ү", "а", "ё", "о", "у", "ы", + "ю", "я", "a", "e", "i", "o", "ö", "u", "ü", "y" ); $frontVowels = array( "е", "и", "э", "ө", "ү", "e", "i", "ö", "ü" ); $backVowels = array( "а", "ё", "о", "у", "ы", "ю", "я", "a", "o", "u", "y" ); $unroundFrontVowels = array( "е", "и", "э", "e", "i" ); @@ -53,7 +54,8 @@ class LanguageTyv extends Language { $roundBackVowels = array( "ё", "о", "у", "ю", "o", "u" ); //$voicedPhonemes = array( "д", "б", "з", "ж", "г", "d", "b", "z", "g" ); $unvoicedPhonemes = array( "т", "п", "с", "ш", "к", "ч", "х", "t", "p", "s", "k", "x" ); - $directiveUnvoicedStems = array( "т", "п", "с", "ш", "к", "ч", "х", "л", "м", "н", "ң", "t", "p", "s", "k", "x", "l", "m", "n", "ŋ" ); + $directiveUnvoicedStems = array( "т", "п", "с", "ш", "к", "ч", "х", "л", + "м", "н", "ң", "t", "p", "s", "k", "x", "l", "m", "n", "ŋ" ); $directiveVoicedStems = array( "д", "б", "з", "ж", "г", "р", "й", "d", "b", "z", "g", "r", "j" ); //$allSonants = array("л", "м", "н", "ң", "р", "й"); @@ -62,11 +64,14 @@ class LanguageTyv extends Language { //Put the word in a form we can play with since we're using UTF-8 preg_match_all( '/./us', $word, $ar ); - $wordEnding = $ar[0][count( $ar[0] ) - 1]; // Here's the last letter in the word - $wordReversed = array_reverse( $ar[0] ); // Here's an array with the order of the letters in the word reversed so we can find a match quicker *shrug* + // Here's the last letter in the word + $wordEnding = $ar[0][count( $ar[0] ) - 1]; + // Here's an array with the order of the letters in the word reversed so + // we can find a match quicker. *shrug* + $wordReversed = array_reverse( $ar[0] ); // Find the last vowel in the word - $wordLastVowel = NULL; + $wordLastVowel = null; foreach ( $wordReversed as $xvalue ) { foreach ( $allVowels as $yvalue ) { if ( strcmp( $xvalue, $yvalue ) == 0 ) { @@ -76,7 +81,7 @@ class LanguageTyv extends Language { continue; } } - if ( $wordLastVowel !== NULL ) { + if ( $wordLastVowel !== null ) { break; } else { continue; |