Index: trunk/extensions/Babel/Babel.class.php |
— | — | @@ -53,28 +53,28 @@ |
54 | 54 | } |
55 | 55 | } |
56 | 56 | |
57 | | - $top = wfMsgExt( 'babel', array( 'parsemag', 'content' ), self::$title->getDBkey() ); |
58 | | - if ( strlen( $top ) == 0 ) { |
| 57 | + $top = wfMessage( 'babel', self::$title->getDBkey() )->inContentLanguage(); // TODO: allow user language |
| 58 | + if ( $top->isDisabled() ) { |
59 | 59 | $top = ''; |
60 | 60 | } else { |
61 | | - $url = wfMsgForContent( 'babel-url' ); |
62 | | - if ( ! strlen( $url ) == 0 ) { |
63 | | - $top = '[['.$url.'|'.$top.']]'; |
| 61 | + $top = $top->text(); |
| 62 | + $url = wfMessage( 'babel-url' )->inContentLanguage(); |
| 63 | + if ( ! $url->isDisabled() ) { |
| 64 | + $top = '[['.$url->text().'|'.$top.']]'; |
64 | 65 | } |
65 | 66 | $top = '! class="mw-babel-header" | ' . $top; |
66 | 67 | } |
67 | | - |
68 | | - $footer = wfMsgExt( 'babel-footer', array( 'parsemag' ), self::$title->getDBkey() ); |
69 | | - if ( strlen( $footer ) == 0 ) { |
| 68 | + $footer = wfMessage( 'babel-footer', self::$title->getDBkey() )->inContentLanguage(); // TODO: allow user language |
| 69 | + if ( $footer->isDisabled() ) { |
70 | 70 | $footer = ''; |
71 | 71 | } else { |
72 | | - $url = wfMsgForContent( 'babel-footer-url' ); |
73 | | - if ( ! strlen( $url ) == 0 ) { |
74 | | - $footer = '[['.$url.'|'.$footer.']]'; |
| 72 | + $footer = $footer->text(); |
| 73 | + $url = wfMessage( 'babel-footer-url' )->inContentLanguage(); |
| 74 | + if ( ! $url->isDisabled() ) { |
| 75 | + $footer = '[['.$url->text().'|'.$footer.']]'; |
75 | 76 | } |
76 | 77 | $footer = '! class="mw-babel-footer" | ' . $footer; |
77 | 78 | } |
78 | | - |
79 | 79 | $cellspacing = Babel::mHtmlAttrib( 'cellspacing', 'babel-box-cellspacing' ); |
80 | 80 | $cellpadding = Babel::mHtmlAttrib( 'cellpadding', 'babel-box-cellpadding' ); |
81 | 81 | |