thunderai_translate_lang and thunderai_translate_exclude_lang placeholders added. see #247 #726 #727
This commit is contained in:
parent
41071e3256
commit
7e5ba820c2
2 changed files with 35 additions and 1 deletions
|
|
@ -1316,10 +1316,18 @@
|
||||||
"message": "Default signature as defined in ThunderAI options.",
|
"message": "Default signature as defined in ThunderAI options.",
|
||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
"thunderai_def_lang": {
|
"placeholder_thunderai_def_lang": {
|
||||||
"message": "Default language as defined in ThunderAI options.",
|
"message": "Default language as defined in ThunderAI options.",
|
||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
|
"placeholder_thunderai_translate_lang": {
|
||||||
|
"message": "The language to be used in the mail translations.",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"placeholder_thunderai_translate_exclude_lang": {
|
||||||
|
"message": "The languages code to do not translate when found.",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
"placeholder_mail_attachments_info": {
|
"placeholder_mail_attachments_info": {
|
||||||
"message": "Information about the attachments in the email",
|
"message": "Information about the attachments in the email",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
|
|
||||||
|
|
@ -253,6 +253,24 @@ const defaultPlaceholders = [
|
||||||
is_dynamic: "0",
|
is_dynamic: "0",
|
||||||
enabled: 1,
|
enabled: 1,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'thunderai_translate_lang',
|
||||||
|
name: "__MSG_placeholder_thunderai_translate_lang__",
|
||||||
|
default_value: "",
|
||||||
|
type: 0,
|
||||||
|
is_default: "1",
|
||||||
|
is_dynamic: "0",
|
||||||
|
enabled: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'thunderai_translate_exclude_lang',
|
||||||
|
name: "__MSG_placeholder_thunderai_translate_exclude_lang__",
|
||||||
|
default_value: "",
|
||||||
|
type: 0,
|
||||||
|
is_default: "1",
|
||||||
|
is_dynamic: "0",
|
||||||
|
enabled: 1,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 'empty',
|
id: 'empty',
|
||||||
name: "__MSG_placeholder_empty__",
|
name: "__MSG_placeholder_empty__",
|
||||||
|
|
@ -599,6 +617,14 @@ export const placeholdersUtils = {
|
||||||
let prefs_def_lang = await browser.storage.sync.get({ default_chatgpt_lang: prefs_default.default_chatgpt_lang });
|
let prefs_def_lang = await browser.storage.sync.get({ default_chatgpt_lang: prefs_default.default_chatgpt_lang });
|
||||||
finalSubs['thunderai_def_lang'] = placeholdersUtils.failSafePlaceholders(prefs_def_lang.default_chatgpt_lang);
|
finalSubs['thunderai_def_lang'] = placeholdersUtils.failSafePlaceholders(prefs_def_lang.default_chatgpt_lang);
|
||||||
break;
|
break;
|
||||||
|
case 'thunderai_translate_lang':
|
||||||
|
let prefs_translate_lang = await browser.storage.sync.get({ translate_lang: prefs_default.translate_lang });
|
||||||
|
finalSubs['thunderai_translate_lang'] = placeholdersUtils.failSafePlaceholders(prefs_translate_lang.translate_lang);
|
||||||
|
break;
|
||||||
|
case 'thunderai_translate_exclude_lang':
|
||||||
|
let prefs_translate_exclude_lang = await browser.storage.sync.get({ translate_exclude_lang: prefs_default.translate_exclude_lang });
|
||||||
|
finalSubs['thunderai_translate_exclude_lang'] = placeholdersUtils.failSafePlaceholders(prefs_translate_exclude_lang.translate_exclude_lang);
|
||||||
|
break;
|
||||||
case 'mail_attachments_info':
|
case 'mail_attachments_info':
|
||||||
let attachments_info_string = "";
|
let attachments_info_string = "";
|
||||||
let attachments_info = await browser.messages.listAttachments(curr_message.id);
|
let attachments_info = await browser.messages.listAttachments(curr_message.id);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue