Index: trunk/extensions/UploadWizard/UploadWizardHooks.php |
— | — | @@ -73,51 +73,51 @@ |
74 | 74 | 'UploadWizardPage.js' |
75 | 75 | ), |
76 | 76 | 'languageScripts' => array( |
77 | | - 'am' => 'resources/languages/classes/LanguageAm.js', |
78 | | - 'ar' => 'resources/languages/classes/LanguageAr.js', |
79 | | - 'bat-smg' => 'resources/languages/classes/LanguageBat_smg.js', |
80 | | - 'be' => 'resources/languages/classes/LanguageBe.js', |
81 | | - 'be-tarask' => 'resources/languages/classes/LanguageBe_tarask.js', |
82 | | - 'bh' => 'resources/languages/classes/LanguageBh.js', |
83 | | - 'bs' => 'resources/languages/classes/LanguageBs.js', |
84 | | - 'cs' => 'resources/languages/classes/LanguageCs.js', |
85 | | - 'cu' => 'resources/languages/classes/LanguageCu.js', |
86 | | - 'cy' => 'resources/languages/classes/LanguageCy.js', |
87 | | - 'dsb' => 'resources/languages/classes/LanguageDsb.js', |
88 | | - 'fr' => 'resources/languages/classes/LanguageFr.js', |
89 | | - 'ga' => 'resources/languages/classes/LanguageGa.js', |
90 | | - 'gd' => 'resources/languages/classes/LanguageGd.js', |
91 | | - 'gv' => 'resources/languages/classes/LanguageGv.js', |
92 | | - 'he' => 'resources/languages/classes/LanguageHe.js', |
93 | | - 'hi' => 'resources/languages/classes/LanguageHi.js', |
94 | | - 'hr' => 'resources/languages/classes/LanguageHr.js', |
95 | | - 'hsb' => 'resources/languages/classes/LanguageHsb.js', |
96 | | - 'hy' => 'resources/languages/classes/LanguageHy.js', |
97 | | - 'ksh' => 'resources/languages/classes/LanguageKsh.js', |
98 | | - 'ln' => 'resources/languages/classes/LanguageLn.js', |
99 | | - 'lt' => 'resources/languages/classes/LanguageLt.js', |
100 | | - 'lv' => 'resources/languages/classes/LanguageLv.js', |
101 | | - 'mg' => 'resources/languages/classes/LanguageMg.js', |
102 | | - 'mk' => 'resources/languages/classes/LanguageMk.js', |
103 | | - 'mo' => 'resources/languages/classes/LanguageMo.js', |
104 | | - 'mt' => 'resources/languages/classes/LanguageMt.js', |
105 | | - 'nso' => 'resources/languages/classes/LanguageNso.js', |
106 | | - 'pl' => 'resources/languages/classes/LanguagePl.js', |
107 | | - 'pt-br' => 'resources/languages/classes/LanguagePt_br.js', |
108 | | - 'ro' => 'resources/languages/classes/LanguageRo.js', |
109 | | - 'ru' => 'resources/languages/classes/LanguageRu.js', |
110 | | - 'se' => 'resources/languages/classes/LanguageSe.js', |
111 | | - 'sh' => 'resources/languages/classes/LanguageSh.js', |
112 | | - 'sk' => 'resources/languages/classes/LanguageSk.js', |
113 | | - 'sl' => 'resources/languages/classes/LanguageSl.js', |
114 | | - 'sma' => 'resources/languages/classes/LanguageSma.js', |
115 | | - 'sr' => 'resources/languages/classes/LanguageSr.js', |
116 | | - 'sr-ec' => 'resources/languages/classes/LanguageSr_ec.js', |
117 | | - 'sr-el' => 'resources/languages/classes/LanguageSr_el.js', |
118 | | - 'ti' => 'resources/languages/classes/LanguageTi.js', |
119 | | - 'tl' => 'resources/languages/classes/LanguageTl.js', |
120 | | - 'uk' => 'resources/languages/classes/LanguageUk.js', |
121 | | - 'wa' => 'resources/languages/classes/LanguageWa.js' |
| 77 | + 'am' => 'resources/language/classes/LanguageAm.js', |
| 78 | + 'ar' => 'resources/language/classes/LanguageAr.js', |
| 79 | + 'bat-smg' => 'resources/language/classes/LanguageBat_smg.js', |
| 80 | + 'be' => 'resources/language/classes/LanguageBe.js', |
| 81 | + 'be-tarask' => 'resources/language/classes/LanguageBe_tarask.js', |
| 82 | + 'bh' => 'resources/language/classes/LanguageBh.js', |
| 83 | + 'bs' => 'resources/language/classes/LanguageBs.js', |
| 84 | + 'cs' => 'resources/language/classes/LanguageCs.js', |
| 85 | + 'cu' => 'resources/language/classes/LanguageCu.js', |
| 86 | + 'cy' => 'resources/language/classes/LanguageCy.js', |
| 87 | + 'dsb' => 'resources/language/classes/LanguageDsb.js', |
| 88 | + 'fr' => 'resources/language/classes/LanguageFr.js', |
| 89 | + 'ga' => 'resources/language/classes/LanguageGa.js', |
| 90 | + 'gd' => 'resources/language/classes/LanguageGd.js', |
| 91 | + 'gv' => 'resources/language/classes/LanguageGv.js', |
| 92 | + 'he' => 'resources/language/classes/LanguageHe.js', |
| 93 | + 'hi' => 'resources/language/classes/LanguageHi.js', |
| 94 | + 'hr' => 'resources/language/classes/LanguageHr.js', |
| 95 | + 'hsb' => 'resources/language/classes/LanguageHsb.js', |
| 96 | + 'hy' => 'resources/language/classes/LanguageHy.js', |
| 97 | + 'ksh' => 'resources/language/classes/LanguageKsh.js', |
| 98 | + 'ln' => 'resources/language/classes/LanguageLn.js', |
| 99 | + 'lt' => 'resources/language/classes/LanguageLt.js', |
| 100 | + 'lv' => 'resources/language/classes/LanguageLv.js', |
| 101 | + 'mg' => 'resources/language/classes/LanguageMg.js', |
| 102 | + 'mk' => 'resources/language/classes/LanguageMk.js', |
| 103 | + 'mo' => 'resources/language/classes/LanguageMo.js', |
| 104 | + 'mt' => 'resources/language/classes/LanguageMt.js', |
| 105 | + 'nso' => 'resources/language/classes/LanguageNso.js', |
| 106 | + 'pl' => 'resources/language/classes/LanguagePl.js', |
| 107 | + 'pt-br' => 'resources/language/classes/LanguagePt_br.js', |
| 108 | + 'ro' => 'resources/language/classes/LanguageRo.js', |
| 109 | + 'ru' => 'resources/language/classes/LanguageRu.js', |
| 110 | + 'se' => 'resources/language/classes/LanguageSe.js', |
| 111 | + 'sh' => 'resources/language/classes/LanguageSh.js', |
| 112 | + 'sk' => 'resources/language/classes/LanguageSk.js', |
| 113 | + 'sl' => 'resources/language/classes/LanguageSl.js', |
| 114 | + 'sma' => 'resources/language/classes/LanguageSma.js', |
| 115 | + 'sr' => 'resources/language/classes/LanguageSr.js', |
| 116 | + 'sr-ec' => 'resources/language/classes/LanguageSr_ec.js', |
| 117 | + 'sr-el' => 'resources/language/classes/LanguageSr_el.js', |
| 118 | + 'ti' => 'resources/language/classes/LanguageTi.js', |
| 119 | + 'tl' => 'resources/language/classes/LanguageTl.js', |
| 120 | + 'uk' => 'resources/language/classes/LanguageUk.js', |
| 121 | + 'wa' => 'resources/language/classes/LanguageWa.js' |
122 | 122 | ), |
123 | 123 | 'styles' => array( |
124 | 124 | 'resources/jquery/jquery.tipsy.css', |
— | — | @@ -295,4 +295,18 @@ |
296 | 296 | } |
297 | 297 | return true; |
298 | 298 | } |
| 299 | + |
| 300 | + public static function CanonicalNamespaces( array $namespaces ) { |
| 301 | + global $wgNamespaceAliases; |
| 302 | + // add proper aliases for NS_FILE, otherwise an error is being thrown |
| 303 | + // in combined.min.js when the content language code is not 'en': |
| 304 | + // "unrecognized namespace=File" due to undefiled 'File' key in wgNamespaceIds |
| 305 | + if ( !isset( $wgNamespaceAliases['File'] ) ) { |
| 306 | + $wgNamespaceAliases['File'] = NS_FILE; |
| 307 | + } |
| 308 | + if ( !isset( $wgNamespaceAliases['File_talk'] ) ) { |
| 309 | + $wgNamespaceAliases['File_talk'] = NS_FILE_TALK; |
| 310 | + } |
| 311 | + return true; |
| 312 | + } |
299 | 313 | } |
Index: trunk/extensions/UploadWizard/UploadWizardDependencyLoader.php |
— | — | @@ -40,7 +40,7 @@ |
41 | 41 | $this->inlineScripts = array(); |
42 | 42 | if ( $langCode !== null ) { |
43 | 43 | if ( $langCode !== 'en' && isset( $module['languageScripts'][$langCode] ) ) { |
44 | | - $this->inlineScripts[] = $module['languageScripts'][$langCode]; |
| 44 | + $this->scripts[] = $module['languageScripts'][$langCode]; |
45 | 45 | } |
46 | 46 | $this->inlineScripts[] = UploadWizardMessages::getMessagesJs( 'UploadWizard', $langCode ); |
47 | 47 | } |
Index: trunk/extensions/UploadWizard/UploadWizard.php |
— | — | @@ -59,3 +59,4 @@ |
60 | 60 | |
61 | 61 | // for ResourceLoader |
62 | 62 | $wgHooks['ResourceLoaderRegisterModules'][] = 'UploadWizardHooks::resourceLoaderRegisterModules'; |
| 63 | +$wgHooks['CanonicalNamespaces'][] = 'UploadWizardHooks::canonicalNamespaces'; |