X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=languages%2Fclasses%2FLanguageOs.php;h=d374c859c2a7f188e7c0ce2a0532db9e5e4a3ce1;hb=2b61957cfed50d53dfca4822f02eb0633fbfd9b4;hp=7ea67f25733501026a02bb77aa21dbc9c94188fe;hpb=30cca9fe5c37903ee342851afec811a4fe54e933;p=lhc%2Fweb%2Fwiklou.git diff --git a/languages/classes/LanguageOs.php b/languages/classes/LanguageOs.php index 7ea67f2573..d374c859c2 100644 --- a/languages/classes/LanguageOs.php +++ b/languages/classes/LanguageOs.php @@ -49,8 +49,8 @@ class LanguageOs extends Language { * Then result word is: word + 'й' + case ending for cases != allative or comitative * and word + case ending for allative or comitative. Ending of allative case here is 'æ'. * - * @param $word string - * @param $case string + * @param string $word + * @param string $case * @return string */ function convertGrammar( $word, $case ) { @@ -71,15 +71,14 @@ class LanguageOs extends Language { if ( preg_match( '/тæ$/u', $word ) ) { $word = mb_substr( $word, 0, -1 ); $end_allative = 'æм'; - } - # Works if $word is in singular form. - # Checking if $word ends on one of the vowels: е, ё, и, о, ы, э, ю, я. - elseif ( preg_match( "/[аæеёиоыэюя]$/u", $word ) ) { + } elseif ( preg_match( "/[аæеёиоыэюя]$/u", $word ) ) { + # Works if $word is in singular form. + # Checking if $word ends on one of the vowels: е, ё, и, о, ы, э, ю, я. $jot = 'й'; - } - # Checking if $word ends on 'у'. 'У' can be either consonant 'W' or vowel 'U' in cyrillic Ossetic. - # Examples: {{grammar:genitive|аунеу}} = аунеуы, {{grammar:genitive|лæппу}} = лæппуйы. - elseif ( preg_match( "/у$/u", $word ) ) { + } elseif ( preg_match( "/у$/u", $word ) ) { + # Checking if $word ends on 'у'. 'У' + # can be either consonant 'W' or vowel 'U' in cyrillic Ossetic. + # Examples: {{grammar:genitive|аунеу}} = аунеуы, {{grammar:genitive|лæппу}} = лæппуйы. if ( !preg_match( "/[аæеёиоыэюя]$/u", mb_substr( $word, -2, 1 ) ) ) { $jot = 'й'; }