Skip to content

Commit dd023ac

Browse files
committed
improve aws translate config
1 parent 32b5b59 commit dd023ac

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

Lines changed: 2 additions & 3 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([AttributeInterface::NO_LOCALE], $allEnabledLocales);
5050
}
5151

5252
if (empty($translatedLanguages)) {
@@ -146,8 +146,7 @@ public function doHandle(RunContext $context): void
146146
foreach ($toTranslate['destinationLanguages'] as $destinationLanguage) {
147147
$result = $client->translateText([
148148
'Settings' => [
149-
'Brevity' => 'ON',
150-
'Formality' => 'FORMAL',
149+
'Formality' => 'INFORMAL',
151150
'Profanity' => 'MASK',
152151
],
153152
'SourceLanguageCode' => $toTranslate['sourceLanguage'],

0 commit comments

Comments
 (0)