r108114 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108113‎ | r108114 | r108115 >
Date:02:53, 5 January 2012
Author:jeroendedauw
Status:resolved (Comments)
Tags:
Comment:
Fixed internationalization of magic words
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/RELEASE-NOTES (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/languages/SMW_Magic.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/RELEASE-NOTES
@@ -10,6 +10,7 @@
1111
1212 * Fixed bug in "further results" links causing the main column to be displayed twice on Special:Ask (bug 33473).
1313 * Fixed incorrect case-sensitivity of the format parameter (bug 31138).
 14+* Fixed internationalization of magic words.
1415
1516 == SMW 1.7 ==
1617
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php
@@ -32,6 +32,7 @@
3333 $wgExtensionFunctions[] = 'smwfSetupExtension';
3434 $wgExtensionMessagesFiles['SemanticMediaWiki'] = $smwgIP . 'languages/SMW_Messages.php';
3535 $wgExtensionMessagesFiles['SemanticMediaWikiAlias'] = $smwgIP . 'languages/SMW_Aliases.php';
 36+ $wgExtensionMessagesFiles['SemanticMediaWikiMagic'] = $smwgIP . 'languages/SMW_Magic.php';
3637
3738 smwfRegisterHooks();
3839 smwfRegisterResourceLoaderModules();
@@ -74,10 +75,7 @@
7576 global $wgHooks, $wgVersion;
7677
7778 $wgHooks['LoadExtensionSchemaUpdates'][] = 'SMWHooks::onSchemaUpdate';
78 -
79 - // FIXME: The following can be removed when new style magic words are used (introduced in r52503)
80 - $wgHooks['LanguageGetMagic'][] = 'smwfAddMagicWords'; // setup names for parser functions (needed here)
81 -
 79+
8280 $wgHooks['ParserTestTables'][] = 'SMWHooks::onParserTestTables';
8381 $wgHooks['AdminLinks'][] = 'SMWHooks::addToAdminLinks';
8482 $wgHooks['PageSchemasRegisterHandlers'][] = 'SMWHooks::onPageSchemasRegistration';
@@ -485,23 +483,6 @@
486484 /**********************************************/
487485
488486 /**
489 - * Set up (possibly localised) names for SMW's parser functions.
490 - * @todo Can be removed when new style magic words are used (introduced in r52503).
491 - */
492 -function smwfAddMagicWords( &$magicWords, $langCode ) {
493 - $magicWords['ask'] = array( 0, 'ask' );
494 - $magicWords['show'] = array( 0, 'show' );
495 - $magicWords['subobject'] = array( 0, 'subobject' );
496 - $magicWords['concept'] = array( 0, 'concept' );
497 - $magicWords['set'] = array( 0, 'set' );
498 - $magicWords['set_recurring_event'] = array( 0, 'set_recurring_event' );
499 - $magicWords['declare'] = array( 0, 'declare' );
500 - $magicWords['SMW_NOFACTBOX'] = array( 0, '__NOFACTBOX__' );
501 - $magicWords['SMW_SHOWFACTBOX'] = array( 0, '__SHOWFACTBOX__' );
502 - return true;
503 -}
504 -
505 -/**
506487 * Initialise a global language object for content language. This must happen
507488 * early on, even before user language is known, to determine labels for
508489 * additional namespaces. In contrast, messages can be initialised much later
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_Magic.php
@@ -16,6 +16,8 @@
1717 'show' => array( 0, 'show' ),
1818 'info' => array( 0, 'info' ),
1919 'concept' => array( 0, 'concept' ),
 20+ 'subobject' => array( 0, 'subobject' ),
 21+ 'smwdoc' => array( 0, 'smwdoc' ),
2022 'set' => array( 0, 'set' ),
2123 'set_recurring_event' => array( 0, 'set_recurring_event' ),
2224 'declare' => array( 0, 'declare' ),

Follow-up revisions

RevisionCommit summaryAuthorDate
r108143Fix spaces -> tabs for r108114demon15:17, 5 January 2012

Comments

#Comment by Nikerabbit (talk | contribs)   08:39, 5 January 2012

Uses spaces instead of tabs.

Status & tagging log