Hooks for Translate extension. More...
Public Member Functions | |
__construct (RevisionLookup $revisionLookup, ILoadBalancer $loadBalancer, Config $config) | |
onRevisionRecordInserted ( $revisionRecord) | |
@inheritDoc | |
onListDefinedTags (&$tags) | |
@inheritDoc | |
onChangeTagsListActive (&$tags) | |
@inheritDoc | |
Static Public Member Functions | |
static | setupTranslate () |
Do late setup that depends on configuration. | |
static | onUserGetReservedNames (array &$names) |
Hook: UserGetReservedNames Prevents anyone from registering or logging in as FuzzyBot. | |
static | onAbuseFilterAlterVariables (VariableHolder &$vars, Title $title, User $user) |
Used for setting an AbuseFilter variable. | |
static | onAbuseFilterComputeVariable (string $method, VariableHolder $vars, array $parameters, ?string &$result) |
Computes the translate_source_text and translate_target_language AbuseFilter variables. | |
static | onAbuseFilterBuilder (array &$builderValues) |
Register AbuseFilter variables provided by Translate. | |
static | setupParserHooks (Parser $parser) |
Hook: ParserFirstCallInit Registers <languages> tag with the parser. | |
static | schemaUpdates (DatabaseUpdater $updater) |
Hook: LoadExtensionSchemaUpdates. | |
static | onPageContentLanguage (Title $title, &$pageLang) |
Hook: PageContentLanguage Set the correct page content language for translation units. | |
static | translateMessageDocumentationLanguage (array &$names, ?string $code) |
Hook: LanguageGetTranslatedLanguageNames Hook: TranslateSupportedLanguages. | |
static | searchProfile (array &$profiles) |
Hook: SpecialSearchProfiles. | |
static | searchProfileForm (SpecialSearch $search, string &$form, string $profile, string $term, array $opts) |
Hook: SpecialSearchProfileForm. | |
static | searchProfileSetupEngine (SpecialSearch $search, string $profile, SearchEngine $engine) |
Hook: SpecialSearchSetupEngine. | |
static | preventCategorization (Parser $parser, string &$html) |
Hook: ParserAfterTidy. | |
static | showFakeCategories (OutputPage $outputPage, ParserOutput $parserOutput) |
Hook: OutputPageParserOutput. | |
static | addConfig (array &$vars, OutputPage $out) |
Hook: MakeGlobalVariablesScript Adds $wgTranslateDocumentationLanguageCode to ResourceLoader configuration when Special:Translate is shown. | |
static | onAdminLinks (ALTree $tree) |
Hook: AdminLinks. | |
static | onMergeAccountFromTo (User $oldUser, User $newUser) |
Hook: MergeAccountFromTo For UserMerge extension. | |
static | onDeleteAccount (User $oldUser) |
Hook: DeleteAccount For UserMerge extension. | |
static | onAbortEmailNotificationReview (User $editor, Title $title, RecentChange $rc) |
Hook: AbortEmailNotification. | |
static | onTitleIsAlwaysKnown ( $target, &$isKnown) |
Hook: TitleIsAlwaysKnown Make Special:MyLanguage links red if the target page doesn't exist. | |
static | setupTranslateParserFunction (Parser $parser) |
Hook: ParserFirstCallInit. | |
static | translateRenderParserFunction (Parser $parser) |
static | validateMessage (IContextSource $context, Content $content, Status $status, string $summary, User $user) |
Runs the configured validator to ensure that the message meets the required criteria. | |
Hooks for Translate extension.
Contains class with basic non-feature specific hooks. Main subsystems, like page translation, should have their own hook handler. * Most of the hooks on this class are still old style static functions, but new new hooks should use the new style hook handlers with interfaces.
Definition at line 75 of file HookHandler.php.
MediaWiki\Extension\Translate\HookHandler::__construct | ( | RevisionLookup | $revisionLookup, |
ILoadBalancer | $loadBalancer, | ||
Config | $config ) |
Definition at line 88 of file HookHandler.php.
|
static |
Hook: MakeGlobalVariablesScript Adds $wgTranslateDocumentationLanguageCode to ResourceLoader configuration when Special:Translate is shown.
Definition at line 785 of file HookHandler.php.
|
static |
Hook: AbortEmailNotification.
Definition at line 859 of file HookHandler.php.
|
static |
Used for setting an AbuseFilter variable.
Definition at line 441 of file HookHandler.php.
|
static |
Register AbuseFilter variables provided by Translate.
Definition at line 490 of file HookHandler.php.
|
static |
Computes the translate_source_text and translate_target_language AbuseFilter variables.
Definition at line 463 of file HookHandler.php.
|
static |
Hook: AdminLinks.
Definition at line 807 of file HookHandler.php.
MediaWiki\Extension\Translate\HookHandler::onChangeTagsListActive | ( | & | $tags | ) |
@inheritDoc
Definition at line 1026 of file HookHandler.php.
|
static |
Hook: DeleteAccount For UserMerge extension.
Definition at line 843 of file HookHandler.php.
MediaWiki\Extension\Translate\HookHandler::onListDefinedTags | ( | & | $tags | ) |
@inheritDoc
Definition at line 1021 of file HookHandler.php.
|
static |
Hook: MergeAccountFromTo For UserMerge extension.
Definition at line 821 of file HookHandler.php.
|
static |
Hook: PageContentLanguage Set the correct page content language for translation units.
Title | $title | |
Language | StubUserLang | string | &$pageLang |
Definition at line 613 of file HookHandler.php.
MediaWiki\Extension\Translate\HookHandler::onRevisionRecordInserted | ( | $revisionRecord | ) |
@inheritDoc
Definition at line 984 of file HookHandler.php.
|
static |
Hook: TitleIsAlwaysKnown Make Special:MyLanguage links red if the target page doesn't exist.
A bit hacky because the core code is not so flexible.
Title | $target | Title object that is being checked |
bool | null | &$isKnown | Whether MediaWiki currently thinks this page is known |
Definition at line 875 of file HookHandler.php.
|
static |
Hook: UserGetReservedNames Prevents anyone from registering or logging in as FuzzyBot.
Definition at line 435 of file HookHandler.php.
|
static |
Hook: ParserAfterTidy.
Definition at line 746 of file HookHandler.php.
|
static |
Hook: LoadExtensionSchemaUpdates.
Definition at line 507 of file HookHandler.php.
|
static |
Hook: SpecialSearchProfiles.
Definition at line 641 of file HookHandler.php.
|
static |
Hook: SpecialSearchProfileForm.
Definition at line 667 of file HookHandler.php.
|
static |
Hook: SpecialSearchSetupEngine.
Definition at line 728 of file HookHandler.php.
|
static |
Hook: ParserFirstCallInit Registers <languages> tag with the parser.
Definition at line 501 of file HookHandler.php.
|
static |
Do late setup that depends on configuration.
Definition at line 99 of file HookHandler.php.
|
static |
Hook: ParserFirstCallInit.
Definition at line 897 of file HookHandler.php.
|
static |
Hook: OutputPageParserOutput.
Definition at line 773 of file HookHandler.php.
|
static |
Hook: LanguageGetTranslatedLanguageNames Hook: TranslateSupportedLanguages.
Definition at line 624 of file HookHandler.php.
|
static |
Definition at line 901 of file HookHandler.php.
|
static |
Runs the configured validator to ensure that the message meets the required criteria.
Hook: EditFilterMergedContent
Definition at line 920 of file HookHandler.php.