Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
MediaWiki\Extension\Translate\TtmServer\WritableTtmServer Interface Reference

Interface for TtmServer that can be updated. More...

Inheritance diagram for MediaWiki\Extension\Translate\TtmServer\WritableTtmServer:
MediaWiki\Extension\Translate\TtmServer\DatabaseTtmServer MediaWiki\Extension\Translate\TtmServer\ElasticSearchTtmServer MediaWiki\Extension\Translate\TtmServer\FakeTtmServer MediaWiki\Extension\Translate\TtmServer\FakeWritableTtmServer

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.
 

Detailed Description

Interface for TtmServer that can be updated.

Definition at line 12 of file WritableTtmServer.php.

Member Function Documentation

◆ batchInsertDefinitions()

MediaWiki\Extension\Translate\TtmServer\WritableTtmServer::batchInsertDefinitions ( array $batch)

◆ batchInsertTranslations()

MediaWiki\Extension\Translate\TtmServer\WritableTtmServer::batchInsertTranslations ( array $batch)

◆ beginBatch()

◆ beginBootstrap()

MediaWiki\Extension\Translate\TtmServer\WritableTtmServer::beginBootstrap ( )

◆ endBatch()

◆ endBootstrap()

◆ setDoReIndex()

MediaWiki\Extension\Translate\TtmServer\WritableTtmServer::setDoReIndex ( )

◆ update()

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.

Parameters
MessageHandle$handle
string | null$targetTextUse 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.


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