X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=languages%2Fclasses%2FLanguageRu.php;h=7b15721a57465ffa01829006cbbe76466837cfc6;hb=3b5b239e853c78114147a51b7c66b13e0ccd561d;hp=62de39051d10a823eef786174cbd016d5b546333;hpb=2fdcd7bfdd95a3b1515b9a94289d67eb60add484;p=lhc%2Fweb%2Fwiklou.git diff --git a/languages/classes/LanguageRu.php b/languages/classes/LanguageRu.php index 62de39051d..7b15721a57 100644 --- a/languages/classes/LanguageRu.php +++ b/languages/classes/LanguageRu.php @@ -31,45 +31,6 @@ * @ingroup Language */ class LanguageRu extends Language { - /** - * Convert from the nominative form of a noun to some other case - * Invoked with {{grammar:case|word}} - * - * @param string $word - * @param string $case - * @return string - */ - function convertGrammar( $word, $case ) { - global $wgGrammarForms; - if ( isset( $wgGrammarForms['ru'][$case][$word] ) ) { - return $wgGrammarForms['ru'][$case][$word]; - } - - $grammarTransformations = $this->getGrammarTransformations(); - - if ( isset( $grammarTransformations[$case] ) ) { - foreach ( array_values( $grammarTransformations[$case] ) as $rule ) { - $form = $rule[0]; - - if ( $form === '@metadata' ) { - continue; - } - - $replacement = $rule[1]; - - $regex = "/$form/"; - - if ( preg_match( $regex, $word ) ) { - $word = preg_replace( $regex, $replacement, $word ); - - break; - } - } - } - - return $word; - } - /** * Four-digit number should be without group commas (spaces) * See manual of style at https://ru.wikipedia.org/wiki/Википедия:Оформление_статей