r49217 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49216‎ | r49217 | r49218 >
Date:16:14, 5 April 2009
Author:mkroetzsch
Status:deferred
Tags:
Comment:
added translations for some of the format names
Modified paths:
  • /trunk/extensions/SemanticResultFormats/BibTeX/SRF_BibTeX.php (modified) (history)
  • /trunk/extensions/SemanticResultFormats/SRF_Messages.php (modified) (history)
  • /trunk/extensions/SemanticResultFormats/Timeline/SRF_Timeline.php (modified) (history)
  • /trunk/extensions/SemanticResultFormats/iCalendar/SRF_iCalendar.php (modified) (history)
  • /trunk/extensions/SemanticResultFormats/vCard/SRF_vCard.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticResultFormats/iCalendar/SRF_iCalendar.php
@@ -47,6 +47,11 @@
4848 return ($context==SMWQueryProcessor::SPECIAL_PAGE)?SMWQuery::MODE_INSTANCES:SMWQuery::MODE_NONE;
4949 }
5050
 51+ public function getName() {
 52+ wfLoadExtensionMessages('SemanticResultFormats');
 53+ return wfMsg('srf_printername_icalendar');
 54+ }
 55+
5156 protected function getResultText($res, $outputmode) {
5257 global $smwgIQRunningNumber, $wgSitename, $wgServer, $wgRequest;
5358 $result = '';
Index: trunk/extensions/SemanticResultFormats/vCard/SRF_vCard.php
@@ -32,6 +32,11 @@
3333 return ($context==SMWQueryProcessor::SPECIAL_PAGE)?SMWQuery::MODE_INSTANCES:SMWQuery::MODE_NONE;
3434 }
3535
 36+ public function getName() {
 37+ wfLoadExtensionMessages('SemanticResultFormats');
 38+ return wfMsg('srf_printername_vcard');
 39+ }
 40+
3641 protected function getResultText($res, $outputmode) {
3742 global $smwgIQRunningNumber, $wgSitename, $wgServer, $wgRequest;
3843 $result = '';
Index: trunk/extensions/SemanticResultFormats/Timeline/SRF_Timeline.php
@@ -47,6 +47,11 @@
4848 }
4949 }
5050
 51+ public function getName() {
 52+ wfLoadExtensionMessages('SemanticResultFormats');
 53+ return wfMsg('srf_printername_' . $this->mFormat);
 54+ }
 55+
5156 protected function getResultText($res, $outputmode) {
5257 global $smwgIQRunningNumber, $wgScriptPath;
5358 SMWOutputs::requireHeadItem(SMW_HEADER_STYLE);
Index: trunk/extensions/SemanticResultFormats/SRF_Messages.php
@@ -18,10 +18,16 @@
1919 'srfc_gotomonth' => 'Go to month',
2020 // format "vCard"
2121 'srf_vcard_link' => 'vCard',
 22+ 'srf_printername_vcard' => 'vCard export',
2223 // format "iCalendar"
2324 'srf_icalendar_link' => 'iCalendar',
 25+ 'srf_printername_icalendar' => 'iCalendar export',
2426 // format "BibTeX"
2527 'srf_bibtex_link' => 'BibTeX',
 28+ 'srf_printername_bibtex' => 'BibTeX export',
 29+ // format "timeline"
 30+ 'srf_printername_timeline' => 'Timeline',
 31+ 'srf_printername_eventline' => 'Eventline',
2632 );
2733
2834 /** Message documentation (Message documentation)
Index: trunk/extensions/SemanticResultFormats/BibTeX/SRF_BibTeX.php
@@ -45,6 +45,15 @@
4646 }
4747 }
4848
 49+ public function getQueryMode($context) {
 50+ return ($context==SMWQueryProcessor::SPECIAL_PAGE)?SMWQuery::MODE_INSTANCES:SMWQuery::MODE_NONE;
 51+ }
 52+
 53+ public function getName() {
 54+ wfLoadExtensionMessages('SemanticResultFormats');
 55+ return wfMsg('srf_printername_bibtex');
 56+ }
 57+
4958 protected function getResultText($res, $outputmode) {
5059 global $smwgIQRunningNumber, $wgSitename, $wgServer, $wgRequest;
5160 $result = '';
@@ -276,7 +285,7 @@
277286 foreach ($items as $item) {
278287 $result .= $item->text();
279288 }
280 - } else { // just make link to vcard
 289+ } else { // just make link to export
281290 if ($this->getSearchLabel($outputmode)) {
282291 $label = $this->getSearchLabel($outputmode);
283292 } else {
@@ -460,5 +469,5 @@
461470 unpublished
462471 A document having an author and title, but not formally published.
463472 Required fields: author, title, note
464 - Optional fields: month, year, key
 473+ Optional fields: month, year, key
465474 */

Status & tagging log