translate_exclude_lang option added (but not used at the moment). see #247 #720

This commit is contained in:
mic 2026-03-29 23:00:01 +02:00
parent f1b42f8714
commit 0b5d410afd
3 changed files with 24 additions and 0 deletions

View file

@ -2129,6 +2129,14 @@
"message": "Language to translate emails into. If empty, uses the default language setting.",
"description": ""
},
"prefs_OptionText_translate_exclude_lang": {
"message": "Exclude languages",
"description": ""
},
"prefs_OptionText_translate_exclude_lang_Info": {
"message": "Comma-separated list of language codes (e.g., en, fr, it) to skip for automatic translation. If the email is in one of these languages, it won't be translated automatically or the manual button won't be shown.",
"description": ""
},
"prefs_OptionText_Translate_main_prompt": {
"message": "The prompt describing the translation task:",
"description": ""
@ -2216,5 +2224,9 @@
"prefs_OptionText_action_auto_batch": {
"message": "When the email is received",
"description": ""
},
"placeholder_string": {
"message": "Placeholder",
"description": ""
}
}

View file

@ -146,6 +146,7 @@ export const prefs_default = {
translate_display_mode: 'inline', // 'inline' or 'webchat'
translate_max_display_length: 0, // 0 = no limit, otherwise max chars shown inline
translate_lang: '', // target language, fallback on default_chatgpt_lang
translate_exclude_lang: '', // languages to do not translate
spamfilter_show_msg_panel: true,
...generated_prefs
}

View file

@ -67,6 +67,17 @@
<label>
<input type="text" id="translate_lang" name="translate_lang" class="option-input" />
<br>__MSG_prefs_OptionText_translate_lang_Info__
<br>__MSG_placeholder_string__: <i>{%thunderai_translate_lang%}</i>
</label>
</td>
</tr>
<tr class="translate_tr">
<td><span class="opt_title">__MSG_prefs_OptionText_translate_exclude_lang__</span></td>
<td>
<label>
<input type="text" id="translate_exclude_lang" name="translate_exclude_lang" class="option-input" />
<br>__MSG_prefs_OptionText_translate_exclude_lang_Info__
<br>__MSG_placeholder_string__: <i>{%thunderai_translate_exclude_lang%}</i>
</label>
</td>
</tr>