Index: trunk/extensions/Babel/Babel_body.php |
— | — | @@ -1,5 +1,11 @@ |
2 | 2 | <?php |
3 | 3 | |
| 4 | +/** |
| 5 | + * Main class for the Babel extension. |
| 6 | + * |
| 7 | + * @addtogroup Extensions |
| 8 | + */ |
| 9 | + |
4 | 10 | class Babel { |
5 | 11 | |
6 | 12 | private $_LanguageTools; |
— | — | @@ -400,10 +406,18 @@ |
401 | 407 | ":Category:{$this->addFixes( $code,'category' )}" |
402 | 408 | ); |
403 | 409 | |
| 410 | + /* Get the fallback message for comparison. |
| 411 | + */ |
| 412 | + $fallback = wfMsgExt( "babel-$level-n", |
| 413 | + array( 'nofallback', 'language' => Language::getFallbackfor( $code ) ), |
| 414 | + ":Category:{$this->addFixes( "$code-$level",'category' )}", |
| 415 | + ":Category:{$this->addFixes( $code,'category' )}" |
| 416 | + ); |
| 417 | + |
404 | 418 | /* Translation not found, use the generic translation of the |
405 | 419 | * highest level fallback possible. |
406 | 420 | */ |
407 | | - if( wfEmptyMsg( "babel-$level-n", $text ) ) { |
| 421 | + if( $text == $fallback ) { |
408 | 422 | $text = wfMsgExt( "babel-$level", |
409 | 423 | array( 'language' => $code ), |
410 | 424 | ":Category:{$this->addFixes( "$code-$level",'category')}", |
Index: trunk/extensions/Babel/Babel.i18n.php |
— | — | @@ -1,7 +1,7 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | 4 | /** |
5 | | - * Internationalisation file for extension AjaxShowEditors. |
| 5 | + * Internationalisation file for Babel extension. |
6 | 6 | * |
7 | 7 | * @addtogroup Extensions |
8 | 8 | */ |
Index: trunk/extensions/Babel/LanguageTools.php |
— | — | @@ -1,5 +1,12 @@ |
2 | 2 | <?php |
3 | 3 | |
| 4 | +/** |
| 5 | + * LanguageTools class for Babel extension, handles language code validation and |
| 6 | + * conversion. |
| 7 | + * |
| 8 | + * @addtogroup Extensions |
| 9 | + */ |
| 10 | + |
4 | 11 | class LanguageTools { |
5 | 12 | |
6 | 13 | private $_cache; |
Index: trunk/extensions/Babel/Babel.php |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | * @link http://www.mediawiki.org/wiki/Extension:Babel |
13 | 13 | * |
14 | 14 | * @author MinuteElectron <minuteelectron@googlemail.com> |
15 | | - * @copyright Copyright ? 2008 MinuteElectron. |
| 15 | + * @copyright Copyright � 2008 MinuteElectron. |
16 | 16 | * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later |
17 | 17 | */ |
18 | 18 | |
Index: trunk/extensions/Babel/Babel.css |
— | — | @@ -1,3 +1,13 @@ |
| 2 | +/** |
| 3 | + * Stylesheet for Babel extension. |
| 4 | + * |
| 5 | + * This should be added to your MediaWiki:Common.css page when installing this |
| 6 | + * extension and should not be modified. You may modify the CSS code on the |
| 7 | + * MediaWiki:Common.css page to adjust colours etc. |
| 8 | + * |
| 9 | + * @addtogroup Extensions |
| 10 | + */ |
| 11 | + |
2 | 12 | table.mw-babel-wrapper { |
3 | 13 | width: 238px; |
4 | 14 | float: right; |
— | — | @@ -32,7 +42,7 @@ |
33 | 43 | line-height: 1.25em; |
34 | 44 | } |
35 | 45 | |
36 | | -/* level colours */ |
| 46 | +/* colours */ |
37 | 47 | div.mw-babel-box-0 { |
38 | 48 | border: solid #B7B7B7 1px; |
39 | 49 | } |