Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | declare( strict_types = 1 ); |
3 | |
4 | // phpcs:disable MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName |
5 | |
6 | namespace MediaWiki\Extension\Translate\TranslatorInterface; |
7 | |
8 | use MediaWiki\Extension\Translate\MessageLoading\MessageHandle; |
9 | use MediaWiki\User\User; |
10 | |
11 | /** |
12 | * This is a hook handler interface, see docs/Hooks.md in core. |
13 | * Use the hook name "Translate:newTranslation" to register handlers implementing this interface. |
14 | * |
15 | * @stable to implement |
16 | * @ingroup Hooks |
17 | */ |
18 | interface NewTranslationHook { |
19 | /** |
20 | * Event triggered when non-fuzzy translation has been made |
21 | * |
22 | * @param MessageHandle $handle |
23 | * @param int $revisionId |
24 | * @param string $text Content of the new translation |
25 | * @param User $user User who created or changed the translation |
26 | * @return bool|void True or no return value to continue or false to abort |
27 | */ |
28 | public function onTranslate_newTranslation( MessageHandle $handle, int $revisionId, string $text, User $user ); |
29 | } |