Merge pull request #192 from micz/i18n_default_prompts
I18n default prompts
This commit is contained in:
commit
0efe16450d
7 changed files with 234 additions and 12 deletions
|
|
@ -694,5 +694,49 @@
|
|||
"prefs_OptionText_owl_warning": {
|
||||
"message": "Es scheint, dass mindestens eines Ihrer Konten das Add-on Eule für Exchange verwendet. Es gibt ein bekanntes Problem zwischen Thunderbird und Eule, das derzeit behoben wird. Derzeit können Sie ThunderAI beim Verfassen von E-Mails verwenden, jedoch nicht beim Lesen.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_reply_full_text": {
|
||||
"message": "Antworten Sie auf die folgende E-Mail. Antworten Sie nur mit dem erforderlichen Text und ohne zusätzliche Kommentare oder anderen Text.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_reply_additional_text": {
|
||||
"message": "Fügen Sie die Betreffzeile nicht in die Antwort ein.",
|
||||
"description": ""
|
||||
},
|
||||
"reply_same_lang": {
|
||||
"message": "Antworten Sie in derselben Sprache.",
|
||||
"description": ""
|
||||
},
|
||||
"sign_msg_as": {
|
||||
"message": "Unterschreiben Sie die Nachricht als",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_reply_advanced_full_text": {
|
||||
"message": "Antworten Sie auf die folgende E-Mail \"{%selected_text%}\", wobei dies der vollständige E-Mail-Thread ist \"{%mail_html_body%}\". Antworten Sie nur mit dem erforderlichen Text und ohne zusätzliche Kommentare oder anderen Text.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_rewrite_full_text": {
|
||||
"message": "Schreiben Sie den folgenden Text höflicher um. Antworten Sie nur mit dem umgeschriebenen Text und ohne zusätzliche Kommentare oder anderen Text.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_rewrite_formal_full_text": {
|
||||
"message": "Schreiben Sie den folgenden Text formeller um. Antworten Sie nur mit dem umgeschriebenen Text und ohne zusätzliche Kommentare oder anderen Text.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_classify_full_text": {
|
||||
"message": "Klassifizieren Sie den folgenden Text in Bezug auf Höflichkeit, Wärme, Formalität, Bestimmtheit und Anstößigkeit und geben Sie einen Prozentsatz für jede Kategorie an. Antworten Sie nur mit den Kategorien und den Werten, ohne zusätzliche Kommentare oder anderen Text.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_summarize_this_full_text": {
|
||||
"message": "Fassen Sie die folgende E-Mail in einer Liste mit Stichpunkten zusammen.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_translate_this_full_text": {
|
||||
"message": "Übersetzen Sie die folgende E-Mail ins",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_this_full_text": {
|
||||
"message": "Antworten Sie nur mit dem erforderlichen Text und ohne zusätzliche Kommentare oder anderen Text.",
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
|
|
@ -698,5 +698,49 @@
|
|||
"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": ""
|
||||
},
|
||||
"reply_same_lang": {
|
||||
"message": "Reply in the same language.",
|
||||
"description": ""
|
||||
},
|
||||
"sign_msg_as": {
|
||||
"message": "Sign the message as",
|
||||
"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": ""
|
||||
},
|
||||
"prompt_rewrite_full_text": {
|
||||
"message": "Rewrite the following text to be more polite. Reply with only the re-written text and with no extra comments or other text.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_rewrite_formal_full_text": {
|
||||
"message": "Rewrite the following text to be more formal. Reply with only the re-written text and with no extra comments or other text.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_classify_full_text": {
|
||||
"message": "Classify the following text in terms of Politeness, Warmth, Formality, Assertiveness, Offensiveness giving a percentage for each category. Reply with only the category and score with no extra comments or other text.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_summarize_this_full_text": {
|
||||
"message": "Summarize the following email into a bullet point list.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_translate_this_full_text": {
|
||||
"message": "Translate the following email in",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_this_full_text": {
|
||||
"message": "Reply with only the needed text and with no extra comments or other text.",
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
|
|
@ -694,5 +694,49 @@
|
|||
"prefs_OptionText_owl_warning": {
|
||||
"message": "Il semble qu'au moins un de vos comptes utilise le module complémentaire Chouette pour Exchange. Il existe un problème connu entre Thunderbird et Chouette, qui est en cours de résolution. Pour le moment, vous pouvez utiliser ThunderAI lors de la rédaction d'e-mails, mais pas lors de leur lecture.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_reply_full_text": {
|
||||
"message": "Répondez à l'email suivant. Répondez uniquement avec le texte nécessaire et sans commentaires ou autres textes supplémentaires.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_reply_additional_text": {
|
||||
"message": "Ne pas ajouter la ligne d'objet à la réponse.",
|
||||
"description": ""
|
||||
},
|
||||
"reply_same_lang": {
|
||||
"message": "Répondez dans la même langue.",
|
||||
"description": ""
|
||||
},
|
||||
"sign_msg_as": {
|
||||
"message": "Signez le message en tant que",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_reply_advanced_full_text": {
|
||||
"message": "Répondez à l'email suivant \"{%selected_text%}\", en tenant compte du fait qu'il s'agit de l'intégralité du fil de discussion \"{%mail_html_body%}\". Répondez uniquement avec le texte nécessaire et sans commentaires ou autres textes supplémentaires.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_rewrite_full_text": {
|
||||
"message": "Réécrivez le texte suivant pour qu'il soit plus poli. Répondez uniquement avec le texte réécrit et sans commentaires ou autres textes supplémentaires.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_rewrite_formal_full_text": {
|
||||
"message": "Réécrivez le texte suivant pour qu'il soit plus formel. Répondez uniquement avec le texte réécrit et sans commentaires ou autres textes supplémentaires.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_classify_full_text": {
|
||||
"message": "Classifiez le texte suivant en termes de Politesse, Chaleur, Formalité, Assertivité, Offensivité en donnant un pourcentage pour chaque catégorie. Répondez uniquement avec les catégories et les scores, sans commentaires ou autres textes supplémentaires.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_summarize_this_full_text": {
|
||||
"message": "Résumé l'email suivant sous forme de liste à puces.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_translate_this_full_text": {
|
||||
"message": "Traduisez l'email suivant en",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_this_full_text": {
|
||||
"message": "Répondez uniquement avec le texte nécessaire et sans commentaires ou autres textes supplémentaires.",
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
|
|
@ -694,5 +694,49 @@
|
|||
"prefs_OptionText_owl_warning": {
|
||||
"message": "Sembra che almeno uno dei tuoi account stia utilizzando il componente aggiuntivo Gufo per Exchange. Esiste un problema noto tra Thunderbird e Gufo, che è attualmente in fase di risoluzione. Al momento, puoi utilizzare ThunderAI durante la composizione delle email, ma non durante la loro lettura.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_reply_full_text": {
|
||||
"message": "Rispondi alla seguente email. Rispondi solo con il testo necessario e senza commenti o altro testo aggiuntivo.",
|
||||
"description": ""
|
||||
},
|
||||
"reply_same_lang": {
|
||||
"message": "Rispondi nella stessa lingua.",
|
||||
"description": ""
|
||||
},
|
||||
"sign_msg_as": {
|
||||
"message": "Firma il messaggio come",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_reply_additional_text": {
|
||||
"message": "Non aggiungere la linea dell'oggetto alla risposta.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_reply_advanced_full_text": {
|
||||
"message": "Rispondi alla seguente email \"{%selected_text%}\", considerando che si tratta dell'intero thread di email \"{%mail_html_body%}\". Rispondi con solo il testo necessario e senza commenti extra o altro testo.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_rewrite_full_text": {
|
||||
"message": "Riscrivi il seguente testo in modo più cortese. Rispondi con solo il testo riscritto e senza commenti extra o altro testo.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_rewrite_formal_full_text": {
|
||||
"message": "Riscrivi il seguente testo in modo più formale. Rispondi con solo il testo riscritto e senza commenti extra o altro testo.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_classify_full_text": {
|
||||
"message": "Classifica il seguente testo in termini di Cortesia, Calore, Formalità, Assertività, Offensività, assegnando una percentuale a ciascuna categoria. Rispondi con solo le categorie e i punteggi, senza commenti extra o altro testo.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_summarize_this_full_text": {
|
||||
"message": "Riassumi la seguente email in un elenco puntato.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_translate_this_full_text": {
|
||||
"message": "Traduci la seguente email in",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_this_full_text": {
|
||||
"message": "Rispondi con solo il testo necessario e senza commenti extra o altro testo.",
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
|
|
@ -694,5 +694,49 @@
|
|||
"prefs_OptionText_owl_warning": {
|
||||
"message": "Parece que pelo menos uma das suas contas está usando o complemento Coruja para Exchange. Existe um problema conhecido entre Thunderbird e Coruja, que está sendo resolvido no momento. Por enquanto, você pode usar o ThunderAI ao redigir e-mails, mas não ao lê-los.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_reply_full_text": {
|
||||
"message": "Responda ao e-mail a seguir. Responda apenas com o texto necessário e sem comentários adicionais ou outros textos.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_reply_additional_text": {
|
||||
"message": "Não adicione a linha de assunto à resposta.",
|
||||
"description": ""
|
||||
},
|
||||
"reply_same_lang": {
|
||||
"message": "Responda no mesmo idioma.",
|
||||
"description": ""
|
||||
},
|
||||
"sign_msg_as": {
|
||||
"message": "Assine a mensagem como",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_reply_advanced_full_text": {
|
||||
"message": "Responda ao seguinte e-mail \"{%selected_text%}\", considerando que este é o thread completo de e-mails \"{%mail_html_body%}\". Responda apenas com o texto necessário e sem comentários adicionais ou outros textos.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_rewrite_full_text": {
|
||||
"message": "Reescreva o texto a seguir de forma mais educada. Responda apenas com o texto reescrito e sem comentários adicionais ou outros textos.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_rewrite_formal_full_text": {
|
||||
"message": "Reescreva o texto a seguir de forma mais formal. Responda apenas com o texto reescrito e sem comentários adicionais ou outros textos.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_classify_full_text": {
|
||||
"message": "Classifique o texto a seguir em termos de Educação, Calor, Formalidade, Assertividade e Ofensividade, atribuindo uma porcentagem para cada categoria. Responda apenas com as categorias e as pontuações, sem comentários adicionais ou outros textos.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_summarize_this_full_text": {
|
||||
"message": "Resuma o e-mail a seguir em uma lista de tópicos.",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_translate_this_full_text": {
|
||||
"message": "Traduza o e-mail a seguir para",
|
||||
"description": ""
|
||||
},
|
||||
"prompt_this_full_text": {
|
||||
"message": "Responda apenas com o texto necessário e sem comentários adicionais ou outros textos.",
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
|
|
@ -107,7 +107,7 @@ export class mzta_Menus {
|
|||
chatgpt_lang = prefs.default_chatgpt_lang;
|
||||
//console.log(" >>>>>>>>>>>> chatgpt_lang: " + chatgpt_lang);
|
||||
if(chatgpt_lang === ''){
|
||||
chatgpt_lang = 'Reply in the same language.';
|
||||
chatgpt_lang = browser.i18n.getMessage("reply_same_lang");
|
||||
}else{
|
||||
chatgpt_lang = browser.i18n.getMessage("prompt_lang") + " " + chatgpt_lang + ".";
|
||||
}
|
||||
|
|
@ -167,10 +167,10 @@ export class mzta_Menus {
|
|||
if(chatgpt_lang2 === ''){
|
||||
chatgpt_lang2 = getLanguageDisplayName(browser.i18n.getUILanguage());
|
||||
}
|
||||
fullPrompt = curr_prompt.text + chatgpt_lang2 + ". \"" + body_text + "\" ";
|
||||
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;
|
||||
|
|
@ -189,7 +189,7 @@ export class mzta_Menus {
|
|||
if(prefs.default_sign_name===''){
|
||||
return '';
|
||||
}else{
|
||||
return "Sign the message as " + prefs.default_sign_name + ".";
|
||||
return browser.i18n.getMessage("sign_msg_as") + " " + prefs.default_sign_name + ".";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
@ -89,7 +89,7 @@ const defaultPrompts = [
|
|||
{
|
||||
id: 'prompt_rewrite_polite',
|
||||
name: "__MSG_prompt_rewrite_polite__",
|
||||
text: "Rewrite the following text to be more polite. Reply with only the re-written text and with no extra comments or other text.",
|
||||
text: "prompt_rewrite_full_text",
|
||||
type: "2",
|
||||
action: "2",
|
||||
need_selected: "1",
|
||||
|
|
@ -101,7 +101,7 @@ const defaultPrompts = [
|
|||
{
|
||||
id: 'prompt_rewrite_formal',
|
||||
name: "__MSG_prompt_rewrite_formal__",
|
||||
text: "Rewrite the following text to be more formal. Reply with only the re-written text and with no extra comments or other text.",
|
||||
text: "prompt_rewrite_formal_full_text",
|
||||
type: "2",
|
||||
action: "2",
|
||||
need_selected: "1",
|
||||
|
|
@ -113,7 +113,7 @@ const defaultPrompts = [
|
|||
{
|
||||
id: 'prompt_classify',
|
||||
name: "__MSG_prompt_classify__",
|
||||
text: "Classify the following text in terms of Politeness, Warmth, Formality, Assertiveness, Offensiveness giving a percentage for each category. Reply with only the category and score with no extra comments or other text.",
|
||||
text: "prompt_classify_full_text",
|
||||
type: "0",
|
||||
action: "0",
|
||||
need_selected: "0",
|
||||
|
|
@ -125,7 +125,7 @@ const defaultPrompts = [
|
|||
{
|
||||
id: 'prompt_summarize_this',
|
||||
name: "__MSG_prompt_summarize_this__",
|
||||
text: "Summarize the following email into a bullet point list.",
|
||||
text: "prompt_summarize_this_full_text",
|
||||
type: "0",
|
||||
action: "0",
|
||||
need_selected: "0",
|
||||
|
|
@ -137,7 +137,7 @@ const defaultPrompts = [
|
|||
{
|
||||
id: 'prompt_translate_this',
|
||||
name: "__MSG_prompt_translate_this__",
|
||||
text: "Translate the following email in ",
|
||||
text: "prompt_translate_this_full_text",
|
||||
type: "0",
|
||||
action: "0",
|
||||
need_selected: "0",
|
||||
|
|
@ -149,7 +149,7 @@ const defaultPrompts = [
|
|||
{
|
||||
id: 'prompt_this',
|
||||
name: "__MSG_prompt_this__",
|
||||
text: "Reply with only the needed text and with no extra comments or other text.",
|
||||
text: "prompt_this_full_text",
|
||||
type: "2",
|
||||
action: "2",
|
||||
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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue