r6584 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r6583‎ | r6584 | r6585 >
Date:02:22, 9 December 2004
Author:zhengzhu
Status:old
Tags:
Comment:
initialize messages in the wgForceUIMsgAsContentMsg array for all languages.
Modified paths:
  • /branches/REL1_4/phase3/maintenance/InitialiseMessages.inc (modified) (history)

Diff [purge]

Index: branches/REL1_4/phase3/maintenance/InitialiseMessages.inc
@@ -10,12 +10,14 @@
1111 * @subpackage Maintenance
1212 */
1313
 14+require_once('languages/Names.php');
1415
15 -
1616 function initialiseMessages( $overwrite = false, $messageArray = false ) {
1717 global $wgContLang, $wgContLanguageCode;
1818 global $wgContLangClass, $wgAllMessagesEn;
1919 global $wgDisableLangConversion;
 20+ global $wgForceUIMsgAsContentMsg;
 21+ global $wgLanguageNames;
2022 global $IP;
2123
2224 # overwrite language conversion option so that all variants
@@ -51,6 +53,20 @@
5254 }
5355 }
5456
 57+ /*
 58+ initialize all messages in $wgForceUIMsgAsContentMsg for all
 59+ languages in Names.php
 60+ */
 61+ if( is_array( $wgForceUIMsgAsContentMsg ) ) {
 62+ foreach( $wgForceUIMsgAsContentMsg as $uikey ) {
 63+ foreach( $wgLanguageNames as $code => $name) {
 64+ if( $code == $wgContLanguageCode )
 65+ continue;
 66+ $messages[$uikey. '/' . $code] = $wgContLang->getMessage($uikey);
 67+ }
 68+ }
 69+ }
 70+
5571 initialiseMessagesReal( $overwrite, $messages );
5672 }
5773

Status & tagging log