r89118 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89117‎ | r89118 | r89119 >
Date:16:32, 29 May 2011
Author:reedy
Status:deferred
Tags:
Comment:
More documentation!
Modified paths:
  • /trunk/phase3/languages/classes/LanguageCu.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageDsb.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageEo.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageFi.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageGa.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageGan.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageHsb.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageHy.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageIu.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageKaa.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageKk.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageKk_cyrl.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageKu.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageRu.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageSr.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageTr.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageUk.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageWa.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageZh.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/classes/LanguageHy.php
@@ -6,8 +6,15 @@
77 * @author Ruben Vardanyan (Me@RubenVardanyan.com)
88 */
99 class LanguageHy extends Language {
10 - # Convert from the nominative form of a noun to some other case
11 - # Invoked with {{grammar:case|word}}
 10+
 11+ /**
 12+ * Convert from the nominative form of a noun to some other case
 13+ * Invoked with {{grammar:case|word}}
 14+ *
 15+ * @param $word string
 16+ * @param $case string
 17+ * @return string
 18+ */
1219 function convertGrammar( $word, $case ) {
1320 global $wgGrammarForms;
1421 if ( isset( $wgGrammarForms['hy'][$case][$word] ) ) {
Index: trunk/phase3/languages/classes/LanguageTr.php
@@ -40,7 +40,7 @@
4141 * @see bug 28040
4242 *
4343 * @param $string string
44 - * @param $first string
 44+ * @param $first string|bool
4545 *
4646 * @return string
4747 */
@@ -53,7 +53,7 @@
5454 * @see bug 28040
5555 *
5656 * @param $string string
57 - * @param $first string
 57+ * @param $first string|bool
5858 *
5959 * @return string
6060 */
Index: trunk/phase3/languages/classes/LanguageEo.php
@@ -51,6 +51,10 @@
5252 return parent::iconv( $in, $out, $string );
5353 }
5454
 55+ /**
 56+ * @param $matches array
 57+ * @return string
 58+ */
5559 function strrtuxCallback( $matches ) {
5660 static $ux = array (
5761 'x' => 'xx' , 'X' => 'Xx' ,
@@ -64,6 +68,10 @@
6569 return strtr( $matches[1], $ux );
6670 }
6771
 72+ /**
 73+ * @param $matches array
 74+ * @return string
 75+ */
6876 function strrtxuCallback( $matches ) {
6977 static $xu = array (
7078 'xx' => 'x' , 'xX' => 'x' ,
@@ -84,6 +92,10 @@
8593 return strtr( $matches[1], $xu ) . strtr( $matches[2], $xu );
8694 }
8795
 96+ /**
 97+ * @param $s string
 98+ * @return string
 99+ */
88100 function checkTitleEncoding( $s ) {
89101 # Check for X-system backwards-compatibility URLs
90102 $ishigh = preg_match( '/[\x80-\xff]/', $s );
Index: trunk/phase3/languages/classes/LanguageIu.php
@@ -17,6 +17,9 @@
1818 */
1919 require_once( dirname( __FILE__ ) . '/../LanguageConverter.php' );
2020
 21+/**
 22+ *
 23+ */
2124 class IuConverter extends LanguageConverter {
2225 var $mToLatin = array(
2326 'ᐦ' => 'h', 'ᐃ' => 'i', 'ᐄ' => 'ii', 'ᐅ' => 'u', 'ᐆ' => 'uu', 'ᐊ' => 'a', 'ᐋ' => 'aa',
@@ -76,11 +79,16 @@
7780 );
7881 }
7982
80 - /* rules should be defined as -{Syllabic | Latin-} -or-
81 - -{code:text | code:text | ...}-
82 - update: delete all rule parsing because it's not used
83 - currently, and just produces a couple of bugs
84 - */
 83+ /**
 84+ * rules should be defined as -{Syllabic | Latin-} -or-
 85+ * -{code:text | code:text | ...}-
 86+ * update: delete all rule parsing because it's not used
 87+ * currently, and just produces a couple of bugs
 88+ *
 89+ * @param $rule string
 90+ * @param $flags array
 91+ * @return array
 92+ */
8593 function parseManualRule( $rule, $flags = array() ) {
8694 if ( in_array( 'T', $flags ) ) {
8795 return parent::parseManualRule( $rule, $flags );
@@ -95,7 +103,13 @@
96104 return $carray;
97105 }
98106
99 - // Do not convert content on talk pages
 107+ /**
 108+ * Do not convert content on talk pages
 109+ *
 110+ * @param $text string
 111+ * @param $parser Parser
 112+ * @return string
 113+ */
100114 function parserConvert( $text, &$parser ) {
101115 if ( is_object( $parser->getTitle() ) && $parser->getTitle()->isTalkPage() )
102116 $this->mDoContentConvert = false;
@@ -110,6 +124,10 @@
111125 * - if there is no selected variant, leave the link
112126 * names as they were
113127 * - do not try to find variants for usernames
 128+ *
 129+ * @param $link string
 130+ * @param $nt Title
 131+ * @param $ignoreOtherCond bool
114132 */
115133 function findVariantLink( &$link, &$nt, $ignoreOtherCond = false ) {
116134 // check for user namespace
@@ -129,6 +147,9 @@
130148 * We want our external link captions to be converted in variants,
131149 * so we return the original text instead -{$text}-, except for URLs
132150 *
 151+ * @param $text string
 152+ * @param $noParse bool
 153+ *
133154 * @return string
134155 */
135156 function markNoConversion( $text, $noParse = false ) {
@@ -141,6 +162,9 @@
142163 * An ugly function wrapper for parsing Image titles
143164 * (to prevent image name conversion)
144165 *
 166+ * @param $text string
 167+ * @param $toVariant bool
 168+ *
145169 * @return string
146170 */
147171 function autoConvert( $text, $toVariant = false ) {
@@ -155,6 +179,9 @@
156180 /**
157181 * It translates text into variant
158182 *
 183+ * @param $text string
 184+ * @param $toVariant bool
 185+ *
159186 * @return string
160187 */
161188 function translate( $text, $toVariant ) {
Index: trunk/phase3/languages/classes/LanguageUk.php
@@ -5,8 +5,15 @@
66 * @ingroup Language
77 */
88 class LanguageUk extends Language {
9 - # Convert from the nominative form of a noun to some other case
10 - # Invoked with {{grammar:case|word}}
 9+
 10+ /**
 11+ * Convert from the nominative form of a noun to some other case
 12+ * Invoked with {{grammar:case|word}}
 13+ *
 14+ * @param $word string
 15+ * @param $case string
 16+ * @return string
 17+ */
1118 function convertGrammar( $word, $case ) {
1219 global $wgGrammarForms;
1320 if ( isset( $wgGrammarForms['uk'][$case][$word] ) ) {
Index: trunk/phase3/languages/classes/LanguageKaa.php
@@ -11,6 +11,9 @@
1212 /**
1313 * Cases: genitive, dative, accusative, locative, ablative, comitative + possessive forms
1414 *
 15+ * @param $word string
 16+ * @param $case string
 17+ *
1518 * @return string
1619 */
1720 function convertGrammar( $word, $case ) {
@@ -25,6 +28,8 @@
2629 /**
2730 * It fixes issue with ucfirst for transforming 'i' to 'İ'
2831 *
 32+ * @param $string string
 33+ *
2934 * @return string
3035 */
3136 function ucfirst ( $string ) {
Index: trunk/phase3/languages/classes/LanguageFi.php
@@ -8,8 +8,14 @@
99 */
1010 class LanguageFi extends Language {
1111
12 - # Convert from the nominative form of a noun to some other case
13 - # Invoked with {{GRAMMAR:case|word}}
 12+ /**
 13+ * Convert from the nominative form of a noun to some other case
 14+ * Invoked with {{grammar:case|word}}
 15+ *
 16+ * @param $word string
 17+ * @param $case string
 18+ * @return string
 19+ */
1420 function convertGrammar( $word, $case ) {
1521 global $wgGrammarForms;
1622 if ( isset( $wgGrammarForms['fi'][$case][$word] ) ) {
@@ -55,6 +61,11 @@
5662 return $word;
5763 }
5864
 65+ /**
 66+ * @param $str string
 67+ * @param $forContent bool
 68+ * @return string
 69+ */
5970 function translateBlockExpiry( $str, $forContent = false ) {
6071 /*
6172 'ago', 'now', 'today', 'this', 'next',
Index: trunk/phase3/languages/classes/LanguageGan.php
@@ -8,6 +8,14 @@
99 */
1010 class GanConverter extends LanguageConverter {
1111
 12+ /**
 13+ * @param $langobj Language
 14+ * @param $maincode string
 15+ * @param $variants array
 16+ * @param $variantfallbacks array
 17+ * @param $flags array
 18+ * @param $manualLevel array
 19+ */
1220 function __construct( $langobj, $maincode,
1321 $variants = array(),
1422 $variantfallbacks = array(),
@@ -37,14 +45,24 @@
3846 );
3947 }
4048
41 - /* there shouldn't be any latin text in Chinese conversion, so no need
42 - to mark anything.
43 - $noParse is there for compatibility with LanguageConvert::markNoConversion
 49+ /**
 50+ * there shouldn't be any latin text in Chinese conversion, so no need
 51+ * to mark anything.
 52+ * $noParse is there for compatibility with LanguageConvert::markNoConversion
 53+ *
 54+ * @param $text string
 55+ * @param $noParse bool
 56+ *
 57+ * @return string
4458 */
4559 function markNoConversion( $text, $noParse = false ) {
4660 return $text;
4761 }
4862
 63+ /**
 64+ * @param $key string
 65+ * @return String
 66+ */
4967 function convertCategoryKey( $key ) {
5068 return $this->autoConvert( $key, 'gan' );
5169 }
@@ -80,25 +98,44 @@
8199 $wgHooks['ArticleSaveComplete'][] = $this->mConverter;
82100 }
83101
84 - # this should give much better diff info
 102+ /**
 103+ * this should give much better diff info
 104+ *
 105+ * @param $text string
 106+ * @return string
 107+ */
85108 function segmentForDiff( $text ) {
86109 return preg_replace(
87110 "/([\\xc0-\\xff][\\x80-\\xbf]*)/e",
88111 "' ' .\"$1\"", $text );
89112 }
90113
 114+ /**
 115+ * @param $text string
 116+ * @return string
 117+ */
91118 function unsegmentForDiff( $text ) {
92119 return preg_replace(
93120 "/ ([\\xc0-\\xff][\\x80-\\xbf]*)/e",
94121 "\"$1\"", $text );
95122 }
96123
97 - // word segmentation
 124+ /**
 125+ * word segmentation
 126+ *
 127+ * @param $string string
 128+ * @param $autoVariant string
 129+ * @return String
 130+ */
98131 function normalizeForSearch( $string, $autoVariant = 'gan-hans' ) {
99132 // LanguageZh::normalizeForSearch
100133 return parent::normalizeForSearch( $string, $autoVariant );
101134 }
102135
 136+ /**
 137+ * @param $termsArray array
 138+ * @return array
 139+ */
103140 function convertForSearchResult( $termsArray ) {
104141 $terms = implode( '|', $termsArray );
105142 $terms = self::convertDoubleWidth( $terms );
Index: trunk/phase3/languages/classes/LanguageDsb.php
@@ -6,9 +6,14 @@
77 */
88 class LanguageDsb extends Language {
99
10 - # Convert from the nominative form of a noun to some other case
11 - # Invoked with {{GRAMMAR:case|word}}
12 -
 10+ /**
 11+ * Convert from the nominative form of a noun to some other case
 12+ * Invoked with {{grammar:case|word}}
 13+ *
 14+ * @param $word string
 15+ * @param $case string
 16+ * @return string
 17+ */
1318 function convertGrammar( $word, $case ) {
1419 global $wgGrammarForms;
1520 if ( isset( $wgGrammarForms['dsb'][$case][$word] ) ) {
Index: trunk/phase3/languages/classes/LanguageHsb.php
@@ -6,9 +6,14 @@
77
88 class LanguageHsb extends Language {
99
10 - # Convert from the nominative form of a noun to some other case
11 - # Invoked with {{GRAMMAR:case|word}}
12 -
 10+ /**
 11+ * Convert from the nominative form of a noun to some other case
 12+ * Invoked with {{grammar:case|word}}
 13+ *
 14+ * @param $word string
 15+ * @param $case string
 16+ * @return string
 17+ */
1318 function convertGrammar( $word, $case ) {
1419 global $wgGrammarForms;
1520 if ( isset( $wgGrammarForms['hsb'][$case][$word] ) ) {
Index: trunk/phase3/languages/classes/LanguageZh.php
@@ -8,6 +8,14 @@
99 */
1010 class ZhConverter extends LanguageConverter {
1111
 12+ /**
 13+ * @param $langobj Language
 14+ * @param $maincode string
 15+ * @param $variants array
 16+ * @param $variantfallbacks array
 17+ * @param $flags array
 18+ * @param $manualLevel array
 19+ */
1220 function __construct( $langobj, $maincode,
1321 $variants = array(),
1422 $variantfallbacks = array(),
@@ -58,14 +66,24 @@
5967 $this->mTables['zh-tw']->merge( $this->mTables['zh-hant'] );
6068 }
6169
62 - /* there shouldn't be any latin text in Chinese conversion, so no need
63 - to mark anything.
64 - $noParse is there for compatibility with LanguageConvert::markNoConversion
 70+ /**
 71+ * there shouldn't be any latin text in Chinese conversion, so no need
 72+ * to mark anything.
 73+ * $noParse is there for compatibility with LanguageConvert::markNoConversion
 74+ *
 75+ * @param $text string
 76+ * @param $noParse bool
 77+ *
 78+ * @return string
6579 */
6680 function markNoConversion( $text, $noParse = false ) {
6781 return $text;
6882 }
6983
 84+ /**
 85+ * @param $key string
 86+ * @return String
 87+ */
7088 function convertCategoryKey( $key ) {
7189 return $this->autoConvert( $key, 'zh' );
7290 }
@@ -110,13 +128,22 @@
111129 $wgHooks['ArticleSaveComplete'][] = $this->mConverter;
112130 }
113131
114 - # this should give much better diff info
 132+ /**
 133+ * this should give much better diff info
 134+ *
 135+ * @param $text string
 136+ * @return string
 137+ */
115138 function segmentForDiff( $text ) {
116139 return preg_replace(
117140 "/([\\xc0-\\xff][\\x80-\\xbf]*)/e",
118141 "' ' .\"$1\"", $text );
119142 }
120143
 144+ /**
 145+ * @param $text string
 146+ * @return string
 147+ */
121148 function unsegmentForDiff( $text ) {
122149 return preg_replace(
123150 "/ ([\\xc0-\\xff][\\x80-\\xbf]*)/e",
@@ -145,6 +172,10 @@
146173
147174 }
148175
 176+ /**
 177+ * @param $termsArray array
 178+ * @return array
 179+ */
149180 function convertForSearchResult( $termsArray ) {
150181 $terms = implode( '|', $termsArray );
151182 $terms = self::convertDoubleWidth( $terms );
Index: trunk/phase3/languages/classes/LanguageRu.php
@@ -7,8 +7,15 @@
88 * @ingroup Language
99 */
1010 class LanguageRu extends Language {
11 - # Convert from the nominative form of a noun to some other case
12 - # Invoked with {{grammar:case|word}}
 11+
 12+ /**
 13+ * Convert from the nominative form of a noun to some other case
 14+ * Invoked with {{grammar:case|word}}
 15+ *
 16+ * @param $word string
 17+ * @param $case string
 18+ * @return string
 19+ */
1320 function convertGrammar( $word, $case ) {
1421 global $wgGrammarForms;
1522 if ( isset( $wgGrammarForms['ru'][$case][$word] ) ) {
Index: trunk/phase3/languages/classes/LanguageGa.php
@@ -5,8 +5,15 @@
66 * @ingroup Language
77 */
88 class LanguageGa extends Language {
9 - # Convert day names
10 - # Invoked with {{GRAMMAR:transformation|word}}
 9+
 10+ /**
 11+ * Convert day names
 12+ * Invoked with {{GRAMMAR:transformation|word}}
 13+ *
 14+ * @param $word string
 15+ * @param $case string
 16+ * @return string
 17+ */
1118 function convertGrammar( $word, $case ) {
1219 global $wgGrammarForms;
1320 if ( isset( $wgGrammarForms['ga'][$case][$word] ) ) {
Index: trunk/phase3/languages/classes/LanguageKk_cyrl.php
@@ -236,6 +236,11 @@
237237 return $word;
238238 }
239239
 240+ /**
 241+ * @param $word string
 242+ * @param $case string
 243+ * @return string
 244+ */
240245 function convertGrammarKk_latn( $word, $case ) {
241246 global $wgGrammarForms;
242247 if ( isset( $wgGrammarForms['kk-tr'][$case][$word] ) ) {
@@ -456,6 +461,11 @@
457462 return $word;
458463 }
459464
 465+ /**
 466+ * @param $word string
 467+ * @param $case string
 468+ * @return string
 469+ */
460470 function convertGrammarKk_arab( $word, $case ) {
461471 global $wgGrammarForms;
462472 if ( isset( $wgGrammarForms['kk-cn'][$case][$word] ) ) {
@@ -676,6 +686,11 @@
677687 return $word;
678688 }
679689
 690+ /**
 691+ * @param $word string
 692+ * @param $allVowels array
 693+ * @return array
 694+ */
680695 function lastLetter( $word, $allVowels ) {
681696 $lastLetter = array();
682697
Index: trunk/phase3/languages/classes/LanguageKk.php
@@ -20,6 +20,13 @@
2121
2222 protected $mCyrl2Latn, $mLatn2Cyrl, $mCyLa2Arab;
2323
 24+ /**
 25+ * @param $langobj Language
 26+ * @param $maincode string
 27+ * @param $variants array
 28+ * @param $variantfallbacks array
 29+ * @param $flags array
 30+ */
2431 function __construct( $langobj, $maincode,
2532 $variants = array(),
2633 $variantfallbacks = array(),
@@ -192,11 +199,17 @@
193200 );
194201 }
195202
196 - /* rules should be defined as -{ekavian | iyekavian-} -or-
197 - -{code:text | code:text | ...}-
198 - update: delete all rule parsing because it's not used
199 - currently, and just produces a couple of bugs
200 - */
 203+ /**
 204+ * rules should be defined as -{ekavian | iyekavian-} -or-
 205+ * -{code:text | code:text | ...}-
 206+ *
 207+ * update: delete all rule parsing because it's not used
 208+ * currently, and just produces a couple of bugs
 209+ *
 210+ * @param $rule string
 211+ * @param $flags array
 212+ * @return array
 213+ */
201214 function parseManualRule( $rule, $flags = array() ) {
202215 if ( in_array( 'T', $flags ) ) {
203216 return parent::parseManualRule( $rule, $flags );
@@ -216,6 +229,10 @@
217230 * - if there is no selected variant, leave the link
218231 * names as they were
219232 * - do not try to find variants for usernames
 233+ *
 234+ * @param $link string
 235+ * @param $nt Title
 236+ * @param bool $ignoreOtherCond
220237 */
221238 function findVariantLink( &$link, &$nt, $ignoreOtherCond = false ) {
222239 // check for user namespace
@@ -235,6 +252,9 @@
236253 * An ugly function wrapper for parsing Image titles
237254 * (to prevent image name conversion)
238255 *
 256+ * @param $text string
 257+ * @param $toVariant bool
 258+ *
239259 * @return string
240260 */
241261 function autoConvert( $text, $toVariant = false ) {
@@ -249,6 +269,9 @@
250270 /**
251271 * It translates text into variant
252272 *
 273+ * @param $text string
 274+ * @param $toVariant string
 275+ *
253276 * @return string
254277 */
255278 function translate( $text, $toVariant ) {
@@ -289,6 +312,11 @@
290313 return $ret;
291314 }
292315
 316+ /**
 317+ * @param $text string
 318+ * @param $toVariant string
 319+ * @return mixed|string
 320+ */
293321 function regsConverter( $text, $toVariant ) {
294322 if ( $text == '' ) {
295323 return $text;
@@ -345,6 +373,9 @@
346374 * We want our external link captions to be converted in variants,
347375 * so we return the original text instead -{$text}-, except for URLs
348376 *
 377+ * @param $text string
 378+ * @param $noParse string|bool
 379+ *
349380 * @return string
350381 */
351382 function markNoConversion( $text, $noParse = false ) {
Index: trunk/phase3/languages/classes/LanguageCu.php
@@ -5,8 +5,15 @@
66 * @ingroup Language
77 */
88 class LanguageCu extends Language {
9 - # Convert from the nominative form of a noun to some other case
10 - # Invoked with {{grammar:case|word}}
 9+
 10+ /**
 11+ * Convert from the nominative form of a noun to some other case
 12+ * Invoked with {{grammar:case|word}}
 13+ *
 14+ * @param $word string
 15+ * @param $case string
 16+ * @return string
 17+ */
1118 function convertGrammar( $word, $case ) {
1219 global $wgGrammarForms;
1320 if ( isset( $wgGrammarForms['сu'][$case][$word] ) ) {
Index: trunk/phase3/languages/classes/LanguageWa.php
@@ -24,11 +24,17 @@
2525 return ( $count <= 1 ) ? $forms[0] : $forms[1];
2626 }
2727
28 - ## #
29 - ## # Dates in Walloon are "1î d' <monthname>" for 1st of the month,
30 - ## # "<day> di <monthname>" for months starting by a consoun, and
31 - ## # "<day> d' <monthname>" for months starting with a vowel
32 - ## #
 28+ /**
 29+ * Dates in Walloon are "1î d' <monthname>" for 1st of the month,
 30+ * "<day> di <monthname>" for months starting by a consoun, and
 31+ * "<day> d' <monthname>" for months starting with a vowel
 32+ *
 33+ * @param $ts string
 34+ * @param $adj bool
 35+ * @param $format bool
 36+ * @param $tc bool
 37+ * @return string
 38+ */
3339 function date( $ts, $adj = false, $format = true, $tc = false ) {
3440 $ts = wfTimestamp( TS_MW, $ts );
3541 if ( $adj ) { $ts = $this->userAdjust( $ts, $tc ); }
@@ -69,6 +75,13 @@
7076 return $d;
7177 }
7278
 79+ /**
 80+ * @param $ts string
 81+ * @param $adj bool
 82+ * @param $format bool
 83+ * @param $tc bool
 84+ * @return string
 85+ */
7386 function timeanddate( $ts, $adj = false, $format = true, $tc = false ) {
7487 if ( $adj ) { $ts = $this->userAdjust( $ts, $tc ); }
7588 $datePreference = $this->dateFormat( $format );
Index: trunk/phase3/languages/classes/LanguageKu.php
@@ -137,6 +137,10 @@
138138 * - if there is no selected variant, leave the link
139139 * names as they were
140140 * - do not try to find variants for usernames
 141+ *
 142+ * @param $link string
 143+ * @param $nt Title
 144+ * @param $ignoreOtherCond bool
141145 */
142146 function findVariantLink( &$link, &$nt, $ignoreOtherCond = false ) {
143147 // check for user namespace
@@ -156,6 +160,9 @@
157161 * We want our external link captions to be converted in variants,
158162 * so we return the original text instead -{$text}-, except for URLs
159163 *
 164+ * @param $text string
 165+ * @param $noParse bool
 166+ *
160167 * @return string
161168 */
162169 function markNoConversion( $text, $noParse = false ) {
@@ -168,6 +175,9 @@
169176 * An ugly function wrapper for parsing Image titles
170177 * (to prevent image name conversion)
171178 *
 179+ * @param $text string
 180+ * @param $toVariant bool
 181+ *
172182 * @return string
173183 */
174184 function autoConvert( $text, $toVariant = false ) {
@@ -183,6 +193,9 @@
184194 * It translates text into variant, specials:
185195 * - ommiting roman numbers
186196 *
 197+ * @param $text string
 198+ * @param $toVariant bool
 199+ *
187200 * @return string
188201 */
189202 function translate( $text, $toVariant ) {
Index: trunk/phase3/languages/classes/LanguageSr.php
@@ -58,11 +58,17 @@
5959 );
6060 }
6161
62 - /* rules should be defined as -{ekavian | iyekavian-} -or-
63 - -{code:text | code:text | ...}-
64 - update: delete all rule parsing because it's not used
65 - currently, and just produces a couple of bugs
66 - */
 62+ /**
 63+ * rules should be defined as -{ekavian | iyekavian-} -or-
 64+ * -{code:text | code:text | ...}-
 65+ *
 66+ * update: delete all rule parsing because it's not used
 67+ * currently, and just produces a couple of bugs
 68+ *
 69+ * @param $rule string
 70+ * @param $flags array
 71+ * @return array
 72+ */
6773 function parseManualRule( $rule, $flags = array() ) {
6874 if ( in_array( 'T', $flags ) ) {
6975 return parent::parseManualRule( $rule, $flags );
@@ -82,6 +88,10 @@
8389 * - if there is no selected variant, leave the link
8490 * names as they were
8591 * - do not try to find variants for usernames
 92+ *
 93+ * @param $link string
 94+ * @param $nt Title
 95+ * @param $ignoreOtherCond bool
8696 */
8797 function findVariantLink( &$link, &$nt, $ignoreOtherCond = false ) {
8898 // check for user namespace
@@ -101,6 +111,9 @@
102112 * We want our external link captions to be converted in variants,
103113 * so we return the original text instead -{$text}-, except for URLs
104114 *
 115+ * @param $text string
 116+ * @param $noParse bool
 117+ *
105118 * @return string
106119 */
107120 function markNoConversion( $text, $noParse = false ) {
@@ -113,6 +126,9 @@
114127 * An ugly function wrapper for parsing Image titles
115128 * (to prevent image name conversion)
116129 *
 130+ * @param $text string
 131+ * @param $toVariant bool
 132+ *
117133 * @return string
118134 */
119135 function autoConvert( $text, $toVariant = false ) {
@@ -128,6 +144,9 @@
129145 * It translates text into variant, specials:
130146 * - ommiting roman numbers
131147 *
 148+ * @param $text string
 149+ * @param $toVariant string
 150+ *
132151 * @return string
133152 */
134153 function translate( $text, $toVariant ) {
@@ -161,6 +180,9 @@
162181 * @author Nikola Smolenski <smolensk@eunet.rs>
163182 * @since 1.18
164183 *
 184+ * @param $text string
 185+ * @param $variant string
 186+ *
165187 * @return bool
166188 */
167189 public function guessVariant( $text, $variant ) {

Status & tagging log