Index: trunk/extensions/RecordAdmin/SpecialRecordAdmin.18n.php |
— | — | @@ -1,11 +1,15 @@ |
2 | 2 | <?php |
3 | | -#Internationalisation message file of Record Admin extension |
4 | | - |
| 3 | +/*Internationalisation message file of Record Admin extension |
| 4 | +* Created by Bertrand GRONDIN |
| 5 | +* |
| 6 | +* @addtogroup Extensions |
| 7 | +* |
| 8 | +*/ |
5 | 9 | $messages=array(); |
6 | 10 | |
7 | 11 | $messages['en'] = array ( |
8 | 12 | 'recordadmin' => 'Record Administration', |
9 | | - 'recordadmin-desc' => 'A special page for finding and editing record articles using a form', |
| 13 | + 'recordadmin-desc' => 'A special page for finding and editing record pages using a form', |
10 | 14 | 'recordadmin-select' => 'Select the type of record to search for ', |
11 | 15 | 'recordadmin-newsearch' => 'New $1 search', |
12 | 16 | 'recordadmin-newrecord' => 'Select another record type', |
— | — | @@ -29,12 +33,15 @@ |
30 | 34 | 'recordadmin-buttonsave' => 'Save', |
31 | 35 | 'recordadmin-noform' => 'There is no form associated with "$1" records!', |
32 | 36 | 'recordadmin-createlink' => 'click <a href=$1>here</a> to create one', |
33 | | - 'recordadmin-newcreated' => 'New $type created from public form', |
| 37 | + 'recordadmin-newcreated' => 'New $1 created from public form', |
| 38 | + 'recordadmin-summary-typecreated' => 'New $1 created', |
| 39 | + 'recordadmin-viewlink' => '(<a href="$1">view</a>)', |
| 40 | + 'recordadmin-editlink' => '<a href="$1").">edit</a>', |
34 | 41 | ); |
35 | 42 | |
36 | 43 | $messages['fr'] = array ( |
37 | 44 | 'recordadmin' => 'Gestion des enregistrements', |
38 | | - 'recordadmin-desc' => 'Une page spéciale pour trouver et modifier l’enregistrement des articles par l’utilisation d’un formulaire', |
| 45 | + 'recordadmin-desc' => 'Une page spéciale pour trouver et modifier l’enregistrement des pages par l’utilisation d’un formulaire', |
39 | 46 | 'recordadmin-select' => 'Sélectionner le type d’enregistrement à rechercher pour', |
40 | 47 | 'recordadmin-newsearch' => 'Nouvelle recherche $1', |
41 | 48 | 'recordadmin-newrecord' => 'Sélectionner un autre type d’enregistrement', |
— | — | @@ -57,4 +64,8 @@ |
58 | 65 | 'recordadmin-buttonsave' => 'Sauvegarder', |
59 | 66 | 'recordadmin-noform' => 'Il n’y a aucun formulaire avec l’enregistrement « $1 » !', |
60 | 67 | 'recordadmin-createlink' => 'cliquez <a href=$1>ici</a> pour en créer un', |
| 68 | + 'recordadmin-newcreated' => 'Nouveau $1 créé à partir d’un formulaire public', |
| 69 | + 'recordadmin-summary-typecreated' => 'Nouveau $1 de créer', |
| 70 | + 'recordadmin-viewlink' => 'voir', |
| 71 | + 'recordadmin-editlink' => 'modifier', |
61 | 72 | ); |
Index: trunk/extensions/RecordAdmin/SpecialRecordAdmin.alias.php |
— | — | @@ -0,0 +1,15 @@ |
| 2 | +<?php |
| 3 | +/**Internationalization aliases for RecordAdmin extension |
| 4 | +* |
| 5 | +* @addtogroup Extensions |
| 6 | +*/ |
| 7 | + |
| 8 | +$aliases = array(); |
| 9 | + |
| 10 | +$aliases['en'] = array( |
| 11 | + RecordAdmin => array(RecordAdmin), |
| 12 | +); |
| 13 | + |
| 14 | +$aliases['fr'] = array( |
| 15 | + RecordAdmin => array(GérerEnregistrement), |
| 16 | +); |
Property changes on: trunk/extensions/RecordAdmin/SpecialRecordAdmin.alias.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 17 | + native |
Index: trunk/extensions/RecordAdmin/SpecialRecordAdmin.php |
— | — | @@ -10,17 +10,18 @@ |
11 | 11 | |
12 | 12 | if (!defined('MEDIAWIKI')) die('Not an entry point.'); |
13 | 13 | |
14 | | -define('RECORDADMIN_VERSION','0.2, 2008-10-31'); |
| 14 | +define('RECORDADMIN_VERSION','0.2.1, 2008-10-31'); |
15 | 15 | |
16 | 16 | $wgRecordAdminCategory = 'Records'; # Category which contains the templates used as records and having corresponding forms |
17 | 17 | $wgRecordAdminUseNamespaces = false; # Whether record articles should be in a namespace of the same name as their type |
18 | 18 | $dir = dirname(__FILE__) . '/'; |
19 | 19 | $wgExtensionMessagesFiles['RecordAdmin'] = $dir . 'SpecialRecordAdmin.18n.php'; |
| 20 | +$wgExtensionAliasesFiles['RecordAdmin'] = $dir . 'SpecialRecordAdmin.alias.php'; |
20 | 21 | $wgExtensionFunctions[] = 'wfSetupRecordAdmin'; |
21 | 22 | |
22 | 23 | $wgExtensionCredits['specialpage'][] = array( |
23 | 24 | 'name' => 'Record administration', |
24 | | - 'author' => '[http://www.organicdesign.co.nz/nad User:Nad]', |
| 25 | + 'author' => '[http://www.organicdesign.co.nz/nad User:Nad], Bertrand GRONDIN', |
25 | 26 | 'description' => 'A special page for finding and editing record articles using a form', |
26 | 27 | 'descriptionmsg' => 'recordadmin-desc', |
27 | 28 | 'url' => 'http://www.organicdesign.co.nz/Extension:SpecialExample', |
— | — | @@ -39,7 +40,6 @@ |
40 | 41 | var $guid = ''; |
41 | 42 | |
42 | 43 | function __construct() { |
43 | | - wfLoadExtensionMessages ('RecordAdmin'); |
44 | 44 | # Name to use for creating a new record either via RecordAdmin or a public form |
45 | 45 | # todo: should add a hook here for custom default-naming |
46 | 46 | $this->guid = strftime('%Y%m%d', time()).'-'.substr(strtoupper(uniqid()), -5); |
— | — | @@ -59,6 +59,7 @@ |
60 | 60 | */ |
61 | 61 | function execute($param) { |
62 | 62 | global $wgOut, $wgRequest, $wgRecordAdminCategory, $wgRecordAdminUseNamespaces; |
| 63 | + wfLoadExtensionMessages ('RecordAdmin'); |
63 | 64 | $this->setHeaders(); |
64 | 65 | $type = $wgRequest->getText('wpType') or $type = $param; |
65 | 66 | $record = $wgRequest->getText('wpRecord'); |
— | — | @@ -124,7 +125,7 @@ |
125 | 126 | |
126 | 127 | # Attempt to create the article |
127 | 128 | $article = new Article($t); |
128 | | - $summary = "[[Special:RecordAdmin/$type|RecordAdmin]]: New $type created"; |
| 129 | + $summary = "[[Special:RecordAdmin/$type|RecordAdmin]]:".wfMsg('recordadmin-summary-typecreated'); |
129 | 130 | $text = ''; |
130 | 131 | foreach ($posted as $k => $v) if ($v) { |
131 | 132 | if ($this->types[$k] == 'bool') $v = 'yes'; |
— | — | @@ -218,8 +219,8 @@ |
219 | 220 | $t = $r[0]; |
220 | 221 | $k = $r[1]; |
221 | 222 | $stripe = $stripe ? '' : ' class="stripe"'; |
222 | | - $table .= "<tr$stripe><td class='col1'>(<a href='".$t->getLocalURL()."'>view</a>)"; |
223 | | - $table .= "(<a href='".$title->getLocalURL("wpType=$type&wpRecord=$k")."'>edit</a>)</td>\n"; |
| 223 | + $table .= "<tr$stripe><td class='col1'>(<a href='".$t->getLocalURL()."'>".wfMsg('recordadmin-viewlink')."</a>)"; |
| 224 | + $table .= "(<a href='".$title->getLocalURL("wpType=$type&wpRecord=$k")."'>".wfMsg('recordadmin-editlink')."</a>)</td>\n"; |
224 | 225 | $table .= "<td class='col2'>$ts</td>\n"; |
225 | 226 | $i = 0; |
226 | 227 | foreach (array_keys($this->types) as $k) { |