Parse, validate and import translations from a CSV file. More...
Public Member Functions | |
| __construct (private readonly WikiPageFactory $wikiPageFactory,) | |
| parseFile (string $csvFilePath) | |
| Parse and validate the CSV file. | |
| importData (array $messagesWithTranslations, UserIdentity $user, string $comment, ?callable $progressReporter=null) | |
| Import the data returned from the parseFile method. | |
Parse, validate and import translations from a CSV file.
Definition at line 24 of file CsvTranslationImporter.php.
| MediaWiki\Extension\Translate\MessageGroupProcessing\CsvTranslationImporter::__construct | ( | private readonly WikiPageFactory | $wikiPageFactory | ) |
Definition at line 26 of file CsvTranslationImporter.php.
| MediaWiki\Extension\Translate\MessageGroupProcessing\CsvTranslationImporter::importData | ( | array | $messagesWithTranslations, |
| UserIdentity | $user, | ||
| string | $comment, | ||
| ?callable | $progressReporter = null ) |
Import the data returned from the parseFile method.
| array<int,array{messageTitle:string,translations:array<string,string>}> | $messagesWithTranslations | |
| UserIdentity | $user | |
| string | $comment | |
| null|callable(Title,PageUpdateStatus[],int,int):void | $progressReporter If not null, called with the current message title, the per-language import results for that message, the number of messages to import and the number of messages imported so far |
Definition at line 142 of file CsvTranslationImporter.php.
| MediaWiki\Extension\Translate\MessageGroupProcessing\CsvTranslationImporter::parseFile | ( | string | $csvFilePath | ) |
Parse and validate the CSV file.
Definition at line 36 of file CsvTranslationImporter.php.