]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - languages/classes/LanguageHsb.php
MediaWiki 1.30.2
[autoinstallsdev/mediawiki.git] / languages / classes / LanguageHsb.php
index 7cbc17deff206f4c2b3904c1caa8673fa044e972..a862d42edc5d79b7f3a01364eb4105570a14a535 100644 (file)
@@ -1,14 +1,40 @@
 <?php
-/** Upper Sorbian (Hornjoserbsce)
+/**
+ * Upper Sorbian (Hornjoserbsce) specific code.
  *
- * @addtogroup Language
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Language
  */
 
+/**
+ * Upper Sorbian (Hornjoserbsce)
+ *
+ * @ingroup Language
+ */
 class LanguageHsb extends Language {
-
-       # Convert from the nominative form of a noun to some other case
-       # Invoked with {{GRAMMAR:case|word}}
-
+       /**
+        * 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['hsb'][$case][$word] ) ) {
@@ -16,101 +42,16 @@ class LanguageHsb extends Language {
                }
 
                switch ( $case ) {
-                       case 'genitiw': # genitive
-                               if ( $word == 'Wikipedija' ) {
-                                       $word = 'Wikipedije';
-                               } elseif ( $word == 'Wikiknihi' ) {
-                                       $word = 'Wikiknih';
-                               } elseif ( $word == 'Wikinowiny' ) {
-                                       $word = 'Wikinowin';
-                               } elseif ( $word == 'Wikižórło' ) {
-                                       $word = 'Wikižórła';
-                               } elseif ( $word == 'Wikicitaty' ) {
-                                       $word = 'Wikicitatow';
-                               } elseif ( $word == 'Wikisłownik' ) {
-                                       $word = 'Wikisłownika';
-                               }
-                               break;
-                       case 'datiw': # dativ
-                               if ( $word == 'Wikipedija' ) {
-                                       $word = 'Wikipediji';
-                               } elseif ( $word == 'Wikiknihi' ) {
-                                       $word = 'Wikikniham';
-                               } elseif ( $word == 'Wikinowiny' ) {
-                                       $word = 'Wikinowinam';
-                               } elseif ( $word == 'Wikižórło' ) {
-                                       $word = 'Wikižórłu';
-                               } elseif ( $word == 'Wikicitaty' ) {
-                                       $word = 'Wikicitatam';
-                               } elseif ( $word == 'Wikisłownik' ) {
-                                       $word = 'Wikisłownikej';
-                               }
-                               break;
-                       case 'akuzativ': # akuzativ
-                               if ( $word == 'Wikipedija' ) {
-                                       $word = 'Wikipediju';
-                               } elseif ( $word == 'Wikiknihi' ) {
-                                       $word = 'Wikiknknihi';
-                               } elseif ( $word == 'Wikinowiny' ) {
-                                       $word = 'Wikinowiny';
-                               } elseif ( $word == 'Wikižórło' ) {
-                                       $word = 'Wikižórło';
-                               } elseif ( $word == 'Wikicitaty' ) {
-                                       $word = 'Wikicitaty';
-                               } elseif ( $word == 'Wikisłownik' ) {
-                                       $word = 'Wikisłownik';
-                               }
-                               break;
                        case 'instrumental': # instrumental
-                               if ( $word == 'Wikipedija' ) {
-                                       $word = 'Wikipediju';
-                               } elseif ( $word == 'Wikiknihi' ) {
-                                       $word = 'Wikiknihami';
-                               } elseif ( $word == 'Wikinowiny' ) {
-                                       $word = 'Wikinowinami';
-                               } elseif ( $word == 'Wikižórło' ) {
-                                       $word = 'Wikižórłom';
-                               } elseif ( $word == 'Wikicitaty' ) {
-                                       $word = 'Wikicitatami';
-                               } elseif ( $word == 'Wikisłownik' ) {
-                                       $word = 'Wikisłownikom';
-                               } else {
-                                       $word = 'z ' . $word;
-                               }
+                               $word = 'z ' . $word;
                                break;
                        case 'lokatiw': # lokatiw
-                               if ( $word == 'Wikipedija' ) {
-                                       $word = 'Wikipediji';
-                               } elseif ( $word == 'Wikiknihi' ) {
-                                       $word = 'Wikiknihach';
-                               } elseif ( $word == 'Wikinowiny' ) {
-                                       $word = 'Wikinowinach';
-                               } elseif ( $word == 'Wikižórło' ) {
-                                       $word = 'Wikižórłu';
-                               } elseif ( $word == 'Wikicitaty' ) {
-                                       $word = 'Wikicitatach';
-                               } elseif ( $word == 'Wikisłownik' ) {
-                                       $word = 'Wikisłowniku';
-                               } else {
-                                       $word = 'wo ' . $word;
-                               }
+                               $word = 'wo ' . $word;
                                break;
-                       }
-               
-               return $word; # this will return the original value for 'nominatiw' (nominativ) and all undefined case values
-       }
-
-       function convertPlural( $count, $singular, $dual, $plural, $pluralgen, $w5 ) {
-               switch ( abs( $count ) % 100 ) {
-                       case 1:
-                               return $singular;
-                       case 2:
-                               return $dual;
-                       case 3:
-                       case 4:
-                               return $plural;
-                       default:
-                               return $pluralgen;
                }
+
+               # this will return the original value for 'nominatiw' (nominativ) and
+               # all undefined case values.
+               return $word;
        }
 }