two prompts adde to i18n english only, see #185

This commit is contained in:
mic 2024-11-28 22:58:45 +01:00
parent 521b8e5ea8
commit 817c57889b
3 changed files with 17 additions and 3 deletions

View file

@ -698,5 +698,17 @@
"prefs_OptionText_chatgpt_web_model_tooltip": {
"message": "Click on a value to set it.",
"description": ""
},
"prompt_reply_full_text": {
"message": "Reply to the following email. Reply with only the needed text and with no extra comments or other text.",
"description": ""
},
"prompt_reply_additional_text": {
"message": "Do not add the subject line to the response.",
"description": ""
},
"prompt_reply_advanced_full_text": {
"message": "Reply to the following email \"{%selected_text%}\", considering this is the full thread of emails \"{%mail_html_body%}\". Reply with only the needed text and with no extra comments or other text.",
"description": ""
}
}

View file

@ -170,7 +170,7 @@ export class mzta_Menus {
fullPrompt = curr_prompt.text + chatgpt_lang2 + ". \"" + body_text + "\" ";
break;
case 'prompt_reply':
fullPrompt += "Do not add the subject line to the response."
fullPrompt += browser.i18n.getMessage("prompt_reply_additional_text");
break;
default:
break;

View file

@ -65,7 +65,7 @@ const defaultPrompts = [
{
id: 'prompt_reply',
name: "__MSG_prompt_reply__",
text: "Reply to the following email. Reply with only the needed text and with no extra comments or other text.",
text: "prompt_reply_full_text",
type: "1",
action: "1",
need_selected: "0",
@ -77,7 +77,7 @@ const defaultPrompts = [
{
id: 'prompt_reply_advanced',
name: "__MSG_prompt_reply_advanced__",
text: "Reply to the following email \"{%selected_text%}\", considering this is the full thread of emails \"{%mail_html_body%}\". Reply with only the needed text and with no extra comments or other text.",
text: "prompt_reply_advanced_full_text",
type: "1",
action: "1",
need_selected: "1",
@ -223,6 +223,7 @@ async function getDefaultPrompts_withProps() {
if(prefs._default_prompts_properties === null){ // no default prompts properties saved
let pos = 1;
defaultPrompts_prop.forEach((prompt) => {
prompt.text = browser.i18n.getMessage(prompt.text);
prompt.position_display = pos;
prompt.position_compose = pos;
prompt.enabled = 1;
@ -232,6 +233,7 @@ async function getDefaultPrompts_withProps() {
} else { // we have saved default prompts properties
let pos = 1000;
defaultPrompts_prop.forEach((prompt) => {
prompt.text = browser.i18n.getMessage(prompt.text);
if(prefs._default_prompts_properties?.[prompt.id]){
prompt.position_compose = prefs._default_prompts_properties[prompt.id].position_compose;
prompt.position_display = prefs._default_prompts_properties[prompt.id].position_display;