]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - languages/classes/LanguageBs.php
MediaWiki 1.30.2
[autoinstallsdev/mediawiki.git] / languages / classes / LanguageBs.php
index 6432109d708d751843e1626a2881e767a92002af..de9c7dcec45d5cc8d3875d5d04d0632e82b80ce8 100644 (file)
@@ -1,34 +1,42 @@
 <?php
+/**
+ * Bosnian (bosanski) specific code.
+ *
+ * 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
+ */
 
-/** Bosnian (bosanski)
+/**
+ * Bosnian (bosanski)
  *
  * @ingroup Language
  */
 class LanguageBs extends Language {
-
-       function convertPlural( $count, $forms ) {
-               if ( !count( $forms ) ) { return ''; }
-               $forms = $this->preConvertPlural( $forms, 3 );
-
-               // FIXME: CLDR defines 4 plural forms instead of 3. Plural for decimals is missing.
-               //        http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html
-               if ( $count > 10 && floor( ( $count % 100 ) / 10 ) == 1 ) {
-                       return $forms[2];
-               } else {
-                       switch ( $count % 10 ) {
-                               case 1:  return $forms[0];
-                               case 2:
-                               case 3:
-                               case 4:  return $forms[1];
-                               default: return $forms[2];
-                       }
-               }
-       }
-
-       # 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}}
+        *
         * Cases: genitiv, dativ, akuzativ, vokativ, instrumental, lokativ
+        *
+        * @param string $word
+        * @param string $case
+        *
+        * @return string
         */
        function convertGrammar( $word, $case ) {
                global $wgGrammarForms;
@@ -44,6 +52,8 @@ class LanguageBs extends Language {
                        break;
                }
 
-               return $word; # this will return the original value for 'nominativ' (nominative) and all undefined case values
+               # this will return the original value for 'nominativ' (nominative)
+               # and all undefined case values.
+               return $word;
        }
 }