Index: trunk/extensions/WikiArticleFeeds/WikiArticleFeeds.i18n.php |
— | — | @@ -0,0 +1,14 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Internationalisation file for extension WikiArticleFeeds. |
| 5 | + * |
| 6 | + * @file |
| 7 | + * @ingroup Extensions |
| 8 | + */ |
| 9 | + |
| 10 | +$messages = array(); |
| 11 | + |
| 12 | +$messages['en'] = array( |
| 13 | + 'wikiarticlefeeds-desc' => 'Produces feeds generated from MediaWiki articles.', |
| 14 | + 'wikiarticlefeeds_combined_description' => 'This is a combination feed, containing items from several feed sources.', |
| 15 | +); |
\ No newline at end of file |
Property changes on: trunk/extensions/WikiArticleFeeds/WikiArticleFeeds.i18n.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 16 | + native |
Index: trunk/extensions/WikiArticleFeeds/WikiArticleFeeds.php |
— | — | @@ -109,9 +109,14 @@ |
110 | 110 | 'author'=>'Jim Wilson (wilson.jim.r<at>gmail.com)', |
111 | 111 | 'url'=>'http://jimbojw.com/wiki/index.php?title=WikiArticleFeeds', |
112 | 112 | 'description'=>'Produces feeds generated from MediaWiki articles.', |
| 113 | + 'descriptionmsg' => 'wikiarticlefeeds-desc', |
113 | 114 | 'version'=>WIKIARTICLEFEEDS_VERSION |
114 | 115 | ); |
115 | 116 | |
| 117 | +$dir = dirname( __FILE__ ) . '/'; |
| 118 | + |
| 119 | +$wgExtensionMessagesFiles['WikiArticleFeeds'] = $dir . 'WikiArticleFeeds.i18n.php'; |
| 120 | + |
116 | 121 | /** |
117 | 122 | * Wrapper class for consolidating all WAF related parser methods |
118 | 123 | */ |
— | — | @@ -410,7 +415,7 @@ |
411 | 416 | */ |
412 | 417 | function wfGenerateWikiFeed($article, $feedFormat = 'atom', $filterTags = null) { |
413 | 418 | |
414 | | - global $wgOut, $wgScript, $wgServer, $wgFeedClasses, $wgMessageCache, $wgVersion, $wgSitename; |
| 419 | + global $wgOut, $wgScript, $wgServer, $wgFeedClasses, $wgVersion, $wgSitename; |
415 | 420 | |
416 | 421 | # Setup, handle redirects |
417 | 422 | if ($article->isRedirect()) { |
— | — | @@ -422,8 +427,6 @@ |
423 | 428 | $title = $article->getTitle(); |
424 | 429 | $feedUrl = $title->getFullUrl(); |
425 | 430 | |
426 | | - $wgMessageCache->addMessage('wikiarticlefeeds_combined_description', 'This is a combination feed, containing items from several feed sources.'); |
427 | | - |
428 | 431 | # Parse page into feed items. |
429 | 432 | $content = $wgOut->parse($article->getContent()."\n__NOEDITSECTION__ __NOTOC__"); |
430 | 433 | preg_match_all( |
— | — | @@ -462,6 +465,7 @@ |
463 | 466 | if (!$feedDescription) { |
464 | 467 | $feedDescription = $segDesc; |
465 | 468 | } else { |
| 469 | + wfLoadExtensionMessages( 'WikiArticleFeeds' ); |
466 | 470 | $feedDescription = wfMsg('wikiarticlefeeds_combined_description'); |
467 | 471 | } |
468 | 472 | } |
Property changes on: trunk/extensions/WikiArticleFeeds/WikiArticleFeeds.php |
___________________________________________________________________ |
Name: svn:eol-style |
469 | 473 | + native |