Support MediaWiki Messages ({{int: strings) in SemanticDrilldown. They will be used for rending the labels
Example:
{{#drilldowninfo:filters= Tag (property=Tag,int=SA Tag Tags), |display parameters=?Sort Key;?Short Description;?Tag;format=broadtable;mainlabel={{int:SA Subject Area Subject Area}}; |header=Template:S Subject Area Drilldown Header }}
Patch:
Index: includes/SD_ParserFunctions.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- includes/SD_ParserFunctions.php (revision 78c5fe9b5a9eb1a12a9eb97d1ad73495a388cb93) +++ includes/SD_ParserFunctions.php (revision ) @@ -82,7 +82,7 @@ continue; } $key = trim( $filterSetting[0] ); - if ( $key != 'property' && $key != 'category' && $key != 'requires' ) { + if ( $key != 'property' && $key != 'category' && $key != 'requires' && $key != 'int') { return "<div class=\"error\">Error: unknown setting, \"$key\".</div>"; // Display an error message? continue; Index: includes/SD_Filter.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- includes/SD_Filter.php (revision 78c5fe9b5a9eb1a12a9eb97d1ad73495a388cb93) +++ includes/SD_Filter.php (revision ) @@ -39,7 +39,11 @@ public function addRequiredFilter( $filterName ) { $this->required_filters[] = $filterName; } - + + public function addInt( $int ) { + $this->int = $int; + } + static function loadAllFromPageSchema( $psSchemaObj ){ $filters_ps = array(); $template_all = $psSchemaObj->getTemplates(); Index: includes/SD_Utils.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- includes/SD_Utils.php (revision 78c5fe9b5a9eb1a12a9eb97d1ad73495a388cb93) +++ includes/SD_Utils.php (revision ) @@ -200,6 +200,8 @@ $curFilter->setCategory( $value ); } elseif ( $key == 'requires' ) { $curFilter->addRequiredFilter( $value ); + } elseif ( $key == 'int' ) { + $curFilter->addInt( $value ); } } $filters[] = $curFilter; Index: specials/SD_BrowseData.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- specials/SD_BrowseData.php (revision 78c5fe9b5a9eb1a12a9eb97d1ad73495a388cb93) +++ specials/SD_BrowseData.php (revision ) @@ -473,15 +473,20 @@ * Create the full display of the filter line, once the text for * the "results" (values) for this filter has been created. */ - function printFilterLine( $filterName, $isApplied, $isNormalFilter, $resultsLine ) { + function printFilterLine( $filterName, $isApplied, $isNormalFilter, $resultsLine, $filter ) { global $sdgScriptPath; global $sdgDisableFilterCollapsible; $filterLabel = $this->printFilterLabel( $filterName ); + $label = $filterLabel; + if ( isset( $filter->int ) ) { + $label = wfMessage( $filter->int )->text(); + } + if ($sdgDisableFilterCollapsible) { $text = '<div class="drilldown-filter">'; - $text .= ' <div class="drilldown-filter-label">' . $filterLabel . '</div>'; + $text .= ' <div class="drilldown-filter-label">' . $label . '</div>'; $text .= ' <div class="drilldown-filter-values">' . $resultsLine . '</div>'; $text .= '</div>'; @@ -568,7 +573,7 @@ } $curSearchTermNum = count( $af->search_terms ); $results_line = $this->printComboBoxInput( $af->filter->name, $curSearchTermNum, $filter_values ); - return $this->printFilterLine( $af->filter->name, true, true, $results_line ); + return $this->printFilterLine( $af->filter->name, true, true, $results_line, $af->filter ); /* } elseif ( $af->lower_date != null || $af->upper_date != null ) { // With the current interface, this code will never get @@ -615,7 +620,8 @@ } } } - return $this->printFilterLine( $af->filter->name, true, true, $results_line ); + + return $this->printFilterLine( $af->filter->name, true, true, $results_line, $af->filter); } function printUnappliedFilterValues( $cur_url, $f, $filter_values ) { @@ -985,7 +991,7 @@ } if ( !is_array( $filter_values ) ) { $f->dropTempTable(); - return $this->printFilterLine( $f->name, false, false, $filter_values ); + return $this->printFilterLine( $f->name, false, false, $filter_values, $f ); } if ( count( $filter_values ) > 0 ) { $found_results_for_filter = true; @@ -1039,7 +1045,7 @@ $results_line = $this->printUnappliedFilterValues( $cur_url, $f, $filter_values ); } - $text = $this->printFilterLine( $f->name, false, $normal_filter, $results_line ); + $text = $this->printFilterLine( $f->name, false, $normal_filter, $results_line, $f ); $f->dropTempTable(); if ( $sdgHideFiltersWithoutValues && count( $filter_values ) == 0 ) { @@ -1202,11 +1208,17 @@ } else { $header .= $this->printAppliedFilterLine( $af ); } + if (isset($f->int)) { + $af->int = $f->int; - } - } + } + } + } foreach ( $this->remaining_filters as $rf ) { if ( $rf->name == $f->name ) { $header .= $this->printUnappliedFilterLine( $rf, $cur_url ); + } + if (isset($f->int)) { + $rf->int = $f->int; } } }