Index: trunk/extensions/SemanticMediaWiki/specials/Statistics/SMW_SpecialStatistics.php |
— | — | @@ -39,6 +39,8 @@ |
40 | 40 | ) |
41 | 41 | ); |
42 | 42 | |
| 43 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
| 44 | + |
43 | 45 | $out = wfMsgExt( 'smw_semstats_text', array( 'parse' ), |
44 | 46 | $wgLang->formatNum( $semanticStatistics['PROPUSES'] ), $wgLang->formatNum( $semanticStatistics['USEDPROPS'] ), |
45 | 47 | $wgLang->formatNum( $propertyPageAmount ), $wgLang->formatNum( $semanticStatistics['DECLPROPS'] ) |
Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialAsk.php |
— | — | @@ -30,6 +30,7 @@ |
31 | 31 | */ |
32 | 32 | public function __construct() { |
33 | 33 | parent::__construct( 'Ask' ); |
| 34 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
34 | 35 | } |
35 | 36 | |
36 | 37 | function execute( $p ) { |
Index: trunk/extensions/SemanticMediaWiki/specials/SMWAdmin/SMW_SpecialSMWAdmin.php |
— | — | @@ -28,6 +28,7 @@ |
29 | 29 | */ |
30 | 30 | public function __construct() { |
31 | 31 | parent::__construct( 'SMWAdmin', 'delete' ); |
| 32 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
32 | 33 | } |
33 | 34 | |
34 | 35 | public function execute( $par ) { |
Index: trunk/extensions/SemanticMediaWiki/specials/Export/SMW_SpecialOWLExport.php |
— | — | @@ -113,6 +113,8 @@ |
114 | 114 | } |
115 | 115 | } |
116 | 116 | |
| 117 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
| 118 | + |
117 | 119 | // nothing exported yet; show user interface: |
118 | 120 | $html = '<form name="tripleSearch" action="" method="POST">' . "\n" . |
119 | 121 | '<p>' . wfMsg( 'smw_exportrdf_docu' ) . "</p>\n" . |
Index: trunk/extensions/SemanticMediaWiki/specials/URIResolver/SMW_SpecialURIResolver.php |
— | — | @@ -22,6 +22,7 @@ |
23 | 23 | */ |
24 | 24 | public function __construct() { |
25 | 25 | parent::__construct( 'URIResolver', '', false ); |
| 26 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
26 | 27 | } |
27 | 28 | |
28 | 29 | function execute( $query ) { |
Index: trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_SpecialWantedProperties.php |
— | — | @@ -74,6 +74,7 @@ |
75 | 75 | } |
76 | 76 | |
77 | 77 | function getPageHeader() { |
| 78 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
78 | 79 | return '<p>' . wfMsg( 'smw_wantedproperties_docu' ) . "</p><br />\n"; |
79 | 80 | } |
80 | 81 | |
— | — | @@ -84,6 +85,7 @@ |
85 | 86 | } else { |
86 | 87 | $proplink = $result[0]->getLongHTMLText( $skin ); |
87 | 88 | } |
| 89 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
88 | 90 | return wfMsgExt( 'smw_wantedproperty_template', array( 'parsemag' ), $proplink, $result[1] ); |
89 | 91 | } |
90 | 92 | |
Index: trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_SpecialUnusedProperties.php |
— | — | @@ -76,6 +76,7 @@ |
77 | 77 | } |
78 | 78 | |
79 | 79 | function getPageHeader() { |
| 80 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
80 | 81 | return '<p>' . wfMsg( 'smw_unusedproperties_docu' ) . "</p><br />\n"; |
81 | 82 | } |
82 | 83 | |
— | — | @@ -84,6 +85,7 @@ |
85 | 86 | $proplink = $skin->makeKnownLinkObj( $result->getWikiPageValue()->getTitle(), $result->getWikiValue() ); |
86 | 87 | $types = smwfGetStore()->getPropertyValues( $result->getWikiPageValue(), SMWPropertyValue::makeProperty( '_TYPE' ) ); // TODO: do not bypass SMWDataValueFactory! |
87 | 88 | $errors = array(); |
| 89 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
88 | 90 | if ( count( $types ) >= 1 ) { |
89 | 91 | $typestring = current( $types )->getLongHTMLText( $skin ); |
90 | 92 | } else { |
Index: trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_QueryPage.php |
— | — | @@ -57,6 +57,7 @@ |
58 | 58 | |
59 | 59 | // if list is empty, show it |
60 | 60 | if ( $num == 0 ) { |
| 61 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
61 | 62 | $wgOut->addHTML( '<p>' . wfMsgHTML( 'specialpage-empty' ) . '</p>' ); |
62 | 63 | return; |
63 | 64 | } |
Index: trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_SpecialTypes.php |
— | — | @@ -71,6 +71,7 @@ |
72 | 72 | } |
73 | 73 | |
74 | 74 | function getPageHeader() { |
| 75 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
75 | 76 | return '<p>' . wfMsg( 'smw_types_docu' ) . "</p><br />\n"; |
76 | 77 | } |
77 | 78 | |
— | — | @@ -107,6 +108,7 @@ |
108 | 109 | $tv = SMWDataValueFactory::newTypeIDValue( '__typ', $titletext ); |
109 | 110 | $info = array(); |
110 | 111 | $error = array(); |
| 112 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
111 | 113 | if ( $tv->isAlias() ) { // print the type title as found, long text would (again) print the alias |
112 | 114 | $ttitle = Title::makeTitle( SMW_NS_TYPE, $titletext ); |
113 | 115 | $link = $skin->makeKnownLinkObj( $ttitle, $ttitle->getText() ); // aliases are only found if the page exists |
Index: trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_SpecialProperties.php |
— | — | @@ -74,6 +74,7 @@ |
75 | 75 | } |
76 | 76 | |
77 | 77 | function getPageHeader() { |
| 78 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
78 | 79 | return '<p>' . wfMsg( 'smw_properties_docu' ) . "</p><br />\n"; |
79 | 80 | } |
80 | 81 | |
— | — | @@ -81,6 +82,7 @@ |
82 | 83 | global $wgLang; |
83 | 84 | $typestring = ''; |
84 | 85 | $errors = array(); |
| 86 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
85 | 87 | if ( $result[0]->isUserDefined() && ( $result[1] <= 5 ) ) { |
86 | 88 | $errors[] = wfMsg( 'smw_propertyhardlyused' ); |
87 | 89 | } |
Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialBrowse.php |
— | — | @@ -38,6 +38,7 @@ |
39 | 39 | public function __construct() { |
40 | 40 | global $smwgBrowseShowAll; |
41 | 41 | parent::__construct( 'Browse', '', true, false, 'default', true ); |
| 42 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
42 | 43 | if ( $smwgBrowseShowAll ) { |
43 | 44 | SMWSpecialBrowse::$incomingvaluescount = 21; |
44 | 45 | SMWSpecialBrowse::$incomingpropertiescount = - 1; |
Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialPageProperty.php |
— | — | @@ -26,6 +26,7 @@ |
27 | 27 | */ |
28 | 28 | public function __construct() { |
29 | 29 | parent::__construct( 'PageProperty', '', false ); |
| 30 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
30 | 31 | } |
31 | 32 | |
32 | 33 | public function execute( $query ) { |
— | — | @@ -56,6 +57,7 @@ |
57 | 58 | |
58 | 59 | // Produce output |
59 | 60 | $html = ''; |
| 61 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
60 | 62 | if ( ( $propname == '' ) ) { // no property given, show a message |
61 | 63 | $html .= wfMsg( 'smw_pp_docu' ) . "\n"; |
62 | 64 | } else { // property given, find and display results |
Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialSearchByProperty.php |
— | — | @@ -49,6 +49,7 @@ |
50 | 50 | */ |
51 | 51 | public function __construct() { |
52 | 52 | parent::__construct( 'SearchByProperty' ); |
| 53 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
53 | 54 | } |
54 | 55 | |
55 | 56 | /** |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QueryParser.php |
— | — | @@ -115,6 +115,7 @@ |
116 | 116 | * The call-by-ref parameter $label is used to append any label strings found. |
117 | 117 | */ |
118 | 118 | protected function getSubqueryDescription( &$setNS, &$label ) { |
| 119 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
119 | 120 | $conjunction = null; // used for the current inner conjunction |
120 | 121 | $disjuncts = array(); // (disjunctive) array of subquery conjunctions |
121 | 122 | $hasNamespaces = false; // does the current $conjnuction have its own namespace restrictions? |
— | — | @@ -264,6 +265,7 @@ |
265 | 266 | * string. |
266 | 267 | */ |
267 | 268 | protected function getPropertyDescription( $propertyname, &$setNS, &$label ) { |
| 269 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
268 | 270 | $this->readChunk(); // consume separator ":=" or "::" |
269 | 271 | // first process property chain syntax (e.g. "property1.property2::value"), escaped by initial " ": |
270 | 272 | $propertynames = ( $propertyname { 0 } == ' ' ) ? array( $propertyname ):explode( '.', $propertyname ); |
— | — | @@ -370,6 +372,7 @@ |
371 | 373 | * passed as a parameter. |
372 | 374 | */ |
373 | 375 | protected function getArticleDescription( $firstchunk, &$setNS, &$label ) { |
| 376 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
374 | 377 | $chunk = $firstchunk; |
375 | 378 | $result = null; |
376 | 379 | $continue = true; |
— | — | @@ -409,6 +412,7 @@ |
410 | 413 | } |
411 | 414 | |
412 | 415 | protected function finishLinkDescription( $chunk, $hasNamespaces, $result, &$setNS, &$label ) { |
| 416 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
413 | 417 | if ( $result === null ) { // no useful information or concrete error found |
414 | 418 | $this->m_errors[] = wfMsgForContent( 'smw_badqueryatom' ); |
415 | 419 | } elseif ( !$hasNamespaces && $setNS && ( $this->m_defaultns !== null ) ) { |
— | — | @@ -520,6 +524,7 @@ |
521 | 525 | * also be changed (if it was non-NULL). |
522 | 526 | */ |
523 | 527 | protected function addDescription( $curdesc, $newdesc, $conjunction = true ) { |
| 528 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
524 | 529 | $notallowedmessage = 'smw_noqueryfeature'; |
525 | 530 | if ( $newdesc instanceof SMWSomeProperty ) { |
526 | 531 | $allowed = $this->m_queryfeatures & SMW_PROPERTY_QUERY; |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_RSSlink.php |
— | — | @@ -41,6 +41,7 @@ |
42 | 42 | } |
43 | 43 | |
44 | 44 | public function getName() { |
| 45 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
45 | 46 | return wfMsg( 'smw_printername_rss' ); |
46 | 47 | } |
47 | 48 | |
— | — | @@ -53,6 +54,7 @@ |
54 | 55 | $this->m_title = $wgSitename; |
55 | 56 | } |
56 | 57 | if ( $this->m_description == '' ) { |
| 58 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
57 | 59 | $this->m_description = wfMsg( 'smw_rss_description', $wgSitename ); |
58 | 60 | } |
59 | 61 | |
— | — | @@ -115,6 +117,7 @@ |
116 | 118 | if ( $this->getSearchLabel( $outputmode ) ) { |
117 | 119 | $label = $this->getSearchLabel( $outputmode ); |
118 | 120 | } else { |
| 121 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
119 | 122 | $label = wfMsgForContent( 'smw_rss_link' ); |
120 | 123 | } |
121 | 124 | $link = $res->getQueryLink( $label ); |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Temperature.php |
— | — | @@ -49,6 +49,7 @@ |
50 | 50 | break; |
51 | 51 | default: // unsupported unit |
52 | 52 | // create error here, assuming that our temperature units should not be augmented by unknown units |
| 53 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
53 | 54 | $this->addError( wfMsgForContent( 'smw_unsupportedunit', $this->m_unit ) ); |
54 | 55 | $this->m_unit = $this->m_unitin; |
55 | 56 | break; |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Factbox.php |
— | — | @@ -42,6 +42,7 @@ |
43 | 43 | // actually build the Factbox text: |
44 | 44 | $text = ''; |
45 | 45 | if ( wfRunHooks( 'smwShowFactbox', array( &$text, $semdata ) ) ) { |
| 46 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
46 | 47 | SMWOutputs::requireHeadItem( SMW_HEADER_STYLE ); |
47 | 48 | $rdflink = SMWInfolink::newInternalLink( wfMsgForContent( 'smw_viewasrdf' ), $wgContLang->getNsText( NS_SPECIAL ) . ':ExportRDF/' . $semdata->getSubject()->getWikiValue(), 'rdflink' ); |
48 | 49 | |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_JSONlink.php |
— | — | @@ -31,6 +31,7 @@ |
32 | 32 | } |
33 | 33 | |
34 | 34 | public function getName() { |
| 35 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
35 | 36 | return wfMsg( 'smw_printername_json' ); |
36 | 37 | } |
37 | 38 | |
— | — | @@ -144,6 +145,7 @@ |
145 | 146 | if ( $this->getSearchLabel( $outputmode ) ) { |
146 | 147 | $label = $this->getSearchLabel( $outputmode ); |
147 | 148 | } else { |
| 149 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
148 | 150 | $label = wfMsgForContent( 'smw_json_link' ); |
149 | 151 | } |
150 | 152 | $link = $res->getQueryLink( $label ); |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_Table.php |
— | — | @@ -14,6 +14,7 @@ |
15 | 15 | class SMWTableResultPrinter extends SMWResultPrinter { |
16 | 16 | |
17 | 17 | public function getName() { |
| 18 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
18 | 19 | return wfMsg( 'smw_printername_' . $this->mFormat ); |
19 | 20 | } |
20 | 21 | |
Index: trunk/extensions/SemanticMediaWiki/includes/articlepages/SMW_ConceptPage.php |
— | — | @@ -74,6 +74,7 @@ |
75 | 75 | */ |
76 | 76 | protected function getPages() { |
77 | 77 | wfProfileIn( __METHOD__ . ' (SMW)' ); |
| 78 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
78 | 79 | $r = ''; |
79 | 80 | $ti = htmlspecialchars( $this->mTitle->getText() ); |
80 | 81 | $nav = $this->getNavigationLinks(); |
Index: trunk/extensions/SemanticMediaWiki/includes/articlepages/SMW_TypePage.php |
— | — | @@ -62,6 +62,7 @@ |
63 | 63 | */ |
64 | 64 | protected function getPages() { |
65 | 65 | wfProfileIn( __METHOD__ . ' (SMW)' ); |
| 66 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
66 | 67 | $r = ''; |
67 | 68 | $typevalue = $this->m_typevalue; |
68 | 69 | if ( $typevalue->isBuiltIn() ) { |
Index: trunk/extensions/SemanticMediaWiki/includes/articlepages/SMW_PropertyPage.php |
— | — | @@ -77,6 +77,7 @@ |
78 | 78 | */ |
79 | 79 | protected function getPages() { |
80 | 80 | wfProfileIn( __METHOD__ . ' (SMW)' ); |
| 81 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
81 | 82 | $r = ''; |
82 | 83 | $ti = htmlspecialchars( $this->mTitle->getText() ); |
83 | 84 | if ( count( $this->subproperties ) > 0 ) { |
Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_QueryResult.php |
— | — | @@ -205,6 +205,7 @@ |
206 | 206 | } |
207 | 207 | |
208 | 208 | if ( $caption == false ) { |
| 209 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
209 | 210 | $caption = ' ' . wfMsgForContent( 'smw_iq_moreresults' ); // The space is right here, not in the QPs! |
210 | 211 | } |
211 | 212 | |
Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_Query.php |
— | — | @@ -170,6 +170,7 @@ |
171 | 171 | $log = array(); |
172 | 172 | $this->m_description = $this->m_description->prune( $maxsize, $maxdepth, $log ); |
173 | 173 | if ( count( $log ) > 0 ) { |
| 174 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
174 | 175 | $this->m_errors[] = wfMsgForContent( 'smw_querytoolarge', str_replace( '[', '[', implode( ', ' , $log ) ) ); |
175 | 176 | } |
176 | 177 | } |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_URI.php |
— | — | @@ -48,6 +48,7 @@ |
49 | 49 | } |
50 | 50 | |
51 | 51 | protected function parseUserValue( $value ) { |
| 52 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
52 | 53 | $value = trim( $value ); |
53 | 54 | $this->m_url = ''; |
54 | 55 | $this->m_uri = ''; |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_SetupLight.php |
— | — | @@ -266,6 +266,7 @@ |
267 | 267 | * Adds links to Admin Links page |
268 | 268 | **/ |
269 | 269 | function smwfAddToAdminLinks( &$admin_links_tree ) { |
| 270 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
270 | 271 | $data_structure_section = new ALSection( wfMsg( 'smw_adminlinks_datastructure' ) ); |
271 | 272 | // $smw_row = new ALRow( 'smw' ); |
272 | 273 | // $smw_row->addItem( ALItem::newFromSpecialPage( 'Categories' ) ); |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_Embedded.php |
— | — | @@ -38,6 +38,7 @@ |
39 | 39 | } |
40 | 40 | |
41 | 41 | public function getName() { |
| 42 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
42 | 43 | return wfMsg( 'smw_printername_embedded' ); |
43 | 44 | } |
44 | 45 | |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_CSV.php |
— | — | @@ -36,6 +36,7 @@ |
37 | 37 | } |
38 | 38 | |
39 | 39 | public function getName() { |
| 40 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
40 | 41 | return wfMsg( 'smw_printername_csv' ); |
41 | 42 | } |
42 | 43 | |
— | — | @@ -70,6 +71,7 @@ |
71 | 72 | if ( $this->getSearchLabel( $outputmode ) ) { |
72 | 73 | $label = $this->getSearchLabel( $outputmode ); |
73 | 74 | } else { |
| 75 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
74 | 76 | $label = wfMsgForContent( 'smw_csv_link' ); |
75 | 77 | } |
76 | 78 | |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DataValueFactory.php |
— | — | @@ -87,6 +87,7 @@ |
88 | 88 | } elseif ( ( $typeid != '' ) && ( $typeid { 0 } != '_' ) ) { // custom type with linear conversion |
89 | 89 | $result = new self::$mTypeClasses['__lin']( $typeid ); |
90 | 90 | } else { // type really unknown |
| 91 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
91 | 92 | return new SMWErrorValue( wfMsgForContent( 'smw_unknowntype', $typeid ), $value, $caption ); |
92 | 93 | } |
93 | 94 | |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_String.php |
— | — | @@ -18,6 +18,7 @@ |
19 | 19 | protected $m_value = ''; |
20 | 20 | |
21 | 21 | protected function parseUserValue( $value ) { |
| 22 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
22 | 23 | if ( $value != '' ) { |
23 | 24 | $this->m_value = $value; |
24 | 25 | if ( ( $this->m_typeid != '_txt' ) && ( $this->m_typeid != '_cod' ) && ( strlen( $this->m_value ) > 255 ) ) { // limit size (for DB indexing) |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php |
— | — | @@ -238,6 +238,7 @@ |
239 | 239 | * Adds links to Admin Links page |
240 | 240 | **/ |
241 | 241 | function smwfAddToAdminLinks( &$admin_links_tree ) { |
| 242 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
242 | 243 | $data_structure_section = new ALSection( wfMsg( 'smw_adminlinks_datastructure' ) ); |
243 | 244 | $smw_row = new ALRow( 'smw' ); |
244 | 245 | $smw_row->addItem( ALItem::newFromSpecialPage( 'Categories' ) ); |
— | — | @@ -312,6 +313,7 @@ |
313 | 314 | */ |
314 | 315 | function smwfShowBrowseLink( $skintemplate ) { |
315 | 316 | if ( $skintemplate->data['isarticle'] ) { |
| 317 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
316 | 318 | $browselink = SMWInfolink::newBrowsingLink( wfMsg( 'smw_browselink' ), |
317 | 319 | $skintemplate->data['titleprefixeddbkey'], false ); |
318 | 320 | echo "<li id=\"t-smwbrowselink\">" . $browselink->getHTML() . "</li>"; |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Property.php |
— | — | @@ -310,6 +310,7 @@ |
311 | 311 | $result = SMWDataValueFactory::newTypeIDValue( '__typ' ); |
312 | 312 | $result->setDBkeys( array( $smwgPDefaultType ) ); |
313 | 313 | } else { // many types given, error |
| 314 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
314 | 315 | $result = SMWDataValueFactory::newTypeIDValue( '__typ' ); |
315 | 316 | $result->setDBkeys( array( '__err' ) ); |
316 | 317 | $result->addError( wfMsgForContent( 'smw_manytypes' ) ); |
— | — | @@ -364,6 +365,7 @@ |
365 | 366 | return $text; |
366 | 367 | } else { |
367 | 368 | SMWOutputs::requireHeadItem( SMW_HEADER_TOOLTIP ); |
| 369 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
368 | 370 | return '<span class="smwttinline"><span class="smwbuiltin">' . $text . |
369 | 371 | '</span><span class="smwttcontent">' . wfMsgForContent( 'smw_isspecprop' ) . '</span></span>'; |
370 | 372 | } |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Number.php |
— | — | @@ -41,6 +41,8 @@ |
42 | 42 | $this->m_unitin = false; |
43 | 43 | $this->m_unitvalues = false; |
44 | 44 | |
| 45 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
| 46 | + |
45 | 47 | // Parse to find value and unit |
46 | 48 | $decseparator = wfMsgForContent( 'smw_decseparator' ); |
47 | 49 | $kiloseparator = wfMsgForContent( 'smw_kiloseparator' ); |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Bool.php |
— | — | @@ -18,6 +18,7 @@ |
19 | 19 | protected $m_falsecaption = null; // a desired label for "false" if given |
20 | 20 | |
21 | 21 | protected function parseUserValue( $value ) { |
| 22 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
22 | 23 | $value = trim( $value ); |
23 | 24 | $lcv = strtolower( $value ); |
24 | 25 | $this->m_value = null; |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_RefreshTab.php |
— | — | @@ -20,6 +20,7 @@ |
21 | 21 | function smwfAddRefreshTab( $skin, &$content_actions ) { |
22 | 22 | global $wgUser; |
23 | 23 | if ( $wgUser->isAllowed( 'delete' ) ) { |
| 24 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
24 | 25 | $content_actions['purge'] = array( |
25 | 26 | 'class' => false, |
26 | 27 | 'text' => wfMsg( 'smw_purge' ), |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Time.php |
— | — | @@ -209,6 +209,7 @@ |
210 | 210 | // handle direct entry of Julian or Modified Julian days here; don't bother browsing for times. |
211 | 211 | if ( ( $this->m_pref == 'JD' ) || ( $this->m_pref == 'MJD' ) ) { |
212 | 212 | if ( !( is_numeric( $filteredvalue ) ) ) {// Immediate error check |
| 213 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
213 | 214 | $this->addError( wfMsgForContent( 'smw_nodatetime', $value ) ); |
214 | 215 | return true; |
215 | 216 | } |
— | — | @@ -286,6 +287,7 @@ |
287 | 288 | $band = $band | $this->checkDigit( $tmp ); |
288 | 289 | } |
289 | 290 | } else { |
| 291 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
290 | 292 | $this->addError( wfMsgForContent( 'smw_nodatetime', $value ) ); |
291 | 293 | return true; |
292 | 294 | } |
— | — | @@ -313,15 +315,19 @@ |
314 | 316 | |
315 | 317 | // error catching |
316 | 318 | if ( !$found ) { // no band matches the entered date |
| 319 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
317 | 320 | $this->addError( wfMsgForContent( 'smw_nodatetime', $value ) ); |
318 | 321 | return true; |
319 | 322 | } elseif ( ( $this->m_day > 0 ) && ( $this->m_day > self::$m_daysofmonths[$this->m_month] ) ) { // date does not exist in Gregorian calendar |
| 323 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
320 | 324 | $this->addError( wfMsgForContent( 'smw_nodatetime', $value ) ); |
321 | 325 | return true; |
322 | 326 | } elseif ( ( $this->m_dayj > 0 ) && ( $this->m_dayj > self::$m_daysofmonths[$this->m_monthj] ) ) { // date does not exist in Julian calendar |
| 327 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
323 | 328 | $this->addError( wfMsgForContent( 'smw_nodatetime', $value ) ); |
324 | 329 | return true; |
325 | 330 | } elseif ( ( $this->m_yearj != false ) && ( $this->m_yearj < - 4713 ) && ( $this->m_timeoffset != 0 ) ) { // no support for time offsets if year < -4713 |
| 331 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
326 | 332 | $this->addError( wfMsgForContent( 'smw_nodatetime', $value ) ); |
327 | 333 | return true; |
328 | 334 | } |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php |
— | — | @@ -148,6 +148,7 @@ |
149 | 149 | */ |
150 | 150 | function smwfNumberFormat( $value, $decplaces = 3 ) { |
151 | 151 | global $smwgMaxNonExpNumber; |
| 152 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
152 | 153 | $decseparator = wfMsgForContent( 'smw_decseparator' ); |
153 | 154 | |
154 | 155 | // If number is a trillion or more, then switch to scientific |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_WikiPage.php |
— | — | @@ -85,9 +85,11 @@ |
86 | 86 | $this->m_title = Title::newFromText( $value, $this->m_fixNamespace ); |
87 | 87 | ///TODO: Escape the text so users can see any punctuation problems (bug 11666). |
88 | 88 | if ( $this->m_title === null ) { |
| 89 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
89 | 90 | $this->addError( wfMsgForContent( 'smw_notitle', $value ) ); |
90 | 91 | } elseif ( ( $this->m_fixNamespace != NS_MAIN ) && |
91 | 92 | ( $this->m_fixNamespace != $this->m_title->getNamespace() ) ) { |
| 93 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
92 | 94 | $this->addError( wfMsgForContent( 'smw_wrong_namespace', $wgContLang->getNsText( $this->m_fixNamespace ) ) ); |
93 | 95 | } |
94 | 96 | if ( $this->m_title !== null ) { |
— | — | @@ -103,6 +105,7 @@ |
104 | 106 | } |
105 | 107 | } |
106 | 108 | } else { |
| 109 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
107 | 110 | $this->addError( wfMsgForContent( 'smw_notitle', $value ) ); |
108 | 111 | } |
109 | 112 | if ( $this->m_caption === false ) { |
— | — | @@ -121,6 +124,7 @@ |
122 | 125 | $this->m_prefixedtext = false; |
123 | 126 | $this->m_caption = false; |
124 | 127 | if ( ( $this->m_fixNamespace != NS_MAIN ) && ( $this->m_fixNamespace != $this->m_namespace ) ) { |
| 128 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
125 | 129 | $this->addError( wfMsgForContent( 'smw_notitle', $this->getPrefixedText() ) ); |
126 | 130 | } |
127 | 131 | } |
— | — | @@ -266,6 +270,7 @@ |
267 | 271 | } |
268 | 272 | if ( $this->m_title === null ) { // should not normally happen, but anyway ... |
269 | 273 | global $wgContLang; |
| 274 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
270 | 275 | $this->addError( wfMsgForContent( 'smw_notitle', $wgContLang->getNsText( $this->m_namespace ) . ':' . $this->m_dbkeyform ) ); |
271 | 276 | $this->m_dbkeyform = ''; |
272 | 277 | } |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Types.php |
— | — | @@ -42,6 +42,7 @@ |
43 | 43 | $typenamespace = $wgContLang->getNsText( SMW_NS_TYPE ); |
44 | 44 | $id = SMWDataValueFactory::findTypeID( $this->m_reallabel ); |
45 | 45 | if ( $id { 0 } == '_' ) { // builtin |
| 46 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
46 | 47 | SMWOutputs::requireHeadItem( SMW_HEADER_TOOLTIP ); |
47 | 48 | return '<span class="smwttinline"><span class="smwbuiltin">[[' . $typenamespace . ':' . $this->m_reallabel . '|' . $this->m_reallabel . ']]</span><span class="smwttcontent">' . wfMsgForContent( 'smw_isknowntype' ) . '</span></span>'; |
48 | 49 | } else { |
— | — | @@ -58,6 +59,7 @@ |
59 | 60 | $title = $this->m_isalias ? Title::newFromText( $this->m_reallabel, SMW_NS_TYPE ) : $this->getTitle(); |
60 | 61 | $id = SMWDataValueFactory::findTypeID( $this->m_reallabel ); |
61 | 62 | if ( $id { 0 } == '_' ) { // builtin |
| 63 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
62 | 64 | SMWOutputs::requireHeadItem( SMW_HEADER_TOOLTIP ); |
63 | 65 | return '<span class="smwttinline"><span class="smwbuiltin">' . |
64 | 66 | $linker->makeLinkObj( $title, $this->m_reallabel ) . '</span><span class="smwttcontent">' . |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Linear.php |
— | — | @@ -166,6 +166,7 @@ |
167 | 167 | if ( count( $factors ) == 0 ) { // no custom type |
168 | 168 | // delete all previous errors, this is our real problem |
169 | 169 | /// TODO: probably we should check for this earlier, but avoid unnecessary DB requests ... |
| 170 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
170 | 171 | $this->addError( wfMsgForContent( 'smw_unknowntype', SMWDataValueFactory::findTypeLabel( $this->getTypeID() ) ) ); |
171 | 172 | return; |
172 | 173 | } |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_ParseData.php |
— | — | @@ -106,6 +106,7 @@ |
107 | 107 | $result = SMWDataValueFactory::newPropertyObjectValue( $property, $value, $caption ); |
108 | 108 | |
109 | 109 | if ( $property->isInverse() ) { |
| 110 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
110 | 111 | $result->addError( wfMsgForContent( 'smw_noinvannot' ) ); |
111 | 112 | } elseif ( $storeAnnotation && ( self::getSMWData( $parser ) !== null ) ) { |
112 | 113 | self::getSMWData( $parser )->addPropertyObjectValue( $property, $result ); |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DataValue.php |
— | — | @@ -158,6 +158,7 @@ |
159 | 159 | $this->parseUserValue( $value ); // may set caption if not set yet, depending on datavalue |
160 | 160 | $this->m_isset = true; |
161 | 161 | } else { |
| 162 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
162 | 163 | $this->addError( wfMsgForContent( 'smw_parseerror' ) ); |
163 | 164 | } |
164 | 165 | |
— | — | @@ -258,6 +259,7 @@ |
259 | 260 | $servicelinks = smwfGetStore()->getPropertyValues( $this->m_property->getWikiPageValue(), SMWPropertyValue::makeProperty( '_SERV' ) ); |
260 | 261 | |
261 | 262 | foreach ( $servicelinks as $dv ) { |
| 263 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
262 | 264 | |
263 | 265 | $args[0] = 'smw_service_' . str_replace( ' ', '_', $dv->getWikiValue() ); // messages distinguish ' ' from '_' |
264 | 266 | $text = call_user_func_array( 'wfMsgForContent', $args ); |
— | — | @@ -772,6 +774,7 @@ |
773 | 775 | } |
774 | 776 | |
775 | 777 | if ( !$accept ) { |
| 778 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
776 | 779 | $this->addError( wfMsgForContent( 'smw_notinenum', $this->getWikiValue(), $valuestring ) ); |
777 | 780 | } |
778 | 781 | } |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_Auto.php |
— | — | @@ -31,6 +31,7 @@ |
32 | 32 | } |
33 | 33 | |
34 | 34 | public function getName() { |
| 35 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
35 | 36 | return wfMsg( 'smw_printername_auto' ); |
36 | 37 | } |
37 | 38 | |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QueryPrinter.php |
— | — | @@ -123,6 +123,7 @@ |
124 | 124 | } elseif ( $this->mInline ) { |
125 | 125 | $label = $this->mSearchlabel; |
126 | 126 | if ( $label === null ) { // apply defaults |
| 127 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
127 | 128 | $label = wfMsgForContent( 'smw_iq_moreresults' ); |
128 | 129 | } |
129 | 130 | if ( $label != '' ) { |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_List.php |
— | — | @@ -44,11 +44,13 @@ |
45 | 45 | } |
46 | 46 | |
47 | 47 | public function getName() { |
| 48 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
48 | 49 | return wfMsg( 'smw_printername_' . $this->mFormat ); |
49 | 50 | } |
50 | 51 | |
51 | 52 | protected function getResultText( $res, $outputmode ) { |
52 | 53 | if ( ( $this->mFormat == 'template' ) && ( $this->mTemplate == false ) ) { |
| 54 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
53 | 55 | $res->addErrors( array( wfMsgForContent( 'smw_notemplategiven' ) ) ); |
54 | 56 | return ''; |
55 | 57 | } |
— | — | @@ -69,6 +71,7 @@ |
70 | 72 | $listsep = $this->mSep; |
71 | 73 | $finallistsep = $listsep; |
72 | 74 | } elseif ( $this->mFormat == 'list' ) { // make default list ", , , and " |
| 75 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
73 | 76 | $listsep = ', '; |
74 | 77 | $finallistsep = wfMsgForContent( 'smw_finallistconjunct' ) . ' '; |
75 | 78 | } else { // no default separators for format "template" |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_ParserExtensions.php |
— | — | @@ -215,6 +215,7 @@ |
216 | 216 | |
217 | 217 | $result = SMWQueryProcessor::getResultFromFunctionParams( $params, SMW_OUTPUT_WIKI ); |
218 | 218 | } else { |
| 219 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
219 | 220 | $result = smwfEncodeMessages( array( wfMsgForContent( 'smw_iq_disabled' ) ) ); |
220 | 221 | } |
221 | 222 | |
— | — | @@ -238,6 +239,7 @@ |
239 | 240 | |
240 | 241 | $result = SMWQueryProcessor::getResultFromFunctionParams( $params, SMW_OUTPUT_WIKI, SMWQueryProcessor::INLINE_QUERY, true ); |
241 | 242 | } else { |
| 243 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
242 | 244 | $result = smwfEncodeMessages( array( wfMsgForContent( 'smw_iq_disabled' ) ) ); |
243 | 245 | } |
244 | 246 | |
— | — | @@ -252,6 +254,8 @@ |
253 | 255 | static public function doConcept( &$parser ) { |
254 | 256 | global $smwgQDefaultNamespaces, $smwgQMaxSize, $smwgQMaxDepth, $wgContLang; |
255 | 257 | |
| 258 | + wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
| 259 | + |
256 | 260 | $title = $parser->getTitle(); |
257 | 261 | $pconc = SMWPropertyValue::makeProperty( '_CONC' ); |
258 | 262 | |