From c06484297b47a4eece059c9995b6520820923541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B4mulo=20Mendes=20Figueiredo?= Date: Fri, 28 Feb 2025 12:39:57 -0300 Subject: [PATCH] i18n: ask and explain floating buttons --- .../components/chat/ContentRenderer/FloatingButtons.svelte | 7 ++++--- src/lib/i18n/locales/en-US/translation.json | 3 +++ src/lib/i18n/locales/pt-BR/translation.json | 3 +++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/lib/components/chat/ContentRenderer/FloatingButtons.svelte b/src/lib/components/chat/ContentRenderer/FloatingButtons.svelte index d7ad58c00..6dc48529b 100644 --- a/src/lib/components/chat/ContentRenderer/FloatingButtons.svelte +++ b/src/lib/components/chat/ContentRenderer/FloatingButtons.svelte @@ -121,7 +121,8 @@ toast.error('Model not selected'); return; } - prompt = `Explain this section to me in more detail\n\n\`\`\`\n${selectedText}\n\`\`\``; + const explainText = $i18n.t('Explain this section to me in more detail'); + prompt = `${explainText}\n\n\`\`\`\n${selectedText}\n\`\`\``; responseContent = ''; const [res, controller] = await chatCompletion(localStorage.token, { @@ -246,7 +247,7 @@ > -
Ask
+
{$i18n.t('Ask')}
{:else} diff --git a/src/lib/i18n/locales/en-US/translation.json b/src/lib/i18n/locales/en-US/translation.json index d0930120c..0dc59a8a0 100644 --- a/src/lib/i18n/locales/en-US/translation.json +++ b/src/lib/i18n/locales/en-US/translation.json @@ -93,6 +93,7 @@ "Are you sure?": "", "Arena Models": "", "Artifacts": "", + "Ask": "", "Ask a question": "", "Assistant": "", "Attach file from knowledge": "", @@ -443,6 +444,8 @@ "Exclude": "", "Execute code for analysis": "", "Experimental": "", + "Explain": "", + "Explain this section to me in more detail": "", "Explore the cosmos": "", "Export": "", "Export All Archived Chats": "", diff --git a/src/lib/i18n/locales/pt-BR/translation.json b/src/lib/i18n/locales/pt-BR/translation.json index e7dbc89dd..1b0b9eb74 100644 --- a/src/lib/i18n/locales/pt-BR/translation.json +++ b/src/lib/i18n/locales/pt-BR/translation.json @@ -93,6 +93,7 @@ "Are you sure?": "Você tem certeza?", "Arena Models": "Arena de Modelos", "Artifacts": "Artefatos", + "Ask": "Perguntar", "Ask a question": "Faça uma pergunta", "Assistant": "Assistente", "Attach file from knowledge": "", @@ -443,6 +444,8 @@ "Exclude": "Excluir", "Execute code for analysis": "", "Experimental": "Experimental", + "Explain": "Explicar", + "Explain this section to me in more detail": "Explique esta seção em mais detalhes", "Explore the cosmos": "Explorar o cosmos", "Export": "Exportar", "Export All Archived Chats": "Exportar todos os chats arquivados",