r24834 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24833‎ | r24834 | r24835 >
Date:19:33, 15 August 2007
Author:robchurch
Status:old
Tags:
Comment:
(bug 10948)
* Introduce standard messages file
* French localisation c/o Bertrand GRONDIN
Modified paths:
  • /trunk/extensions/BlockTitles/BlockTitles.i18n.php (added) (history)
  • /trunk/extensions/BlockTitles/BlockTitles.php (modified) (history)

Diff [purge]

Index: trunk/extensions/BlockTitles/BlockTitles.i18n.php
@@ -0,0 +1,33 @@
 2+<?php
 3+
 4+/**
 5+ * Messages file for the BlockTitles extension
 6+ */
 7+
 8+/**
 9+ * Fetch extension messages
 10+ *
 11+ * @return array
 12+ */
 13+function efBlockTitlesMessages() {
 14+ $messages = array(
 15+
 16+/**
 17+ * English (Travis Derouin)
 18+ */
 19+'en' => array(
 20+ 'block_title_error_page_title' => 'Blocked Title',
 21+ 'block_title_error' => 'Sorry, the title of this article is not allowed to be saved.',
 22+),
 23+
 24+/**
 25+ * French (Bertrand Grondin)
 26+ */
 27+'fr' => array(
 28+ 'block_title_error_page_title' => 'Titre invalide',
 29+ 'block_title_error' => 'Désolé, le titre de cet article n’est pas autorisé à être sauvegardé.',
 30+),
 31+
 32+ );
 33+ return $messages;
 34+}
\ No newline at end of file
Property changes on: trunk/extensions/BlockTitles/BlockTitles.i18n.php
___________________________________________________________________
Added: svn:eol-style
135 + native
Index: trunk/extensions/BlockTitles/BlockTitles.php
@@ -14,7 +14,6 @@
1515 */
1616
1717 $wgExtensionFunctions[] = 'wfBlockTitles';
18 -
1918 $wgExtensionCredits['other'][] = array(
2019 'name' => 'BlockTitles',
2120 'author' => 'Travis Derouin',
@@ -31,12 +30,9 @@
3231
3332 function wfBlockTitles() {
3433 global $wgMessageCache;
35 - $wgMessageCache->addMessages(
36 - array(
37 - 'block_title_error_page_title' => 'Invalid Title',
38 - 'block_title_error' => 'Sorry, the title of this article is not allowed to be saved.',
39 - )
40 - );
 34+ require_once( dirname( __FILE__ ) . '/BlockTitles.i18n.php' );
 35+ foreach( efBlockTitlesMessages() as $lang => $messages )
 36+ $wgMessageCache->addMessages( $messages, $lang );
4137 }
4238
4339 function wfCheckBlockTitles (&$article ) {

Status & tagging log