http://www.mediawiki.org/wiki/Special:Code/MediaWiki/71114
Revision: 71114 Author: nikerabbit Date: 2010-08-15 10:21:57 +0000 (Sun, 15 Aug 2010) Log Message: ----------- * (bug 21903) LiquidThreads namespace names cannot be localised Modified Paths: -------------- trunk/extensions/LiquidThreads/LiquidThreads.php Added Paths: ----------- trunk/extensions/LiquidThreads/i18n/Lqt.namespaces.php Modified: trunk/extensions/LiquidThreads/LiquidThreads.php =================================================================== --- trunk/extensions/LiquidThreads/LiquidThreads.php 2010-08-15 10:07:05 UTC (rev 71113) +++ trunk/extensions/LiquidThreads/LiquidThreads.php 2010-08-15 10:21:57 UTC (rev 71114) @@ -3,11 +3,11 @@ die(); $wgExtensionCredits['other'][] = array( - 'path' => __FILE__, - 'name' => 'Liquid Threads', - 'version' => '2.0-alpha', - 'url' => 'http://www.mediawiki.org/wiki/Extension:LiquidThreads', - 'author' => array( 'David McCabe', 'Andrew Garrett' ), + 'path' => __FILE__, + 'name' => 'Liquid Threads', + 'version' => '2.0-alpha', + 'url' => 'http://www.mediawiki.org/wiki/Extension:LiquidThreads', + 'author' => array( 'David McCabe', 'Andrew Garrett' ), 'descriptionmsg' => 'lqt-desc', ); @@ -21,22 +21,21 @@ define( 'LQT_NEWEST_THREADS', 'nt' ); define( 'LQT_OLDEST_THREADS', 'ot' ); -// FIXME: would be neat if it was possible to somehow localise this. -$wgCanonicalNamespaceNames[NS_LQT_THREAD] = 'Thread'; -$wgCanonicalNamespaceNames[NS_LQT_THREAD_TALK] = 'Thread_talk'; -$wgCanonicalNamespaceNames[NS_LQT_SUMMARY] = 'Summary'; -$wgCanonicalNamespaceNames[NS_LQT_SUMMARY_TALK] = 'Summary_talk'; +$wgExtensionFunctions[] = 'wgLqtSetupCanonicalNamespces'; -// FIXME: would be neat if it was possible to somehow localise this. -$wgExtraNamespaces[NS_LQT_THREAD] = 'Thread'; -$wgExtraNamespaces[NS_LQT_THREAD_TALK] = 'Thread_talk'; -$wgExtraNamespaces[NS_LQT_SUMMARY] = 'Summary'; -$wgExtraNamespaces[NS_LQT_SUMMARY_TALK] = 'Summary_talk'; +function wgLqtSetupCanonicalNamespces() { + global $wgCanonicalNamespaceNames; + $wgCanonicalNamespaceNames[NS_LQT_THREAD] = 'Thread'; + $wgCanonicalNamespaceNames[NS_LQT_THREAD_TALK] = 'Thread_talk'; + $wgCanonicalNamespaceNames[NS_LQT_SUMMARY] = 'Summary'; + $wgCanonicalNamespaceNames[NS_LQT_SUMMARY_TALK] = 'Summary_talk'; +} // Localisation $dir = dirname( __FILE__ ) . '/'; $wgExtensionMessagesFiles['LiquidThreads'] = $dir . 'i18n/Lqt.i18n.php'; $wgExtensionMessagesFiles['LiquidThreadsMagic'] = $dir . 'i18n/LiquidThreads.magic.php'; +$wgExtensionMessagesFiles['LiquidThreadsNamespaces'] = $dir . 'i18n/Lqt.namespaces.php'; $wgExtensionAliasesFiles['LiquidThreads'] = $dir . 'i18n/Lqt.alias.php'; // Parser Function Setup Added: trunk/extensions/LiquidThreads/i18n/Lqt.namespaces.php =================================================================== --- trunk/extensions/LiquidThreads/i18n/Lqt.namespaces.php (rev 0) +++ trunk/extensions/LiquidThreads/i18n/Lqt.namespaces.php 2010-08-15 10:21:57 UTC (rev 71114) @@ -0,0 +1,17 @@ +<?php + +$namespaceNames = array(); + +$namespaceNames['en'] = array( + NS_LQT_THREAD => 'Thread', + NS_LQT_THREAD_TALK => 'Thread_talk', + NS_LQT_SUMMARY => 'Summary', + NS_LQT_SUMMARY_TALK => 'Summary_talk', +); + +$namespaceNames['fi'] = array( + NS_LQT_THREAD => 'Viestiketju', + NS_LQT_THREAD_TALK => 'Keskustelu_viestiketjusta', + NS_LQT_SUMMARY => 'Yhteenveto', + NS_LQT_SUMMARY_TALK => 'Keskustelu_yhteenvedosta', +); Property changes on: trunk/extensions/LiquidThreads/i18n/Lqt.namespaces.php ___________________________________________________________________ Added: svn:eol-style + native _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs