* Entries in $wgGrammarForms should apply to one language only
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Thu, 25 May 2006 20:52:45 +0000 (20:52 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Thu, 25 May 2006 20:52:45 +0000 (20:52 +0000)
includes/DefaultSettings.php
languages/Language.php
languages/LanguageBs.php
languages/LanguageCs.php
languages/LanguageFi.php
languages/LanguageGa.php
languages/LanguageLa.php
languages/LanguageRu.php
languages/LanguageSk.php
languages/LanguageSl.php
languages/LanguageTyv.php

index e2c59bf..a96a1d0 100644 (file)
@@ -564,7 +564,7 @@ $wgLanguageCode     = 'en';
  * Used in Language::convertGrammar().
  */
 $wgGrammarForms = array();
-#$wgGrammarForms['genitive']['car'] = 'car\'s';
+#$wgGrammarForms['en']['genitive']['car'] = 'car\'s';
 
 /** Treat language links as magic connectors, not inline links */
 $wgInterwikiMagic = true;
index eacf153..f2485bc 100644 (file)
@@ -1022,8 +1022,8 @@ class Language {
         */
        function convertGrammar( $word, $case ) {
                global $wgGrammarForms;
-               if ( isset($wgGrammarForms[$case][$word]) ) {
-                       return $wgGrammarForms[$case][$word];
+               if ( isset($wgGrammarForms['en'][$case][$word]) ) {
+                       return $wgGrammarForms['en'][$case][$word];
                }
                return $word;
        }
index 10313f1..05804d3 100644 (file)
@@ -184,8 +184,8 @@ class LanguageBs extends LanguageUtf8 {
        # Invoked with {{GRAMMAR:case|word}}
        function convertGrammar( $word, $case ) {
                global $wgGrammarForms;
-               if ( isset($wgGrammarForms[$case][$word]) ) {
-                       return $wgGrammarForms[$case][$word];
+               if ( isset($wgGrammarForms['bs'][$case][$word]) ) {
+                       return $wgGrammarForms['bs'][$case][$word];
                }
                switch ( $case ) {
                        case 'genitiv': # genitive
index 9e36d39..804c487 100644 (file)
@@ -193,8 +193,8 @@ class LanguageCs extends LanguageUtf8 {
        # Invoked by putting {{grammar:case|word}} in a message
        function convertGrammar( $word, $case ) {
                global $wgGrammarForms;
-               if ( isset($wgGrammarForms[$case][$word]) ) {
-                       return $wgGrammarForms[$case][$word];
+               if ( isset($wgGrammarForms['cs'][$case][$word]) ) {
+                       return $wgGrammarForms['cs'][$case][$word];
                }
                # allowed values for $case:
                #       1sg, 2sg, ..., 7sg -- nominative, genitive, ... (in singular)
index e183064..19de0eb 100644 (file)
@@ -194,8 +194,8 @@ class LanguageFi extends LanguageUtf8 {
        # Invoked with {{GRAMMAR:case|word}}
        function convertGrammar( $word, $case ) {
                global $wgGrammarForms;
-               if ( isset($wgGrammarForms[$case][$word]) ) {
-                       return $wgGrammarForms[$case][$word];
+               if ( isset($wgGrammarForms['fi'][$case][$word]) ) {
+                       return $wgGrammarForms['fi'][$case][$word];
                }
 
                # These rules are not perfect, but they are currently only used for site names so it doesn't
index d25e8c2..8229527 100644 (file)
@@ -176,8 +176,8 @@ class LanguageGa extends LanguageUtf8 {
        # Invoked with {{GRAMMAR:transformation|word}}
        function convertGrammar( $word, $what ) {
                global $wgGrammarForms;
-               if ( isset($wgGrammarForms[$case][$word]) ) {
-                       return $wgGrammarForms[$case][$word];
+               if ( isset($wgGrammarForms['ga'][$case][$word]) ) {
+                       return $wgGrammarForms['ga'][$case][$word];
                }
 
                switch ( $what ) {
index b27a39c..43eb72e 100644 (file)
@@ -95,8 +95,8 @@ class LanguageLa extends LanguageUtf8 {
         */
        function convertGrammar( $word, $case ) {
                global $wgGrammarForms;
-               if ( isset($wgGrammarForms[$case][$word]) ) {
-                       return $wgGrammarForms[$case][$word];
+               if ( isset($wgGrammarForms['la'][$case][$word]) ) {
+                       return $wgGrammarForms['la'][$case][$word];
                }
 
                switch ( $case ) {
index a37bdd4..f0067ce 100644 (file)
@@ -163,8 +163,8 @@ class LanguageRu extends LanguageUtf8 {
        # Invoked with {{grammar:case|word}}
        function convertGrammar( $word, $case ) {
                global $wgGrammarForms;
-               if ( isset($wgGrammarForms[$case][$word]) ) {
-                       return $wgGrammarForms[$case][$word];
+               if ( isset($wgGrammarForms['ru'][$case][$word]) ) {
+                       return $wgGrammarForms['ru'][$case][$word];
                }
 
                # These rules are not perfect, but they are currently only used for site names so it doesn't
index 6cf472c..0c17b0c 100644 (file)
@@ -178,8 +178,8 @@ class LanguageSk extends LanguageUtf8 {
        # Invoked with {{GRAMMAR:case|word}}
        function convertGrammar( $word, $case ) {
                global $wgGrammarForms;
-               if ( isset($wgGrammarForms[$case][$word]) ) {
-                       return $wgGrammarForms[$case][$word];
+               if ( isset($wgGrammarForms['sk'][$case][$word]) ) {
+                       return $wgGrammarForms['sk'][$case][$word];
                }
 
                switch ( $case ) {
index 2adaac8..9795d69 100644 (file)
@@ -101,8 +101,8 @@ class LanguageSl extends LanguageUtf8 {
        # Invoked with {{GRAMMAR:case|word}}
        function convertGrammar( $word, $case ) {
                global $wgGrammarForms;
-               if ( isset($wgGrammarForms[$case][$word]) ) {
-                       return $wgGrammarForms[$case][$word];
+               if ( isset($wgGrammarForms['sl'][$case][$word]) ) {
+                       return $wgGrammarForms['sl'][$case][$word];
                }
 
                switch ( $case ) {
index e6544d6..9ae23b0 100644 (file)
@@ -100,8 +100,8 @@ class LanguageTyv extends LanguageUtf8 {
         */
        function convertGrammar( $word, $case ) {
                global $wgGrammarForms;
-               if ( isset($wgGrammarForms[$case][$word]) ) {
-                       return $wgGrammarForms[$case][$word];
+               if ( isset($wgGrammarForms['tyv'][$case][$word]) ) {
+                       return $wgGrammarForms['tyv'][$case][$word];
                }