Resources.php

Go to the documentation of this file.
00001 <?php
00009 $resourcePaths = array(
00010     'localBasePath' => __DIR__,
00011     'remoteExtPath' => 'Translate'
00012 );
00013 
00014 $wgResourceModules['ext.translate'] = array(
00015     'styles' => 'resources/css/ext.translate.css',
00016     'position' => 'top',
00017 ) + $resourcePaths;
00018 
00019 $wgResourceModules['ext.translate.base'] = array(
00020     'scripts' => 'resources/js/ext.translate.base.js',
00021     'dependencies' => array(
00022         'mediawiki.util',
00023         'mediawiki.api',
00024         'ext.translate.hooks'
00025     ),
00026     'messages' => array(
00027         'translate-js-support-unsaved-warning',
00028     ),
00029 ) + $resourcePaths;
00030 
00031 $wgResourceModules['ext.translate.dropdownmenu'] = array(
00032     'styles' => 'resources/css/ext.translate.dropdownmenu.css',
00033     'scripts' => 'resources/js/ext.translate.dropdownmenu.js',
00034 ) + $resourcePaths;
00035 
00036 $wgResourceModules['ext.translate.editor'] = array(
00037     'scripts' => array(
00038         'resources/js/ext.translate.editor.js',
00039         'resources/js/ext.translate.editor.helpers.js',
00040         'resources/js/ext.translate.proofread.js',
00041         'resources/js/ext.translate.pagemode.js',
00042     ),
00043     'styles' => array(
00044         'resources/css/ext.translate.editor.css',
00045         'resources/css/ext.translate.proofread.css',
00046         'resources/css/ext.translate.pagemode.css',
00047     ),
00048     'dependencies' => array(
00049         'ext.translate.base',
00050         'ext.translate.storage',
00051         'ext.translate.hooks',
00052         'ext.translate.dropdownmenu',
00053         'jquery.uls.grid',
00054         'mediawiki.util',
00055         'mediawiki.Uri',
00056         'mediawiki.api',
00057         'mediawiki.api.edit',
00058         'mediawiki.api.parse',
00059         'mediawiki.user',
00060         'mediawiki.jqueryMsg',
00061         'jquery.makeCollapsible',
00062         'jquery.tipsy',
00063         'jquery.textchange',
00064         'jquery.autosize',
00065         'jquery.textSelection',
00066     ),
00067     'messages' => array(
00068         'tux-status-translated',
00069         'tux-status-saving',
00070         'tux-status-unsaved',
00071         'tux-editor-placeholder',
00072         'tux-editor-paste-original-button-label',
00073         'tux-editor-discard-changes-button-label',
00074         'tux-editor-save-button-label',
00075         'tux-editor-skip-button-label',
00076         'tux-editor-cancel-button-label',
00077         'tux-editor-confirm-button-label',
00078         'tux-editor-shortcut-info',
00079         'tux-editor-edit-desc',
00080         'tux-editor-add-desc',
00081         'tux-editor-message-desc-more',
00082         'tux-editor-message-desc-less',
00083         'tux-editor-suggestions-title',
00084         'tux-editor-in-other-languages',
00085         'tux-editor-need-more-help',
00086         'tux-editor-ask-help',
00087         'tux-editor-tm-match',
00088         'tux-warnings-more',
00089         'tux-warnings-hide',
00090         'tux-editor-save-failed',
00091         'tux-editor-n-uses',
00092         'tux-editor-doc-editor-placeholder',
00093         'tux-editor-doc-editor-save',
00094         'tux-editor-doc-editor-cancel',
00095         'translate-edit-nopermission',
00096         'translate-edit-askpermission',
00097         'tux-editor-outdated-warning',
00098         'tux-editor-outdated-warning-diff-link',
00099         'tux-proofread-action-tooltip',
00100         'tux-proofread-edit-label',
00101         'tux-proofread-translated-by-self',
00102         'tux-editor-close-tooltip',
00103         'tux-editor-expand-tooltip',
00104         'tux-editor-collapse-tooltip',
00105         'tux-editor-message-tools-history',
00106         'tux-editor-message-tools-translations',
00107         'tux-editor-loading',
00108     ),
00109     'position' => 'top',
00110 ) + $resourcePaths;
00111 
00112 $wgResourceModules['ext.translate.groupselector'] = array(
00113     'styles' => 'resources/css/ext.translate.groupselector.css',
00114     'scripts' => 'resources/js/ext.translate.groupselector.js',
00115     'position' => 'top',
00116     'dependencies' => array(
00117         'ext.translate.base',
00118         'jquery.uls.grid',
00119         'ext.translate.statsbar',
00120         'mediawiki.jqueryMsg',
00121         'ext.translate.loader',
00122         'jquery.ui.position.custom',
00123     ),
00124     'messages' => array(
00125         'translate-msggroupselector-projects',
00126         'translate-msggroupselector-search-placeholder',
00127         'translate-msggroupselector-search-all',
00128         'translate-msggroupselector-search-recent',
00129         'translate-msggroupselector-view-subprojects',
00130     ),
00131 ) + $resourcePaths;
00132 
00133 $wgResourceModules['ext.translate.helplink'] = array(
00134     'styles' => 'resources/css/ext.translate.helplink.css',
00135     'position' => 'top',
00136 ) + $resourcePaths;
00137 
00138 $wgResourceModules['ext.translate.hooks'] = array(
00139     'scripts' => 'resources/js/ext.translate.hooks.js',
00140     'position' => 'top',
00141 ) + $resourcePaths;
00142 
00143 $wgResourceModules['ext.translate.loader'] = array(
00144     'styles' => 'resources/css/ext.translate.loader.css',
00145     'position' => 'top',
00146 ) + $resourcePaths;
00147 
00148 $wgResourceModules['ext.translate.messagetable'] = array(
00149     'scripts' => 'resources/js/ext.translate.messagetable.js',
00150     'styles' => 'resources/css/ext.translate.messagetable.css',
00151     'position' => 'top',
00152     'dependencies' => array(
00153         'ext.translate.base',
00154         'ext.translate.hooks',
00155         'mediawiki.util',
00156         'jquery.appear',
00157         'mediawiki.jqueryMsg',
00158         'ext.translate.parsers',
00159         'ext.translate.loader',
00160         'jquery.textchange',
00161     ),
00162     'messages' => array(
00163         'translate-messagereview-progress',
00164         'translate-messagereview-failure',
00165         'translate-messagereview-done',
00166         'api-error-badtoken',
00167         'api-error-emptypage',
00168         'api-error-fuzzymessage',
00169         'api-error-invalidrevision',
00170         'api-error-owntranslation',
00171         'api-error-unknownmessage',
00172         'api-error-unknownerror',
00173         'tpt-unknown-page',
00174         'tux-edit',
00175         'tux-status-fuzzy',
00176         'tux-status-optional',
00177         'tux-status-translated',
00178         'tux-status-proofread',
00179         'translate-edit-title',
00180         'tux-messagetable-more-messages',
00181         'tux-messagetable-loading-messages',
00182         'tux-message-filter-result',
00183         'tux-message-filter-advanced-button',
00184         'tux-empty-list-all',
00185         'tux-empty-list-all-guide',
00186         'tux-empty-list-translated',
00187         'tux-empty-list-translated-guide',
00188         'tux-empty-list-translated-action',
00189         'tux-empty-list-other',
00190         'tux-empty-list-other-guide',
00191         'tux-empty-list-other-action',
00192         'tux-empty-list-other-link',
00193         'tux-empty-no-messages-to-display',
00194         'tux-empty-show-optional-messages',
00195         'tux-message-filter-placeholder',
00196         'translate-language-disabled',
00197         'tux-empty-no-outdated-messages',
00198         'tux-empty-nothing-new-to-proofread',
00199         'tux-empty-you-can-help-providing',
00200         'tux-empty-you-can-review-already-proofread',
00201         'tux-empty-nothing-to-proofread',
00202         'tux-empty-there-are-optional',
00203     ),
00204 ) + $resourcePaths;
00205 
00206 $wgResourceModules['ext.translate.messagewebimporter'] = array(
00207     'styles' => 'resources/css/ext.translate.messagewebimporter.css',
00208     'position' => 'top',
00209 ) + $resourcePaths;
00210 
00211 $wgResourceModules['ext.translate.multiselectautocomplete'] = array(
00212     'scripts' => 'resources/js/ext.translate.multiselectautocomplete.js',
00213     'dependencies' => array(
00214         'jquery.ui.autocomplete',
00215     ),
00216     'position' => 'top',
00217 ) + $resourcePaths;
00218 
00219 $wgResourceModules['ext.translate.navitoggle'] = array(
00220     'skinScripts' => array(
00221         'vector' => 'resources/js/ext.translate.navitoggle.js',
00222     ),
00223     'skinStyles' => array(
00224         'vector' => 'resources/css/ext.translate.navitoggle.css',
00225     ),
00226 ) + $resourcePaths;
00227 
00228 $wgResourceModules['ext.translate.pagetranslation.uls'] = array(
00229     'scripts' => 'resources/js/ext.translate.pagetranslation.uls.js',
00230     'dependencies' => array(
00231         'ext.uls.init',
00232         'mediawiki.util',
00233     ),
00234 ) + $resourcePaths;
00235 
00236 $wgResourceModules['ext.translate.parsers'] = array(
00237     'scripts' => 'resources/js/ext.translate.parsers.js',
00238     'dependencies' => array(
00239         'mediawiki.util',
00240     ),
00241 ) + $resourcePaths;
00242 
00243 $wgResourceModules['ext.translate.quickedit'] = array(
00244     'scripts' => 'resources/js/ext.translate.quickedit.js',
00245     'styles' => 'resources/css/ext.translate.quickedit.css',
00246     'messages' => array( 'translate-js-nonext', 'translate-js-save-failed' ),
00247     'dependencies' => array(
00248         'jquery.form',
00249         'jquery.ui.dialog',
00250         'jquery.autosize',
00251         'mediawiki.util',
00252     ),
00253 ) + $resourcePaths;
00254 
00255 $wgResourceModules['ext.translate.selecttoinput'] = array(
00256     'scripts' => 'resources/js/ext.translate.selecttoinput.js',
00257 ) + $resourcePaths;
00258 
00259 $wgResourceModules['ext.translate.special.aggregategroups'] = array(
00260     'scripts' => 'resources/js/ext.translate.special.aggregategroups.js',
00261     'styles' => 'resources/css/ext.translate.special.aggregategroups.css',
00262     'position' => 'top',
00263     'dependencies' => array(
00264         'mediawiki.util',
00265         'jquery.async',
00266         'jquery.chosen'
00267     ),
00268     'messages' => array(
00269         'tpt-aggregategroup-remove-confirm',
00270     ),
00271 ) + $resourcePaths;
00272 
00273 $wgResourceModules['ext.translate.special.importtranslations'] = array(
00274     'scripts' => 'resources/js/ext.translate.special.importtranslations.js',
00275     'dependencies' => array(
00276         'jquery.ui.autocomplete',
00277     ),
00278 ) + $resourcePaths;
00279 
00280 $wgResourceModules['ext.translate.special.languagestats'] = array(
00281     'scripts' => 'resources/js/ext.translate.special.languagestats.js',
00282     'styles' => 'resources/css/ext.translate.special.languagestats.css',
00283     'messages' => array(
00284         'translate-langstats-expandall',
00285         'translate-langstats-collapseall',
00286         'translate-langstats-expand',
00287         'translate-langstats-collapse'
00288     ),
00289     'dependencies' => 'jquery.tablesorter',
00290 ) + $resourcePaths;
00291 
00292 $wgResourceModules['ext.translate.special.managegroups'] = array(
00293     'styles' => 'resources/css/ext.translate.special.managegroups.css',
00294     'position' => 'top',
00295 ) + $resourcePaths;
00296 
00297 $wgResourceModules['ext.translate.special.pagetranslation'] = array(
00298     'scripts' => 'resources/js/ext.translate.special.pagetranslation.js',
00299     'styles' => 'resources/css/ext.translate.special.pagetranslation.css',
00300     'dependencies' => array(
00301         'ext.translate.multiselectautocomplete',
00302     ),
00303     'position' => 'top',
00304 ) + $resourcePaths;
00305 
00306 $wgResourceModules['ext.translate.special.searchtranslations'] = array(
00307     'scripts' => 'resources/js/ext.translate.special.searchtranslations.js',
00308     'styles' => 'resources/css/ext.translate.special.searchtranslations.css',
00309     'dependencies' => array(
00310         'ext.translate.editor',
00311         'ext.uls.init',
00312         'ext.uls.geoclient',
00313         'ext.translate.groupselector',
00314     ),
00315     'messages' => array(
00316         'translate-documentation-language',
00317         'translate-search-more-languages-info',
00318         'translate-search-more-groups-info',
00319     ),
00320     'position' => 'top',
00321 ) + $resourcePaths;
00322 
00323 $wgResourceModules['ext.translate.special.supportedlanguages'] = array(
00324     'styles' => 'resources/css/ext.translate.special.supportedlanguages.css',
00325     'position' => 'top',
00326 ) + $resourcePaths;
00327 
00328 $wgResourceModules['ext.translate.special.translate'] = array(
00329     'styles' => 'resources/css/ext.translate.special.translate.css',
00330     'scripts' => 'resources/js/ext.translate.special.translate.js',
00331     'position' => 'top',
00332     'dependencies' => array(
00333         'mediawiki.jqueryMsg',
00334         'mediawiki.Uri',
00335         'mediawiki.api.parse',
00336         'ext.translate.base',
00337         'ext.translate.groupselector',
00338         'ext.translate.messagetable',
00339         'ext.translate.navitoggle',
00340         'ext.translate.workflowselector',
00341         'ext.uls.init',
00342     ),
00343     'messages' => array(
00344         'translate-workflow-set-do',
00345         'translate-workflow-set-doing',
00346         'translate-workflow-set-done',
00347         'translate-workflow-set-error-alreadyset',
00348         'translate-documentation-language',
00349         'translate-workflow-state-',
00350         'tpt-discouraged-language-force',
00351         'tpt-discouraged-language',
00352         'tux-editor-proofreading-hide-own-translations',
00353         'tux-editor-proofreading-show-own-translations',
00354     ),
00355 ) + $resourcePaths;
00356 
00357 $wgResourceModules['ext.translate.special.translatesandbox'] = array(
00358     'scripts' => 'resources/js/ext.translate.special.translatesandbox.js',
00359     'styles' => 'resources/css/ext.translate.special.translatesandbox.css',
00360     'position' => 'top',
00361     'dependencies' => array(
00362         'ext.translate.translationstashstorage',
00363         'mediawiki.api',
00364         'jquery.uls.grid',
00365         'jquery.ui.dialog',
00366         'mediawiki.jqueryMsg',
00367     ),
00368     'messages' => array(
00369         'tsb-accept-button-label',
00370         'tsb-reject-button-label',
00371         'tsb-accept-all-button-label',
00372         'tsb-reject-all-button-label',
00373         'tsb-reminder-link-text',
00374         'tsb-translations-source',
00375         'tsb-translations-user',
00376         'tsb-translations-current',
00377         'tsb-request-count',
00378     ),
00379 ) + $resourcePaths;
00380 
00381 $wgResourceModules['ext.translate.special.translationstash'] = array(
00382     'scripts' => 'resources/js/ext.translate.special.translationstash.js',
00383     'styles' => 'resources/css/ext.translate.special.translationstash.css',
00384     'position' => 'top',
00385     'dependencies' => array(
00386         'ext.translate.editor',
00387         'ext.translate.messagetable',
00388         'ext.translate.translationstashstorage',
00389         'mediawiki.language',
00390     ),
00391     'messages' => array(
00392         'translate-translationstash-translations',
00393         'translate-translationstash-skip-button-label',
00394         'tsb-limit-reached-title',
00395         'tsb-limit-reached-body',
00396     ),
00397 ) + $resourcePaths;
00398 
00399 $wgResourceModules['ext.translate.special.translationstats'] = array(
00400     'scripts' => 'resources/js/ext.translate.special.translationstats.js',
00401     'dependencies' => array(
00402         'jquery.ui.datepicker',
00403     ),
00404 ) + $resourcePaths;
00405 
00406 $wgResourceModules['ext.translate.statsbar'] = array(
00407     'styles' => 'resources/css/ext.translate.statsbar.css',
00408     'scripts' => 'resources/js/ext.translate.statsbar.js',
00409     'messages' => array(
00410         'translate-statsbar-tooltip',
00411         'translate-statsbar-tooltip-with-fuzzy',
00412     ),
00413     'position' => 'top',
00414 ) + $resourcePaths;
00415 
00416 $wgResourceModules['ext.translate.storage'] = array(
00417     'scripts' => 'resources/js/ext.translate.storage.js',
00418 ) + $resourcePaths;
00419 
00420 
00421 $wgResourceModules['ext.translate.tabgroup'] = array(
00422     'styles' => 'resources/css/ext.translate.tabgroup.css',
00423     'position' => 'top',
00424 ) + $resourcePaths;
00425 
00426 $wgResourceModules['ext.translate.translationstashstorage'] = array(
00427     'scripts' => 'resources/js/ext.translate.translationstashstorage.js',
00428 ) + $resourcePaths;
00429 
00430 $wgResourceModules['ext.translate.workflowselector'] = array(
00431     'styles' => 'resources/css/ext.translate.workflowselector.css',
00432     'scripts' => 'resources/js/ext.translate.workflowselector.js',
00433     'messages' => array(
00434         'translate-workflow-set-doing',
00435         'translate-workflowstatus',
00436     ),
00437     'dependencies' => array(
00438         'ext.translate.dropdownmenu',
00439     ),
00440 ) + $resourcePaths;
00441 
00442 // Third party module
00443 $wgResourceModules['jquery.autosize'] = array(
00444     'scripts' => 'resources/js/jquery.autosize.js',
00445 ) + $resourcePaths;
00446 
00447 $wgResourceModules['jquery.textchange'] = array(
00448     'scripts' => 'resources/js/jquery.textchange.js',
00449 ) + $resourcePaths;
00450 
00451 // Use different name to not conflict with core.
00452 // MediaWiki 1.21 has 1.8.x, which is too old for us.
00453 $wgResourceModules['jquery.ui.position.custom'] = array(
00454     'scripts' => 'resources/js/jquery.ui.position.js',
00455 ) + $resourcePaths;
00456 
00457 $wgHooks['ResourceLoaderTestModules'][] =
00458     // Dependencies must be arrays here
00459     function ( array &$modules ) use ( $resourcePaths ) {
00460         $modules['qunit']['ext.translate.parsers.test'] = array(
00461             'scripts' => array( 'tests/qunit/ext.translate.parsers.test.js' ),
00462             'dependencies' => array( 'ext.translate.parsers' ),
00463         ) + $resourcePaths;
00464 
00465         return true;
00466     };
Generated on Tue Oct 29 00:00:24 2013 for MediaWiki Translate Extension by  doxygen 1.6.3