two prompts adde to i18n english only, see #185
This commit is contained in:
parent
521b8e5ea8
commit
817c57889b
3 changed files with 17 additions and 3 deletions
|
|
@ -698,5 +698,17 @@
|
||||||
"prefs_OptionText_chatgpt_web_model_tooltip": {
|
"prefs_OptionText_chatgpt_web_model_tooltip": {
|
||||||
"message": "Click on a value to set it.",
|
"message": "Click on a value to set it.",
|
||||||
"description": ""
|
"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": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -170,7 +170,7 @@ export class mzta_Menus {
|
||||||
fullPrompt = curr_prompt.text + chatgpt_lang2 + ". \"" + body_text + "\" ";
|
fullPrompt = curr_prompt.text + chatgpt_lang2 + ". \"" + body_text + "\" ";
|
||||||
break;
|
break;
|
||||||
case 'prompt_reply':
|
case 'prompt_reply':
|
||||||
fullPrompt += "Do not add the subject line to the response."
|
fullPrompt += browser.i18n.getMessage("prompt_reply_additional_text");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ const defaultPrompts = [
|
||||||
{
|
{
|
||||||
id: 'prompt_reply',
|
id: 'prompt_reply',
|
||||||
name: "__MSG_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",
|
type: "1",
|
||||||
action: "1",
|
action: "1",
|
||||||
need_selected: "0",
|
need_selected: "0",
|
||||||
|
|
@ -77,7 +77,7 @@ const defaultPrompts = [
|
||||||
{
|
{
|
||||||
id: 'prompt_reply_advanced',
|
id: 'prompt_reply_advanced',
|
||||||
name: "__MSG_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",
|
type: "1",
|
||||||
action: "1",
|
action: "1",
|
||||||
need_selected: "1",
|
need_selected: "1",
|
||||||
|
|
@ -223,6 +223,7 @@ async function getDefaultPrompts_withProps() {
|
||||||
if(prefs._default_prompts_properties === null){ // no default prompts properties saved
|
if(prefs._default_prompts_properties === null){ // no default prompts properties saved
|
||||||
let pos = 1;
|
let pos = 1;
|
||||||
defaultPrompts_prop.forEach((prompt) => {
|
defaultPrompts_prop.forEach((prompt) => {
|
||||||
|
prompt.text = browser.i18n.getMessage(prompt.text);
|
||||||
prompt.position_display = pos;
|
prompt.position_display = pos;
|
||||||
prompt.position_compose = pos;
|
prompt.position_compose = pos;
|
||||||
prompt.enabled = 1;
|
prompt.enabled = 1;
|
||||||
|
|
@ -232,6 +233,7 @@ async function getDefaultPrompts_withProps() {
|
||||||
} else { // we have saved default prompts properties
|
} else { // we have saved default prompts properties
|
||||||
let pos = 1000;
|
let pos = 1000;
|
||||||
defaultPrompts_prop.forEach((prompt) => {
|
defaultPrompts_prop.forEach((prompt) => {
|
||||||
|
prompt.text = browser.i18n.getMessage(prompt.text);
|
||||||
if(prefs._default_prompts_properties?.[prompt.id]){
|
if(prefs._default_prompts_properties?.[prompt.id]){
|
||||||
prompt.position_compose = prefs._default_prompts_properties[prompt.id].position_compose;
|
prompt.position_compose = prefs._default_prompts_properties[prompt.id].position_compose;
|
||||||
prompt.position_display = prefs._default_prompts_properties[prompt.id].position_display;
|
prompt.position_display = prefs._default_prompts_properties[prompt.id].position_display;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue