r78879 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78878‎ | r78879 | r78880 >
Date:10:51, 23 December 2010
Author:questpc
Status:deferred
Tags:
Comment:
Fixed ResourceLoader path to resources/language/classes (previousely renamed folder). Fixed an exception in combined.min.js due to undefined File namespace key in wgNamespaceIds. It is made for 1.18a and default non-English locale.
Modified paths:
  • /trunk/extensions/UploadWizard/UploadWizard.php (modified) (history)
  • /trunk/extensions/UploadWizard/UploadWizardDependencyLoader.php (modified) (history)
  • /trunk/extensions/UploadWizard/UploadWizardHooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/UploadWizardHooks.php
@@ -73,51 +73,51 @@
7474 'UploadWizardPage.js'
7575 ),
7676 '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'
122122 ),
123123 'styles' => array(
124124 'resources/jquery/jquery.tipsy.css',
@@ -295,4 +295,18 @@
296296 }
297297 return true;
298298 }
 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+ }
299313 }
Index: trunk/extensions/UploadWizard/UploadWizardDependencyLoader.php
@@ -40,7 +40,7 @@
4141 $this->inlineScripts = array();
4242 if ( $langCode !== null ) {
4343 if ( $langCode !== 'en' && isset( $module['languageScripts'][$langCode] ) ) {
44 - $this->inlineScripts[] = $module['languageScripts'][$langCode];
 44+ $this->scripts[] = $module['languageScripts'][$langCode];
4545 }
4646 $this->inlineScripts[] = UploadWizardMessages::getMessagesJs( 'UploadWizard', $langCode );
4747 }
Index: trunk/extensions/UploadWizard/UploadWizard.php
@@ -59,3 +59,4 @@
6060
6161 // for ResourceLoader
6262 $wgHooks['ResourceLoaderRegisterModules'][] = 'UploadWizardHooks::resourceLoaderRegisterModules';
 63+$wgHooks['CanonicalNamespaces'][] = 'UploadWizardHooks::canonicalNamespaces';

Status & tagging log