r49421 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49420‎ | r49421 | r49422 >
Date:14:24, 12 April 2009
Author:ialex
Status:deferred
Tags:
Comment:
* Add i18n file
* svn:eol-style native
Modified paths:
  • /trunk/extensions/WikiArticleFeeds/WikiArticleFeeds.i18n.php (added) (history)
  • /trunk/extensions/WikiArticleFeeds/WikiArticleFeeds.php (modified) (history)

Diff [purge]

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
116 + native
Index: trunk/extensions/WikiArticleFeeds/WikiArticleFeeds.php
@@ -109,9 +109,14 @@
110110 'author'=>'Jim Wilson (wilson.jim.r&lt;at&gt;gmail.com)',
111111 'url'=>'http://jimbojw.com/wiki/index.php?title=WikiArticleFeeds',
112112 'description'=>'Produces feeds generated from MediaWiki articles.',
 113+ 'descriptionmsg' => 'wikiarticlefeeds-desc',
113114 'version'=>WIKIARTICLEFEEDS_VERSION
114115 );
115116
 117+$dir = dirname( __FILE__ ) . '/';
 118+
 119+$wgExtensionMessagesFiles['WikiArticleFeeds'] = $dir . 'WikiArticleFeeds.i18n.php';
 120+
116121 /**
117122 * Wrapper class for consolidating all WAF related parser methods
118123 */
@@ -410,7 +415,7 @@
411416 */
412417 function wfGenerateWikiFeed($article, $feedFormat = 'atom', $filterTags = null) {
413418
414 - global $wgOut, $wgScript, $wgServer, $wgFeedClasses, $wgMessageCache, $wgVersion, $wgSitename;
 419+ global $wgOut, $wgScript, $wgServer, $wgFeedClasses, $wgVersion, $wgSitename;
415420
416421 # Setup, handle redirects
417422 if ($article->isRedirect()) {
@@ -422,8 +427,6 @@
423428 $title = $article->getTitle();
424429 $feedUrl = $title->getFullUrl();
425430
426 - $wgMessageCache->addMessage('wikiarticlefeeds_combined_description', 'This is a combination feed, containing items from several feed sources.');
427 -
428431 # Parse page into feed items.
429432 $content = $wgOut->parse($article->getContent()."\n__NOEDITSECTION__ __NOTOC__");
430433 preg_match_all(
@@ -462,6 +465,7 @@
463466 if (!$feedDescription) {
464467 $feedDescription = $segDesc;
465468 } else {
 469+ wfLoadExtensionMessages( 'WikiArticleFeeds' );
466470 $feedDescription = wfMsg('wikiarticlefeeds_combined_description');
467471 }
468472 }
Property changes on: trunk/extensions/WikiArticleFeeds/WikiArticleFeeds.php
___________________________________________________________________
Name: svn:eol-style
469473 + native

Status & tagging log