Implements support for MinT translation service via the Cxserver API. More...
Protected Member Functions | |
handlePairsForService (array $response) | |
getServiceName () | |
handleServiceResponse (array $responseBody) | |
wrapUntranslatable (string $text) | |
Some mangling that tries to keep some parts of the message unmangled by the translation service. | |
Protected Member Functions inherited from MediaWiki\Extension\Translate\WebService\CxserverWebService | |
mapCode (string $code) | |
Map a MediaWiki (almost standard) language code to the code used by the translation service. | |
doPairs () | |
Get the list of supported language pairs for the web service. | |
getQuery (string $text, string $sourceLanguage, string $targetLanguage) | |
Get the query. | |
parseResponse (TranslationQueryResponse $response) | |
Get the response. | |
Protected Member Functions inherited from MediaWiki\Extension\Translate\WebService\TranslationWebService | |
getSupportedLanguagePairs () | |
unwrapUntranslatable (string $text) | |
Undo the hopyfully untouched mangling done by wrapUntranslatable. | |
reportTranslationServiceFailure (string $msg) | |
Increases the failure count for this service. | |
Additional Inherited Members | |
Public Member Functions inherited from MediaWiki\Extension\Translate\WebService\CxserverWebService | |
__construct (HttpRequestFactory $httpRequestFactory, string $service, array $config) | |
getType () | |
Returns the type of this web service. | |
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. | |
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 MinT translation service via the Cxserver API.
Definition at line 13 of file MintCxserverWebService.php.
|
protected |
Reimplemented from MediaWiki\Extension\Translate\WebService\CxserverWebService.
Definition at line 35 of file MintCxserverWebService.php.
|
protected |
Reimplemented from MediaWiki\Extension\Translate\WebService\CxserverWebService.
Definition at line 23 of file MintCxserverWebService.php.
|
protected |
Reimplemented from MediaWiki\Extension\Translate\WebService\CxserverWebService.
Definition at line 39 of file MintCxserverWebService.php.
|
protected |
Some mangling that tries to keep some parts of the message unmangled by the translation service.
Most of them support either class=notranslate or translate=no.
Reimplemented from MediaWiki\Extension\Translate\WebService\TranslationWebService.
Definition at line 43 of file MintCxserverWebService.php.