From 8f89b3beafe135ac508f7196ac5b793f53a3f8ef Mon Sep 17 00:00:00 2001 From: mic Date: Mon, 29 Jul 2024 23:30:55 +0200 Subject: [PATCH] connecting message added to i18n en --- _locales/en/messages.json | 4 ++++ api_webchat/controller.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index ff2e35cc..079b58e7 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -434,5 +434,9 @@ "chagtp_api_send_button": { "message": "Using model", "description": "" + }, + "chagtp_api_connecting": { + "message": "Will attempt to connect to OpenAI ChatGPT using the API key provided...", + "description": "" } } \ No newline at end of file diff --git a/api_webchat/controller.js b/api_webchat/controller.js index c141f4d0..e4ac25ed 100644 --- a/api_webchat/controller.js +++ b/api_webchat/controller.js @@ -59,7 +59,7 @@ let prefs_api = await browser.storage.sync.get({api_key_chatgpt: '', model_chatg // const openaiApiKey = params.get('openapi-key'); //console.log(">>>>>>>>>>> api_key_chatgpt: " + prefs_api_key.api_key_chatgpt); worker.postMessage({ type: 'init', api_key_chatgpt: prefs_api.api_key_chatgpt, model_chatgpt: prefs_api.model_chatgpt}); -messagesArea.appendUserMessage("Will attempt to connect to OpenAI using the API key provided.", "info"); +messagesArea.appendUserMessage(browser.i18n.getMessage("chagtp_api_connecting"), "info"); // Event listeners for worker messages // TODO I'm sure there's a better way to do this