2006-04-19 20:17:43 +00:00
|
|
|
<?php
|
2012-06-05 20:13:22 +00:00
|
|
|
/**
|
|
|
|
|
* 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
|
|
|
|
|
*/
|
2006-04-17 23:57:09 +00:00
|
|
|
|
2012-06-05 20:13:22 +00:00
|
|
|
/**
|
|
|
|
|
* Bosnian (bosanski)
|
WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>
Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage
One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
|
|
|
*
|
|
|
|
|
* @ingroup Language
|
|
|
|
|
*/
|
2006-07-26 07:15:39 +00:00
|
|
|
class LanguageBs extends Language {
|
2006-06-23 21:19:54 +00:00
|
|
|
/**
|
2012-01-10 18:42:59 +00:00
|
|
|
* Convert from the nominative form of a noun to some other case
|
|
|
|
|
* Invoked with {{GRAMMAR:case|word}}
|
|
|
|
|
*
|
2006-06-23 21:19:54 +00:00
|
|
|
* Cases: genitiv, dativ, akuzativ, vokativ, instrumental, lokativ
|
2011-05-29 15:53:18 +00:00
|
|
|
*
|
2014-04-17 13:31:28 +00:00
|
|
|
* @param string $word
|
|
|
|
|
* @param string $case
|
2011-05-29 15:53:18 +00:00
|
|
|
*
|
|
|
|
|
* @return string
|
2006-06-23 21:19:54 +00:00
|
|
|
*/
|
2019-10-11 18:44:16 +00:00
|
|
|
public function convertGrammar( $word, $case ) {
|
2006-05-25 14:31:28 +00:00
|
|
|
global $wgGrammarForms;
|
2010-07-29 09:43:18 +00:00
|
|
|
if ( isset( $wgGrammarForms['bs'][$case][$word] ) ) {
|
2006-05-25 20:52:45 +00:00
|
|
|
return $wgGrammarForms['bs'][$case][$word];
|
2006-05-25 14:31:28 +00:00
|
|
|
}
|
2006-04-29 20:14:36 +00:00
|
|
|
switch ( $case ) {
|
|
|
|
|
case 'instrumental': # instrumental
|
* (bug 14165, bug 14294) Wikimedia specific configuration in convertGrammar() for 13 localisations (be, be-tarask, bs, cs, dsb, ga, gsw, hsb, hu, lv, rmy, sk, sl) removed. The settings have been put in extension WikimediaMessages. For be, be-tarask, bs, dsb, hsb some duplicates (1=1) were removed. Patch for Czech by Danny B.
* Also put the wgGrammarForms from the Wikimedia configuration in here, so everything is in one place. Bonus with this setup is that there will be a little less work for Wikimedia shell operators, as the wgGrammarForms configuration is now accessible to i18n committers.
* Header for WikimediaMessages.php, and add myself to extension credits.
WARNING to Wikimedia shell operators: the whole section "wgGrammarForms" in InitialiseSettings.php.html should be remove after updating to this version. It will most probably overrule all settings in WikimediaMessages because of "'default' => array()"
2008-08-10 18:32:10 +00:00
|
|
|
$word = 's ' . $word;
|
2020-10-28 18:58:11 +00:00
|
|
|
break;
|
2006-04-29 20:14:36 +00:00
|
|
|
case 'lokativ': # locative
|
* (bug 14165, bug 14294) Wikimedia specific configuration in convertGrammar() for 13 localisations (be, be-tarask, bs, cs, dsb, ga, gsw, hsb, hu, lv, rmy, sk, sl) removed. The settings have been put in extension WikimediaMessages. For be, be-tarask, bs, dsb, hsb some duplicates (1=1) were removed. Patch for Czech by Danny B.
* Also put the wgGrammarForms from the Wikimedia configuration in here, so everything is in one place. Bonus with this setup is that there will be a little less work for Wikimedia shell operators, as the wgGrammarForms configuration is now accessible to i18n committers.
* Header for WikimediaMessages.php, and add myself to extension credits.
WARNING to Wikimedia shell operators: the whole section "wgGrammarForms" in InitialiseSettings.php.html should be remove after updating to this version. It will most probably overrule all settings in WikimediaMessages because of "'default' => array()"
2008-08-10 18:32:10 +00:00
|
|
|
$word = 'o ' . $word;
|
2020-10-28 18:58:11 +00:00
|
|
|
break;
|
2006-04-29 20:14:36 +00:00
|
|
|
}
|
2006-04-17 23:57:09 +00:00
|
|
|
|
2014-04-21 18:43:15 +00:00
|
|
|
# this will return the original value for 'nominativ' (nominative)
|
|
|
|
|
# and all undefined case values.
|
|
|
|
|
return $word;
|
2006-04-29 20:14:36 +00:00
|
|
|
}
|
2006-04-17 23:57:09 +00:00
|
|
|
}
|