Implements support for Yandex translation api v1. More...
Public Member Functions | |
__construct (HttpRequestFactory $httpRequestFactory, string $serviceName, array $config) | |
getType () | |
@inheritDoc | |
Public Member Functions inherited from MediaWiki\Extension\Translate\WebService\TranslationWebService | |
getName () | |
Gets the name of this service, for example to display it for the user. | |
getQueries (string $text, string $sourceLanguage, string $targetLanguage) | |
Get queries for this service. | |
getResultData (TranslationQueryResponse $response) | |
Get the web service specific response returned by QueryAggregator. | |
__construct (string $service, array $config) | |
isSupportedLanguagePair (string $sourceLanguage, string $targetLanguage) | |
Test whether given language pair is supported by the service. | |
setLogger (LoggerInterface $logger) | |
checkTranslationServiceFailure () | |
Checks whether the service has exceeded failure count. | |
Protected Member Functions | |
mapCode (string $code) | |
@inheritDoc | |
doPairs () | |
@inheritDoc | |
getQuery (string $text, string $sourceLanguage, string $targetLanguage) | |
@inheritDoc | |
parseResponse (TranslationQueryResponse $reply) | |
@inheritDoc | |
Protected Member Functions inherited from MediaWiki\Extension\Translate\WebService\TranslationWebService | |
getSupportedLanguagePairs () | |
wrapUntranslatable (string $text) | |
Some mangling that tries to keep some parts of the message unmangled by the translation service. | |
unwrapUntranslatable (string $text) | |
Undo the hopyfully untouched mangling done by wrapUntranslatable. | |
reportTranslationServiceFailure (string $msg) | |
Increases the failure count for this service. | |
Additional Inherited Members | |
Static Public Member Functions inherited from MediaWiki\Extension\Translate\WebService\TranslationWebService | |
static | factory (string $serviceName, array $config) |
Get a webservice handler. | |
Protected Attributes inherited from MediaWiki\Extension\Translate\WebService\TranslationWebService | |
$service | |
$config | |
$logger | |
$serviceFailureCount = 5 | |
$serviceFailurePeriod = 900 | |
Implements support for Yandex translation api v1.
Definition at line 18 of file YandexWebService.php.
MediaWiki\Extension\Translate\WebService\YandexWebService::__construct | ( | HttpRequestFactory | $httpRequestFactory, |
string | $serviceName, | ||
array | $config ) |
Definition at line 22 of file YandexWebService.php.
|
protected |
@inheritDoc
Reimplemented from MediaWiki\Extension\Translate\WebService\TranslationWebService.
Definition at line 45 of file YandexWebService.php.
|
protected |
@inheritDoc
Reimplemented from MediaWiki\Extension\Translate\WebService\TranslationWebService.
Definition at line 74 of file YandexWebService.php.
MediaWiki\Extension\Translate\WebService\YandexWebService::getType | ( | ) |
@inheritDoc
Reimplemented from MediaWiki\Extension\Translate\WebService\TranslationWebService.
Definition at line 32 of file YandexWebService.php.
|
protected |
@inheritDoc
Reimplemented from MediaWiki\Extension\Translate\WebService\TranslationWebService.
Definition at line 37 of file YandexWebService.php.
|
protected |
@inheritDoc
Reimplemented from MediaWiki\Extension\Translate\WebService\TranslationWebService.
Definition at line 100 of file YandexWebService.php.