Index: trunk/phase3/maintenance/language/checkLanguage.inc |
— | — | @@ -304,17 +304,17 @@ |
305 | 305 | |
306 | 306 | /** |
307 | 307 | * Check a language. |
308 | | - * @param $code The language code. |
309 | | - * @return The results. |
| 308 | + * @param $code string The language code. |
| 309 | + * @return array The results. |
310 | 310 | */ |
311 | 311 | protected function checkLanguage( $code ) { |
312 | 312 | # Syntax check only |
| 313 | + $results = array(); |
313 | 314 | if ( $this->level === 0 ) { |
314 | 315 | $this->L->getMessages( $code ); |
315 | | - return; |
| 316 | + return $results; |
316 | 317 | } |
317 | 318 | |
318 | | - $results = array(); |
319 | 319 | $checkFunctions = $this->getChecks(); |
320 | 320 | $checkBlacklist = $this->getCheckBlacklist(); |
321 | 321 | foreach ( $this->checks as $check ) { |
— | — | @@ -643,7 +643,7 @@ |
644 | 644 | |
645 | 645 | /** |
646 | 646 | * Check a language and show the results. |
647 | | - * @param $code The language code. |
| 647 | + * @param $code string The language code. |
648 | 648 | */ |
649 | 649 | protected function checkLanguage( $code ) { |
650 | 650 | foreach( $this->extensions as $extension ) { |
Index: trunk/phase3/maintenance/language/languages.inc |
— | — | @@ -61,7 +61,7 @@ |
62 | 62 | /** |
63 | 63 | * Get the language list. |
64 | 64 | * |
65 | | - * @return The language list. |
| 65 | + * @return array The language list. |
66 | 66 | */ |
67 | 67 | public function getLanguages() { |
68 | 68 | return $this->mLanguages; |
— | — | @@ -70,7 +70,7 @@ |
71 | 71 | /** |
72 | 72 | * Get the ignored messages list. |
73 | 73 | * |
74 | | - * @return The ignored messages list. |
| 74 | + * @return array The ignored messages list. |
75 | 75 | */ |
76 | 76 | public function getIgnoredMessages() { |
77 | 77 | return $this->mIgnoredMessages; |
— | — | @@ -79,7 +79,7 @@ |
80 | 80 | /** |
81 | 81 | * Get the optional messages list. |
82 | 82 | * |
83 | | - * @return The optional messages list. |
| 83 | + * @return array The optional messages list. |
84 | 84 | */ |
85 | 85 | public function getOptionalMessages() { |
86 | 86 | return $this->mOptionalMessages; |
— | — | @@ -137,7 +137,7 @@ |
138 | 138 | * obsolete - messages which should not be translated, either because they do not exist, or they are ignored messages. |
139 | 139 | * translated - messages which are either required or optional, but translated from English and needed. |
140 | 140 | * |
141 | | - * @param $code The language code. |
| 141 | + * @param $code string The language code. |
142 | 142 | */ |
143 | 143 | private function loadMessages( $code ) { |
144 | 144 | if ( isset( $this->mMessages[$code] ) ) { |
— | — | @@ -203,7 +203,7 @@ |
204 | 204 | * obsolete - messages which should not be translated, either because they do not exist, or they are ignored messages. |
205 | 205 | * translated - messages which are either required or optional, but translated from English and needed. |
206 | 206 | * |
207 | | - * @param $code The language code. |
| 207 | + * @param $code string The language code. |
208 | 208 | * |
209 | 209 | * @return string The messages in this language. |
210 | 210 | */ |
— | — | @@ -220,7 +220,7 @@ |
221 | 221 | * ignored - messages which should not be translated to other languages. |
222 | 222 | * translatable - messages which are either required or optional, but can be translated from English. |
223 | 223 | * |
224 | | - * @return The general English messages. |
| 224 | + * @return array The general English messages. |
225 | 225 | */ |
226 | 226 | public function getGeneralMessages() { |
227 | 227 | $this->loadGeneralMessages(); |
— | — | @@ -230,9 +230,9 @@ |
231 | 231 | /** |
232 | 232 | * Get fallback language code for a specific language. |
233 | 233 | * |
234 | | - * @param $code The language code. |
| 234 | + * @param $code string The language code. |
235 | 235 | * |
236 | | - * @return Fallback code. |
| 236 | + * @return string Fallback code. |
237 | 237 | */ |
238 | 238 | public function getFallback( $code ) { |
239 | 239 | $this->loadFile( $code ); |
— | — | @@ -242,7 +242,7 @@ |
243 | 243 | /** |
244 | 244 | * Get namespace names for a specific language. |
245 | 245 | * |
246 | | - * @param $code The language code. |
| 246 | + * @param $code string The language code. |
247 | 247 | * |
248 | 248 | * @return Namespace names. |
249 | 249 | */ |
— | — | @@ -254,7 +254,7 @@ |
255 | 255 | /** |
256 | 256 | * Get namespace aliases for a specific language. |
257 | 257 | * |
258 | | - * @param $code The language code. |
| 258 | + * @param $code string The language code. |
259 | 259 | * |
260 | 260 | * @return Namespace aliases. |
261 | 261 | */ |
— | — | @@ -266,7 +266,7 @@ |
267 | 267 | /** |
268 | 268 | * Get magic words for a specific language. |
269 | 269 | * |
270 | | - * @param $code The language code. |
| 270 | + * @param $code string The language code. |
271 | 271 | * |
272 | 272 | * @return Magic words. |
273 | 273 | */ |
— | — | @@ -278,7 +278,7 @@ |
279 | 279 | /** |
280 | 280 | * Get special page aliases for a specific language. |
281 | 281 | * |
282 | | - * @param $code The language code. |
| 282 | + * @param $code string The language code. |
283 | 283 | * |
284 | 284 | * @return Special page aliases. |
285 | 285 | */ |
— | — | @@ -290,9 +290,9 @@ |
291 | 291 | /** |
292 | 292 | * Get the untranslated messages for a specific language. |
293 | 293 | * |
294 | | - * @param $code The language code. |
| 294 | + * @param $code string The language code. |
295 | 295 | * |
296 | | - * @return The untranslated messages for this language. |
| 296 | + * @return array The untranslated messages for this language. |
297 | 297 | */ |
298 | 298 | public function getUntranslatedMessages( $code ) { |
299 | 299 | $this->loadGeneralMessages(); |
— | — | @@ -303,9 +303,9 @@ |
304 | 304 | /** |
305 | 305 | * Get the duplicate messages for a specific language. |
306 | 306 | * |
307 | | - * @param $code The language code. |
| 307 | + * @param $code string The language code. |
308 | 308 | * |
309 | | - * @return The duplicate messages for this language. |
| 309 | + * @return array The duplicate messages for this language. |
310 | 310 | */ |
311 | 311 | public function getDuplicateMessages( $code ) { |
312 | 312 | $this->loadGeneralMessages(); |
— | — | @@ -322,9 +322,9 @@ |
323 | 323 | /** |
324 | 324 | * Get the obsolete messages for a specific language. |
325 | 325 | * |
326 | | - * @param $code The language code. |
| 326 | + * @param $code string The language code. |
327 | 327 | * |
328 | | - * @return The obsolete messages for this language. |
| 328 | + * @return array The obsolete messages for this language. |
329 | 329 | */ |
330 | 330 | public function getObsoleteMessages( $code ) { |
331 | 331 | $this->loadGeneralMessages(); |
— | — | @@ -335,9 +335,9 @@ |
336 | 336 | /** |
337 | 337 | * Get the messages whose variables do not match the original ones. |
338 | 338 | * |
339 | | - * @param $code The language code. |
| 339 | + * @param $code string The language code. |
340 | 340 | * |
341 | | - * @return The messages whose variables do not match the original ones. |
| 341 | + * @return array The messages whose variables do not match the original ones. |
342 | 342 | */ |
343 | 343 | public function getMessagesWithMismatchVariables( $code ) { |
344 | 344 | $this->loadGeneralMessages(); |
— | — | @@ -366,9 +366,9 @@ |
367 | 367 | /** |
368 | 368 | * Get the messages which do not use plural. |
369 | 369 | * |
370 | | - * @param $code The language code. |
| 370 | + * @param $code string The language code. |
371 | 371 | * |
372 | | - * @return The messages which do not use plural in this language. |
| 372 | + * @return array The messages which do not use plural in this language. |
373 | 373 | */ |
374 | 374 | public function getMessagesWithoutPlural( $code ) { |
375 | 375 | $this->loadGeneralMessages(); |
— | — | @@ -385,9 +385,9 @@ |
386 | 386 | /** |
387 | 387 | * Get the empty messages. |
388 | 388 | * |
389 | | - * @param $code The language code. |
| 389 | + * @param $code string The language code. |
390 | 390 | * |
391 | | - * @return The empty messages for this language. |
| 391 | + * @return array The empty messages for this language. |
392 | 392 | */ |
393 | 393 | public function getEmptyMessages( $code ) { |
394 | 394 | $this->loadGeneralMessages(); |
— | — | @@ -404,9 +404,9 @@ |
405 | 405 | /** |
406 | 406 | * Get the messages with trailing whitespace. |
407 | 407 | * |
408 | | - * @param $code The language code. |
| 408 | + * @param $code string The language code. |
409 | 409 | * |
410 | | - * @return The messages with trailing whitespace in this language. |
| 410 | + * @return array The messages with trailing whitespace in this language. |
411 | 411 | */ |
412 | 412 | public function getMessagesWithWhitespace( $code ) { |
413 | 413 | $this->loadGeneralMessages(); |
— | — | @@ -423,9 +423,9 @@ |
424 | 424 | /** |
425 | 425 | * Get the non-XHTML messages. |
426 | 426 | * |
427 | | - * @param $code The language code. |
| 427 | + * @param $code string The language code. |
428 | 428 | * |
429 | | - * @return The non-XHTML messages for this language. |
| 429 | + * @return array The non-XHTML messages for this language. |
430 | 430 | */ |
431 | 431 | public function getNonXHTMLMessages( $code ) { |
432 | 432 | $this->loadGeneralMessages(); |
— | — | @@ -451,9 +451,9 @@ |
452 | 452 | /** |
453 | 453 | * Get the messages which include wrong characters. |
454 | 454 | * |
455 | | - * @param $code The language code. |
| 455 | + * @param $code string The language code. |
456 | 456 | * |
457 | | - * @return The messages which include wrong characters in this language. |
| 457 | + * @return array The messages which include wrong characters in this language. |
458 | 458 | */ |
459 | 459 | public function getMessagesWithWrongChars( $code ) { |
460 | 460 | $this->loadGeneralMessages(); |
— | — | @@ -488,9 +488,9 @@ |
489 | 489 | /** |
490 | 490 | * Get the messages which include dubious links. |
491 | 491 | * |
492 | | - * @param $code The language code. |
| 492 | + * @param $code string The language code. |
493 | 493 | * |
494 | | - * @return The messages which include dubious links in this language. |
| 494 | + * @return array The messages which include dubious links in this language. |
495 | 495 | */ |
496 | 496 | public function getMessagesWithDubiousLinks( $code ) { |
497 | 497 | $this->loadGeneralMessages(); |
— | — | @@ -517,9 +517,9 @@ |
518 | 518 | /** |
519 | 519 | * Get the messages which include unbalanced brackets. |
520 | 520 | * |
521 | | - * @param $code The language code. |
| 521 | + * @param $code string The language code. |
522 | 522 | * |
523 | | - * @return The messages which include unbalanced brackets in this language. |
| 523 | + * @return array The messages which include unbalanced brackets in this language. |
524 | 524 | */ |
525 | 525 | public function getMessagesWithUnbalanced( $code ) { |
526 | 526 | $this->loadGeneralMessages(); |
— | — | @@ -547,7 +547,7 @@ |
548 | 548 | if ( $a !== $b || $c !== $d ) { |
549 | 549 | $messages[$key] = "$a, $b, $c, $d"; |
550 | 550 | } |
551 | | - |
| 551 | + |
552 | 552 | } |
553 | 553 | return $messages; |
554 | 554 | } |
— | — | @@ -555,9 +555,9 @@ |
556 | 556 | /** |
557 | 557 | * Get the untranslated namespace names. |
558 | 558 | * |
559 | | - * @param $code The language code. |
| 559 | + * @param $code string The language code. |
560 | 560 | * |
561 | | - * @return The untranslated namespace names in this language. |
| 561 | + * @return array The untranslated namespace names in this language. |
562 | 562 | */ |
563 | 563 | public function getUntranslatedNamespaces( $code ) { |
564 | 564 | $this->loadFile( 'en' ); |
— | — | @@ -570,9 +570,9 @@ |
571 | 571 | /** |
572 | 572 | * Get the project talk namespace names with no $1. |
573 | 573 | * |
574 | | - * @param $code The language code. |
| 574 | + * @param $code string The language code. |
575 | 575 | * |
576 | | - * @return The problematic project talk namespaces in this language. |
| 576 | + * @return array The problematic project talk namespaces in this language. |
577 | 577 | */ |
578 | 578 | public function getProblematicProjectTalks( $code ) { |
579 | 579 | $this->loadFile( $code ); |
— | — | @@ -599,9 +599,9 @@ |
600 | 600 | /** |
601 | 601 | * Get the untranslated magic words. |
602 | 602 | * |
603 | | - * @param $code The language code. |
| 603 | + * @param $code string The language code. |
604 | 604 | * |
605 | | - * @return The untranslated magic words in this language. |
| 605 | + * @return array The untranslated magic words in this language. |
606 | 606 | */ |
607 | 607 | public function getUntranslatedMagicWords( $code ) { |
608 | 608 | $this->loadFile( 'en' ); |
— | — | @@ -618,9 +618,9 @@ |
619 | 619 | /** |
620 | 620 | * Get the obsolete magic words. |
621 | 621 | * |
622 | | - * @param $code The language code. |
| 622 | + * @param $code string The language code. |
623 | 623 | * |
624 | | - * @return The obsolete magic words in this language. |
| 624 | + * @return array The obsolete magic words in this language. |
625 | 625 | */ |
626 | 626 | public function getObsoleteMagicWords( $code ) { |
627 | 627 | $this->loadFile( 'en' ); |
— | — | @@ -637,9 +637,9 @@ |
638 | 638 | /** |
639 | 639 | * Get the magic words that override the original English magic word. |
640 | 640 | * |
641 | | - * @param $code The language code. |
| 641 | + * @param $code string The language code. |
642 | 642 | * |
643 | | - * @return The overriding magic words in this language. |
| 643 | + * @return array The overriding magic words in this language. |
644 | 644 | */ |
645 | 645 | public function getOverridingMagicWords( $code ) { |
646 | 646 | $this->loadFile( 'en' ); |
— | — | @@ -666,9 +666,9 @@ |
667 | 667 | /** |
668 | 668 | * Get the magic words which do not match the case-sensitivity of the original words. |
669 | 669 | * |
670 | | - * @param $code The language code. |
| 670 | + * @param $code string The language code. |
671 | 671 | * |
672 | | - * @return The magic words whose case does not match in this language. |
| 672 | + * @return array The magic words whose case does not match in this language. |
673 | 673 | */ |
674 | 674 | public function getCaseMismatchMagicWords( $code ) { |
675 | 675 | $this->loadFile( 'en' ); |
— | — | @@ -689,9 +689,9 @@ |
690 | 690 | /** |
691 | 691 | * Get the untranslated special page names. |
692 | 692 | * |
693 | | - * @param $code The language code. |
| 693 | + * @param $code string The language code. |
694 | 694 | * |
695 | | - * @return The untranslated special page names in this language. |
| 695 | + * @return array The untranslated special page names in this language. |
696 | 696 | */ |
697 | 697 | public function getUntraslatedSpecialPages( $code ) { |
698 | 698 | $this->loadFile( 'en' ); |
— | — | @@ -708,9 +708,9 @@ |
709 | 709 | /** |
710 | 710 | * Get the obsolete special page names. |
711 | 711 | * |
712 | | - * @param $code The language code. |
| 712 | + * @param $code string The language code. |
713 | 713 | * |
714 | | - * @return The obsolete special page names in this language. |
| 714 | + * @return array The obsolete special page names in this language. |
715 | 715 | */ |
716 | 716 | public function getObsoleteSpecialPages( $code ) { |
717 | 717 | $this->loadFile( 'en' ); |
— | — | @@ -726,9 +726,13 @@ |
727 | 727 | } |
728 | 728 | |
729 | 729 | class extensionLanguages extends languages { |
730 | | - private $mMessageGroup; # The message group |
731 | 730 | |
732 | 731 | /** |
| 732 | + * @var MessageGroup |
| 733 | + */ |
| 734 | + private $mMessageGroup; |
| 735 | + |
| 736 | + /** |
733 | 737 | * Load the messages group. |
734 | 738 | * @param $group The messages group. |
735 | 739 | */ |
— | — | @@ -743,7 +747,7 @@ |
744 | 748 | /** |
745 | 749 | * Get the extension name. |
746 | 750 | * |
747 | | - * @return The extension name. |
| 751 | + * @return string The extension name. |
748 | 752 | */ |
749 | 753 | public function name() { |
750 | 754 | return $this->mMessageGroup->getLabel(); |
— | — | @@ -752,7 +756,7 @@ |
753 | 757 | /** |
754 | 758 | * Load the language file. |
755 | 759 | * |
756 | | - * @param $code The language code. |
| 760 | + * @param $code string The language code. |
757 | 761 | */ |
758 | 762 | protected function loadFile( $code ) { |
759 | 763 | if( !isset( $this->mRawMessages[$code] ) ) { |
Index: trunk/phase3/languages/classes/LanguageHu.php |
— | — | @@ -25,5 +25,6 @@ |
26 | 26 | case 'k': |
27 | 27 | return $word . 'k'; |
28 | 28 | } |
| 29 | + return ''; |
29 | 30 | } |
30 | 31 | } |
Index: trunk/phase3/languages/classes/LanguageKk_cyrl.php |
— | — | @@ -12,7 +12,7 @@ |
13 | 13 | * Cases: genitive, dative, accusative, locative, ablative, comitative + possessive forms |
14 | 14 | * |
15 | 15 | * @param $word string |
16 | | - * @param $case stirng |
| 16 | + * @param $case string |
17 | 17 | * |
18 | 18 | * @return string |
19 | 19 | */ |