2004-02-18 02:15:00 +00:00
|
|
|
|
<?php
|
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
|
|
|
|
|
2005-04-05 11:00:27 +00:00
|
|
|
|
/**
|
2006-06-16 18:47:15 +00:00
|
|
|
|
* Hebrew (עברית)
|
|
|
|
|
|
*
|
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-06-16 18:47:15 +00:00
|
|
|
|
*
|
2006-08-13 21:03:56 +00:00
|
|
|
|
* @author Rotem Liss
|
2006-06-16 18:47:15 +00:00
|
|
|
|
*/
|
2006-07-26 07:15:39 +00:00
|
|
|
|
class LanguageHe extends Language {
|
2006-05-26 18:26:51 +00:00
|
|
|
|
/**
|
2006-06-25 10:37:45 +00:00
|
|
|
|
* Convert grammar forms of words.
|
2006-06-16 18:47:15 +00:00
|
|
|
|
*
|
2006-06-25 10:37:45 +00:00
|
|
|
|
* Available cases:
|
|
|
|
|
|
* "prefixed" (or "תחילית") - when the word has a prefix
|
2006-05-26 18:26:51 +00:00
|
|
|
|
*
|
2006-06-25 10:37:45 +00:00
|
|
|
|
* @param string the word to convert
|
|
|
|
|
|
* @param string the case
|
|
|
|
|
|
*/
|
2006-07-07 13:12:51 +00:00
|
|
|
|
public function convertGrammar( $word, $case ) {
|
2006-06-25 10:37:45 +00:00
|
|
|
|
global $wgGrammarForms;
|
|
|
|
|
|
if ( isset($wgGrammarForms['he'][$case][$word]) ) {
|
|
|
|
|
|
return $wgGrammarForms['he'][$case][$word];
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
switch ( $case ) {
|
|
|
|
|
|
case 'prefixed':
|
|
|
|
|
|
case 'תחילית':
|
|
|
|
|
|
# Duplicate the "Waw" if prefixed
|
|
|
|
|
|
if ( substr( $word, 0, 2 ) == "ו" && substr( $word, 0, 4 ) != "וו" ) {
|
|
|
|
|
|
$word = "ו".$word;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Remove the "He" if prefixed
|
|
|
|
|
|
if ( substr( $word, 0, 2 ) == "ה" ) {
|
|
|
|
|
|
$word = substr( $word, 2 );
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Add a hyphen if non-Hebrew letters
|
|
|
|
|
|
if ( substr( $word, 0, 2 ) < "א" || substr( $word, 0, 2 ) > "ת" ) {
|
|
|
|
|
|
$word = "־".$word;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return $word;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* Gets a number and uses the suited form of the word.
|
2006-05-26 18:26:51 +00:00
|
|
|
|
*
|
2006-06-25 10:37:45 +00:00
|
|
|
|
* @param integer the number of items
|
|
|
|
|
|
* @param string the first form (singular)
|
|
|
|
|
|
* @param string the second form (plural)
|
2006-12-16 22:31:08 +00:00
|
|
|
|
* @param string the third form (2 items, plural is used if not applicable and not specified
|
|
|
|
|
|
* @param not used (for compatibility with ancestor)
|
|
|
|
|
|
* @param not used (for compatibility with ancestor)
|
2006-06-16 18:47:15 +00:00
|
|
|
|
*
|
|
|
|
|
|
* @return string of the suited form of word
|
2006-05-26 18:26:51 +00:00
|
|
|
|
*/
|
2007-11-18 20:15:49 +00:00
|
|
|
|
function convertPlural( $count, $forms ) {
|
|
|
|
|
|
if ( !count($forms) ) { return ''; }
|
|
|
|
|
|
$forms = $this->preConvertPlural( $forms, 3 );
|
|
|
|
|
|
|
2006-05-26 18:26:51 +00:00
|
|
|
|
if ( $count == '1' ) {
|
2007-11-18 20:15:49 +00:00
|
|
|
|
return $forms[0];
|
2007-11-28 14:20:43 +00:00
|
|
|
|
} elseif ( $count == '2' && isset($forms[2]) ) {
|
2007-11-18 20:15:49 +00:00
|
|
|
|
return $forms[2];
|
2006-05-26 18:26:51 +00:00
|
|
|
|
} else {
|
2007-11-18 20:15:49 +00:00
|
|
|
|
return $forms[1];
|
2006-05-26 18:26:51 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2003-07-08 20:17:36 +00:00
|
|
|
|
}
|