Index: trunk/phase3/languages/LanguageConverter.php |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | $this->mMainLanguageCode = $maincode; |
74 | 74 | $this->mVariants = array_diff( $variants, $wgDisabledVariants ); |
75 | 75 | $this->mVariantFallbacks = $variantfallbacks; |
76 | | - $this->mVariantNames = Language::getLanguageNames(); |
| 76 | + $this->mVariantNames = Language::fetchLanguageNames(); |
77 | 77 | $this->mCacheKey = wfMemcKey( 'conversiontables', $maincode ); |
78 | 78 | $defaultflags = array( |
79 | 79 | // 'S' show converted text |
— | — | @@ -626,6 +626,7 @@ |
627 | 627 | * @param $startPos int |
628 | 628 | * @param $depth Integer: depth of recursion |
629 | 629 | * |
| 630 | + * @throws MWException |
630 | 631 | * @return String: converted text |
631 | 632 | */ |
632 | 633 | protected function recursiveConvertRule( $text, $variant, &$startPos, $depth = 0 ) { |
— | — | @@ -796,6 +797,7 @@ |
797 | 798 | * This method must be implemented in derived class. |
798 | 799 | * |
799 | 800 | * @private |
| 801 | + * @throws MWException |
800 | 802 | */ |
801 | 803 | function loadDefaultTables() { |
802 | 804 | $name = get_class( $this ); |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -158,6 +158,7 @@ |
159 | 159 | /** |
160 | 160 | * Create a language object for a given language code |
161 | 161 | * @param $code String |
| 162 | + * @throws MWException |
162 | 163 | * @return Language |
163 | 164 | */ |
164 | 165 | protected static function newFromCode( $code ) { |
— | — | @@ -559,7 +560,7 @@ |
560 | 561 | if ( $usemsg && wfMessage( $msg )->exists() ) { |
561 | 562 | return $this->getMessageFromDB( $msg ); |
562 | 563 | } |
563 | | - $name = self::getLanguageName( $code ); |
| 564 | + $name = self::fetchLanguageName( $code ); |
564 | 565 | if ( $name ) { |
565 | 566 | return $name; # if it's defined as a language name, show that |
566 | 567 | } else { |
— | — | @@ -2538,6 +2539,7 @@ |
2539 | 2540 | * @param $file string |
2540 | 2541 | * @param $string string |
2541 | 2542 | * |
| 2543 | + * @throws MWException |
2542 | 2544 | * @return string |
2543 | 2545 | */ |
2544 | 2546 | function transformUsingPairFile( $file, $string ) { |
— | — | @@ -3576,6 +3578,7 @@ |
3577 | 3579 | * @param $prefix string Prepend this to the filename |
3578 | 3580 | * @param $code string Language code |
3579 | 3581 | * @param $suffix string Append this to the filename |
| 3582 | + * @throws MWException |
3580 | 3583 | * @return string $prefix . $mangledCode . $suffix |
3581 | 3584 | */ |
3582 | 3585 | public static function getFileName( $prefix = 'Language', $code, $suffix = '.php' ) { |
Index: trunk/phase3/languages/classes/LanguagePl.php |
— | — | @@ -15,14 +15,16 @@ |
16 | 16 | if ( !count( $forms ) ) { return ''; } |
17 | 17 | $forms = $this->preConvertPlural( $forms, 3 ); |
18 | 18 | $count = abs( $count ); |
19 | | - if ( $count == 1 ) |
20 | | - return $forms[0]; // singular |
| 19 | + if ( $count == 1 ) { |
| 20 | + return $forms[0]; // singular |
| 21 | + } |
21 | 22 | switch ( $count % 10 ) { |
22 | 23 | case 2: |
23 | 24 | case 3: |
24 | 25 | case 4: |
25 | | - if ( $count / 10 % 10 != 1 ) |
| 26 | + if ( $count / 10 % 10 != 1 ) { |
26 | 27 | return $forms[1]; // plural |
| 28 | + } |
27 | 29 | default: |
28 | 30 | return $forms[2]; // plural genitive |
29 | 31 | } |
Index: trunk/phase3/languages/classes/LanguageKu.php |
— | — | @@ -196,6 +196,7 @@ |
197 | 197 | * @param $text string |
198 | 198 | * @param $toVariant bool |
199 | 199 | * |
| 200 | + * @throws MWException |
200 | 201 | * @return string |
201 | 202 | */ |
202 | 203 | function translate( $text, $toVariant ) { |
Index: trunk/phase3/languages/classes/LanguageSr.php |
— | — | @@ -147,6 +147,7 @@ |
148 | 148 | * @param $text string |
149 | 149 | * @param $toVariant string |
150 | 150 | * |
| 151 | + * @throws MWException |
151 | 152 | * @return string |
152 | 153 | */ |
153 | 154 | function translate( $text, $toVariant ) { |