Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
Interfaces.php
Go to the documentation of this file.
1<?php
30 public function query( $sourceLanguage, $targetLanguage, $text );
31
38 public function isLocalSuggestion( array $suggestion );
39
46 public function expandLocation( array $suggestion );
47}
48
64 public function update( MessageHandle $handle, $targetText );
65
71 public function beginBootstrap();
72
76 public function beginBatch();
77
83 public function batchInsertDefinitions( array $batch );
84
90 public function batchInsertTranslations( array $batch );
91
95 public function endBatch();
96
100 public function endBootstrap();
101
109 public function getMirrors();
110
119 public function isFrozen();
120
125 public function setDoReIndex();
126}
127
142 public function search( $queryString, $opts, $highlight );
143
148 public function getFacets( $resultset );
149
154 public function getTotalHits( $resultset );
155
160 public function getDocuments( $resultset );
161}
Class for pointing to messages, like Title class is for titles.
Interface for TTMServer that can be queried (=all of them).
expandLocation(array $suggestion)
Given suggestion returned by this TTMServer, constructs fully qualified URL to the location of the tr...
query( $sourceLanguage, $targetLanguage, $text)
Fetches all relevant suggestions for given text.
isLocalSuggestion(array $suggestion)
Determines if the suggestion returned by this TTMServer comes from this wiki or any other wiki.
Interface for TTMServer that can act as backend for translation search.
getDocuments( $resultset)
search( $queryString, $opts, $highlight)
Performs a search in the translation database.
getTotalHits( $resultset)
getFacets( $resultset)
Interface for TTMServer that can be updated.
endBatch()
Called before every batch (MessageGroup).
isFrozen()
Check if the service is frozen, attempting to write to a frozen service may lead to errors or unexpec...
getMirrors()
Get the list of services to duplicate writes to make them "mirrors" of this service.
setDoReIndex()
Instruct the service to fully wipe the index and start from scratch.
batchInsertDefinitions(array $batch)
Called multiple times per batch if necessary.
batchInsertTranslations(array $batch)
Called multiple times per batch if necessary.
beginBatch()
Called before every batch (MessageGroup).
update(MessageHandle $handle, $targetText)
Shovels the new translation into translation memory.
beginBootstrap()
Called when starting to fill the translation memory.
endBootstrap()
Do any cleanup, optimizing etc.