Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
MediaWiki\Extension\Translate\TranslatorInterface\TranslateEditAddons Class Reference

Various editing enhancements to the edit page interface. More...

Static Public Member Functions

static disallowLangTranslations (Title $title, User $user, string $action, &$result)
 Prevent translations to non-translatable languages for the group Hook: getUserPermissionsErrorsExpensive.
 
static onSaveComplete (WikiPage $wikiPage, UserIdentity $userIdentity, string $summary, int $flags, RevisionRecord $revisionRecord)
 Runs message checks, adds tp:transver tags and updates statistics.
 
static updateTransverTag (MessageHandle $handle, int $revision, string $text, User $user)
 Adds tag which identifies the revision of source message at that time.
 
static disablePreSaveTransform (WikiPage $wikiPage, ParserOptions $popts)
 Hook: ArticlePrepareTextForEdit.
 

Detailed Description

Various editing enhancements to the edit page interface.

Partly succeeded by the new ajax-enhanced editor but kept for compatibility. Also has code that is still relevant, like the hooks on save.

Author
Niklas Laxström
Siebrand Mazeland @license GPL-2.0-or-later

Definition at line 34 of file TranslateEditAddons.php.

Member Function Documentation

◆ disablePreSaveTransform()

static MediaWiki\Extension\Translate\TranslatorInterface\TranslateEditAddons::disablePreSaveTransform ( WikiPage $wikiPage,
ParserOptions $popts )
static

Hook: ArticlePrepareTextForEdit.

Definition at line 272 of file TranslateEditAddons.php.

◆ disallowLangTranslations()

static MediaWiki\Extension\Translate\TranslatorInterface\TranslateEditAddons::disallowLangTranslations ( Title $title,
User $user,
string $action,
& $result )
static

Prevent translations to non-translatable languages for the group Hook: getUserPermissionsErrorsExpensive.

Parameters
Title$title
User$user
string$action
mixed&$result

Definition at line 44 of file TranslateEditAddons.php.

◆ onSaveComplete()

static MediaWiki\Extension\Translate\TranslatorInterface\TranslateEditAddons::onSaveComplete ( WikiPage $wikiPage,
UserIdentity $userIdentity,
string $summary,
int $flags,
RevisionRecord $revisionRecord )
static

Runs message checks, adds tp:transver tags and updates statistics.

Hook: PageSaveComplete

Definition at line 94 of file TranslateEditAddons.php.

◆ updateTransverTag()

static MediaWiki\Extension\Translate\TranslatorInterface\TranslateEditAddons::updateTransverTag ( MessageHandle $handle,
int $revision,
string $text,
User $user )
static

Adds tag which identifies the revision of source message at that time.

This is used to show diff against current version of source message when updating a translation. Hook: Translate:newTranslation

Definition at line 235 of file TranslateEditAddons.php.


The documentation for this class was generated from the following file: