Skip to content

Commit 89835ce

Browse files
authored
Merge pull request #630 from alchemy-fr/PS-887-improve-config
PS-887 allow aws translate to translate a lot of word
2 parents 32b5b59 + 9826dc2 commit 89835ce

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

databox/api/src/Integration/Aws/Translate/TranslateAction.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function doHandle(RunContext $context): void
4646
$srcLocales = $preferredSourceLanguages;
4747
$srcLocales = array_merge($srcLocales, $lc, [AttributeInterface::NO_LOCALE]);
4848
} else {
49-
$srcLocales = [AttributeInterface::NO_LOCALE];
49+
$srcLocales = array_merge($allEnabledLocales, [AttributeInterface::NO_LOCALE]);
5050
}
5151

5252
if (empty($translatedLanguages)) {
@@ -145,11 +145,6 @@ public function doHandle(RunContext $context): void
145145

146146
foreach ($toTranslate['destinationLanguages'] as $destinationLanguage) {
147147
$result = $client->translateText([
148-
'Settings' => [
149-
'Brevity' => 'ON',
150-
'Formality' => 'FORMAL',
151-
'Profanity' => 'MASK',
152-
],
153148
'SourceLanguageCode' => $toTranslate['sourceLanguage'],
154149
'TargetLanguageCode' => $destinationLanguage,
155150
'Text' => $toTranslate['text'],

0 commit comments

Comments
 (0)