Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
MediaWiki\Extension\Translate\TtmServer\FakeWritableTtmServer Class Reference
Inheritance diagram for MediaWiki\Extension\Translate\TtmServer\FakeWritableTtmServer:
MediaWiki\Extension\Translate\TtmServer\TtmServer MediaWiki\Extension\Translate\TtmServer\WritableTtmServer

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.
 
 isFrozen ()
 
 setDoReIndex ()
 Instruct the service to fully wipe the index and start from scratch.
 
- Public Member Functions inherited from MediaWiki\Extension\Translate\TtmServer\TtmServer
 __construct (array $config)
 

Additional Inherited Members

- Static Public Member Functions inherited from MediaWiki\Extension\Translate\TtmServer\TtmServer
static sortSuggestions (array $suggestions)
 
static onDelete (WikiPage $wikipage)
 Hook: ArticleDeleteComplete.
 
static onChange (MessageHandle $handle)
 Called from TranslateEditAddons::onSave.
 
static onGroupChange (MessageHandle $handle, array $old)
 
- Protected Attributes inherited from MediaWiki\Extension\Translate\TtmServer\TtmServer
array $config
 

Detailed Description

Definition at line 8 of file FakeWritableTtmServer.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Extension\Translate\TtmServer\FakeWritableTtmServer::__construct ( )

Definition at line 9 of file FakeWritableTtmServer.php.

Member Function Documentation

◆ batchInsertDefinitions()

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

Called multiple times per batch if necessary.

Implements MediaWiki\Extension\Translate\TtmServer\WritableTtmServer.

Definition at line 23 of file FakeWritableTtmServer.php.

◆ batchInsertTranslations()

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

Called multiple times per batch if necessary.

Implements MediaWiki\Extension\Translate\TtmServer\WritableTtmServer.

Definition at line 26 of file FakeWritableTtmServer.php.

◆ beginBatch()

MediaWiki\Extension\Translate\TtmServer\FakeWritableTtmServer::beginBatch ( )

Called before every batch (MessageGroup).

Implements MediaWiki\Extension\Translate\TtmServer\WritableTtmServer.

Definition at line 20 of file FakeWritableTtmServer.php.

◆ beginBootstrap()

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

Called when starting to fill the translation memory.

Set up necessary variables and remove old content from the server.

Implements MediaWiki\Extension\Translate\TtmServer\WritableTtmServer.

Definition at line 17 of file FakeWritableTtmServer.php.

◆ endBatch()

MediaWiki\Extension\Translate\TtmServer\FakeWritableTtmServer::endBatch ( )

Called after every batch (MessageGroup).

Implements MediaWiki\Extension\Translate\TtmServer\WritableTtmServer.

Definition at line 29 of file FakeWritableTtmServer.php.

◆ endBootstrap()

MediaWiki\Extension\Translate\TtmServer\FakeWritableTtmServer::endBootstrap ( )

Do any cleanup, optimizing etc.

Implements MediaWiki\Extension\Translate\TtmServer\WritableTtmServer.

Definition at line 32 of file FakeWritableTtmServer.php.

◆ isFrozen()

MediaWiki\Extension\Translate\TtmServer\FakeWritableTtmServer::isFrozen ( )

Definition at line 35 of file FakeWritableTtmServer.php.

◆ setDoReIndex()

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

Instruct the service to fully wipe the index and start from scratch.

Implements MediaWiki\Extension\Translate\TtmServer\WritableTtmServer.

Definition at line 39 of file FakeWritableTtmServer.php.

◆ update()

MediaWiki\Extension\Translate\TtmServer\FakeWritableTtmServer::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.

Implements MediaWiki\Extension\Translate\TtmServer\WritableTtmServer.

Definition at line 13 of file FakeWritableTtmServer.php.


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