r5250 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r5249‎ | r5250 | r5251 >
Date:04:49, 17 September 2004
Author:zhengzhu
Status:old
Tags:
Comment:
Prevent Simplified/Traditional Chinese message conversion when listing the messages.
Modified paths:
  • /trunk/phase3/includes/SpecialAllmessages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialAllmessages.php
@@ -10,7 +10,8 @@
1111 */
1212 function wfSpecialAllmessages() {
1313 global $wgOut, $wgAllMessagesEn, $wgRequest, $wgMessageCache, $wgTitle;
14 -
 14+ global $wgDoZhMessageConversion, $wgLanguageCode;
 15+
1516 $fname = "wfSpecialAllMessages";
1617 wfProfileIn( $fname );
1718
@@ -24,11 +25,19 @@
2526 ksort( $sortedArray );
2627 $messages = array();
2728 $wgMessageCache->disableTransform();
 29+
 30+ if(strtolower($wgLanguageCode) == "zh")
 31+ $wgDoZhMessageConversion = false;
 32+
2833 foreach ( $sortedArray as $key => $enMsg ) {
2934 $messages[$key]['enmsg'] = $enMsg;
3035 $messages[$key]['statmsg'] = wfMsgNoDb( $key );
3136 $messages[$key]['msg'] = wfMsg ( $key );
3237 }
 38+
 39+ if(strtolower($wgLanguageCode) == "zh")
 40+ $wgDoZhMessageConversion = true;
 41+
3342 $wgMessageCache->enableTransform();
3443 wfProfileOut( "$fname-setup" );
3544

Status & tagging log