r28564 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r28563‎ | r28564 | r28565 >
Date:20:17, 16 December 2007
Author:siebrand
Status:old
Tags:
Comment:
* Adding i18n file (submitted by Bertrand Grondin)
* remove trailing whitespace, fix indentation
Modified paths:
  • /trunk/extensions/Seealso/Seealso.i18n.php (added) (history)
  • /trunk/extensions/Seealso/Seealso.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Seealso/Seealso.i18n.php
@@ -0,0 +1,22 @@
 2+<?php
 3+/**
 4+ * Internationalisation file for extension Seealso.
 5+ *
 6+ * @addtogroup Extensions
 7+*/
 8+
 9+$messages = array();
 10+
 11+/** English
 12+ * @author Magnus Manske
 13+ */
 14+$messages['en'] = array(
 15+ 'seealso' => 'See also',
 16+);
 17+
 18+/** French (Français)
 19+ * @author Bertrand GRONDIN
 20+ */
 21+$messages['fr'] = array(
 22+ 'seealso' => 'Voir aussi',
 23+);
Property changes on: trunk/extensions/Seealso/Seealso.i18n.php
___________________________________________________________________
Added: svn:eol-style
124 + native
Index: trunk/extensions/Seealso/Seealso.php
@@ -11,20 +11,30 @@
1212 Set system message "seealso_local" to use a localized version, e.g., to "sieheauch"
1313 */
1414
 15+$wgExtensionCredits['parserhook'][] = array(
 16+ 'name' => 'Seealso',
 17+ 'url' => 'http://www.mediawiki.org/wiki/Extension:See_also',
 18+ 'author' => 'Magnus Manske',
 19+ 'description' => 'Localised \'See also\' headings using the tag <nowiki><seealso></nowiki>',
 20+);
1521
1622 $wgExtensionFunctions[] = "wfSeealso";
1723
 24+$dir = dirname(__FILE__) . '/';
 25+$wgExtensionMessagesFiles['seealso'] = $dir . 'Seealso.i18n.php';
 26+
1827 function wfSeealso () {
 28+ wfLoadExtensionMessages( 'seealso' );
1929 global $wgParser ;
20 - $wgParser->setHook ( "seealso" , 'parse_seealso' ) ;
21 - $l = trim ( wfMsg ( "seealso_local" , "" ) ) ;
 30+ $wgParser->setHook ('seealso', 'parse_seealso' ) ;
 31+ $l = trim ( 'seealso-local', "" ) ;
2232 if ( $l != "" )
23 - $wgParser->setHook ( $l , 'parse_seealso' ) ;
 33+ $wgParser->setHook ( $l , 'parse_seealso' ) ;
2434 }
2535
2636 function parse_seealso ( $text, $params, &$parser ) {
2737 $a = explode ( "\n" , $text ) ;
28 - $ret = "== " . trim ( wfMsg ( "seealso" ) ) . " ==\n" ;
 38+ $ret = "== " . trim ( wfMsg('seealso')) . " ==\n" ;
2939 foreach ( $a AS $x ) {
3040 $x = trim ( $x ) ;
3141 if ( $x == "" ) continue ;
@@ -35,5 +45,3 @@
3646 $ret = $ret->getText();
3747 return $ret ;
3848 }
39 -
40 -

Status & tagging log