Interface for TtmServer that can be updated. More...
Public Member Functions | |
update (MessageHandle $handle, ?string $targetText) | |
Shovels the new translation into translation memory. | |
beginBootstrap () | |
Called when starting to fill the translation memory. | |
beginBatch () | |
Called before every batch (MessageGroup). | |
batchInsertDefinitions (array $batch) | |
Called multiple times per batch if necessary. | |
batchInsertTranslations (array $batch) | |
Called multiple times per batch if necessary. | |
endBatch () | |
Called after every batch (MessageGroup). | |
endBootstrap () | |
Do any cleanup, optimizing etc. | |
setDoReIndex () | |
Instruct the service to fully wipe the index and start from scratch. | |
Interface for TtmServer that can be updated.
Definition at line 12 of file WritableTtmServer.php.
MediaWiki\Extension\Translate\TtmServer\WritableTtmServer::batchInsertDefinitions | ( | array | $batch | ) |
Called multiple times per batch if necessary.
Implemented in MediaWiki\Extension\Translate\TtmServer\DatabaseTtmServer, MediaWiki\Extension\Translate\TtmServer\ElasticSearchTtmServer, MediaWiki\Extension\Translate\TtmServer\FakeTtmServer, and MediaWiki\Extension\Translate\TtmServer\FakeWritableTtmServer.
MediaWiki\Extension\Translate\TtmServer\WritableTtmServer::batchInsertTranslations | ( | array | $batch | ) |
Called multiple times per batch if necessary.
Implemented in MediaWiki\Extension\Translate\TtmServer\DatabaseTtmServer, MediaWiki\Extension\Translate\TtmServer\ElasticSearchTtmServer, MediaWiki\Extension\Translate\TtmServer\FakeTtmServer, and MediaWiki\Extension\Translate\TtmServer\FakeWritableTtmServer.
MediaWiki\Extension\Translate\TtmServer\WritableTtmServer::beginBatch | ( | ) |
Called before every batch (MessageGroup).
Implemented in MediaWiki\Extension\Translate\TtmServer\DatabaseTtmServer, MediaWiki\Extension\Translate\TtmServer\ElasticSearchTtmServer, MediaWiki\Extension\Translate\TtmServer\FakeTtmServer, and MediaWiki\Extension\Translate\TtmServer\FakeWritableTtmServer.
MediaWiki\Extension\Translate\TtmServer\WritableTtmServer::beginBootstrap | ( | ) |
Called when starting to fill the translation memory.
Set up necessary variables and remove old content from the server.
Implemented in MediaWiki\Extension\Translate\TtmServer\DatabaseTtmServer, MediaWiki\Extension\Translate\TtmServer\ElasticSearchTtmServer, MediaWiki\Extension\Translate\TtmServer\FakeTtmServer, and MediaWiki\Extension\Translate\TtmServer\FakeWritableTtmServer.
MediaWiki\Extension\Translate\TtmServer\WritableTtmServer::endBatch | ( | ) |
Called after every batch (MessageGroup).
Implemented in MediaWiki\Extension\Translate\TtmServer\DatabaseTtmServer, MediaWiki\Extension\Translate\TtmServer\ElasticSearchTtmServer, MediaWiki\Extension\Translate\TtmServer\FakeTtmServer, and MediaWiki\Extension\Translate\TtmServer\FakeWritableTtmServer.
MediaWiki\Extension\Translate\TtmServer\WritableTtmServer::endBootstrap | ( | ) |
MediaWiki\Extension\Translate\TtmServer\WritableTtmServer::setDoReIndex | ( | ) |
Instruct the service to fully wipe the index and start from scratch.
Implemented in MediaWiki\Extension\Translate\TtmServer\DatabaseTtmServer, MediaWiki\Extension\Translate\TtmServer\ElasticSearchTtmServer, MediaWiki\Extension\Translate\TtmServer\FakeTtmServer, and MediaWiki\Extension\Translate\TtmServer\FakeWritableTtmServer.
MediaWiki\Extension\Translate\TtmServer\WritableTtmServer::update | ( | MessageHandle | $handle, |
?string | $targetText ) |
Shovels the new translation into translation memory.
Use this for single updates (=after message edit). If no text is provided, entry will be removed from the translation memory.
MessageHandle | $handle | |
string | null | $targetText | Use null to only delete. |
Implemented in MediaWiki\Extension\Translate\TtmServer\DatabaseTtmServer, MediaWiki\Extension\Translate\TtmServer\ElasticSearchTtmServer, MediaWiki\Extension\Translate\TtmServer\FakeTtmServer, and MediaWiki\Extension\Translate\TtmServer\FakeWritableTtmServer.