Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
MediaWiki\Extension\Translate\MessageGroupProcessing\TranslatableBundleImporter Class Reference

Service to import a translatable bundle from a file. More...

Inheritance diagram for MediaWiki\Extension\Translate\MessageGroupProcessing\TranslatableBundleImporter:

Public Member Functions

 __construct (WikiImporterFactory $wikiImporterFactory, TranslatablePageParser $translatablePageParser, RevisionLookup $revisionLookup, NamespaceInfo $namespaceInfo, TitleFactory $titleFactory, FormatterFactory $formatterFactory)
 
 import (string $importFilePath, string $interwikiPrefix, bool $assignKnownUsers, UserIdentity $user, MessageLocalizer $localizer, ?Title $targetPage, ?string $comment)
 
 setPageImportCompleteCallback (callable $callable)
 
 onAfterImportPage ( $title, $foreignTitle, $revCount, $sRevCount, $pageInfo)
 

Static Public Member Functions

static getInstance ()
 Factory method used to initialize this HookHandler.
 

Detailed Description

Service to import a translatable bundle from a file.

Uses WikiImporter from MediaWiki core.

Since
2023.05 @license GPL-2.0-or-later
Author
Abijeet Patro

Definition at line 32 of file TranslatableBundleImporter.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Extension\Translate\MessageGroupProcessing\TranslatableBundleImporter::__construct ( WikiImporterFactory $wikiImporterFactory,
TranslatablePageParser $translatablePageParser,
RevisionLookup $revisionLookup,
NamespaceInfo $namespaceInfo,
TitleFactory $titleFactory,
FormatterFactory $formatterFactory )

Definition at line 43 of file TranslatableBundleImporter.php.

Member Function Documentation

◆ getInstance()

static MediaWiki\Extension\Translate\MessageGroupProcessing\TranslatableBundleImporter::getInstance ( )
static

Factory method used to initialize this HookHandler.

Definition at line 60 of file TranslatableBundleImporter.php.

◆ import()

MediaWiki\Extension\Translate\MessageGroupProcessing\TranslatableBundleImporter::import ( string $importFilePath,
string $interwikiPrefix,
bool $assignKnownUsers,
UserIdentity $user,
MessageLocalizer $localizer,
?Title $targetPage,
?string $comment )

Definition at line 64 of file TranslatableBundleImporter.php.

◆ onAfterImportPage()

MediaWiki\Extension\Translate\MessageGroupProcessing\TranslatableBundleImporter::onAfterImportPage ( $title,
$foreignTitle,
$revCount,
$sRevCount,
$pageInfo )

Definition at line 162 of file TranslatableBundleImporter.php.

◆ setPageImportCompleteCallback()

MediaWiki\Extension\Translate\MessageGroupProcessing\TranslatableBundleImporter::setPageImportCompleteCallback ( callable $callable)

Definition at line 124 of file TranslatableBundleImporter.php.


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