r67411 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67410‎ | r67411 | r67412 >
Date:19:15, 5 June 2010
Author:ialex
Status:ok
Tags:
Comment:
Fixed some doxygen warnings
Modified paths:
  • /trunk/phase3/languages/classes/LanguageHe.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/classes/LanguageHe.php
@@ -8,21 +8,22 @@
99 * @author Rotem Liss
1010 */
1111 class LanguageHe extends Language {
 12+
1213 /**
1314 * Convert grammar forms of words.
1415 *
1516 * Available cases:
1617 * "prefixed" (or "תחילית") - when the word has a prefix
1718 *
18 - * @param string the word to convert
19 - * @param string the case
 19+ * @param $word String: the word to convert
 20+ * @param $case String: the case
2021 */
2122 public function convertGrammar( $word, $case ) {
2223 global $wgGrammarForms;
2324 if ( isset($wgGrammarForms['he'][$case][$word]) ) {
2425 return $wgGrammarForms['he'][$case][$word];
2526 }
26 -
 27+
2728 switch ( $case ) {
2829 case 'prefixed':
2930 case 'תחילית':
@@ -30,32 +31,27 @@
3132 if ( substr( $word, 0, 2 ) == "ו" && substr( $word, 0, 4 ) != "וו" ) {
3233 $word = "ו".$word;
3334 }
34 -
 35+
3536 # Remove the "He" if prefixed
3637 if ( substr( $word, 0, 2 ) == "ה" ) {
3738 $word = substr( $word, 2 );
3839 }
39 -
 40+
4041 # Add a hyphen if non-Hebrew letters
4142 if ( substr( $word, 0, 2 ) < "א" || substr( $word, 0, 2 ) > "ת" ) {
4243 $word = "־".$word;
4344 }
4445 }
45 -
 46+
4647 return $word;
4748 }
48 -
 49+
4950 /**
5051 * Gets a number and uses the suited form of the word.
5152 *
52 - * @param integer the number of items
53 - * @param string the first form (singular)
54 - * @param string the second form (plural)
55 - * @param string the third form (2 items, plural is used if not applicable and not specified
56 - * @param not used (for compatibility with ancestor)
57 - * @param not used (for compatibility with ancestor)
58 - *
59 - * @return string of the suited form of word
 53+ * @param $count Integer: the number of items
 54+ * @param $forms Array with 3 items: the three plural forms
 55+ * @return String: the suited form of word
6056 */
6157 function convertPlural( $count, $forms ) {
6258 if ( !count($forms) ) { return ''; }

Status & tagging log