Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
ScribuntoHookHandler | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
onScribuntoExternalLibraries | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
6 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Extension\Translate\MessageBundleTranslation; |
4 | |
5 | use MediaWiki\Extension\Scribunto\Hooks\ScribuntoExternalLibrariesHook; |
6 | |
7 | class ScribuntoHookHandler implements ScribuntoExternalLibrariesHook { |
8 | public function onScribuntoExternalLibraries( string $engine, array &$extraLibraries ): void { |
9 | if ( $engine !== 'lua' ) { |
10 | return; |
11 | } |
12 | |
13 | $extraLibraries['mw.ext.translate.messageBundle'] = [ |
14 | 'class' => MessageBundleLuaLibrary::class, |
15 | 'deferLoad' => true |
16 | ]; |
17 | } |
18 | } |