From d89f9cb43c3368e5d02b4682d7dcd21be1608161 Mon Sep 17 00:00:00 2001 From: Manfred Egger Date: Mon, 18 Mar 2024 13:51:36 +0100 Subject: [PATCH] Make it possible to exclude certain fields via translateWithDeepl, not only include them --- Classes/Service/DeeplTranslationService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/Service/DeeplTranslationService.php b/Classes/Service/DeeplTranslationService.php index 9347909..81c60b1 100644 --- a/Classes/Service/DeeplTranslationService.php +++ b/Classes/Service/DeeplTranslationService.php @@ -408,8 +408,8 @@ protected function canFieldBeTranslated(string $tableName, string $fieldName, ?s $result = false; } elseif (($tcaConfiguration['l10n_mode'] ?? '') === 'exclude') { $result = false; - } elseif ($tcaConfiguration['translateWithDeepl'] ?? false) { - $result = true; + } elseif (isset($tcaConfiguration['translateWithDeepl'])) { + $result = (bool)$tcaConfiguration['translateWithDeepl']; } elseif ($tcaConfiguration['config']['type'] === 'input') { $result = true; if (isset($tcaConfiguration['renderType']) && $tcaConfiguration['renderType'] !== 'default') {