Index: trunk/extensions/Translate/aliases.txt |
— | — | @@ -1,335 +0,0 @@ |
2 | | -Abuse filter |
3 | | -file = AbuseFilter/AbuseFilter.alias.php |
4 | | - |
5 | | -Admin Links |
6 | | -file = AdminLinks/AdminLinks.alias.php |
7 | | - |
8 | | -Advanced random |
9 | | -file = AdvancedRandom/AdvancedRandom.alias.php |
10 | | - |
11 | | -APC |
12 | | -file = APC/ViewAPC.alias.php |
13 | | - |
14 | | -Ask SQL |
15 | | -file = Asksql/Asksql.alias.php |
16 | | - |
17 | | -Bad images |
18 | | -file = BadImage/BadImage.alias.php |
19 | | - |
20 | | -Call |
21 | | -file = Call/Call.alias.php |
22 | | - |
23 | | -Category intersection |
24 | | -file = CategoryIntersection/CategoryIntersection.alias.php |
25 | | - |
26 | | -Category tree |
27 | | -file = CategoryTree/CategoryTree.alias.php |
28 | | - |
29 | | -CentralAuth |
30 | | -file = CentralAuth/CentralAuth.alias.php |
31 | | - |
32 | | -Change author |
33 | | -file = ChangeAuthor/ChangeAuthor.alias.php |
34 | | - |
35 | | -Check user |
36 | | -file = CheckUser/CheckUser.alias.php |
37 | | - |
38 | | -Chemistry |
39 | | -file = Chemistry/Chemicalsources.alias.php |
40 | | - |
41 | | -Cite special |
42 | | -file = Cite/SpecialCite.alias.php |
43 | | - |
44 | | -Close Wikis |
45 | | -file = CloseWikis/CloseWikis.alias.php |
46 | | - |
47 | | -Code review |
48 | | -file = CodeReview/CodeReview.alias.php |
49 | | - |
50 | | -Collection |
51 | | -file = Collection/Collection.alias.php |
52 | | - |
53 | | -CommunityVoice |
54 | | -file = CommunityVoice/CommunityVoice.alias.php |
55 | | - |
56 | | -Configure |
57 | | -file = Configure/Configure.alias.php |
58 | | - |
59 | | -Confirm account |
60 | | -file = ConfirmAccount/ConfirmAccount.alias.php |
61 | | - |
62 | | -Confirm edit |
63 | | -file = ConfirmEdit/ConfirmEdit.alias.php |
64 | | - |
65 | | -Contact page |
66 | | -file = ContactPage/ContactPage.alias.php |
67 | | - |
68 | | -Contributors |
69 | | -file = Contributors/Contributors.alias.php |
70 | | - |
71 | | -Contribution reporting |
72 | | -file = ContributionReporting/ContributionReporting.alias.php |
73 | | - |
74 | | -Contribution scores |
75 | | -file = ContributionScores/ContributionScores.alias.php |
76 | | - |
77 | | -Contribution tracking |
78 | | -file = ContributionTracking/ContributionTracking.alias.php |
79 | | - |
80 | | -Cooperation statistics |
81 | | -file = CooperationStatistics/CooperationStatistics.alias.php |
82 | | - |
83 | | -Cross namespace links |
84 | | -file = CrossNamespaceLinks/SpecialCrossNamespaceLinks.alias.php |
85 | | - |
86 | | -Count edits |
87 | | -file = CountEdits/CountEdits.alias.php |
88 | | - |
89 | | -Data transfer |
90 | | -file = DataTransfer/languages/DT_Aliases.php |
91 | | - |
92 | | -Delete batch |
93 | | -file = DeleteBatch/DeleteBatch.alias.php |
94 | | - |
95 | | -Delete queue |
96 | | -file = DeleteQueue/DeleteQueue.alias.php |
97 | | - |
98 | | -Drafts |
99 | | -file = Drafts/Drafts.alias.php |
100 | | - |
101 | | -Edit count |
102 | | -file = Editcount/SpecialEditcount.alias.php |
103 | | - |
104 | | -Edit user |
105 | | -file = EditUser/EditUser.alias.php |
106 | | - |
107 | | -Emergency DeSysop |
108 | | -file = EmergencyDeSysop/EmergencyDeSysop.alias.php |
109 | | - |
110 | | -Eval |
111 | | -file = Eval/SpecialEval.alias.php |
112 | | - |
113 | | -Expand templates |
114 | | -file = ExpandTemplates/ExpandTemplates.alias.php |
115 | | - |
116 | | -Farmer |
117 | | -file = Farmer/Farmer.alias.php |
118 | | - |
119 | | -Find spam |
120 | | -file = FindSpam/FindSpam.alias.php |
121 | | - |
122 | | -Flagged revisions |
123 | | -file = FlaggedRevs/language/FlaggedRevs.alias.php |
124 | | - |
125 | | -Gadgets |
126 | | -file = Gadgets/Gadgets.alias.php |
127 | | - |
128 | | -Global blocking |
129 | | -file = GlobalBlocking/GlobalBlocking.alias.php |
130 | | - |
131 | | -Global usage |
132 | | -file = GlobalUsage/GlobalUsage.alias.php |
133 | | - |
134 | | -Global user rights |
135 | | -file = GlobalUserrights/GlobalUserrights.alias.php |
136 | | - |
137 | | -Group permissions manager |
138 | | -file = GroupPermissionsManager/GroupPermissionsManager.alias.php |
139 | | - |
140 | | -Image tagging |
141 | | -file = ImageTagging/ImageTagging.alias.php |
142 | | - |
143 | | -Import free images |
144 | | -file = ImportFreeImages/ImportFreeImages.alias.php |
145 | | - |
146 | | -Import users |
147 | | -file = ImportUsers/SpecialImportUsers.alias.php |
148 | | - |
149 | | -Index Function |
150 | | -file = IndexFunction/IndexFunction.alias.php |
151 | | - |
152 | | -Inspect cache |
153 | | -file = InspectCache/InspectCache.alias.php |
154 | | - |
155 | | -Interwiki |
156 | | -file = Interwiki/SpecialInterwiki.alias.php |
157 | | - |
158 | | -Interwiki list |
159 | | -file = InterwikiList/InterwikiList.alias.php |
160 | | - |
161 | | -Invitations |
162 | | -file = Invitations/Invitations.alias.php |
163 | | - |
164 | | -Liquid threads |
165 | | -file = LiquidThreads/i18n/Lqt.alias.php |
166 | | - |
167 | | -Log entry |
168 | | -file = LogEntry/LogEntry.alias.php |
169 | | - |
170 | | -Lookup user |
171 | | -file = LookupUser/LookupUser.alias.php |
172 | | - |
173 | | -Maintenance |
174 | | -file = Maintenance/Maintenance.alias.php |
175 | | - |
176 | | -Metavid Wiki |
177 | | -file = MetavidWiki/languages/MV_Aliases.php |
178 | | - |
179 | | -Most revisors |
180 | | -file = MostRevisors/MostRevisors.alias.php |
181 | | - |
182 | | -Multi upload |
183 | | -file = MultiUpload/SpecialMultipleUpload.alias.php |
184 | | - |
185 | | -Newest pages |
186 | | -file = NewestPages/NewestPages.alias.php |
187 | | - |
188 | | -News channel |
189 | | -file = NewsChannel/NewsChannel.alias.php |
190 | | - |
191 | | -Nss MySQL authentication |
192 | | -file = NssMySQLAuth/NssMySQLAuth.alias.php |
193 | | - |
194 | | -Nuke |
195 | | -file = Nuke/SpecialNuke.alias.php |
196 | | - |
197 | | -OpenID |
198 | | -file = OpenID/OpenID.alias.php |
199 | | - |
200 | | -Oversight |
201 | | -file = Oversight/HideRevision.alias.php |
202 | | - |
203 | | -Password reset |
204 | | -file = PasswordReset/PasswordReset.alias.php |
205 | | - |
206 | | -Patroller |
207 | | -file = Patroller/Patroller.alias.php |
208 | | - |
209 | | -Piwik |
210 | | -file = Piwik/Piwik.alias.php |
211 | | - |
212 | | -Player |
213 | | -file = Player/Player.alias.php |
214 | | - |
215 | | -Plotters |
216 | | -file = Plotters/Plotters.alias.php |
217 | | - |
218 | | -Profile monitor |
219 | | -file = ProfileMonitor/ProfileMonitor.alias.php |
220 | | - |
221 | | -Purge cache |
222 | | -file = PurgeCache/PurgeCache.alias.php |
223 | | - |
224 | | -POV watch |
225 | | -file = PovWatch/PovWatch.alias.php |
226 | | - |
227 | | -Random in category |
228 | | -file = RandomInCategory/SpecialRandomincategory.alias.php |
229 | | - |
230 | | -Reader Feedback |
231 | | -file = ReaderFeedback/language/ReaderFeedback.alias.php |
232 | | - |
233 | | -Record admin |
234 | | -file = RecordAdmin/RecordAdmin.alias.php |
235 | | - |
236 | | -Regex Block |
237 | | -file = regexBlock/regexBlock.alias.php |
238 | | - |
239 | | -Refresh special |
240 | | -file = RefreshSpecial/RefreshSpecial.alias.php |
241 | | - |
242 | | -Rename user |
243 | | -file = Renameuser/SpecialRenameuser.alias.php |
244 | | - |
245 | | -Replace text |
246 | | -file = ReplaceText/ReplaceText.alias.php |
247 | | - |
248 | | -Secure poll |
249 | | -file = SecurePoll/SecurePoll.alias.php |
250 | | - |
251 | | -Semantic drilldown |
252 | | -file = SemanticDrilldown/languages/SD_Aliases.php |
253 | | - |
254 | | -Semantic forms |
255 | | -file = SemanticForms/languages/SF_Aliases.php |
256 | | - |
257 | | -Semantic MediaWiki |
258 | | -file = SemanticMediaWiki/languages/SMW_Aliases.php |
259 | | - |
260 | | -Shared user rights |
261 | | -file = SharedUserRights/SharedUserRights.alias.php |
262 | | - |
263 | | -Show processlist |
264 | | -file = ShowProcesslist/ShowProcesslist.alias.php |
265 | | - |
266 | | -Sign document |
267 | | -file = SignDocument/SignDocument.alias.php |
268 | | - |
269 | | -Site matrix |
270 | | -file = SiteMatrix/SiteMatrix.alias.php |
271 | | - |
272 | | -Social profile |
273 | | -file = SocialProfile/SocialProfile.alias.php |
274 | | - |
275 | | -Spam regex |
276 | | -file = SpamRegex/SpamRegex.alias.php |
277 | | - |
278 | | -Special form |
279 | | -file = SpecialForm/SpecialForm.alias.php |
280 | | - |
281 | | -Stale pages |
282 | | -file = StalePages/StalePages.alias.php |
283 | | - |
284 | | -Template link |
285 | | -file = TemplateLink/TemplateLink.alias.php |
286 | | - |
287 | | -Todo tasks |
288 | | -file = TodoTasks/SpecialTaskList.alias.php |
289 | | - |
290 | | -Translate |
291 | | -file = Translate/Translate.alias.php |
292 | | - |
293 | | -Uniwiki Create page |
294 | | -file = uniwiki/CreatePage/CreatePage.alias.php |
295 | | - |
296 | | -Usability Initiative Opt in |
297 | | -file = UsabilityInitiative/OptIn/OptIn.alias.php |
298 | | - |
299 | | -Usability Initiative Pref stats |
300 | | -file = UsabilityInitiative/PrefStats/PrefStats.alias.php |
301 | | - |
302 | | -Usage statistics |
303 | | -file = UsageStatistics/SpecialUserStats.alias.php |
304 | | - |
305 | | -User merge |
306 | | -file = UserMerge/UserMerge.alias.php |
307 | | - |
308 | | -User option stats |
309 | | -file = UserOptionStats/UserOptionStats.alias.php |
310 | | - |
311 | | -Vote |
312 | | -file = Vote/Vote.alias.php |
313 | | - |
314 | | -Watchers |
315 | | -file = Watchers/Watchers.alias.php |
316 | | - |
317 | | -Watch subpages |
318 | | -file = WatchSubpages/WatchSubpages.alias.php |
319 | | - |
320 | | -Web Chat |
321 | | -file = WebChat/WebChat.alias.php |
322 | | - |
323 | | -What is my IP |
324 | | -file = WhatIsMyIP/WhatIsMyIP.alias.php |
325 | | - |
326 | | -White list |
327 | | -file = WhiteList/WhiteListEdit.alias.php |
328 | | - |
329 | | -Who is watching |
330 | | -file = WhoIsWatching/SpecialWhoIsWatching.alias.php |
331 | | - |
332 | | -Who is online |
333 | | -file = WhosOnline/WhosOnline.alias.php |
334 | | - |
335 | | -Wiki At Home |
336 | | -file = WikiAtHome/WikiAtHome.alias.php |
Index: trunk/extensions/Translate/scripts/magic-export.php |
— | — | @@ -0,0 +1,99 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Script to export special page aliases of extensions. |
| 5 | + * |
| 6 | + * @author Niklas Laxstrom |
| 7 | + * |
| 8 | + * @copyright Copyright © 2008-2009, Niklas Laxström |
| 9 | + * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later |
| 10 | + * @file |
| 11 | + */ |
| 12 | + |
| 13 | +$optionsWithArgs = array( 'target', 'type' ); |
| 14 | +require( dirname( __FILE__ ) . '/cli.inc' ); |
| 15 | + |
| 16 | +function showUsage() { |
| 17 | + STDERR( <<<EOT |
| 18 | +Magic exporter. |
| 19 | + |
| 20 | +Usage: php magic-export.php [options...] |
| 21 | + |
| 22 | +Options: |
| 23 | + --target Target directory for exported files |
| 24 | + --type magic or special |
| 25 | +EOT |
| 26 | +); |
| 27 | + exit( 1 ); |
| 28 | +} |
| 29 | + |
| 30 | +if ( isset( $options['help'] ) || $args === 1 ) { |
| 31 | + showUsage(); |
| 32 | +} |
| 33 | + |
| 34 | +if ( !isset( $options['target'] ) ) { |
| 35 | + STDERR( "You need to specify target directory" ); |
| 36 | + exit( 1 ); |
| 37 | +} |
| 38 | + |
| 39 | +if ( !is_writable( $options['target'] ) ) { |
| 40 | + STDERR( "Target directory is not writable" ); |
| 41 | + exit( 1 ); |
| 42 | +} |
| 43 | + |
| 44 | +if ( !isset( $options['type'] ) ) { |
| 45 | + STDERR( "Type must be one of the following: special magic" ); |
| 46 | + exit( 1 ); |
| 47 | +} |
| 48 | + |
| 49 | + |
| 50 | +$langs = Cli::parseLanguageCodes( '*' ); |
| 51 | +$groups = MessageGroups::singleton()->getGroups(); |
| 52 | + |
| 53 | +$type = $options['type'] ; |
| 54 | + |
| 55 | +foreach ( $groups as $group ) { |
| 56 | + if ( !$group instanceof ExtensionMessageGroup ) continue; |
| 57 | + |
| 58 | + if ( $type === 'special' ) { |
| 59 | + $filename = $group->getAliasFile(); |
| 60 | + } else { |
| 61 | + $filename = $group->getMagicFile(); |
| 62 | + } |
| 63 | + |
| 64 | + if ( $filename === null ) continue; |
| 65 | + |
| 66 | + $file = "$wgTranslateExtensionDirectory/$filename"; |
| 67 | + if ( !file_exists($file) ) continue; |
| 68 | + $input = file_get_contents( $file ); |
| 69 | + |
| 70 | + $headerEnd = strpos( $input, "\n);\n" ); |
| 71 | + |
| 72 | + $output = substr( $input, 0, $headerEnd + 3 ) . "\n\n"; |
| 73 | + |
| 74 | + foreach ( $langs as $l ) { |
| 75 | + |
| 76 | + switch ( $options['type'] ) { |
| 77 | + case 'special': |
| 78 | + $o = new SpecialPageAliasesCM( $l ); |
| 79 | + break; |
| 80 | + case 'magic': |
| 81 | + $o = new MagicWordsCM( $l ); |
| 82 | + break; |
| 83 | + default: |
| 84 | + STDERR( "Invalid type: must be one of: special, magic" ); |
| 85 | + exit( 1 ); |
| 86 | + } |
| 87 | + |
| 88 | + $export = $o->export( $group->getId() ); |
| 89 | + if ( $export === '' ) continue; |
| 90 | + |
| 91 | + # remove useles comment |
| 92 | + $export = preg_replace( "~^# .*$\n~m", '', $export ); |
| 93 | + |
| 94 | + $output .= $export; |
| 95 | + |
| 96 | + } |
| 97 | + |
| 98 | + wfMkdirParents( dirname($options['target'] . "/$filename") ); |
| 99 | + file_put_contents( $options['target'] . "/$filename", trim( $output ) ); |
| 100 | +} |
Index: trunk/extensions/Translate/scripts/alias-export.php |
— | — | @@ -16,7 +16,7 @@ |
17 | 17 | STDERR( <<<EOT |
18 | 18 | Alias exporter. |
19 | 19 | |
20 | | -Usage: php aliasexport.php [options...] |
| 20 | +Usage: php alias-export.php [options...] |
21 | 21 | |
22 | 22 | Options: |
23 | 23 | --target Target directory for exported files |
— | — | @@ -46,35 +46,15 @@ |
47 | 47 | |
48 | 48 | $langs = Cli::parseLanguageCodes( $options['lang'] ); |
49 | 49 | |
| 50 | +$groups = MessageGroups::singleton()->getGroups(); |
50 | 51 | |
51 | | -if ( !file_exists( TRANSLATE_ALIASFILE ) || !is_readable( TRANSLATE_ALIASFILE ) ) { |
52 | | - STDERR( "Alias file not defined" ); |
53 | | - exit( 1 ); |
54 | | -} |
| 52 | +foreach ( $groups as $group ) { |
| 53 | + if ( !$group instanceof ExtensionMessageGroup ) continue; |
| 54 | + $file = $group->getAliasFile(); |
55 | 55 | |
56 | | -$defines = file_get_contents( TRANSLATE_ALIASFILE ); |
57 | | -$sections = preg_split( "/\n\n/", $defines, - 1, PREG_SPLIT_NO_EMPTY ); |
58 | | - |
59 | | -foreach ( $sections as $section ) { |
60 | | - $lines = array_map( 'trim', preg_split( "/\n/", $section ) ); |
61 | | - $name = ''; |
62 | | - foreach ( $lines as $line ) { |
63 | | - if ( $line === '' ) continue; |
64 | | - if ( strpos( $line, '=' ) === false ) { |
65 | | - if ( $name === '' ) { |
66 | | - $name = $line; |
67 | | - } else { |
68 | | - throw new MWException( "Trying to define name twice: " . $line ); |
69 | | - } |
70 | | - } else { |
71 | | - list( $key, $value ) = array_map( 'trim', explode( '=', $line, 2 ) ); |
72 | | - if ( $key === 'file' ) $file = $value; |
73 | | - } |
74 | | - } |
75 | | - |
76 | | - if ( $name !== '' ) { |
| 56 | + if ( $file !== null ) { |
77 | 57 | // Fake a group |
78 | | - $group = new AliasMessageGroup( $name ); |
| 58 | + $group = new AliasMessageGroup( $group->getId() ); |
79 | 59 | $group->setMessageFile( $file ); |
80 | 60 | $group->setVariableName( 'aliases' ); |
81 | 61 | $writer = $group->getWriter(); |
Index: trunk/extensions/Translate/scripts/mwcore-export.php |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | exit( 1 ); |
74 | 74 | } |
75 | 75 | |
76 | | - $export = $o->export( 'MediaWiki Core' ); |
| 76 | + $export = $o->export( 'core' ); |
77 | 77 | if ( $export === '' ) continue; |
78 | 78 | |
79 | 79 | $matches = array(); |
— | — | @@ -120,4 +120,4 @@ |
121 | 121 | |
122 | 122 | file_put_contents( $outFile, $data ); |
123 | 123 | } |
124 | | -} |
| 124 | +} |
\ No newline at end of file |
Index: trunk/extensions/Translate/MessageGroups.php |
— | — | @@ -312,6 +312,8 @@ |
313 | 313 | } |
314 | 314 | |
315 | 315 | class ExtensionMessageGroup extends MessageGroupOld { |
| 316 | + protected $magicFile, $aliasFile; |
| 317 | + |
316 | 318 | /** |
317 | 319 | * Name of the array where all messages are stored, if applicable. |
318 | 320 | */ |
— | — | @@ -401,9 +403,21 @@ |
402 | 404 | return $checker; |
403 | 405 | } |
404 | 406 | |
| 407 | + public function getAliasFile() { return $this->aliasFile; } |
| 408 | + public function setAliasFile( $file ) { $this->aliasFile = $file; } |
| 409 | + |
| 410 | + public function getMagicFile() { return $this->magicFile; } |
| 411 | + public function setMagicFile( $file ) { $this->magicFile = $file; } |
| 412 | + |
405 | 413 | } |
406 | 414 | |
407 | 415 | class AliasMessageGroup extends ExtensionMessageGroup { |
| 416 | + protected $dataSource; |
| 417 | + |
| 418 | + public function setDataSource( $page ) { |
| 419 | + $this->dataSource = $page; |
| 420 | + } |
| 421 | + |
408 | 422 | public function initCollection( $code, $unique = false ) { |
409 | 423 | $collection = parent::initCollection( $code, $unique ); |
410 | 424 | |
— | — | @@ -437,7 +451,7 @@ |
438 | 452 | } |
439 | 453 | |
440 | 454 | public function fillContents( MessageCollection $collection ) { |
441 | | - $data = TranslateUtils::getMessageContent( 'sp-translate-data-SpecialPageAliases', $collection->code ); |
| 455 | + $data = TranslateUtils::getMessageContent( $this->dataSource, $collection->code ); |
442 | 456 | |
443 | 457 | if ( !$data ) return; |
444 | 458 | |
Index: trunk/extensions/Translate/groups/ComplexMessages.php |
— | — | @@ -222,7 +222,7 @@ |
223 | 223 | $s = Xml::openElement( 'table', $this->tableAttributes ); |
224 | 224 | |
225 | 225 | foreach ( array_keys( $this->data ) as $group ) { |
226 | | - $s .= $this->header( $group ); |
| 226 | + $s .= $this->header( $this->data[$group]['label'] ); |
227 | 227 | |
228 | 228 | foreach ( $this->getIterator( $group ) as $key ) { |
229 | 229 | $rowContents = ''; |
— | — | @@ -395,7 +395,8 @@ |
396 | 396 | while ( strlen( $temp ) <= $padTo ) { $temp .= ' '; } |
397 | 397 | |
398 | 398 | $from = self::LANG_CURRENT; |
399 | | - if ( $this->firstMagic && !$data['code'] ) $from = self::LANG_CHAIN; |
| 399 | + // Abuse of the firstMagic property, should use something proper |
| 400 | + if ( $this->firstMagic ) $from = self::LANG_CHAIN; |
400 | 401 | |
401 | 402 | // Check for translations |
402 | 403 | $val = $this->val( $group, self::LANG_CURRENT, $key ); |
— | — | @@ -422,7 +423,7 @@ |
423 | 424 | } |
424 | 425 | |
425 | 426 | if ( $out !== '' ) { |
426 | | - $text = "# $group \n"; |
| 427 | + $text = "# {$data['label']} \n"; |
427 | 428 | $text .= "\$$var$extra = array(\n" . $out . ");\n\n"; |
428 | 429 | return $text; |
429 | 430 | } else { |
— | — | @@ -456,45 +457,32 @@ |
457 | 458 | protected $id = SpecialMagic::MODULE_SPECIAL; |
458 | 459 | protected $databaseMsg = 'sp-translate-data-SpecialPageAliases'; |
459 | 460 | protected $chainable = true; |
| 461 | + protected $groupFile = TRANSLATE_ALIASFILE; |
460 | 462 | |
| 463 | + |
461 | 464 | public function __construct( $code ) { |
462 | 465 | parent::__construct( $code ); |
463 | | - $this->data['MediaWiki Core'] = array( |
| 466 | + $this->data['core'] = array( |
| 467 | + 'label' => 'MediaWiki Core', |
464 | 468 | 'var' => 'specialPageAliases', |
465 | 469 | 'file' => Language::getMessagesFileName( '%CODE%' ), |
466 | 470 | 'code' => false, |
467 | 471 | ); |
468 | 472 | |
469 | 473 | global $wgTranslateExtensionDirectory; |
| 474 | + $groups = MessageGroups::singleton()->getGroups(); |
| 475 | + foreach( $groups as $g ) { |
| 476 | + if ( !$g instanceof ExtensionMessageGroup ) continue; |
| 477 | + $file = $g->getAliasFile(); |
| 478 | + if ( $file === null ) continue; |
470 | 479 | |
471 | | - if ( !file_exists( TRANSLATE_ALIASFILE ) || !is_readable( TRANSLATE_ALIASFILE ) ) |
472 | | - return; |
473 | | - |
474 | | - $defines = file_get_contents( TRANSLATE_ALIASFILE ); |
475 | | - $sections = preg_split( "/\n\n/", $defines, - 1, PREG_SPLIT_NO_EMPTY ); |
476 | | - |
477 | | - foreach ( $sections as $section ) { |
478 | | - $lines = array_map( 'trim', preg_split( "/\n/", $section ) ); |
479 | | - $name = ''; |
480 | | - foreach ( $lines as $line ) { |
481 | | - if ( $line === '' ) continue; |
482 | | - if ( strpos( $line, '=' ) === false ) { |
483 | | - if ( $name === '' ) { |
484 | | - $name = $line; |
485 | | - } else { |
486 | | - throw new MWException( "Trying to define name twice: " . $line ); |
487 | | - } |
488 | | - } else { |
489 | | - list( $key, $value ) = array_map( 'trim', explode( '=', $line, 2 ) ); |
490 | | - if ( $key === 'file' ) $file = $value; |
491 | | - } |
492 | | - } |
493 | | - |
494 | | - if ( $name !== '' ) { |
495 | | - $this->data[$name] = array( |
496 | | - 'var' => 'aliases', |
497 | | - 'file' => $wgTranslateExtensionDirectory . '/' . $file, |
498 | | - 'code' => true, |
| 480 | + $file = "$wgTranslateExtensionDirectory/$file"; |
| 481 | + if ( file_exists($file) ) { |
| 482 | + $this->data[$g->getId()] = array( |
| 483 | + 'label'=> $g->getLabel(), |
| 484 | + 'var' => 'aliases', |
| 485 | + 'file' => $file, |
| 486 | + 'code' => $code, |
499 | 487 | ); |
500 | 488 | } |
501 | 489 | } |
— | — | @@ -539,11 +527,30 @@ |
540 | 528 | |
541 | 529 | public function __construct( $code ) { |
542 | 530 | parent::__construct( $code ); |
543 | | - $this->data['MediaWiki Core'] = array( |
| 531 | + $this->data['core'] = array( |
| 532 | + 'label'=> 'MediaWiki Core', |
544 | 533 | 'var' => 'magicWords', |
545 | 534 | 'file' => Language::getMessagesFileName( '%CODE%' ), |
546 | 535 | 'code' => false, |
547 | 536 | ); |
| 537 | + |
| 538 | + global $wgTranslateExtensionDirectory; |
| 539 | + $groups = MessageGroups::singleton()->getGroups(); |
| 540 | + foreach( $groups as $g ) { |
| 541 | + if ( !$g instanceof ExtensionMessageGroup ) continue; |
| 542 | + $file = $g->getMagicFile(); |
| 543 | + if ( $file === null ) continue; |
| 544 | + |
| 545 | + $file = "$wgTranslateExtensionDirectory/$file"; |
| 546 | + if ( file_exists($file) ) { |
| 547 | + $this->data[$g->getId()] = array( |
| 548 | + 'label'=> $g->getLabel(), |
| 549 | + 'var' => 'magicWords', |
| 550 | + 'file' => $file, |
| 551 | + 'code' => $code, |
| 552 | + ); |
| 553 | + } |
| 554 | + } |
548 | 555 | } |
549 | 556 | |
550 | 557 | public function highlight( $key, $values ) { |
Index: trunk/extensions/Translate/groups/MediaWikiExtensions.php |
— | — | @@ -49,6 +49,8 @@ |
50 | 50 | case 'id': |
51 | 51 | case 'descmsg': |
52 | 52 | case 'desc': |
| 53 | + case 'magicfile': |
| 54 | + case 'aliasfile': |
53 | 55 | $newgroup[$key] = $value; |
54 | 56 | break; |
55 | 57 | case 'optional': |
— | — | @@ -125,7 +127,7 @@ |
126 | 128 | 'url' => $url, |
127 | 129 | ); |
128 | 130 | |
129 | | - $copyvars = array( 'ignored', 'optional', 'var', 'desc', 'prefix', 'mangle' ); |
| 131 | + $copyvars = array( 'ignored', 'optional', 'var', 'desc', 'prefix', 'mangle', 'magicfile', 'aliasfile' ); |
130 | 132 | foreach ( $copyvars as $var ) { |
131 | 133 | if ( isset( $g[$var] ) ) { |
132 | 134 | $newgroup[$var] = $g[$var]; |
— | — | @@ -197,7 +199,11 @@ |
198 | 200 | $group->setDescriptionMsg( $info['descmsg'], $info['url'] ); |
199 | 201 | } |
200 | 202 | |
| 203 | + global $wgTranslateExtensionDirectory; |
201 | 204 | |
| 205 | + if ( isset($info['aliasfile']) ) $group->setAliasFile( $info['aliasfile'] ); |
| 206 | + if ( isset($info['magicfile']) ) $group->setMagicFile( $info['magicfile'] ); |
| 207 | + |
202 | 208 | $group->setType( 'mediawiki' ); |
203 | 209 | return $group; |
204 | 210 | } |
Index: trunk/extensions/Translate/groups/mediawiki-defines.txt |
— | — | @@ -6,11 +6,14 @@ |
7 | 7 | |
8 | 8 | Abuse Filter |
9 | 9 | optional = abusefilter-edit-builder-op-bool-xor |
| 10 | +aliasfile = AbuseFilter/AbuseFilter.alias.php |
10 | 11 | |
11 | 12 | Admin Links |
| 13 | +aliasfile = AdminLinks/AdminLinks.alias.php |
12 | 14 | |
13 | 15 | Advanced Random |
14 | 16 | file = AdvancedRandom/SpecialAdvancedRandom.i18n.php |
| 17 | +aliasfile = AdvancedRandom/AdvancedRandom.alias.php |
15 | 18 | |
16 | 19 | Ajax Login |
17 | 20 | |
— | — | @@ -33,9 +36,11 @@ |
34 | 37 | |
35 | 38 | APC |
36 | 39 | file = APC/ViewAPC.i18n.php |
| 40 | +aliasfile = APC/ViewAPC.alias.php |
37 | 41 | descmsg = viewapc-desc |
38 | 42 | |
39 | 43 | Asksql |
| 44 | +aliasfile = Asksql/Asksql.alias.php |
40 | 45 | |
41 | 46 | Assert Edit |
42 | 47 | descmsg = assert_edit_desc |
— | — | @@ -61,6 +66,7 @@ |
62 | 67 | descmsg = backforth-desc |
63 | 68 | |
64 | 69 | Bad Image |
| 70 | +aliasfile = BadImage/BadImage.alias.php |
65 | 71 | descmsg = badimages-desc |
66 | 72 | |
67 | 73 | Blahtex |
— | — | @@ -77,8 +83,10 @@ |
78 | 84 | id = ext-breadcrumbs |
79 | 85 | |
80 | 86 | Call |
| 87 | +aliasfile = Call/Call.alias.php |
81 | 88 | |
82 | 89 | Category Intersection |
| 90 | +aliasfile = CategoryIntersection/CategoryIntersection.alias.php |
83 | 91 | |
84 | 92 | Category On Upload |
85 | 93 | optional = categoryonupload-none |
— | — | @@ -87,6 +95,7 @@ |
88 | 96 | ignored = categorystepper |
89 | 97 | |
90 | 98 | Category Tree |
| 99 | +aliasfile = CategoryTree/CategoryTree.alias.php |
91 | 100 | ignored = categorytree-collapse-bullet, categorytree-expand-bullet, |
92 | 101 | ignored = categorytree-empty-bullet,categorytree-page-bullet |
93 | 102 | ignored = categorytree-member-num |
— | — | @@ -98,21 +107,25 @@ |
99 | 108 | Category Watch |
100 | 109 | |
101 | 110 | Central Auth |
| 111 | +aliasfile = CentralAuth/CentralAuth.alias.php |
102 | 112 | optional = centralauth-editset-grouplink |
103 | 113 | |
104 | 114 | Central Notice |
105 | 115 | |
106 | 116 | Change Author |
| 117 | +aliasfile = ChangeAuthor/ChangeAuthor.alias.php |
107 | 118 | optional = changeauthor-rev |
108 | 119 | ignored = changeauthor-logpagetext, changeauthor-short |
109 | 120 | |
110 | 121 | Char Insert |
111 | 122 | |
112 | 123 | Check User |
| 124 | +aliasfile = CheckUser/CheckUser.alias.php |
113 | 125 | ignored = checkuser-toollinks |
114 | 126 | |
115 | 127 | Chemistry |
116 | 128 | file = Chemistry/ChemFunctions.i18n.php |
| 129 | +aliasfile = Chemistry/Chemicalsources.alias.php |
117 | 130 | descmsg = chemicalsource-desc |
118 | 131 | optional = chemFunctions_SearchExplanation |
119 | 132 | ignored = chemFunctions_EINECS, chemFunctions_CHEBI, chemFunctions_PubChem, |
— | — | @@ -133,6 +146,7 @@ |
134 | 147 | Cite (special page) |
135 | 148 | id = ext-citespecial |
136 | 149 | file = Cite/SpecialCite.i18n.php |
| 150 | +aliasfile = Cite/SpecialCite.alias.php |
137 | 151 | descmsg = cite_article_desc |
138 | 152 | ignored = cite_text |
139 | 153 | |
— | — | @@ -144,14 +158,17 @@ |
145 | 159 | Client Side |
146 | 160 | |
147 | 161 | Close Wikis |
| 162 | +aliasfile = CloseWikis/CloseWikis.alias.php |
148 | 163 | optional = closewikis-closed |
149 | 164 | |
150 | 165 | Code Review |
| 166 | +aliasfile = CodeReview/CodeReview.alias.php |
151 | 167 | descmsg = code-desc |
152 | 168 | |
153 | 169 | Collection - Core |
154 | 170 | id = ext-collection-core |
155 | 171 | file = Collection/CollectionCore.i18n.php |
| 172 | +aliasfile = Collection/Collection.alias.php |
156 | 173 | descmsg = coll-create_a_book |
157 | 174 | |
158 | 175 | Collection - Other |
— | — | @@ -166,8 +183,10 @@ |
167 | 184 | Comment Spammer |
168 | 185 | |
169 | 186 | Community Voice |
| 187 | +aliasfile = CommunityVoice/CommunityVoice.alias.php |
170 | 188 | |
171 | 189 | Configure |
| 190 | +aliasfile = Configure/Configure.alias.php |
172 | 191 | optional = configure-section-html, configure-section-ajax |
173 | 192 | optional = configure-section-djvu, configure-section-imagemagick |
174 | 193 | optional = configure-section-interwiki, configure-section-memcached |
— | — | @@ -180,10 +199,12 @@ |
181 | 200 | optional = configure-setting-desc |
182 | 201 | |
183 | 202 | Confirm Account |
| 203 | +aliasfile = ConfirmAccount/ConfirmAccount.alias.php |
184 | 204 | descmsg = confirmedit-desc |
185 | 205 | optional = requestaccount-info, requestaccount-footer |
186 | 206 | |
187 | 207 | Confirm Edit |
| 208 | +aliasfile = ConfirmEdit/ConfirmEdit.alias.php |
188 | 209 | descmsg = captcha-desc |
189 | 210 | |
190 | 211 | ConfirmEdit Fancy Captcha |
— | — | @@ -197,30 +218,38 @@ |
198 | 219 | optional = questycaptcha-desc |
199 | 220 | |
200 | 221 | Contact Page |
| 222 | +aliasfile = ContactPage/ContactPage.alias.php |
201 | 223 | |
202 | 224 | Contribution Reporting |
| 225 | +aliasfile = ContributionReporting/ContributionReporting.alias.php |
203 | 226 | |
204 | 227 | Contribution Scores |
| 228 | +aliasfile = ContributionScores/ContributionScores.alias.php |
205 | 229 | |
206 | 230 | Contribution Tracking |
| 231 | +aliasfile = ContributionTracking/ContributionTracking.alias.php |
207 | 232 | |
208 | 233 | Contributions Edit Count |
209 | 234 | file = Contributionseditcount/Contributionseditcount.i18n.php |
210 | 235 | |
211 | 236 | Contributors |
| 237 | +aliasfile = Contributors/Contributors.alias.php |
212 | 238 | |
213 | 239 | Contributors Add-on |
214 | 240 | id = ext-contributorsaddon |
215 | 241 | file = ContributorsAddon/ContributorsAddon.i18n.php |
216 | 242 | |
217 | 243 | Cooperation Statistics |
| 244 | +aliasfile = CooperationStatistics/CooperationStatistics.alias.php |
218 | 245 | ignored = cooperationstatistics-users, cooperationstatistics-limit-few-revisors, cooperationstatistics-limit-many-revisors |
219 | 246 | |
220 | 247 | Count Edits |
| 248 | +aliasfile = CountEdits/CountEdits.alias.php |
221 | 249 | |
222 | 250 | Create Box |
223 | 251 | |
224 | 252 | Cross Namespace Links |
| 253 | +aliasfile = CrossNamespaceLinks/SpecialCrossNamespaceLinks.alias.php |
225 | 254 | file = CrossNamespaceLinks/SpecialCrossNamespaceLinks.i18n.php |
226 | 255 | |
227 | 256 | Crosswiki Block |
— | — | @@ -232,14 +261,17 @@ |
233 | 262 | |
234 | 263 | Data Transfer |
235 | 264 | file = DataTransfer/languages/DT_Messages.php |
| 265 | +aliasfile = DataTransfer/languages/DT_Aliases.php |
236 | 266 | descmsg = dt-desc |
237 | 267 | |
238 | 268 | Delayed Definition |
239 | 269 | descmsg = delaydef-desc |
240 | 270 | |
241 | 271 | Delete Batch |
| 272 | +aliasfile = DeleteBatch/DeleteBatch.alias.php |
242 | 273 | |
243 | 274 | Delete Queue |
| 275 | +aliasfile = DeleteQueue/DeleteQueue.alias.php |
244 | 276 | optional = deletequeue-prod-reasons, deletequeue-speedy-reasons |
245 | 277 | |
246 | 278 | Did You Mean |
— | — | @@ -256,11 +288,13 @@ |
257 | 289 | file = DPLforum/DPLforum.i18n.php |
258 | 290 | |
259 | 291 | Drafts |
| 292 | +aliasfile = Drafts/Drafts.alias.php |
260 | 293 | ignored = accesskey-drafts-save |
261 | 294 | |
262 | 295 | Duplicator |
263 | 296 | |
264 | 297 | Edit Count |
| 298 | +aliasfile = Editcount/SpecialEditcount.alias.php |
265 | 299 | file = Editcount/SpecialEditcount.i18n.php |
266 | 300 | |
267 | 301 | Edit Messages |
— | — | @@ -274,17 +308,21 @@ |
275 | 309 | Edit Subpages |
276 | 310 | |
277 | 311 | Edit User |
| 312 | +aliasfile = EditUser/EditUser.alias.php |
278 | 313 | |
279 | 314 | Email Address Image |
280 | 315 | |
281 | 316 | Emergency DeSysop |
| 317 | +aliasfile = EmergencyDeSysop/EmergencyDeSysop.alias.php |
282 | 318 | |
283 | 319 | Error Handler |
284 | 320 | |
285 | 321 | Eval |
286 | 322 | file = Eval/SpecialEval.i18n.php |
| 323 | +aliasfile = Eval/SpecialEval.alias.php |
287 | 324 | |
288 | 325 | Expand Templates |
| 326 | +aliasfile = ExpandTemplates/ExpandTemplates.alias.php |
289 | 327 | |
290 | 328 | Extension Distributor |
291 | 329 | descmsg = extdist-desc |
— | — | @@ -292,14 +330,21 @@ |
293 | 331 | External Data |
294 | 332 | |
295 | 333 | Farmer |
| 334 | +aliasfile = Farmer/Farmer.alias.php |
296 | 335 | optional = farmercreateurl |
297 | 336 | ignored = farmerwikiurl, farmerinterwikiurl |
298 | 337 | |
299 | 338 | FCK editor |
300 | 339 | |
| 340 | +Find Spam |
| 341 | +aliasfile = FindSpam/FindSpam.alias.php |
| 342 | + |
| 343 | +Fixed Image |
| 344 | + |
301 | 345 | Flagged Revisions - Flagged Revs |
302 | 346 | id = ext-flaggedrevs-flaggedrevs |
303 | 347 | file = FlaggedRevs/language/FlaggedRevs.i18n.php |
| 348 | +aliasfile = FlaggedRevs/language/FlaggedRevs.alias.php |
304 | 349 | optional = revreview-toggle, revreview-ak-review, accesskey-ca-current, accesskey-ca-stable |
305 | 350 | descmsg = flaggedrevs-desc |
306 | 351 | |
— | — | @@ -354,10 +399,6 @@ |
355 | 400 | file = FlaggedRevs/language/ValidationStatistics.i18n.php |
356 | 401 | descmsg = validationstatistics |
357 | 402 | |
358 | | -Find Spam |
359 | | - |
360 | | -Fixed Image |
361 | | - |
362 | 403 | Force Preview |
363 | 404 | |
364 | 405 | Format Email |
— | — | @@ -373,16 +414,20 @@ |
374 | 415 | Fundraiser Portal |
375 | 416 | |
376 | 417 | Gadgets |
| 418 | +aliasfile = Gadgets/Gadgets.alias.php |
377 | 419 | ignored = gadgets-definition |
378 | 420 | |
379 | 421 | Get Family |
380 | 422 | |
381 | 423 | Global Blocking |
| 424 | +aliasfile = GlobalBlocking/GlobalBlocking.alias.php |
382 | 425 | ignored = globalblocking-expiry-options |
383 | 426 | |
384 | 427 | Global Usage |
| 428 | +aliasfile = GlobalUsage/GlobalUsage.alias.php |
385 | 429 | |
386 | 430 | Global User rights |
| 431 | +aliasfile = GlobalUserrights/GlobalUserrights.alias.php |
387 | 432 | descmsg = gur-desc |
388 | 433 | |
389 | 434 | Gnuplot |
— | — | @@ -400,6 +445,7 @@ |
401 | 446 | Go To Category |
402 | 447 | |
403 | 448 | Group Permissions Manager |
| 449 | +aliasfile = GroupPermissionsManager/GroupPermissionsManager.alias.php |
404 | 450 | descmsg = grouppermissions-desc |
405 | 451 | optional = grouppermissions-display |
406 | 452 | |
— | — | @@ -411,6 +457,7 @@ |
412 | 458 | Parser i18n tags |
413 | 459 | id = ext-i18ntags |
414 | 460 | file = I18nTags/I18nTags.i18n.php |
| 461 | +magicfile = I18nTags/I18nTags.magic.php |
415 | 462 | |
416 | 463 | Icon |
417 | 464 | |
— | — | @@ -419,21 +466,26 @@ |
420 | 467 | optional = imagemap_desc_types |
421 | 468 | |
422 | 469 | Image Tagging |
| 470 | +aliasfile = ImageTagging/ImageTagging.alias.php |
423 | 471 | |
424 | 472 | Import Free Images |
| 473 | +aliasfile = ImportFreeImages/ImportFreeImages.alias.php |
425 | 474 | |
426 | 475 | Import Users |
427 | 476 | file = ImportUsers/SpecialImportUsers.i18n.php |
| 477 | +aliasfile = ImportUsers/SpecialImportUsers.alias.php |
428 | 478 | |
429 | 479 | IM Status |
430 | 480 | |
431 | 481 | Index Function |
| 482 | +aliasfile = IndexFunction/IndexFunction.alias.php |
432 | 483 | descmsg = indexfunc-desc |
433 | 484 | ignored = index-exclude-categories |
434 | 485 | |
435 | 486 | Input Box |
436 | 487 | |
437 | 488 | Inspect Cache |
| 489 | +aliasfile = InspectCache/InspectCache.alias.php |
438 | 490 | |
439 | 491 | Intersection |
440 | 492 | file = intersection/DynamicPageList.i18n.php |
— | — | @@ -441,12 +493,15 @@ |
442 | 494 | Interwiki Edit Page |
443 | 495 | id = ext-interwiki |
444 | 496 | file = Interwiki/SpecialInterwiki.i18n.php |
| 497 | +aliasfile = Interwiki/SpecialInterwiki.alias.php |
445 | 498 | optional = interwiki_defaulturl, interwiki_url |
446 | 499 | ignored = interwiki_logentry |
447 | 500 | |
448 | 501 | Interwiki List |
| 502 | +aliasfile = InterwikiList/InterwikiList.alias.php |
449 | 503 | |
450 | 504 | Invitations |
| 505 | +aliasfile = Invitations/Invitations.alias.php |
451 | 506 | ignored = invitations-uninvitedlist-item |
452 | 507 | |
453 | 508 | JS Kit |
— | — | @@ -464,6 +519,7 @@ |
465 | 520 | |
466 | 521 | Liquid Threads |
467 | 522 | file = LiquidThreads/i18n/Lqt.i18n.php |
| 523 | +aliasfile = LiquidThreads/i18n/Lqt.alias.php |
468 | 524 | descmsg = lqt-desc |
469 | 525 | optional = lqt_rc_ellipsis |
470 | 526 | ignored = lqt_header_warning_before_big |
— | — | @@ -471,14 +527,17 @@ |
472 | 528 | Localisation Update |
473 | 529 | |
474 | 530 | Log Entry |
| 531 | +aliasfile = LogEntry/LogEntry.alias.php |
475 | 532 | descmsg = logentry-parserhook-desc |
476 | 533 | |
477 | 534 | Lookup User |
| 535 | +aliasfile = LookupUser/LookupUser.alias.php |
478 | 536 | |
479 | 537 | Lua |
480 | 538 | descmsg = lua_desc |
481 | 539 | |
482 | 540 | Maintenance |
| 541 | +aliasfile = Maintenance/Maintenance.alias.php |
483 | 542 | ignored = maintenance-initEditCount, maintenance-runJobs, maintenance-showJobs |
484 | 543 | ignored = maintenance-stats |
485 | 544 | |
— | — | @@ -497,6 +556,7 @@ |
498 | 557 | |
499 | 558 | Metavid Wiki |
500 | 559 | file = MetavidWiki/languages/MV_Messages.php |
| 560 | +aliasfile = MetavidWiki/languages/MV_Aliases.php |
501 | 561 | descmsg = mv-desc |
502 | 562 | optional = ao_file_64Kb_MPEG4, ao_file_256Kb_MPEG4, ao_file_MPEG1, ao_file_MPEG2 |
503 | 563 | optional = ao_file_flash_flv, ao_file_512Kb_MPEG4, ao_file_Ogg_Video |
— | — | @@ -517,6 +577,7 @@ |
518 | 578 | Mini Preview |
519 | 579 | |
520 | 580 | Most Revisors |
| 581 | +aliasfile = MostRevisors/MostRevisors.alias.php |
521 | 582 | ignored = mostrevisors-limit-few-revisors |
522 | 583 | |
523 | 584 | Multi Boilerplate |
— | — | @@ -524,6 +585,7 @@ |
525 | 586 | |
526 | 587 | Multi Upload |
527 | 588 | file = MultiUpload/SpecialMultipleUpload.i18n.php |
| 589 | +aliasfile = MultiUpload/SpecialMultipleUpload.alias.php |
528 | 590 | descmsg = multipleupload-desc |
529 | 591 | |
530 | 592 | MediaWiki Search |
— | — | @@ -536,6 +598,7 @@ |
537 | 599 | optional = networkauth-name, networkauth-purltext |
538 | 600 | |
539 | 601 | Newest Pages |
| 602 | +aliasfile = NewestPages/NewestPages.alias.php |
540 | 603 | |
541 | 604 | News |
542 | 605 | optional = newsextension-unknownformat, newsextension-feednotfound |
— | — | @@ -547,6 +610,7 @@ |
548 | 611 | descmsg = newsextension-desc |
549 | 612 | |
550 | 613 | News Channel |
| 614 | +aliasfile = NewsChannel/NewsChannel.alias.php |
551 | 615 | |
552 | 616 | New User Message |
553 | 617 | ignored = newusermessage-template, newusermessage-editor, newusermessage-substitute |
— | — | @@ -558,10 +622,12 @@ |
559 | 623 | NS File Repo |
560 | 624 | |
561 | 625 | Nss MySQL Auth |
| 626 | +aliasfile = NssMySQLAuth/NssMySQLAuth.alias.php |
562 | 627 | descmsg = nss-desc |
563 | 628 | |
564 | 629 | Nuke |
565 | 630 | file = Nuke/SpecialNuke.i18n.php |
| 631 | +aliasfile = Nuke/SpecialNuke.alias.php |
566 | 632 | |
567 | 633 | OAI-PMH repository |
568 | 634 | id = ext-oai |
— | — | @@ -579,6 +645,7 @@ |
580 | 646 | ignored = onlinestatus-levels |
581 | 647 | |
582 | 648 | OpenID |
| 649 | +aliasfile = OpenID/OpenID.alias.php |
583 | 650 | optional = prefs-openid, openid-urls-url |
584 | 651 | |
585 | 652 | Open Search Xml |
— | — | @@ -587,16 +654,19 @@ |
588 | 655 | |
589 | 656 | Oversight |
590 | 657 | file = Oversight/HideRevision.i18n.php |
| 658 | +aliasfile = Oversight/HideRevision.alias.php |
591 | 659 | descmsg = hiderevision-desc |
592 | 660 | |
593 | 661 | Page By |
594 | 662 | |
595 | 663 | Password Reset |
| 664 | +aliasfile = PasswordReset/PasswordReset.alias.php |
596 | 665 | |
597 | 666 | Parser Functions |
598 | 667 | descmsg = pfunc_desc |
599 | 668 | |
600 | 669 | Patroller |
| 670 | +aliasfile = Patroller/Patroller.alias.php |
601 | 671 | descmsg = patrol-desc |
602 | 672 | |
603 | 673 | Pdf Handler |
— | — | @@ -605,12 +675,15 @@ |
606 | 676 | Pipe Escape |
607 | 677 | |
608 | 678 | Piwik |
| 679 | +aliasfile = Piwik/Piwik.alias.php |
609 | 680 | optional = piwik |
610 | 681 | |
611 | 682 | Player |
| 683 | +aliasfile = Player/Player.alias.php |
612 | 684 | ignored = player-pagetext, player-imagepage-header |
613 | 685 | |
614 | 686 | Plotters |
| 687 | +aliasfile = Plotters/Plotters.alias.php |
615 | 688 | |
616 | 689 | PNG Handler |
617 | 690 | |
— | — | @@ -625,11 +698,13 @@ |
626 | 699 | |
627 | 700 | POV Watch |
628 | 701 | file = PovWatch/PovWatch.i18n.php |
| 702 | +aliasfile = PovWatch/PovWatch.alias.php |
629 | 703 | descmsg = povwatch_desc |
630 | 704 | |
631 | 705 | Preloader |
632 | 706 | |
633 | 707 | Profile Monitor |
| 708 | +aliasfile = ProfileMonitor/ProfileMonitor.alias.php |
634 | 709 | descmsg = profiling-desc |
635 | 710 | |
636 | 711 | Proofread Page |
— | — | @@ -644,6 +719,7 @@ |
645 | 720 | Purge |
646 | 721 | |
647 | 722 | Purge Cache |
| 723 | +aliasfile = PurgeCache/PurgeCache.alias.php |
648 | 724 | |
649 | 725 | Quiz |
650 | 726 | descmsg = quiz_desc |
— | — | @@ -652,6 +728,7 @@ |
653 | 729 | |
654 | 730 | Random in Category |
655 | 731 | file = RandomInCategory/SpecialRandomincategory.i18n.php |
| 732 | +aliasfile = RandomInCategory/SpecialRandomincategory.alias.php |
656 | 733 | |
657 | 734 | Random Root Page |
658 | 735 | file = Randomrootpage/Randomrootpage.i18n.php |
— | — | @@ -662,6 +739,7 @@ |
663 | 740 | Reader Feedback |
664 | 741 | id = ext-readerfeedback-readerfeedback |
665 | 742 | file = ReaderFeedback/language/ReaderFeedback.i18n.php |
| 743 | +aliasfile = ReaderFeedback/language/ReaderFeedback.alias.php |
666 | 744 | descmsg = readerfeedback |
667 | 745 | |
668 | 746 | Reader Feedback - Liked Pages |
— | — | @@ -680,23 +758,28 @@ |
681 | 759 | descmsg = ratinghistory |
682 | 760 | |
683 | 761 | Record Admin |
| 762 | +aliasfile = RecordAdmin/RecordAdmin.alias.php |
684 | 763 | ignored = recordadmin-title |
685 | 764 | |
686 | 765 | Redirect |
687 | 766 | ignored = redirect-addnewaccount, redirect-userlogincomplete, redirect-userlogoutcomplete |
688 | 767 | |
689 | 768 | Refresh Special |
| 769 | +aliasfile = RefreshSpecial/RefreshSpecial.alias.php |
690 | 770 | |
691 | 771 | Regex Block |
692 | 772 | file = regexBlock/regexBlock.i18n.php |
| 773 | +aliasfile = regexBlock/regexBlock.alias.php |
693 | 774 | |
694 | 775 | RegexFunctions |
695 | 776 | |
696 | 777 | Rename User |
697 | 778 | file = Renameuser/SpecialRenameuser.i18n.php |
| 779 | +aliasfile = Renameuser/SpecialRenameuser.alias.php |
698 | 780 | ignored = renameuser-summary |
699 | 781 | |
700 | 782 | Replace Text |
| 783 | +aliasfile = ReplaceText/ReplaceText.alias.php |
701 | 784 | |
702 | 785 | Review |
703 | 786 | |
— | — | @@ -714,6 +797,7 @@ |
715 | 798 | Secure Passwords |
716 | 799 | |
717 | 800 | Secure Poll |
| 801 | +aliasfile = SecurePoll/SecurePoll.alias.php |
718 | 802 | optional = securepoll-header-ip, securepoll-header-xff, securepoll-header-token-match |
719 | 803 | optional = securepoll-header-url, securepoll-header-id, securepoll-header-trans-id |
720 | 804 | ignored = securepoll-custom-unqualified |
— | — | @@ -724,9 +808,11 @@ |
725 | 809 | |
726 | 810 | Semantic Drilldown |
727 | 811 | file = SemanticDrilldown/languages/SD_Messages.php |
| 812 | +aliasfile = SemanticDrilldown/languages/SD_Aliases.php |
728 | 813 | |
729 | 814 | Semantic Forms |
730 | 815 | file = SemanticForms/languages/SF_Messages.php |
| 816 | +aliasfile = SemanticForms/languages/SF_Aliases.php |
731 | 817 | |
732 | 818 | Semantic Gallery |
733 | 819 | |
— | — | @@ -736,6 +822,7 @@ |
737 | 823 | |
738 | 824 | Semantic MediaWiki |
739 | 825 | file = SemanticMediaWiki/languages/SMW_Messages.php |
| 826 | +aliasfile = SemanticMediaWiki/languages/SMW_Aliases.php |
740 | 827 | descmsg = smw-desc |
741 | 828 | ignored = smw_ask_doculink, smw_service_online_maps, smw_uri_blacklist |
742 | 829 | optional = smw_rss_link, smw_decseparator, smw_kiloseparator |
— | — | @@ -751,11 +838,14 @@ |
752 | 839 | Semantic Tasks |
753 | 840 | |
754 | 841 | Shared User Rights |
| 842 | +aliasfile = SharedUserRights/SharedUserRights.alias.php |
755 | 843 | descmsg = gblrights-desc |
756 | 844 | |
757 | 845 | Show Processlist |
| 846 | +aliasfile = ShowProcesslist/ShowProcesslist.alias.php |
758 | 847 | |
759 | 848 | Sign Document |
| 849 | +aliasfile = SignDocument/SignDocument.alias.php |
760 | 850 | descmsg = signature-desc |
761 | 851 | |
762 | 852 | Sign Document Special Create |
— | — | @@ -774,6 +864,7 @@ |
775 | 865 | descmsg = security-desc |
776 | 866 | |
777 | 867 | Site Matrix |
| 868 | +aliasfile = SiteMatrix/SiteMatrix.alias.php |
778 | 869 | |
779 | 870 | Skin Per Page |
780 | 871 | |
— | — | @@ -786,6 +877,7 @@ |
787 | 878 | ignored = smoothgallery-pagetext |
788 | 879 | |
789 | 880 | Social Profile - System Gifts |
| 881 | +aliasfile = SocialProfile/SocialProfile.alias.php |
790 | 882 | id = ext-socialprofile-systemgifts |
791 | 883 | file = SocialProfile/SystemGifts/SystemGift.i18n.php |
792 | 884 | descmsg = systemgiftmanager |
— | — | @@ -828,12 +920,14 @@ |
829 | 921 | Spam Diff Tool |
830 | 922 | |
831 | 923 | Spam Regex |
| 924 | +aliasfile = SpamRegex/SpamRegex.alias.php |
832 | 925 | |
833 | 926 | Special File List |
834 | 927 | file = SpecialFileList/SpecialFilelist.i18n.php |
835 | 928 | descmsg = filelist-desc |
836 | 929 | |
837 | 930 | Special Form |
| 931 | +aliasfile = SpecialForm/SpecialForm.alias.php |
838 | 932 | ignored = formtemplatepattern |
839 | 933 | descmsg = form-desc |
840 | 934 | |
— | — | @@ -848,6 +942,7 @@ |
849 | 943 | descmsg = spl3-desc |
850 | 944 | |
851 | 945 | Stale Pages |
| 946 | +aliasfile = StalePages/StalePages.alias.php |
852 | 947 | |
853 | 948 | String Functions |
854 | 949 | |
— | — | @@ -867,6 +962,7 @@ |
868 | 963 | descmsg = tasks_desc |
869 | 964 | |
870 | 965 | Template Link |
| 966 | +aliasfile = TemplateLink/TemplateLink.alias.php |
871 | 967 | descmsg = templatelink_desc |
872 | 968 | |
873 | 969 | Throttle |
— | — | @@ -889,6 +985,7 @@ |
890 | 986 | |
891 | 987 | Todo Tasks |
892 | 988 | file = TodoTasks/SpecialTaskList.i18n.php |
| 989 | +aliasfile = TodoTasks/SpecialTaskList.alias.php |
893 | 990 | descmsg = tasklist-parser-desc |
894 | 991 | |
895 | 992 | Tooltip |
— | — | @@ -899,6 +996,7 @@ |
900 | 997 | id = ext-translate-core |
901 | 998 | descmsg = translate-desc |
902 | 999 | file = Translate/Translate.i18n.php |
| 1000 | +aliasfile = Translate/Translate.alias.php |
903 | 1001 | optional = translate-page-paging-links, translate-languagestats-groups |
904 | 1002 | |
905 | 1003 | Translate - Page Translation |
— | — | @@ -932,6 +1030,7 @@ |
933 | 1031 | Uniwiki - Create Page |
934 | 1032 | id = ext-uniwiki-createpage |
935 | 1033 | file = uniwiki/CreatePage/CreatePage.i18n.php |
| 1034 | +aliasfile = uniwiki/CreatePage/CreatePage.alias.php |
936 | 1035 | descmsg = createpage-desc |
937 | 1036 | |
938 | 1037 | Uniwiki - Css Hooks |
— | — | @@ -1003,6 +1102,7 @@ |
1004 | 1103 | Usability Initiative - Opt In |
1005 | 1104 | id = ext-ui-optin |
1006 | 1105 | file = UsabilityInitiative/OptIn/OptIn.i18n.php |
| 1106 | +aliasfile = UsabilityInitiative/OptIn/OptIn.alias.php |
1007 | 1107 | descmsg = optin-desc |
1008 | 1108 | optional = optin-survey-answer-browser-ie5, optin-survey-answer-browser-ie6, optin-survey-answer-browser-ie7, optin-survey-answer-browser-ie8 |
1009 | 1109 | optional = optin-survey-answer-browser-ff1, optin-survey-answer-browser-ff2, optin-survey-answer-browser-ff3, optin-survey-answer-browser-cb |
— | — | @@ -1013,6 +1113,7 @@ |
1014 | 1114 | Usability Initiative - Pref Stats |
1015 | 1115 | id = ext-ui-prefstats |
1016 | 1116 | file = UsabilityInitiative/PrefStats/PrefStats.i18n.php |
| 1117 | +aliasfile = UsabilityInitiative/PrefStats/PrefStats.alias.php |
1017 | 1118 | descmsg = prefstats-desc |
1018 | 1119 | ignored = prefstats-list-elem |
1019 | 1120 | |
— | — | @@ -1023,7 +1124,9 @@ |
1024 | 1125 | |
1025 | 1126 | Usage Statistics |
1026 | 1127 | file = UsageStatistics/SpecialUserStats.i18n.php |
| 1128 | +aliasfile = UsageStatistics/SpecialUserStats.alias.php |
1027 | 1129 | |
| 1130 | + |
1028 | 1131 | User Contact Links |
1029 | 1132 | file = UserContactLinks/UserSignature.i18n.php |
1030 | 1133 | descmsg = usercontactlink-desc |
— | — | @@ -1031,32 +1134,42 @@ |
1032 | 1135 | User Images |
1033 | 1136 | |
1034 | 1137 | User Merge |
| 1138 | +aliasfile = UserMerge/UserMerge.alias.php |
1035 | 1139 | |
1036 | 1140 | User Option Stats |
| 1141 | +aliasfile = UserOptionStats/UserOptionStats.alias.php |
1037 | 1142 | |
1038 | 1143 | User Rights Notification |
1039 | 1144 | id = ext-userrightsnotif |
1040 | 1145 | file = UserRightsNotif/UserRightsNotif.i18n.php |
1041 | 1146 | |
1042 | 1147 | Vote |
| 1148 | +aliasfile = Vote/Vote.alias.php |
1043 | 1149 | |
1044 | 1150 | Watchers |
| 1151 | +aliasfile = Watchers/Watchers.alias.php |
1045 | 1152 | |
1046 | 1153 | Watch Subpages |
| 1154 | +aliasfile = WatchSubpages/WatchSubpages.alias.php |
1047 | 1155 | |
1048 | 1156 | Web Chat |
| 1157 | +aliasfile = WebChat/WebChat.alias.php |
1049 | 1158 | |
1050 | 1159 | Web Store |
1051 | 1160 | |
1052 | 1161 | What Is My IP |
| 1162 | +aliasfile = WhatIsMyIP/WhatIsMyIP.alias.php |
1053 | 1163 | |
1054 | 1164 | White List |
1055 | 1165 | file = WhiteList/WhiteListEdit.i18n.php |
| 1166 | +aliasfile = WhiteList/WhiteListEdit.alias.php |
1056 | 1167 | |
1057 | 1168 | Whos Online |
| 1169 | +aliasfile = WhosOnline/WhosOnline.alias.php |
1058 | 1170 | |
1059 | 1171 | Who Is Watching |
1060 | 1172 | file = WhoIsWatching/SpecialWhoIsWatching.i18n.php |
| 1173 | +aliasfile = WhoIsWatching/SpecialWhoIsWatching.alias.php |
1061 | 1174 | |
1062 | 1175 | Widgets |
1063 | 1176 | |
— | — | @@ -1065,6 +1178,7 @@ |
1066 | 1179 | Wiki At Home |
1067 | 1180 | descmsg = wah-desc |
1068 | 1181 | ignored = specialwikiathome |
| 1182 | +aliasfile = WikiAtHome/WikiAtHome.alias.php |
1069 | 1183 | |
1070 | 1184 | Wikidata |
1071 | 1185 | descmsg = wikidata-desc |
Index: trunk/extensions/Translate/Translate.php |
— | — | @@ -194,7 +194,7 @@ |
195 | 195 | $wgHooks['LoadExtensionSchemaUpdates'][] = 'PageTranslationHooks::schemaUpdates'; |
196 | 196 | |
197 | 197 | // Do not activate hooks if not setup properly |
198 | | - if ( !efTranslateCheckPT() ) { |
| 198 | + if ( false && !efTranslateCheckPT() ) { |
199 | 199 | $wgEnablePageTranslation = false; |
200 | 200 | return true; |
201 | 201 | } |
— | — | @@ -310,4 +310,4 @@ |
311 | 311 | function STDERR() {} |
312 | 312 | } |
313 | 313 | |
314 | | -$wgTranslateTM = false; |
\ No newline at end of file |
| 314 | +$wgTranslateTM = false; |