translated some hardcoded strings

This commit is contained in:
mic 2024-05-06 22:28:57 +02:00
parent d4c8e5700f
commit 3b2ad28398
3 changed files with 23 additions and 4 deletions

View file

@ -84,6 +84,16 @@
"description": "" "description": ""
}, },
"chatgpt_win_custom_text": {
"message": "Insert here the additional text for the prompt.",
"description": ""
},
"chatgpt_win_send": {
"message": "Send",
"description": ""
},
"chatgpt_use_gpt35": { "chatgpt_use_gpt35": {
"message": "Use GPT3.5", "message": "Use GPT3.5",
"description": "" "description": ""

View file

@ -84,6 +84,16 @@
"description": "" "description": ""
}, },
"chatgpt_win_custom_text": {
"message": "Inserisci qui il testo aggiuntivo per il prompt.",
"description": ""
},
"chatgpt_win_send": {
"message": "Invia",
"description": ""
},
"chatgpt_use_gpt35": { "chatgpt_use_gpt35": {
"message": "Usa GPT3.5", "message": "Usa GPT3.5",
"description": "" "description": ""

View file

@ -206,7 +206,7 @@ function addCustomDiv(prompt_action,tabId) {
customDiv.id = 'mzta-custom_text'; customDiv.id = 'mzta-custom_text';
let customInfo = document.createElement('div'); let customInfo = document.createElement('div');
customInfo.id = 'mzta-custom_info'; customInfo.id = 'mzta-custom_info';
customInfo.innerHTML = 'Insert here the additional text for the prompt.'; //browser.i18n.getMessage("chatgpt_win_custom_text"); customInfo.innerHTML = browser.i18n.getMessage("chatgpt_win_custom_text");
customDiv.appendChild(customInfo); customDiv.appendChild(customInfo);
let customTextArea = document.createElement('textarea'); let customTextArea = document.createElement('textarea');
customTextArea.id = 'mzta-custom_textarea'; customTextArea.id = 'mzta-custom_textarea';
@ -217,11 +217,10 @@ function addCustomDiv(prompt_action,tabId) {
customDiv.appendChild(customLoading); customDiv.appendChild(customLoading);
let customBtn = document.createElement('button'); let customBtn = document.createElement('button');
customBtn.id = 'mzta-custom_btn'; customBtn.id = 'mzta-custom_btn';
customBtn.innerHTML = 'Send'; //browser.i18n.getMessage("chatgpt_win_custom_text"); customBtn.innerHTML = browser.i18n.getMessage("chatgpt_win_send");
customBtn.classList.add('mzta-btn'); customBtn.classList.add('mzta-btn');
//customBtn.onclick = customTextBtnClick;
customBtn.addEventListener("click", () => { customTextBtnClick({customBtn:customBtn,customLoading:customLoading,customDiv:customDiv}) }); customBtn.addEventListener("click", () => { customTextBtnClick({customBtn:customBtn,customLoading:customLoading,customDiv:customDiv}) });
customTextArea.addEventListener("keydown", (event) => { if(event.keyCode==13 && event.ctrlKey) customTextBtnClick({customBtn:customBtn,customLoading:customLoading,customDiv:customDiv}) }); customTextArea.addEventListener("keydown", (event) => { if(event.code == "Enter" && event.ctrlKey) customTextBtnClick({customBtn:customBtn,customLoading:customLoading,customDiv:customDiv}) });
customDiv.appendChild(customBtn); customDiv.appendChild(customBtn);
fixedDiv.appendChild(customDiv); fixedDiv.appendChild(customDiv);