Index: trunk/extensions/Contributionseditcount/Contributionseditcount.i18n.php |
— | — | @@ -1,141 +1,135 @@ |
2 | 2 | <?php |
3 | | - |
4 | 3 | /** |
5 | | - * Messages file for the Contributionseditcount extension |
6 | | - */ |
7 | | - |
8 | | -function efContributionseditcountMessages() { |
9 | | - $messages = array( |
10 | | - |
11 | | -/* English */ |
12 | | -'en' => array( |
| 4 | + * Internationalisation file for extension Contributionseditcount. |
| 5 | + * |
| 6 | + * @addtogroup Extensions |
| 7 | +*/ |
| 8 | + |
| 9 | +$messages = array(); |
| 10 | + |
| 11 | +$messages['en'] = array( |
13 | 12 | 'contributionseditcount' => 'This user has $1 edits.', |
14 | | -), |
| 13 | +); |
15 | 14 | |
16 | | -'ar' => array( |
| 15 | +$messages['ar'] = array( |
17 | 16 | 'contributionseditcount' => 'هذا المستخدم لديه $1 تعديل.', |
18 | | -), |
| 17 | +); |
19 | 18 | |
20 | | -'bcl' => array( |
| 19 | +$messages['bcl'] = array( |
21 | 20 | 'contributionseditcount' => 'An parágamit na ini igwang $1 na mga hirá.', |
22 | | -), |
| 21 | +); |
23 | 22 | |
24 | | -'bg' => array( |
| 23 | +$messages['bg'] = array( |
25 | 24 | 'contributionseditcount' => 'Този потребител е направил $1 редакции.', |
26 | | -), |
| 25 | +); |
27 | 26 | |
28 | | -'bn' => array( |
| 27 | +$messages['bn'] = array( |
29 | 28 | 'contributionseditcount' => 'এ ব্যবহারকারীর $1 সম্পাদনা হয়েছে।', |
30 | | -), |
| 29 | +); |
31 | 30 | |
32 | | -'de' => array( |
| 31 | +$messages['de'] = array( |
33 | 32 | 'contributionseditcount' => 'Dieser Benutzer hat $1 Bearbeitungen.', |
34 | | -), |
| 33 | +); |
35 | 34 | |
36 | | -'el' => array( |
| 35 | +$messages['el'] = array( |
37 | 36 | 'contributionseditcount' => 'Αυτός ο χρήστης έχει κάνει $1 επεξεργασίες.', |
38 | | -), |
| 37 | +); |
39 | 38 | |
40 | | -'ext' => array( |
| 39 | +$messages['ext'] = array( |
41 | 40 | 'contributionseditcount' => 'Esti usuáriu á hechu $1 eicionis.', |
42 | | -), |
| 41 | +); |
43 | 42 | |
44 | | -'fi' => array( |
| 43 | +$messages['fi'] = array( |
45 | 44 | 'contributionseditcount' => 'Tällä käyttäjällä on $1 muokkausta.', |
46 | | -), |
| 45 | +); |
47 | 46 | |
48 | | -'fr' => array( |
| 47 | +$messages['fr'] = array( |
49 | 48 | 'contributionseditcount' => 'Cet utilisateur a {{PLURAL:$1|$1 édition|$1 éditions}}.', |
50 | | -), |
| 49 | +); |
51 | 50 | |
52 | | -'gl' => array( |
| 51 | +$messages['gl'] = array( |
53 | 52 | 'contributionseditcount' => 'Este usuario ten $1 edicións.', |
54 | | -), |
| 53 | +); |
55 | 54 | |
56 | | -'hsb' => array( |
| 55 | +$messages['hsb'] = array( |
57 | 56 | 'contributionseditcount' => 'Wužiwar ma $1 změnow.', |
58 | | -), |
| 57 | +); |
59 | 58 | |
60 | | -'it' => array( |
| 59 | +$messages['it'] = array( |
61 | 60 | 'contributionseditcount' => 'Questo utente ha $1 edit', |
62 | | -), |
| 61 | +); |
63 | 62 | |
64 | 63 | /** Luxembourgish (Lëtzebuergesch) |
65 | 64 | * @author Robby |
66 | 65 | */ |
67 | | -'lb' => array( |
| 66 | +$messages['lb'] = array( |
68 | 67 | 'contributionseditcount' => 'Dëse Benotzer huet $1 Kontributiounen.', |
69 | | -), |
| 68 | +); |
70 | 69 | |
71 | | -'nl' => array( |
| 70 | +$messages['nl'] = array( |
72 | 71 | 'contributionseditcount' => 'Deze gebruiker heeft $1 bewerkingen.', |
73 | | -), |
| 72 | +); |
74 | 73 | |
75 | | -'no' => array( |
| 74 | +$messages['no'] = array( |
76 | 75 | 'contributionseditcount' => 'Denne brukeren har $1 redigeringer.', |
77 | | -), |
| 76 | +); |
78 | 77 | |
79 | | -'oc' => array( |
| 78 | +$messages['oc'] = array( |
80 | 79 | 'contributionseditcount' => 'Aqueste utilizaire a {{PLURAL:$1|$1 edicion|$1 edicions}}.', |
81 | | -), |
| 80 | +); |
82 | 81 | |
83 | | -'pl' => array( |
| 82 | +$messages['pl'] = array( |
84 | 83 | 'contributionseditcount' => 'Ten użytkownik ma $1 edycji.', |
85 | | -), |
| 84 | +); |
86 | 85 | |
87 | | -'pms' => array( |
| 86 | +$messages['pms'] = array( |
88 | 87 | 'contributionseditcount' => 'St\'utent-sì a l\'ha fait $1 modìfiche.', |
89 | | -), |
| 88 | +); |
90 | 89 | |
91 | | -'pt' => array( |
| 90 | +$messages['pt'] = array( |
92 | 91 | 'contributionseditcount' => 'Este utilizador tem $1 edições.', |
93 | | -), |
| 92 | +); |
94 | 93 | |
95 | | -'sah' => array( |
| 94 | +$messages['sah'] = array( |
96 | 95 | 'contributionseditcount' => 'Бу кыттааччы $1 көннөрүүлээх.', |
97 | | -), |
| 96 | +); |
98 | 97 | |
99 | 98 | /** Slovak (Slovenčina) |
100 | 99 | * @author Helix84 |
101 | 100 | */ |
102 | | -'sk' => array( |
| 101 | +$messages['sk'] = array( |
103 | 102 | 'contributionseditcount' => 'Tento používateľ má $1 úprav.', |
104 | | -), |
| 103 | +); |
105 | 104 | |
106 | 105 | /** Seeltersk (Seeltersk) |
107 | 106 | * @author Pyt |
108 | 107 | */ |
109 | | -'stq' => array( |
| 108 | +$messages['stq'] = array( |
110 | 109 | 'contributionseditcount' => 'Dissen Benutser häd $1 Beoarbaidengen.', |
111 | | -), |
| 110 | +); |
112 | 111 | |
113 | 112 | /** Volapük (Volapük) |
114 | 113 | * @author Malafaya |
115 | 114 | */ |
116 | | -'vo' => array( |
| 115 | +$messages['vo'] = array( |
117 | 116 | 'contributionseditcount' => 'Geban at labon redakamis $1.', |
118 | | -), |
| 117 | +); |
119 | 118 | |
120 | | -'yue' => array( |
| 119 | +$messages['yue'] = array( |
121 | 120 | 'contributionseditcount' => '呢個用戶有 $1 次編輯。', |
122 | | -), |
| 121 | +); |
123 | 122 | |
124 | | -'zh-hans' => array( |
| 123 | +$messages['zh-hans'] = array( |
125 | 124 | 'contributionseditcount' => '这个用户拥有 $1 次编辑。', |
126 | | -), |
| 125 | +); |
127 | 126 | |
128 | | -'zh-hant' => array( |
| 127 | +$messages['zh-hant'] = array( |
129 | 128 | 'contributionseditcount' => '這個用戶擁有 $1 次編輯。', |
130 | | -), |
| 129 | +); |
131 | 130 | |
132 | | - ); |
133 | | - |
134 | | - $messages['zh'] = $messages['zh-hans']; |
135 | | - $messages['zh-cn'] = $messages['zh-hans']; |
136 | | - $messages['zh-hk'] = $messages['zh-hant']; |
137 | | - $messages['zh-sg'] = $messages['zh-hans']; |
138 | | - $messages['zh-tw'] = $messages['zh-hant']; |
139 | | - $messages['zh-yue'] = $messages['yue']; |
140 | | - |
141 | | - return $messages; |
142 | | -} |
| 131 | +$messages['zh'] = $messages['zh-hans']; |
| 132 | +$messages['zh-cn'] = $messages['zh-hans']; |
| 133 | +$messages['zh-hk'] = $messages['zh-hant']; |
| 134 | +$messages['zh-sg'] = $messages['zh-hans']; |
| 135 | +$messages['zh-tw'] = $messages['zh-hant']; |
| 136 | +$messages['zh-yue'] = $messages['yue']; |
Index: trunk/extensions/Contributionseditcount/Contributionseditcount.php |
— | — | @@ -15,10 +15,14 @@ |
16 | 16 | $wgExtensionFunctions[] = 'wfContributionseditcount'; |
17 | 17 | $wgExtensionCredits['other'][] = array( |
18 | 18 | 'name' => 'Contributionseditcount', |
19 | | - 'description' => 'displays an edit count on Special:Contributions', |
20 | | - 'author' => 'Ævar Arnfjörð Bjarmason' |
| 19 | + 'version' => '2008-01-11', |
| 20 | + 'description' => 'Displays an edit count on Special:Contributions', |
| 21 | + 'author' => 'Ævar Arnfjörð Bjarmason', |
| 22 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:Contributionseditcount', |
21 | 23 | ); |
22 | 24 | |
| 25 | +$wgExtensionMessagesFiles['Contributionseditcount'] = dirname( __FILE__ ) . '/Contributionseditcount.i18n.php'; |
| 26 | + |
23 | 27 | function wfContributionseditcount() { |
24 | 28 | |
25 | 29 | wfUsePHP( 5.0 ); |
— | — | @@ -27,21 +31,18 @@ |
28 | 32 | class Contributionseditcount { |
29 | 33 | |
30 | 34 | public function __construct() { |
31 | | - global $wgMessageCache, $wgHooks; |
32 | | - require_once( dirname( __FILE__ ) . '/Contributionseditcount.i18n.php' ); |
33 | | - foreach( efContributionseditcountMessages() as $lang => $messages ) |
34 | | - $wgMessageCache->addMessages( $messages, $lang ); |
| 35 | + global $wgHooks; |
35 | 36 | $wgHooks['SpecialContributionsBeforeMainOutput'][] = array( &$this, 'hook' ); |
36 | 37 | } |
37 | | - |
| 38 | + |
38 | 39 | public function hook( $uid ) { |
39 | 40 | global $wgOut, $wgLang; |
40 | 41 | if ( $uid != 0 ) |
| 42 | + wfLoadExtensionMessages( 'Contributionseditcount' ); |
41 | 43 | $wgOut->addWikiText( wfMsg( 'contributionseditcount', $wgLang->formatNum( User::edits( $uid ) ) ) ); |
42 | 44 | return true; |
43 | 45 | } |
44 | 46 | } |
45 | 47 | |
46 | 48 | new Contributionseditcount(); |
47 | | - |
48 | | -} |
\ No newline at end of file |
| 49 | +} |
Index: trunk/extensions/Translate/MessageGroups.php |
— | — | @@ -951,15 +951,11 @@ |
952 | 952 | } |
953 | 953 | |
954 | 954 | class ContributionseditcountMessageGroup extends ExtensionMessageGroup { |
955 | | - protected $fileExporter = null; |
956 | 955 | protected $label = 'Contributions Edit Count'; |
957 | 956 | protected $id = 'ext-contributionseditcount'; |
958 | 957 | |
959 | | - protected $functionName = 'efContributionseditcountMessages'; |
| 958 | + protected $arrName = 'messages'; |
960 | 959 | protected $messageFile = 'Contributionseditcount/Contributionseditcount.i18n.php'; |
961 | | - |
962 | | - protected $exportStart = '\'$CODE\' => array('; |
963 | | - protected $exportEnd = '),'; |
964 | 960 | } |
965 | 961 | |
966 | 962 | class ContributorsMessageGroup extends ExtensionMessageGroup { |