mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Add all translations
This commit is contained in:
@@ -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'];
|
||||
|
||||
Reference in New Issue
Block a user