Index: trunk/extensions/Translate/Translate.php |
— | — | @@ -51,6 +51,7 @@ |
52 | 52 | // Register initialization hook |
53 | 53 | $wgExtensionFunctions[] = 'efTranslateInit'; |
54 | 54 | $wgHooks['CanonicalNamespaces'][] = 'efTranslateNamespaces'; |
| 55 | +$wgHooks['ResourceLoaderRegisterModules'][] = 'efTranslateResources'; |
55 | 56 | |
56 | 57 | // Register special pages into MediaWiki |
57 | 58 | $wgSpecialPages['Translate'] = 'SpecialTranslate'; |
— | — | @@ -404,11 +405,11 @@ |
405 | 406 | |
406 | 407 | |
407 | 408 | # Startup code |
408 | | - |
409 | | -if ( class_exists( 'ResourceLoader' ) ) { |
| 409 | +function efTranslateResources() { |
410 | 410 | ResourceLoader::register( array( 'translate-css' => |
411 | 411 | new ResourceLoaderFileModule( array( 'styles' => 'extensions/Translate/Translate.css' ) ) |
412 | 412 | ) ); |
| 413 | + return true; |
413 | 414 | } |
414 | 415 | |
415 | 416 | function efTranslateNamespaces( &$list ) { |