Service to import a translatable bundle from a file. More...
Public Member Functions | |
| __construct (private readonly WikiImporterFactory $wikiImporterFactory, private readonly TranslatablePageParser $translatablePageParser, private readonly RevisionLookup $revisionLookup, private readonly NamespaceInfo $namespaceInfo, private readonly TitleFactory $titleFactory, private readonly 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) | |
| @inheritDoc | |
Static Public Member Functions | |
| static | getInstance () |
| Factory method used to initialize this HookHandler. | |
Service to import a translatable bundle from a file.
Uses WikiImporter from MediaWiki core.
Definition at line 32 of file TranslatableBundleImporter.php.
| MediaWiki\Extension\Translate\MessageGroupProcessing\TranslatableBundleImporter::__construct | ( | private readonly WikiImporterFactory | $wikiImporterFactory, |
| private readonly TranslatablePageParser | $translatablePageParser, | ||
| private readonly RevisionLookup | $revisionLookup, | ||
| private readonly NamespaceInfo | $namespaceInfo, | ||
| private readonly TitleFactory | $titleFactory, | ||
| private readonly FormatterFactory | $formatterFactory ) |
Definition at line 38 of file TranslatableBundleImporter.php.
|
static |
Factory method used to initialize this HookHandler.
Definition at line 49 of file TranslatableBundleImporter.php.
| MediaWiki\Extension\Translate\MessageGroupProcessing\TranslatableBundleImporter::import | ( | string | $importFilePath, |
| string | $interwikiPrefix, | ||
| bool | $assignKnownUsers, | ||
| UserIdentity | $user, | ||
| MessageLocalizer | $localizer, | ||
| ?Title | $targetPage, | ||
| ?string | $comment ) |
| TranslatableBundleImportException |
Definition at line 54 of file TranslatableBundleImporter.php.
| MediaWiki\Extension\Translate\MessageGroupProcessing\TranslatableBundleImporter::onAfterImportPage | ( | $title, | |
| $foreignTitle, | |||
| $revCount, | |||
| $sRevCount, | |||
| $pageInfo ) |
@inheritDoc
Definition at line 158 of file TranslatableBundleImporter.php.
| MediaWiki\Extension\Translate\MessageGroupProcessing\TranslatableBundleImporter::setPageImportCompleteCallback | ( | callable | $callable | ) |
Definition at line 115 of file TranslatableBundleImporter.php.