r19355 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r19354‎ | r19355 | r19356 >
Date:22:11, 16 January 2007
Author:hashar
Status:old
Tags:
Comment:
Implements #8650 : french translation.
Patch by Bertrand Grondin <bertrand.grondin@tiscali.fr>
Modified paths:
  • /trunk/extensions/Asksql/Asksql.i18n.php (added) (history)
  • /trunk/extensions/Asksql/Asksql_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Asksql/Asksql_body.php
@@ -1,22 +1,17 @@
22 <?php
33
4 -if (!defined('MEDIAWIKI'))
 4+if (!defined('MEDIAWIKI')) {
55 exit;
 6+}
67
 8+/** Load up the internationalization stuff */
79 global $wgMessageCache;
 10+require_once( 'Asksql.i18n.php' );
 11+foreach( efAsksqlMessages() as $lang => $messages ) {
 12+ $wgMessageCache->addMessages( $messages, $lang );
 13+}
814
9 -$wgMessageCache->addMessage('asksql', 'SQL query');
10 -$wgMessageCache->addMessage('asksqltext', "Use the form below to make a direct query of the
11 -database.
12 -Use single quotes ('like this') to delimit string literals.
13 -This can often add considerable load to the server, so please use
14 -this function sparingly.");
15 -$wgMessageCache->addMessage('sqlislogged', 'Please note that all queries are logged.');
16 -$wgMessageCache->addMessage('sqlquery', 'Enter query');
17 -$wgMessageCache->addMessage('querybtn', 'Submit query');
18 -$wgMessageCache->addMessage('selectonly', 'Only read-only queries are allowed.');
19 -$wgMessageCache->addMessage('querysuccessful', 'Query successful');
20 -
 15+/** Main class that define a new special page*/
2116 class SpecialAsksql extends SpecialPage {
2217
2318 function SpecialAsksql() {
@@ -34,7 +29,7 @@
3530 $wgOut->permissionRequired( 'asksql' );
3631 return;
3732 }
38 -
 33+
3934 if( $wgRequest->wasPosted() ) {
4035 $query = $wgRequest->getVal( 'wpSqlQuery' );
4136 $action = $wgRequest->getVal( 'action' );
Index: trunk/extensions/Asksql/Asksql.i18n.php
@@ -0,0 +1,43 @@
 2+<?php
 3+
 4+/**
 5+ * Internationalisation file for CountEdits extension
 6+ *
 7+ * @package MediaWiki
 8+ * @subpackage Extensions
 9+ * @author Bertrand Grondin <bertrand.grondin@tiscali.fr>
 10+ */
 11+
 12+function efAsksqlMessages() {
 13+ $messages = array(
 14+
 15+/* English (Rob Church) */
 16+'en' => array(
 17+ 'asksql' => 'SQL query',
 18+ 'asksqltext' => "Use the form below to make a direct query of the
 19+database.
 20+Use single quotes ('like this') to delimit string literals.
 21+This can often add considerable load to the server, so please use
 22+this function sparingly.",
 23+ 'sqlislogged' => 'Please note that all queries are logged.',
 24+ 'sqlquery' => 'Enter query',
 25+ 'querybtn' => 'Submit query',
 26+ 'selectonly' => 'Only read-only queries are allowed.',
 27+ 'querysuccessful' => 'Query successful',),
 28+
 29+/*French (Bertrand Grondin) */
 30+'fr' => array(
 31+ 'asksql' => 'Requête SQL',
 32+ 'asksqltext' => "Utilisez ce formulaire pour faire une requête directe dans la base de donnée.
 33+Utilisez les apostrophes ('comme ceci') pour les chaînes de caractères. Ceci peut souvent surcharger le serveur. Aussi, utilisez cette fonction avec parcimonie.",
 34+ 'sqlislogged' => 'Notez bien que toutes les requêtes sont journalisées.',
 35+ 'sqlquery' => 'Entrez la requête',
 36+ 'querybtn' => 'Soumettre la requête',
 37+ 'selectonly' => 'Seules, les requêtes en lectures seules sont permises.',
 38+ 'querysuccessful' => 'La requête a été exécutée avec succès.',),
 39+ );
 40+
 41+ return $messages;
 42+}
 43+
 44+?>
Property changes on: trunk/extensions/Asksql/Asksql.i18n.php
___________________________________________________________________
Added: svn:eol-style
145 + native