From 2b49fd56f031d65e6c2b21d0e8747a846caf2503 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Thu, 25 May 2006 14:21:45 +0000 Subject: [PATCH] * Modified Language.php to support $wgGrammarForms. Languages which overwrite function convertGrammar() not yet modified. --- RELEASE-NOTES | 1 + languages/Language.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index aa63d540ea..b13efa7238 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -333,6 +333,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN no longer necessary to write four separate functions just to add a custom log type. * (bug 6057) Count "licenses" as a message (and show it in Special:Allmessages) +* Added $wgGrammarForms global == Compatibility == diff --git a/languages/Language.php b/languages/Language.php index f135dd44d2..eacf1535e8 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1021,6 +1021,10 @@ class Language { * @return string */ function convertGrammar( $word, $case ) { + global $wgGrammarForms; + if ( isset($wgGrammarForms[$case][$word]) ) { + return $wgGrammarForms[$case][$word]; + } return $word; } -- 2.20.1