Translation aid that provides suggestion from machine translation services. More...
Public Member Functions | |
populateQueries () | |
getData () | |
Translation aid class should implement this function. | |
Public Member Functions inherited from MediaWiki\Extension\Translate\TranslatorInterface\Aid\QueryAggregatorAwareTranslationAid | |
setQueryAggregator (QueryAggregator $aggregator) | |
Public Member Functions inherited from MediaWiki\Extension\Translate\TranslatorInterface\Aid\TranslationAid | |
__construct (MessageGroup $group, MessageHandle $handle, IContextSource $context, TranslationAidDataProvider $dataProvider) | |
Protected Member Functions | |
formatSuggestion (array $queryData) | |
Protected Member Functions inherited from MediaWiki\Extension\Translate\TranslatorInterface\Aid\QueryAggregatorAwareTranslationAid | |
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 Public Member Functions inherited from MediaWiki\Extension\Translate\TranslatorInterface\Aid\TranslationAid | |
static | getTypes () |
List of available message types mapped to the classes implementing them. | |
Protected Attributes inherited from MediaWiki\Extension\Translate\TranslatorInterface\Aid\TranslationAid | |
$group | |
$handle | |
$context | |
$dataProvider | |
Translation aid that provides suggestion from machine translation services.
Definition at line 17 of file MachineTranslationAid.php.
|
protected |
Definition at line 65 of file MachineTranslationAid.php.
MediaWiki\Extension\Translate\TranslatorInterface\Aid\MachineTranslationAid::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 55 of file MachineTranslationAid.php.
MediaWiki\Extension\Translate\TranslatorInterface\Aid\MachineTranslationAid::populateQueries | ( | ) |
Implements MediaWiki\Extension\Translate\WebService\QueryAggregatorAware.
Definition at line 18 of file MachineTranslationAid.php.