r89116 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89115‎ | r89116 | r89117 >
Date:15:53, 29 May 2011
Author:reedy
Status:deferred
Tags:
Comment:
More documentation!
Modified paths:
  • /trunk/phase3/languages/classes/LanguageBe_tarask.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageBg.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageBh.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageBs.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageEt.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageHi.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageHy.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/LanguageKsh.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageKu_ku.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageLa.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageLn.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageMk.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/classes/LanguageLa.php
@@ -12,6 +12,11 @@
1313 * Rules are far from complete.
1414 *
1515 * Cases: genitive, accusative, ablative
 16+ *
 17+ * @param $word string
 18+ * @param $case string
 19+ *
 20+ * @return string
1621 */
1722 function convertGrammar( $word, $case ) {
1823 global $wgGrammarForms;
Index: trunk/phase3/languages/classes/LanguageHi.php
@@ -7,6 +7,11 @@
88 class LanguageHi extends Language {
99 /**
1010 * Use singular form for zero
 11+ *
 12+ * @param $count int
 13+ * @param $forms array
 14+ *
 15+ * @return string
1116 */
1217 function convertPlural( $count, $forms ) {
1318 if ( !count( $forms ) ) { return ''; }
Index: trunk/phase3/languages/classes/LanguageLn.php
@@ -8,7 +8,11 @@
99 /**
1010 * Use singular form for zero
1111 * http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#ln
12 -
 12+ *
 13+ * @param $count int
 14+ * @param $forms array
 15+ *
 16+ * @return string
1317 */
1418 function convertPlural( $count, $forms ) {
1519 if ( !count( $forms ) ) { return ''; }
Index: trunk/phase3/languages/classes/LanguageHy.php
@@ -63,6 +63,10 @@
6464
6565 /**
6666 * Armenian numeric format is "12 345,67" but "1234,56"
 67+ *
 68+ * @param $_ string
 69+ *
 70+ * @return string
6771 */
6872 function commafy( $_ ) {
6973 if ( !preg_match( '/^\d{1,4}$/', $_ ) ) {
Index: trunk/phase3/languages/classes/LanguageKsh.php
@@ -64,6 +64,8 @@
6565 *
6666 * @param $word String
6767 * @param $case String
 68+ *
 69+ * @return string
6870 */
6971 function convertGrammar( $word, $case ) {
7072 $lord = strtolower( $word );
@@ -144,6 +146,10 @@
145147
146148 /**
147149 * Avoid grouping whole numbers between 0 to 9999
 150+ *
 151+ * @param $_ string
 152+ *
 153+ * @return string
148154 */
149155 public function commafy( $_ ) {
150156 if ( !preg_match( '/^\d{1,4}$/', $_ ) ) {
Index: trunk/phase3/languages/classes/LanguageMk.php
@@ -8,6 +8,11 @@
99 /**
1010 * Plural forms per
1111 * http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#mk
 12+ *
 13+ * @param $count int
 14+ * @param $forms array
 15+ *
 16+ * @return string
1217 */
1318 function convertPlural( $count, $forms ) {
1419 if ( !count( $forms ) ) { return ''; }
Index: trunk/phase3/languages/classes/LanguageEt.php
@@ -8,6 +8,10 @@
99 class LanguageEt extends Language {
1010 /**
1111 * Avoid grouping whole numbers between 0 to 9999
 12+ *
 13+ * @param $_ string
 14+ *
 15+ * @return string
1216 */
1317 function commafy( $_ ) {
1418 if ( !preg_match( '/^\d{1,4}$/', $_ ) ) {
Index: trunk/phase3/languages/classes/LanguageBg.php
@@ -8,6 +8,10 @@
99 /**
1010 * ISO number formatting: 123 456 789,99.
1111 * Avoid tripple grouping by numbers with whole part up to 4 digits.
 12+ *
 13+ * @param $_ string
 14+ *
 15+ * @return string
1216 */
1317 function commafy( $_ ) {
1418 if ( !preg_match( '/^\d{1,4}$/', $_ ) ) {
Index: trunk/phase3/languages/classes/LanguageBh.php
@@ -7,6 +7,11 @@
88 class LanguageBh extends Language {
99 /**
1010 * Use singular form for zero
 11+ *
 12+ * @param $count int
 13+ * @param $forms array
 14+ *
 15+ * @return string
1116 */
1217 function convertPlural( $count, $forms ) {
1318 if ( !count( $forms ) ) { return ''; }
Index: trunk/phase3/languages/classes/LanguageKaa.php
@@ -35,6 +35,10 @@
3636
3737 /**
3838 * It fixes issue with lcfirst for transforming 'I' to 'ı'
 39+ *
 40+ * @param $string string
 41+ *
 42+ * @return string
3943 */
4044 function lcfirst ( $string ) {
4145 if ( substr( $string, 0, 1 ) === 'I' ) {
@@ -46,6 +50,10 @@
4751
4852 /**
4953 * Avoid grouping whole numbers between 0 to 9999
 54+ *
 55+ * @param $_ string
 56+ *
 57+ * @return string
5058 */
5159 function commafy( $_ ) {
5260 if ( !preg_match( '/^\d{1,4}$/', $_ ) ) {
Index: trunk/phase3/languages/classes/LanguageBs.php
@@ -34,6 +34,11 @@
3535 # Invoked with {{GRAMMAR:case|word}}
3636 /**
3737 * Cases: genitiv, dativ, akuzativ, vokativ, instrumental, lokativ
 38+ *
 39+ * @param $word string
 40+ * @param $case string
 41+ *
 42+ * @return string
3843 */
3944 function convertGrammar( $word, $case ) {
4045 global $wgGrammarForms;
Index: trunk/phase3/languages/classes/LanguageKu_ku.php
@@ -8,6 +8,10 @@
99
1010 /**
1111 * Avoid grouping whole numbers between 0 to 9999
 12+ *
 13+ * @param $_ string
 14+ *
 15+ * @return string
1216 */
1317 function commafy( $_ ) {
1418
Index: trunk/phase3/languages/classes/LanguageBe_tarask.php
@@ -52,6 +52,10 @@
5353 * but the characters used for this could be both U+0027 and U+2019.
5454 * This function unifies apostrophe sign in search index values
5555 * to enable seach using both apostrophe signs.
 56+ *
 57+ * @param $string string
 58+ *
 59+ * @return string
5660 */
5761 function normalizeForSearch( $string ) {
5862 wfProfileIn( __METHOD__ );
@@ -71,6 +75,10 @@
7276 /**
7377 * Four-digit number should be without group commas (spaces)
7478 * So "1 234 567", "12 345" but "1234"
 79+ *
 80+ * @param $_ string
 81+ *
 82+ * @return string
7583 */
7684 function commafy( $_ ) {
7785 if ( preg_match( '/^-?\d{1,4}(\.\d*)?$/', $_ ) ) {
Index: trunk/phase3/languages/classes/LanguageKk_cyrl.php
@@ -10,6 +10,11 @@
1111 # Invoked with {{GRAMMAR:case|word}}
1212 /**
1313 * Cases: genitive, dative, accusative, locative, ablative, comitative + possessive forms
 14+ *
 15+ * @param $word string
 16+ * @param $case stirng
 17+ *
 18+ * @return string
1419 */
1520 function convertGrammarKk_cyrl( $word, $case ) {
1621 global $wgGrammarForms;
@@ -707,6 +712,10 @@
708713
709714 /**
710715 * Avoid grouping whole numbers between 0 to 9999
 716+ *
 717+ * @param $_ string
 718+ *
 719+ * @return string
711720 */
712721 function commafy( $_ ) {
713722 if ( !preg_match( '/^\d{1,4}$/', $_ ) ) {
Index: trunk/phase3/languages/classes/LanguageKk.php
@@ -347,6 +347,10 @@
348348 return $text;
349349 }
350350
 351+ /**
 352+ * @param $key string
 353+ * @return String
 354+ */
351355 function convertCategoryKey( $key ) {
352356 return $this->autoConvert( $key, 'kk' );
353357 }
@@ -397,6 +401,10 @@
398402
399403 /**
400404 * It fixes issue with ucfirst for transforming 'i' to 'İ'
 405+ *
 406+ * @param $string string
 407+ *
 408+ * @return string
401409 */
402410 function ucfirst ( $string ) {
403411 $variant = $this->getPreferredVariant();
@@ -410,6 +418,10 @@
411419
412420 /**
413421 * It fixes issue with lcfirst for transforming 'I' to 'ı'
 422+ *
 423+ * @param $string string
 424+ *
 425+ * @return string
414426 */
415427 function lcfirst ( $string ) {
416428 $variant = $this->getPreferredVariant();
@@ -421,6 +433,11 @@
422434 return $string;
423435 }
424436
 437+ /**
 438+ * @param $word string
 439+ * @param $case string
 440+ * @return string
 441+ */
425442 function convertGrammar( $word, $case ) {
426443 wfProfileIn( __METHOD__ );
427444

Status & tagging log