r54812 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54811‎ | r54812 | r54813 >
Date:21:25, 11 August 2009
Author:siebrand
Status:deferred
Tags:
Comment:
* new style magic words support for LiquidThreads
* add localisation support in Translate
Modified paths:
  • /trunk/extensions/LiquidThreads/LiquidThreads.php (modified) (history)
  • /trunk/extensions/LiquidThreads/i18n/LiquidThreads.magic.php (modified) (history)
  • /trunk/extensions/LiquidThreads/i18n/Lqt.i18n.php (modified) (history)
  • /trunk/extensions/Translate/groups/mediawiki-defines.txt (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/i18n/Lqt.i18n.php
@@ -5,10 +5,12 @@
66 * @package MediaWiki
77 * @addtogroup Extensions
88 * @subpackage LiquidThreads
9 - * @author David McCabe <davemccabe@gmail.com> / I18n file by Erik Moeller and Siebrand Mazeland
 9+ * @author David McCabe <davemccabe@gmail.com> / i18n file by Erik Moeller and Siebrand Mazeland
1010 * @licence GPL2
1111 */
1212
 13+require_once( dirname(__FILE__) . '/LiquidThreads.magic.php' );
 14+
1315 $messages = array();
1416
1517 $messages['en'] = array(
Index: trunk/extensions/LiquidThreads/i18n/LiquidThreads.magic.php
@@ -1,20 +1,7 @@
22 <?php
33
4 -class LiquidThreadsMagicWords {
5 - static function getMagicWords( &$magicWords, $lang ) {
6 - $words = array();
7 -
8 - /**
9 - * English
10 - */
11 - $words['en'] = array(
12 - 'useliquidthreads' => array( 0, 'UseLiquidThreads' ),
13 - );
14 -
15 - $magicWords += ( $lang == 'en' || !isset( $words[$lang] ) )
16 - ? $words['en']
17 - : array_merge( $words['en'], $words[$lang] );
18 -
19 - return true;
20 - }
21 -}
 4+$magicWords = array();
 5+
 6+$magicWords['en'] = array(
 7+ 'useliquidthreads' => array( 0, 'UseLiquidThreads' ),
 8+);
Index: trunk/extensions/LiquidThreads/LiquidThreads.php
@@ -68,9 +68,6 @@
6969 $wgHooks['XmlDumpWriterOpenPage'][] = 'LqtHooks::dumpThreadData';
7070 $wgHooks['ModifyExportQuery'][] = 'LqtHooks::modifyExportQuery';
7171
72 -// Magic words
73 -$wgHooks['LanguageGetMagic'][] = 'LiquidThreadsMagicWords::getMagicWords';
74 -
7572 // Deletion
7673 $wgHooks['ArticleDeleteComplete'][] = 'LqtDeletionController::onArticleDeleteComplete';
7774 $wgHooks['ArticleRevisionUndeleted'][] = 'LqtDeletionController::onArticleRevisionUndeleted';
Index: trunk/extensions/Translate/groups/mediawiki-defines.txt
@@ -521,6 +521,7 @@
522522 Liquid Threads
523523 file = LiquidThreads/i18n/Lqt.i18n.php
524524 aliasfile = LiquidThreads/i18n/Lqt.alias.php
 525+magicfile = LiquidThreads/i18n/LiquidThreads.magic.php
525526 descmsg = lqt-desc
526527 optional = lqt_rc_ellipsis
527528 ignored = lqt_header_warning_before_big

Status & tagging log