Index: trunk/phase3/includes/upload/UploadBase.php |
— | — | @@ -1179,9 +1179,9 @@ |
1180 | 1180 | */ |
1181 | 1181 | public static function getFilenamePrefixBlacklist() { |
1182 | 1182 | $blacklist = array(); |
1183 | | - $message = wfMsgForContent( 'filename-prefix-blacklist' ); |
1184 | | - if( $message && !( wfEmptyMsg( 'filename-prefix-blacklist', $message ) || $message == '-' ) ) { |
1185 | | - $lines = explode( "\n", $message ); |
| 1183 | + $message = wfMessage( 'filename-prefix-blacklist' )->inContentLanguage(); |
| 1184 | + if( !$message->isDisabled() ) { |
| 1185 | + $lines = explode( "\n", $message->plain() ); |
1186 | 1186 | foreach( $lines as $line ) { |
1187 | 1187 | // Remove comment lines |
1188 | 1188 | $comment = substr( trim( $line ), 0, 1 ); |
Index: trunk/phase3/includes/Interwiki.php |
— | — | @@ -248,9 +248,8 @@ |
249 | 249 | * @return String |
250 | 250 | */ |
251 | 251 | public function getName() { |
252 | | - $key = 'interwiki-name-' . $this->mPrefix; |
253 | | - $msg = wfMsgForContent( $key ); |
254 | | - return wfEmptyMsg( $key, $msg ) ? '' : $msg; |
| 252 | + $msg = wfMessage( 'interwiki-name-' . $this->mPrefix )->inContentLanguage(); |
| 253 | + return !$msg->exists() ? '' : $msg; |
255 | 254 | } |
256 | 255 | |
257 | 256 | /** |
— | — | @@ -259,8 +258,7 @@ |
260 | 259 | * @return String |
261 | 260 | */ |
262 | 261 | public function getDescription() { |
263 | | - $key = 'interwiki-desc-' . $this->mPrefix; |
264 | | - $msg = wfMsgForContent( $key ); |
265 | | - return wfEmptyMsg( $key, $msg ) ? '' : $msg; |
| 262 | + $msg = wfMessage( 'interwiki-desc-' . $this->mPrefix )->inContentLanguage(); |
| 263 | + return !$msg->exists() ? '' : $msg; |
266 | 264 | } |
267 | 265 | } |
Index: trunk/phase3/includes/ProtectionForm.php |
— | — | @@ -351,13 +351,10 @@ |
352 | 352 | |
353 | 353 | foreach( $this->mRestrictions as $action => $selected ) { |
354 | 354 | /* Not all languages have V_x <-> N_x relation */ |
355 | | - $msg = wfMsg( 'restriction-' . $action ); |
356 | | - if( wfEmptyMsg( 'restriction-' . $action, $msg ) ) { |
357 | | - $msg = $action; |
358 | | - } |
| 355 | + $msg = wfMessage( 'restriction-' . $action ); |
359 | 356 | $out .= "<tr><td>". |
360 | 357 | Xml::openElement( 'fieldset' ) . |
361 | | - Xml::element( 'legend', null, $msg ) . |
| 358 | + Xml::element( 'legend', null, $msg->exists() ? $action : $msg->text() ) . |
362 | 359 | Xml::openElement( 'table', array( 'id' => "mw-protect-table-$action" ) ) . |
363 | 360 | "<tr><td>" . $this->buildSelector( $action, $selected ) . "</td></tr><tr><td>"; |
364 | 361 | |
— | — | @@ -565,11 +562,11 @@ |
566 | 563 | if( $permission == '' ) { |
567 | 564 | return wfMsg( 'protect-default' ); |
568 | 565 | } else { |
569 | | - $key = "protect-level-{$permission}"; |
570 | | - $msg = wfMsg( $key ); |
571 | | - if( wfEmptyMsg( $key, $msg ) ) |
572 | | - $msg = wfMsg( 'protect-fallback', $permission ); |
573 | | - return $msg; |
| 566 | + $msg = wfMessage( "protect-level-{$permission}" ); |
| 567 | + if( !$msg->exists() ) { |
| 568 | + return $msg->text(); |
| 569 | + } |
| 570 | + return wfMsg( 'protect-fallback', $permission ); |
574 | 571 | } |
575 | 572 | } |
576 | 573 | |
Index: trunk/phase3/includes/User.php |
— | — | @@ -3181,11 +3181,8 @@ |
3182 | 3182 | * @return String Localized descriptive group name |
3183 | 3183 | */ |
3184 | 3184 | static function getGroupName( $group ) { |
3185 | | - $key = "group-$group"; |
3186 | | - $name = wfMsg( $key ); |
3187 | | - return $name == '' || wfEmptyMsg( $key, $name ) |
3188 | | - ? $group |
3189 | | - : $name; |
| 3185 | + $msg = wfMessage( "group-$group" ); |
| 3186 | + return $msg->isBlank() ? $group : $msg->text(); |
3190 | 3187 | } |
3191 | 3188 | |
3192 | 3189 | /** |
— | — | @@ -3195,11 +3192,8 @@ |
3196 | 3193 | * @return String Localized name for group member |
3197 | 3194 | */ |
3198 | 3195 | static function getGroupMember( $group ) { |
3199 | | - $key = "group-$group-member"; |
3200 | | - $name = wfMsg( $key ); |
3201 | | - return $name == '' || wfEmptyMsg( $key, $name ) |
3202 | | - ? $group |
3203 | | - : $name; |
| 3196 | + $msg = wfMessage( "group-$group-member" ); |
| 3197 | + return $msg->isBlank() ? $group : $msg->text(); |
3204 | 3198 | } |
3205 | 3199 | |
3206 | 3200 | /** |
— | — | @@ -3251,9 +3245,9 @@ |
3252 | 3246 | * @return Title|Bool Title of the page if it exists, false otherwise |
3253 | 3247 | */ |
3254 | 3248 | static function getGroupPage( $group ) { |
3255 | | - $page = wfMsgForContent( 'grouppage-' . $group ); |
3256 | | - if( !wfEmptyMsg( 'grouppage-' . $group, $page ) ) { |
3257 | | - $title = Title::newFromText( $page ); |
| 3249 | + $msg = wfMessage( 'grouppage-' . $group )->inContentLanguage(); |
| 3250 | + if( !$msg->exists() ) { |
| 3251 | + $title = Title::newFromText( $msg->text() ); |
3258 | 3252 | if( is_object( $title ) ) |
3259 | 3253 | return $title; |
3260 | 3254 | } |
Index: trunk/phase3/includes/Article.php |
— | — | @@ -1270,8 +1270,7 @@ |
1271 | 1271 | global $wgOut; |
1272 | 1272 | |
1273 | 1273 | if ( $this->mTitle->isTalkPage() ) { |
1274 | | - $msg = wfMsgNoTrans( 'talkpageheader' ); |
1275 | | - if ( $msg !== '-' && !wfEmptyMsg( 'talkpageheader', $msg ) ) { |
| 1274 | + if ( !wfMessage( 'talkpageheader' )->isDisabled() ) { |
1276 | 1275 | $wgOut->wrapWikiMsg( "<div class=\"mw-talkpageheader\">\n$1\n</div>", array( 'talkpageheader' ) ); |
1277 | 1276 | } |
1278 | 1277 | } |
— | — | @@ -3843,8 +3842,7 @@ |
3844 | 3843 | # Show user links if allowed to see them. If hidden, then show them only if requested... |
3845 | 3844 | $userlinks = $sk->revUserTools( $revision, !$unhide ); |
3846 | 3845 | |
3847 | | - $m = wfMsg( 'revision-info-current' ); |
3848 | | - $infomsg = $current && !wfEmptyMsg( 'revision-info-current', $m ) && $m != '-' |
| 3846 | + $infomsg = $current && !wfMessage( 'revision-info-current' )->isDisabled() |
3849 | 3847 | ? 'revision-info-current' |
3850 | 3848 | : 'revision-info'; |
3851 | 3849 | |
Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -2004,11 +2004,12 @@ |
2005 | 2005 | return false; |
2006 | 2006 | } |
2007 | 2007 | } else { |
2008 | | - $notice = wfMsgForContentNoTrans( $name ); |
2009 | | - if( wfEmptyMsg( $name, $notice ) || $notice == '-' ) { |
| 2008 | + $msg = wfMessage( $name )->inContentLanguage(); |
| 2009 | + if( $msg->isDisabled() ) { |
2010 | 2010 | wfProfileOut( $fname ); |
2011 | 2011 | return( false ); |
2012 | 2012 | } |
| 2013 | + $notice = $msg->plain(); |
2013 | 2014 | } |
2014 | 2015 | |
2015 | 2016 | // Use the extra hash appender to let eg SSL variants separately cache. |
Index: trunk/phase3/includes/Licenses.php |
— | — | @@ -111,8 +111,8 @@ |
112 | 112 | } |
113 | 113 | |
114 | 114 | protected function msg( $str ) { |
115 | | - $out = wfMsg( $str ); |
116 | | - return wfEmptyMsg( $str, $out ) ? $str : $out; |
| 115 | + $msg = wfMessage( $str ); |
| 116 | + return $msg->exists() ? $msg->text() : $str; |
117 | 117 | } |
118 | 118 | |
119 | 119 | /**#@-*/ |
Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -3355,12 +3355,12 @@ |
3356 | 3356 | $text = $rev->getText(); |
3357 | 3357 | } elseif ( $title->getNamespace() == NS_MEDIAWIKI ) { |
3358 | 3358 | global $wgContLang; |
3359 | | - $message = $wgContLang->lcfirst( $title->getText() ); |
3360 | | - $text = wfMsgForContentNoTrans( $message ); |
3361 | | - if ( wfEmptyMsg( $message, $text ) ) { |
| 3359 | + $message = wfMessage( $wgContLang->lcfirst( $title->getText() ) )->inContentLanguage(); |
| 3360 | + if ( !$message->exists() ) { |
3362 | 3361 | $text = false; |
3363 | 3362 | break; |
3364 | 3363 | } |
| 3364 | + $text = $message->plain(); |
3365 | 3365 | } else { |
3366 | 3366 | break; |
3367 | 3367 | } |
Index: trunk/phase3/includes/ImagePage.php |
— | — | @@ -120,9 +120,9 @@ |
121 | 121 | |
122 | 122 | # Show shared description, if needed |
123 | 123 | if ( $this->mExtraDescription ) { |
124 | | - $fol = wfMsgNoTrans( 'shareddescriptionfollows' ); |
125 | | - if ( $fol != '-' && !wfEmptyMsg( 'shareddescriptionfollows', $fol ) ) { |
126 | | - $wgOut->addWikiText( $fol ); |
| 124 | + $fol = wfMessage( 'shareddescriptionfollows' ); |
| 125 | + if ( !$fol->isDisabled() ) { |
| 126 | + $wgOut->addWikiText( $fol->plain() ); |
127 | 127 | } |
128 | 128 | $wgOut->addHTML( '<div id="shared-image-desc">' . $this->mExtraDescription . "</div>\n" ); |
129 | 129 | } |
Index: trunk/phase3/includes/ChangeTags.php |
— | — | @@ -28,11 +28,8 @@ |
29 | 29 | } |
30 | 30 | |
31 | 31 | static function tagDescription( $tag ) { |
32 | | - $msg = wfMsgExt( "tag-$tag", 'parseinline' ); |
33 | | - if ( wfEmptyMsg( "tag-$tag", $msg ) ) { |
34 | | - return htmlspecialchars( $tag ); |
35 | | - } |
36 | | - return $msg; |
| 32 | + $msg = wfMessage( "tag-$tag" ); |
| 33 | + return $msg->exists() ? $msg->parse() : htmlspecialchars( $tag ); |
37 | 34 | } |
38 | 35 | |
39 | 36 | ## Basic utility method to add tags to a particular change, given its rc_id, rev_id and/or log_id. |
Index: trunk/phase3/includes/filerepo/FileRepo.php |
— | — | @@ -657,11 +657,7 @@ |
658 | 658 | return null; |
659 | 659 | } |
660 | 660 | // 'shared-repo-name-wikimediacommons' is used when $wgUseInstantCommons = true |
661 | | - $repoName = wfMsg( 'shared-repo-name-' . $this->name ); |
662 | | - if ( !wfEmptyMsg( 'shared-repo-name-' . $this->name, $repoName ) ) { |
663 | | - return $repoName; |
664 | | - } |
665 | | - return wfMsg( 'shared-repo' ); |
| 661 | + return wfMessageFallback( 'shared-repo-name-' . $this->name, 'shared-repo' )->text(); |
666 | 662 | } |
667 | 663 | |
668 | 664 | /** |
Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -390,16 +390,18 @@ |
391 | 391 | |
392 | 392 | # Optional notices on a per-namespace and per-page basis |
393 | 393 | $editnotice_ns = 'editnotice-'.$this->mTitle->getNamespace(); |
394 | | - if ( !wfEmptyMsg( $editnotice_ns, wfMsgForContent( $editnotice_ns ) ) ) { |
395 | | - $wgOut->addWikiText( wfMsgForContent( $editnotice_ns ) ); |
| 394 | + $editnotice_ns_message = wfMessage( $editnotice_ns )->inContentLanguage(); |
| 395 | + if ( !$editnotice_ns_message->empty() ) { |
| 396 | + $wgOut->addWikiText( $editnotice_ns_msg->plain() ) ); |
396 | 397 | } |
397 | 398 | if ( MWNamespace::hasSubpages( $this->mTitle->getNamespace() ) ) { |
398 | 399 | $parts = explode( '/', $this->mTitle->getDBkey() ); |
399 | 400 | $editnotice_base = $editnotice_ns; |
400 | 401 | while ( count( $parts ) > 0 ) { |
401 | 402 | $editnotice_base .= '-'.array_shift( $parts ); |
402 | | - if ( !wfEmptyMsg( $editnotice_base, wfMsgForContent( $editnotice_base ) ) ) { |
403 | | - $wgOut->addWikiText( wfMsgForContent( $editnotice_base ) ); |
| 403 | + $editnotice_base_msg = wfMessage( $editnotice_base )->inContentLanguage(); |
| 404 | + if ( !$editnotice_base_msg->exists() ) { |
| 405 | + $wgOut->addWikiText( $editnotice_base_msg->plain() ); |
404 | 406 | } |
405 | 407 | } |
406 | 408 | } |
— | — | @@ -1483,9 +1485,7 @@ |
1484 | 1486 | $wgOut->wrapWikiMsg( "<div class='error' id='mw-edit-longpageerror'>\n$1\n</div>", |
1485 | 1487 | array( 'longpageerror', $wgLang->formatNum( $this->kblength ), $wgLang->formatNum( $wgMaxArticleSize ) ) ); |
1486 | 1488 | } else { |
1487 | | - $msg = 'longpage-hint'; |
1488 | | - $text = wfMsg( $msg ); |
1489 | | - if( !wfEmptyMsg( $msg, $text ) && $text !== '-' ) { |
| 1489 | + if( !wfMessage('longpage-hint')->isDisabled() ) { |
1490 | 1490 | $wgOut->wrapWikiMsg( "<div id='mw-edit-longpage-hint'>\n$1\n</div>", |
1491 | 1491 | array( 'longpage-hint', $wgLang->formatSize( strlen( $this->textbox1 ) ), strlen( $this->textbox1 ) ) |
1492 | 1492 | ); |
— | — | @@ -1741,8 +1741,7 @@ |
1742 | 1742 | protected function showTosSummary() { |
1743 | 1743 | $msg = 'editpage-tos-summary'; |
1744 | 1744 | wfRunHooks( 'EditPageTosSummary', array( $this->mTitle, &$msg ) ); |
1745 | | - $text = wfMsg( $msg ); |
1746 | | - if( !wfEmptyMsg( $msg, $text ) && $text !== '-' ) { |
| 1745 | + if( !wfMessage( $msg )->isDisabled() ) { |
1747 | 1746 | global $wgOut; |
1748 | 1747 | $wgOut->addHTML( '<div class="mw-tos-summary">' ); |
1749 | 1748 | $wgOut->addWikiMsgArray( $msg, array() ); |
Index: trunk/phase3/includes/Message.php |
— | — | @@ -308,6 +308,24 @@ |
309 | 309 | return $this->fetchMessage() !== false; |
310 | 310 | } |
311 | 311 | |
| 312 | + /** |
| 313 | + * Check whether a message does not exist, or is an empty string |
| 314 | + * @return Bool: true if is is and false if not |
| 315 | + */ |
| 316 | + public function isBlank() { |
| 317 | + $message = $this->fetchMessage(); |
| 318 | + return $message === false || $message == ''; |
| 319 | + } |
| 320 | + |
| 321 | + /** |
| 322 | + * Check whether a message does not exist, is an empty string, or is "-" |
| 323 | + * @return Bool: true if is is and false if not |
| 324 | + */ |
| 325 | + public function isDisabled() { |
| 326 | + $message = $this->fetchMessage(); |
| 327 | + return $message === false || $message == '' || $message == '-'; |
| 328 | + } |
| 329 | + |
312 | 330 | public static function rawParam( $value ) { |
313 | 331 | return array( 'raw' => $value ); |
314 | 332 | } |
Index: trunk/phase3/includes/RawPage.php |
— | — | @@ -189,11 +189,9 @@ |
190 | 190 | // If it's a MediaWiki message we can just hit the message cache |
191 | 191 | if( $this->mUseMessageCache && $this->mTitle->getNamespace() == NS_MEDIAWIKI ) { |
192 | 192 | $key = $this->mTitle->getDBkey(); |
193 | | - $text = wfMsgForContentNoTrans( $key ); |
| 193 | + $msg = wfMessage( $key )->inContentLanguage(); |
194 | 194 | # If the message doesn't exist, return a blank |
195 | | - if( wfEmptyMsg( $key, $text ) ) { |
196 | | - $text = ''; |
197 | | - } |
| 195 | + $text = !$msg->exists() ? '' : $msg->plain(); |
198 | 196 | $found = true; |
199 | 197 | } else { |
200 | 198 | // Get it from the DB |
Index: trunk/phase3/includes/specials/SpecialStatistics.php |
— | — | @@ -98,9 +98,9 @@ |
99 | 99 | $text .= Xml::closeElement( 'table' ); |
100 | 100 | |
101 | 101 | # Customizable footer |
102 | | - $footer = wfMsgExt( 'statistics-footer', array('parseinline') ); |
103 | | - if( !wfEmptyMsg( 'statistics-footer', $footer ) && $footer != '' ) { |
104 | | - $text .= "\n" . $footer; |
| 102 | + $footer = wfMessage( 'statistics-footer' ); |
| 103 | + if ( !$footer->isBlank() ) { |
| 104 | + $text .= "\n" . $footer->parse(); |
105 | 105 | } |
106 | 106 | |
107 | 107 | $wgOut->addHTML( $text ); |
— | — | @@ -117,11 +117,11 @@ |
118 | 118 | */ |
119 | 119 | private function formatRow( $text, $number, $trExtraParams = array(), $descMsg = '', $descMsgParam = '' ) { |
120 | 120 | if( $descMsg ) { |
121 | | - $descriptionText = wfMsgExt( $descMsg, array( 'parseinline' ), $descMsgParam ); |
122 | | - if ( !wfEmptyMsg( $descMsg, $descriptionText ) ) { |
123 | | - $descriptionText = " ($descriptionText)"; |
| 121 | + $msg = wfMessage( $descMsg, $descMsgParam ); |
| 122 | + if ( $msg->exists() ) { |
| 123 | + $descriptionText = $msg->parse(); |
124 | 124 | $text .= "<br />" . Xml::element( 'small', array( 'class' => 'mw-statistic-desc'), |
125 | | - $descriptionText ); |
| 125 | + " ($descriptionText)" ); |
126 | 126 | } |
127 | 127 | } |
128 | 128 | return |
Index: trunk/phase3/includes/specials/SpecialUserlogin.php |
— | — | @@ -1186,9 +1186,9 @@ |
1187 | 1187 | function makeLanguageSelector() { |
1188 | 1188 | global $wgLang; |
1189 | 1189 | |
1190 | | - $msg = wfMsgForContent( 'loginlanguagelinks' ); |
1191 | | - if( $msg != '' && !wfEmptyMsg( 'loginlanguagelinks', $msg ) ) { |
1192 | | - $langs = explode( "\n", $msg ); |
| 1190 | + $msg = wfMessage( 'loginlanguagelinks' )->inContentLanguage(); |
| 1191 | + if( !$msg->isBlank() ) { |
| 1192 | + $langs = explode( "\n", $msg->text() ); |
1193 | 1193 | $links = array(); |
1194 | 1194 | foreach( $langs as $lang ) { |
1195 | 1195 | $lang = trim( $lang, '* ' ); |
Index: trunk/phase3/includes/specials/SpecialContributions.php |
— | — | @@ -161,8 +161,7 @@ |
162 | 162 | } |
163 | 163 | } |
164 | 164 | |
165 | | - $text = wfMsgNoTrans( $message, $target ); |
166 | | - if( !wfEmptyMsg( $message, $text ) && $text != '-' ) { |
| 165 | + if( !wfMessage( $message, $target )->isDisabled() ) { |
167 | 166 | $wgOut->wrapWikiMsg( |
168 | 167 | "<div class='mw-contributions-footer'>\n$1\n</div>", |
169 | 168 | array( $message, $target ) ); |
Index: trunk/phase3/includes/specials/SpecialListgrouprights.php |
— | — | @@ -78,19 +78,13 @@ |
79 | 79 | ? 'all' |
80 | 80 | : $group; |
81 | 81 | |
82 | | - $msg = wfMsg( 'group-' . $groupname ); |
83 | | - if ( wfEmptyMsg( 'group-' . $groupname, $msg ) || $msg == '' ) { |
84 | | - $groupnameLocalized = $groupname; |
85 | | - } else { |
86 | | - $groupnameLocalized = $msg; |
87 | | - } |
| 82 | + $msg = wfMessage( 'group-' . $groupname ); |
| 83 | + $groupnameLocalized = !$msg->isBlank() ? $msg->text() : $groupname; |
88 | 84 | |
89 | | - $msg = wfMsgForContent( 'grouppage-' . $groupname ); |
90 | | - if ( wfEmptyMsg( 'grouppage-' . $groupname, $msg ) || $msg == '' ) { |
91 | | - $grouppageLocalized = MWNamespace::getCanonicalName( NS_PROJECT ) . ':' . $groupname; |
92 | | - } else { |
93 | | - $grouppageLocalized = $msg; |
94 | | - } |
| 85 | + $msg = wfMessage( 'grouppage-' . $groupname )->inContentLanguage(); |
| 86 | + $grouppageLocalized = !$msg->isBlank() ? |
| 87 | + $msg->text() : |
| 88 | + MWNamespace::getCanonicalName( NS_PROJECT ) . ':' . $groupname; |
95 | 89 | |
96 | 90 | if( $group == '*' ) { |
97 | 91 | // Do not make a link for the generic * group |
Index: trunk/phase3/includes/specials/SpecialUpload.php |
— | — | @@ -285,10 +285,10 @@ |
286 | 286 | $form->addPreText( $message ); |
287 | 287 | |
288 | 288 | # Add footer to form |
289 | | - $uploadFooter = wfMsgNoTrans( 'uploadfooter' ); |
290 | | - if ( $uploadFooter != '-' && !wfEmptyMsg( 'uploadfooter', $uploadFooter ) ) { |
| 289 | + $uploadFooter = wfMessage( 'uploadfooter' ); |
| 290 | + if ( !$uploadFooter->isDisabled() ) { |
291 | 291 | $form->addPostText( '<div id="mw-upload-footer-message">' |
292 | | - . $wgOut->parse( $uploadFooter ) . "</div>\n" ); |
| 292 | + . $wgOut->parse( $uploadFooter->plain() ) . "</div>\n" ); |
293 | 293 | } |
294 | 294 | |
295 | 295 | return $form; |
Index: trunk/phase3/includes/specials/SpecialDeletedContributions.php |
— | — | @@ -340,9 +340,7 @@ |
341 | 341 | ? 'sp-contributions-footer-anon' |
342 | 342 | : 'sp-contributions-footer'; |
343 | 343 | |
344 | | - |
345 | | - $text = wfMsgNoTrans( $message, $target ); |
346 | | - if( !wfEmptyMsg( $message, $text ) && $text != '-' ) { |
| 344 | + if( !wfMessage( $message )->isDisabled() ) { |
347 | 345 | $wgOut->wrapWikiMsg( "<div class='mw-contributions-footer'>\n$1\n</div>", array( $message, $target ) ); |
348 | 346 | } |
349 | 347 | } |
Index: trunk/phase3/includes/specials/SpecialTags.php |
— | — | @@ -82,8 +82,8 @@ |
83 | 83 | $disp .= ' (' . $sk->link( Title::makeTitle( NS_MEDIAWIKI, "Tag-$tag" ), wfMsgHtml( 'tags-edit' ) ) . ')'; |
84 | 84 | $newRow .= Xml::tags( 'td', null, $disp ); |
85 | 85 | |
86 | | - $desc = wfMsgExt( "tag-$tag-description", 'parseinline' ); |
87 | | - $desc = wfEmptyMsg( "tag-$tag-description", $desc ) ? '' : $desc; |
| 86 | + $msg = wfMessage( "tag-$tag-description" ); |
| 87 | + $desc = !$msg->exists() ? '' : $msg->parse(); |
88 | 88 | $desc .= ' (' . $sk->link( Title::makeTitle( NS_MEDIAWIKI, "Tag-$tag-description" ), wfMsgHtml( 'tags-edit' ) ) . ')'; |
89 | 89 | $newRow .= Xml::tags( 'td', null, $desc ); |
90 | 90 | |
Index: trunk/phase3/includes/Preferences.php |
— | — | @@ -1013,10 +1013,9 @@ |
1014 | 1014 | # Sort by UI skin name. First though need to update validSkinNames as sometimes |
1015 | 1015 | # the skinkey & UI skinname differ (e.g. "standard" skinkey is "Classic" in the UI). |
1016 | 1016 | foreach ( $validSkinNames as $skinkey => &$skinname ) { |
1017 | | - $msgName = "skinname-{$skinkey}"; |
1018 | | - $localisedSkinName = wfMsg( $msgName ); |
1019 | | - if ( !wfEmptyMsg( $msgName, $localisedSkinName ) ) { |
1020 | | - $skinname = htmlspecialchars( $localisedSkinName ); |
| 1017 | + $msg = wfMessage( "skinname-{$skinkey}" ); |
| 1018 | + if ( $msg->exists() ) { |
| 1019 | + $skinname = htmlspecialchars( $msg->text() ); |
1021 | 1020 | } |
1022 | 1021 | } |
1023 | 1022 | asort( $validSkinNames ); |
Index: trunk/phase3/includes/SpecialPage.php |
— | — | @@ -341,9 +341,10 @@ |
342 | 342 | if( isset($specialPageGroupsCache[$page->mName]) ) { |
343 | 343 | return $specialPageGroupsCache[$page->mName]; |
344 | 344 | } |
345 | | - $group = wfMsg('specialpages-specialpagegroup-'.strtolower($page->mName)); |
346 | | - if( $group == '' |
347 | | - || wfEmptyMsg('specialpages-specialpagegroup-'.strtolower($page->mName), $group ) ) { |
| 345 | + $msg = wfMessage('specialpages-specialpagegroup-'.strtolower($page->mName)); |
| 346 | + if ( !$msg->isBlank() ) { |
| 347 | + $group = $msg->text(); |
| 348 | + } else { |
348 | 349 | $group = isset($wgSpecialPageGroups[$page->mName]) |
349 | 350 | ? $wgSpecialPageGroups[$page->mName] |
350 | 351 | : '-'; |
— | — | @@ -882,8 +883,7 @@ |
883 | 884 | } else { |
884 | 885 | $msg = $summaryMessageKey; |
885 | 886 | } |
886 | | - $out = wfMsgNoTrans( $msg ); |
887 | | - if ( ! wfEmptyMsg( $msg, $out ) and $out !== '' and ! $this->including() ) { |
| 887 | + if ( !wfMessage( $msg )->isBlank() and ! $this->including() ) { |
888 | 888 | $wgOut->wrapWikiMsg( "<div class='mw-specialpage-summary'>\n$1\n</div>", $msg ); |
889 | 889 | } |
890 | 890 | |
Index: trunk/phase3/includes/LogPage.php |
— | — | @@ -514,13 +514,11 @@ |
515 | 515 | public static function formatBlockFlag( $flag, $forContent = false ) { |
516 | 516 | static $messages = array(); |
517 | 517 | if( !isset( $messages[$flag] ) ) { |
518 | | - $k = 'block-log-flags-' . $flag; |
519 | | - if( $forContent ) { |
520 | | - $msg = wfMsgForContent( $k ); |
521 | | - } else { |
522 | | - $msg = wfMsg( $k ); |
| 518 | + $msg = wfMessage( 'block-log-flags-' . $flag ); |
| 519 | + if ( $forContent ) { |
| 520 | + $msg = $msg->inContentLanguage(); |
523 | 521 | } |
524 | | - $messages[$flag] = htmlspecialchars( wfEmptyMsg( $k, $msg ) ? $flag : $msg ); |
| 522 | + $messages[$flag] = htmlspecialchars( !$msg->exists() ? $flag : $msg ); |
525 | 523 | } |
526 | 524 | return $messages[$flag]; |
527 | 525 | } |