diff --git a/htdocs/ai/admin/custom_prompt.php b/htdocs/ai/admin/custom_prompt.php index f401e2b9686..56c29fa0e5e 100644 --- a/htdocs/ai/admin/custom_prompt.php +++ b/htdocs/ai/admin/custom_prompt.php @@ -24,13 +24,11 @@ // Load Dolibarr environment require '../../main.inc.php'; - -global $langs, $user, $conf; - -// Libraries require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"; require_once '../lib/ai.lib.php'; +$langs->loadLangs(array("admin")); + // Parameters $action = GETPOST('action', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); diff --git a/htdocs/ai/admin/setup.php b/htdocs/ai/admin/setup.php index a49320ffcae..4fdb1f02435 100644 --- a/htdocs/ai/admin/setup.php +++ b/htdocs/ai/admin/setup.php @@ -24,13 +24,11 @@ // Load Dolibarr environment require '../../main.inc.php'; - -global $langs, $user; - -// Libraries require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"; require_once '../lib/ai.lib.php'; +$langs->loadLangs(array("admin")); + // Parameters $action = GETPOST('action', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 49e1d02e212..febd6c97152 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2433,4 +2433,12 @@ UrlPublicInterfaceLabelAdmin=Alternative URL for public interface UrlPublicInterfaceHelpAdmin=It is possible to define an alias to the web server and thus make available the public interface with another URL (the virtual host server must act as a proxy on the standard URL) ExportUseForce=Use the parameter -f ExportUseForceHelp=Force to continue the export even when an error is found (Backup may not be reliable) -CustomPrompt=Custom prompts \ No newline at end of file +CustomPrompt=Custom prompts +AiDescription=AI (Artificial Intelligence) features +AiDescriptionLong=Provides AI (Artificial Intelligence) features in different part of the application. Need external AI API. +AI_KEY_API_CHATGPT= Key for ChatGPT IA api +AiSetup=AI module setup +AiCustomPrompt=AI customs prompt +AI_CONFIGURATIONS_PROMPT=Custom prompt +ImageGeneration=Image generation +AIPromptForFeatures=AI custom prompts for features \ No newline at end of file diff --git a/htdocs/langs/en_US/ai.lang b/htdocs/langs/en_US/ai.lang deleted file mode 100644 index 0c1790ee3cf..00000000000 --- a/htdocs/langs/en_US/ai.lang +++ /dev/null @@ -1,8 +0,0 @@ -AiDescription=AI (Artificial Intelligence) features -AiDescriptionLong=Provides AI (Artificial Intelligence) features in different part of the application. Need external AI API. -AI_KEY_API_CHATGPT= Key for ChatGPT IA api -AiSetup=AI module setup -AiCustomPrompt=AI customs prompt -AI_CONFIGURATIONS_PROMPT=Custom prompt -ImageGeneration=Image generation -AIPromptForFeatures=AI custom prompts for features \ No newline at end of file