Checks whether a translator is available.
TranslatorInterface $translator: The translator entity.
\Drupal\tmgmt\Translator\AvailableResult The result of the availability check.
Overrides TranslatorPluginBase::checkAvailable
function checkAvailable(TranslatorInterface $translator) {
if ($translator
->getSetting('action') == 'not_available') {
return AvailableResult::no(t('@translator is not available. Make sure it is properly <a href=:configured>configured</a>.', [
'@translator' => $translator
->label(),
':configured' => $translator
->toUrl()
->toString(),
]));
}
return parent::checkAvailable($translator);
}