Translation aid that provides suggestion from translation memory. More...
Public Member Functions | |
__construct (MessageGroup $group, MessageHandle $handle, IContextSource $context, TranslationAidDataProvider $dataProvider) | |
populateQueries () | |
getData () | |
Translation aid class should implement this function. | |
![]() | |
setQueryAggregator (QueryAggregator $aggregator) | |
Protected Member Functions | |
formatWebSuggestions (array $queryData) | |
formatInternalSuggestions (array $queryData, ReadableTtmServer $s, string $serviceName, string $sourceLanguage) | |
![]() | |
storeQuery (TranslationWebService $service, string $from, string $to, string $text) | |
Stores a web service query for later execution. | |
getQueryData () | |
Returns all stored queries. | |
Additional Inherited Members | |
![]() | |
static | getTypes () |
List of available message types mapped to the classes implementing them. | |
![]() | |
$group | |
$handle | |
$context | |
$dataProvider | |
Translation aid that provides suggestion from translation memory.
Definition at line 28 of file TTMServerAid.php.
MediaWiki\Extension\Translate\TranslatorInterface\Aid\TTMServerAid::__construct | ( | MessageGroup | $group, |
MessageHandle | $handle, | ||
IContextSource | $context, | ||
TranslationAidDataProvider | $dataProvider ) |
Reimplemented from MediaWiki\Extension\Translate\TranslatorInterface\Aid\TranslationAid.
Definition at line 34 of file TTMServerAid.php.
|
protected |
Definition at line 130 of file TTMServerAid.php.
|
protected |
Definition at line 95 of file TTMServerAid.php.
MediaWiki\Extension\Translate\TranslatorInterface\Aid\TTMServerAid::getData | ( | ) |
Translation aid class should implement this function.
Return value should be an array with keys and values. Because these are used in the MediaWiki API, lists (numeric keys) should have key '**' set to element name that describes the list values. For example if the translation aid provides translation suggestions, it would return an array which has key '**' set to 'suggestion' and then list of arrays, each containing fields for the information of the suggestions. See InOtherLanguagesAid for example.
TranslationHelperException | Used to signal unexpected errors to aid debugging |
Reimplemented from MediaWiki\Extension\Translate\TranslatorInterface\Aid\TranslationAid.
Definition at line 58 of file TTMServerAid.php.
MediaWiki\Extension\Translate\TranslatorInterface\Aid\TTMServerAid::populateQueries | ( | ) |
Implements MediaWiki\Extension\Translate\WebService\QueryAggregatorAware.
Definition at line 44 of file TTMServerAid.php.