diff -u b/src/Plugin/tmgmt/Translator/GoogleTranslator.php b/src/Plugin/tmgmt/Translator/GoogleTranslator.php --- b/src/Plugin/tmgmt/Translator/GoogleTranslator.php +++ b/src/Plugin/tmgmt/Translator/GoogleTranslator.php @@ -124,17 +124,14 @@ * Overrides TMGMTDefaultTranslatorPluginController::checkTranslatable(). */ public function checkTranslatable(TranslatorInterface $translator, JobInterface $job) { - if (!parent::checkTranslatable($translator, $job)) { - return TranslatableResult::no(t('Cannot translate job.')); - } foreach (\Drupal::service('tmgmt.data')->filterTranslatable($job->getData()) as $value) { - // If one of the texts in this job exceeds the max character count the job - // can't be translated. + // If one of the texts in this job exceeds the max character count + // the job can't be translated. if (Unicode::strlen($value['#text']) > $this->maxCharacters) { - return TranslatableResult::no(t('Cannot translate job.')); + return TranslatableResult::no(t('The length of the job exceeds tha max character count (@count).', ['@count' => $this->maxCharacters])); } } - return TranslatableResult::yes(); + return parent::checkTranslatable($translator, $job); } /** only in patch2: unchanged: --- a/src/Tests/GoogleTranslatorTest.php +++ b/src/Tests/GoogleTranslatorTest.php @@ -87,7 +87,7 @@ class GoogleTranslatorTest extends TMGMTTestBase { // As we requested source language english it should not be included. $this->assertTrue(!isset($languages['en'])); - $this->assertTrue($job->canRequestTranslation()); + $this->assertTrue($job->canRequestTranslation()->getSuccess()); $job->requestTranslation();