Add all translations

This commit is contained in:
Matej Bačo
2024-01-09 15:39:38 +00:00
parent e59bdbbb8f
commit beeb643c66
72 changed files with 1753 additions and 1053 deletions
@@ -90,12 +90,12 @@ class DevGenerateTranslations extends Action
'content' => $enTranslation
]
]
]);
], [], 60);
$body = \json_decode($response->getBody(), true);
if($response->getStatusCode() >= 400) {
throw new Exception($response->getBody());
throw new Exception($response->getBody() . ' with status code ' . $response->getStatusCode() . ' for language ' . $targetLanguage . ' and message ' . $enTranslation);
}
return $body['choices'][0]['message']['content'];