mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix translation
This commit is contained in:
parent
62827c14e6
commit
2b0a789289
|
|
@ -159,10 +159,10 @@ if ($action == 'confirm_deleteproperty' && GETPOST('confirm') == 'yes') {
|
|||
$res = dolibarr_set_const($db, 'AI_CONFIGURATIONS_PROMPT', $newConfigurationsJson, 'chaine', 0, '', $conf->entity);
|
||||
if ($res) {
|
||||
header("Location: ".$_SERVER['PHP_SELF']);
|
||||
setEventMessages($langs->trans("SetupDeleted"), null, 'mesgs');
|
||||
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
|
||||
exit;
|
||||
} else {
|
||||
setEventMessages($langs->trans("ErrorDeleting"), null, 'errors');
|
||||
setEventMessages($langs->trans("NoRecordDeleted"), null, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -173,9 +173,6 @@ print load_fiche_titre($langs->trans($title), $linkback, 'title_setup');
|
|||
$head = aiAdminPrepareHead();
|
||||
print dol_get_fiche_head($head, 'settings', $langs->trans($title), -1, "fa-microchip");
|
||||
|
||||
// Setup page goes here
|
||||
//echo '<span class="opacitymedium">'.$langs->trans("AiSetupPage").'</span><br><br>';
|
||||
|
||||
|
||||
if ($action == 'edit') {
|
||||
print $formSetup->generateOutput(true);
|
||||
|
|
|
|||
|
|
@ -68,12 +68,12 @@ $format = empty($jsonData['instructions']) ? '' : $jsonData['instructions'];
|
|||
$generatedContent = $ai->generateContent($instructions, 'auto', $function, $format);
|
||||
|
||||
if (is_array($generatedContent) && $generatedContent['error']) {
|
||||
// client errors
|
||||
if ($generatedContent['code'] >= 400) {
|
||||
print "Error : " . $generatedContent['message'];
|
||||
print '<br><a href="'.DOL_MAIN_URL_ROOT.'/ai/admin/setup.php">'.$langs->trans('Check Config of Module').'</a>';
|
||||
} elseif ($generatedContent['code'] == 429) {
|
||||
// Output error
|
||||
if ($generatedContent['code'] == 429) {
|
||||
print "Quota or allowed period exceeded. Retry Later !";
|
||||
} elseif ($generatedContent['code'] >= 400) {
|
||||
print "Error : " . $generatedContent['message'];
|
||||
print '<br><a href="'.DOL_MAIN_URL_ROOT.'/ai/admin/setup.php">'.$langs->trans('ErrorGoToModuleSetup').'</a>';
|
||||
} else {
|
||||
print "Error returned by API call: " . $generatedContent['message'];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user