r94111 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94110‎ | r94111 | r94112 >
Date:15:04, 9 August 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
no need to implement special smart behaviour here, which prevents proper i18n
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Category.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/languages/SMW_Messages.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Category.php
@@ -39,11 +39,8 @@
4040 }
4141
4242 public function getName() {
43 - // just use the name of the 'Category' namespace, instead
44 - // of creating a new language value
45 - global $wgContLang;
46 - $namespace_labels = $wgContLang->getNamespaces();
47 - return $namespace_labels[NS_CATEGORY];
 43+ smwfLoadExtensionMessages( 'SemanticMediaWiki' );
 44+ return wfMsg( 'smw_printername_' . $this->mFormat );
4845 }
4946
5047 protected function getResultText( SMWQueryResult $res, $outputmode ) {
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_Messages.php
@@ -64,6 +64,7 @@
6565 'smw_printername_broadtable' => 'Broad table',
6666 'smw_printername_template' => 'Template',
6767 'smw_printername_rdf' => 'RDF export',
 68+ 'smw_printername_category' => 'Category',
6869
6970 // Messages for query parameter descriptions
7071 'smw_paramdesc_limit' => 'The maximum number of results to return',