Merge pull request #10992 from softue/i18n-floating-buttons

i18n floating buttons (en-US and pt-BR)
This commit is contained in:
Timothy Jaeryang Baek 2025-02-28 15:59:49 -08:00 committed by GitHub
commit f1ce653830
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 3 deletions

View File

@ -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 @@
>
<ChatBubble className="size-3 shrink-0" />
<div class="shrink-0">Ask</div>
<div class="shrink-0">{$i18n.t('Ask')}</div>
</button>
<button
class="px-1 hover:bg-gray-50 dark:hover:bg-gray-800 rounded-sm flex items-center gap-1 min-w-fit"
@ -257,7 +258,7 @@
>
<LightBlub className="size-3 shrink-0" />
<div class="shrink-0">Explain</div>
<div class="shrink-0">{$i18n.t('Explain')}</div>
</button>
</div>
{:else}

View File

@ -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": "",

View File

@ -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",