From 80ca0921e2ed7adfc424be32317ac57456aa6fb9 Mon Sep 17 00:00:00 2001 From: Iaroslav Postovalov Date: Tue, 8 Sep 2026 20:17:31 +0200 Subject: [PATCH] i18n: fix Russian wording and translate default prompt suggestions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace unnatural ru-RU phrasing ("Механизм … engine", shouting "ВСЕ", untranslated "LLMs", "Обмен с сообществом", "Экспериментальное") and fill the two remaining empty strings. Default prompt suggestions come from backend config and were never passed through i18n, so the home screen stayed in English regardless of locale. Suggestions.svelte now translates titles and content; custom admin suggestions fall through unchanged. The default strings are registered as keys so `i18n:parse` keeps them, which adds the empty keys to every locale. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01J7AD9p4feC4e9pAt77dbdj --- src/lib/components/chat/Suggestions.svelte | 39 +++++++++++++++++-- src/lib/i18n/locales/ar-BH/translation.json | 18 +++++++++ src/lib/i18n/locales/ar/translation.json | 18 +++++++++ src/lib/i18n/locales/az-AZ/translation.json | 18 +++++++++ src/lib/i18n/locales/bg-BG/translation.json | 18 +++++++++ src/lib/i18n/locales/bn-BD/translation.json | 18 +++++++++ src/lib/i18n/locales/bo-TB/translation.json | 18 +++++++++ src/lib/i18n/locales/bs-BA/translation.json | 18 +++++++++ src/lib/i18n/locales/ca-ES/translation.json | 18 +++++++++ src/lib/i18n/locales/ceb-PH/translation.json | 18 +++++++++ src/lib/i18n/locales/cs-CZ/translation.json | 18 +++++++++ src/lib/i18n/locales/da-DK/translation.json | 18 +++++++++ src/lib/i18n/locales/de-DE/translation.json | 18 +++++++++ src/lib/i18n/locales/dg-DG/translation.json | 18 +++++++++ src/lib/i18n/locales/el-GR/translation.json | 18 +++++++++ src/lib/i18n/locales/en-GB/translation.json | 18 +++++++++ src/lib/i18n/locales/en-US/translation.json | 18 +++++++++ src/lib/i18n/locales/es-ES/translation.json | 18 +++++++++ src/lib/i18n/locales/et-EE/translation.json | 18 +++++++++ src/lib/i18n/locales/eu-ES/translation.json | 18 +++++++++ src/lib/i18n/locales/fa-IR/translation.json | 18 +++++++++ src/lib/i18n/locales/fi-FI/translation.json | 18 +++++++++ src/lib/i18n/locales/fil-PH/translation.json | 18 +++++++++ src/lib/i18n/locales/fo-FO/translation.json | 18 +++++++++ src/lib/i18n/locales/fr-CA/translation.json | 18 +++++++++ src/lib/i18n/locales/fr-FR/translation.json | 18 +++++++++ src/lib/i18n/locales/gl-ES/translation.json | 18 +++++++++ src/lib/i18n/locales/he-IL/translation.json | 18 +++++++++ src/lib/i18n/locales/hi-IN/translation.json | 18 +++++++++ src/lib/i18n/locales/hr-HR/translation.json | 18 +++++++++ src/lib/i18n/locales/hu-HU/translation.json | 18 +++++++++ src/lib/i18n/locales/id-ID/translation.json | 18 +++++++++ src/lib/i18n/locales/ie-GA/translation.json | 18 +++++++++ src/lib/i18n/locales/it-IT/translation.json | 18 +++++++++ src/lib/i18n/locales/ja-JP/translation.json | 18 +++++++++ src/lib/i18n/locales/ka-GE/translation.json | 18 +++++++++ src/lib/i18n/locales/kab-DZ/translation.json | 18 +++++++++ src/lib/i18n/locales/ko-KR/translation.json | 18 +++++++++ src/lib/i18n/locales/lt-LT/translation.json | 18 +++++++++ src/lib/i18n/locales/lv-LV/translation.json | 18 +++++++++ src/lib/i18n/locales/ms-MY/translation.json | 18 +++++++++ src/lib/i18n/locales/nb-NO/translation.json | 18 +++++++++ src/lib/i18n/locales/nl-NL/translation.json | 18 +++++++++ src/lib/i18n/locales/pa-IN/translation.json | 18 +++++++++ src/lib/i18n/locales/pl-PL/translation.json | 18 +++++++++ src/lib/i18n/locales/pt-BR/translation.json | 18 +++++++++ src/lib/i18n/locales/pt-PT/translation.json | 18 +++++++++ src/lib/i18n/locales/ro-RO/translation.json | 18 +++++++++ src/lib/i18n/locales/ru-RU/translation.json | 34 ++++++++++++---- src/lib/i18n/locales/sk-SK/translation.json | 18 +++++++++ src/lib/i18n/locales/sl-SI/translation.json | 18 +++++++++ src/lib/i18n/locales/sr-RS/translation.json | 18 +++++++++ src/lib/i18n/locales/sv-SE/translation.json | 18 +++++++++ src/lib/i18n/locales/ta-IN/translation.json | 18 +++++++++ src/lib/i18n/locales/th-TH/translation.json | 18 +++++++++ src/lib/i18n/locales/tk-TM/translation.json | 18 +++++++++ src/lib/i18n/locales/tr-TR/translation.json | 18 +++++++++ src/lib/i18n/locales/ug-CN/translation.json | 18 +++++++++ src/lib/i18n/locales/uk-UA/translation.json | 18 +++++++++ src/lib/i18n/locales/ur-PK/translation.json | 18 +++++++++ .../i18n/locales/uz-Cyrl-UZ/translation.json | 18 +++++++++ .../i18n/locales/uz-Latn-UZ/translation.json | 18 +++++++++ src/lib/i18n/locales/vi-VN/translation.json | 18 +++++++++ src/lib/i18n/locales/zh-CN/translation.json | 18 +++++++++ src/lib/i18n/locales/zh-TW/translation.json | 18 +++++++++ 65 files changed, 1195 insertions(+), 12 deletions(-) diff --git a/src/lib/components/chat/Suggestions.svelte b/src/lib/components/chat/Suggestions.svelte index 2d3d52b8ca..bfbfac218c 100644 --- a/src/lib/components/chat/Suggestions.svelte +++ b/src/lib/components/chat/Suggestions.svelte @@ -7,6 +7,37 @@ const i18n = getContext('i18n'); + // Default suggestions shipped by the backend config; listed so `i18n:parse` keeps their keys. + const defaultSuggestionKeys = [ + $i18n.t('Help me study'), + $i18n.t('vocabulary for a college entrance exam'), + $i18n.t( + "Help me study vocabulary: write a sentence for me to fill in the blank, and I'll try to pick the correct option." + ), + $i18n.t('Give me ideas'), + $i18n.t("for what to do with my kids' art"), + $i18n.t( + "What are 5 creative things I could do with my kids' art? I don't want to throw them away, but it's also so much clutter." + ), + $i18n.t('Tell me a fun fact'), + $i18n.t('about the Roman Empire'), + $i18n.t('Tell me a random fun fact about the Roman Empire'), + $i18n.t('Show me a code snippet'), + $i18n.t("of a website's sticky header"), + $i18n.t("Show me a code snippet of a website's sticky header in CSS and JavaScript."), + $i18n.t('Explain options trading'), + $i18n.t("if I'm familiar with buying and selling stocks"), + $i18n.t( + "Explain options trading in simple terms if I'm familiar with buying and selling stocks." + ), + $i18n.t('Overcome procrastination'), + $i18n.t('give me tips'), + $i18n.t( + 'Could you start by asking me about instances when I procrastinate the most and then give me some suggestions to overcome it?' + ) + ]; + void defaultSuggestionKeys; + export let suggestionPrompts = []; export let className = ''; export let inputValue = ''; @@ -95,25 +126,25 @@ px-2.5 py-1.5 rounded-lg bg-transparent transition-colors hover:text-gray-950 dark:hover:text-white group" style="animation-delay: {idx * 45}ms" - on:click={() => onSelect({ type: 'prompt', data: prompt.content })} + on:click={() => onSelect({ type: 'prompt', data: $i18n.t(prompt.content) })} >
{#if prompt.title && prompt.title[0] !== ''}
- {prompt.title[0]} + {$i18n.t(prompt.title[0])}
- {prompt.title[1]} + {$i18n.t(prompt.title[1])}
{:else}
- {prompt.content} + {$i18n.t(prompt.content)}