From 66342140a397d8966ea8f7f08e6c43316d4ab5e2 Mon Sep 17 00:00:00 2001 From: Ased Mammad Date: Tue, 5 Mar 2024 15:24:47 +0330 Subject: [PATCH] fix: use translation key as fallback + more translations --- src/lib/components/chat/Settings/Interface.svelte | 2 +- src/lib/i18n/locales/de/common.json | 2 +- src/lib/i18n/locales/en/common.json | 2 +- src/lib/i18n/locales/fa/common.json | 2 +- src/lib/i18n/locales/ua/common.json | 2 +- src/routes/(app)/+page.svelte | 2 +- src/routes/(app)/c/[id]/+page.svelte | 2 +- src/routes/(app)/prompts/edit/+page.svelte | 6 ++++-- 8 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/lib/components/chat/Settings/Interface.svelte b/src/lib/components/chat/Settings/Interface.svelte index c04b38975..84b3399ea 100644 --- a/src/lib/components/chat/Settings/Interface.svelte +++ b/src/lib/components/chat/Settings/Interface.svelte @@ -82,7 +82,7 @@ fullScreenMode = settings.fullScreenMode ?? false; titleAutoGenerateModel = settings.titleAutoGenerateModel ?? ''; titleGenerationPrompt = - settings.titleGenerationPrompt ?? $i18n.t('Default titleGenerationPromt') + ' {{prompt}}'; + settings.titleGenerationPrompt ?? $i18n.t("Create a concise, 3-5 word phrase as a header for the following query, strictly adhering to the 3-5 word limit and avoiding the use of the word 'title':") + ' {{prompt}}'; }); diff --git a/src/lib/i18n/locales/de/common.json b/src/lib/i18n/locales/de/common.json index ddf2bf8e9..388baf2a7 100644 --- a/src/lib/i18n/locales/de/common.json +++ b/src/lib/i18n/locales/de/common.json @@ -87,7 +87,7 @@ "Default (Web API)": "Standard (Web-API)", "Default model updated": "Standardmodell aktualisiert", "Default Prompt Suggestions": "Standard-Prompt-Vorschläge", - "Default titleGenerationPromt": "Erstelle einen prägnanten Satz mit 3-5 Wörtern als Überschrift für die folgende Abfrage. Halte dich dabei strikt an die 3-5-Wort-Grenze und vermeide die Verwendung des Wortes Titel:", + "Create a concise, 3-5 word phrase as a header for the following query, strictly adhering to the 3-5 word limit and avoiding the use of the word 'title':": "Erstelle einen prägnanten Satz mit 3-5 Wörtern als Überschrift für die folgende Abfrage. Halte dich dabei strikt an die 3-5-Wort-Grenze und vermeide die Verwendung des Wortes Titel:", "Default User Role": "Standardbenutzerrolle", "delete": "löschen", "Delete a model": "Ein Modell löschen", diff --git a/src/lib/i18n/locales/en/common.json b/src/lib/i18n/locales/en/common.json index fb9e88c43..ff5f11aaa 100644 --- a/src/lib/i18n/locales/en/common.json +++ b/src/lib/i18n/locales/en/common.json @@ -87,7 +87,7 @@ "Default (Web API)": "Default (Web API)", "Default model updated": "Default model updated", "Default Prompt Suggestions": "Default Prompt Suggestions", - "Default titleGenerationPromt": "Create a concise, 3-5 word phrase as a header for the following query, strictly adhering to the 3-5 word limit and avoiding the use of the word 'title':", + "Create a concise, 3-5 word phrase as a header for the following query, strictly adhering to the 3-5 word limit and avoiding the use of the word 'title':": "Create a concise, 3-5 word phrase as a header for the following query, strictly adhering to the 3-5 word limit and avoiding the use of the word 'title':", "Default User Role": "Default User Role", "delete": "delete", "Delete a model": "Delete a model", diff --git a/src/lib/i18n/locales/fa/common.json b/src/lib/i18n/locales/fa/common.json index ce6c34b8e..c89faa3e1 100644 --- a/src/lib/i18n/locales/fa/common.json +++ b/src/lib/i18n/locales/fa/common.json @@ -251,7 +251,7 @@ "Enter OpenAI API Key": "کلید OpenAI API را وارد کنید", "Current Model": "مدل فعلی", "Display the username instead of You in the Chat": "نمایش نام کاربری به جای «شما» در چت", - "Default titleGenerationPromt": "یک عبارت مختصر و ۳ تا ۵ کلمه ای را به عنوان سرفصل برای پرس و جو زیر ایجاد کنید، به شدت محدودیت ۳-۵ کلمه را رعایت کنید و از استفاده از کلمه 'عنوان' خودداری کنید:", + "Create a concise, 3-5 word phrase as a header for the following query, strictly adhering to the 3-5 word limit and avoiding the use of the word 'title':": "یک عبارت مختصر و ۳ تا ۵ کلمه ای را به عنوان سرفصل برای پرس و جو زیر ایجاد کنید، به شدت محدودیت ۳-۵ کلمه را رعایت کنید و از استفاده از کلمه 'عنوان' خودداری کنید:", "Search": "جستجو", "Search Documents": "جستجوی اسناد", "Use '#' in the prompt input to load and select your documents.": "در پرامپت از '#' برای لود و انتخاب اسناد خود استفاده کنید.", diff --git a/src/lib/i18n/locales/ua/common.json b/src/lib/i18n/locales/ua/common.json index 297fb3da1..4ba4018ef 100644 --- a/src/lib/i18n/locales/ua/common.json +++ b/src/lib/i18n/locales/ua/common.json @@ -83,7 +83,7 @@ "Default (Web API)": "За замовчуванням (Web API)", "Default model updated": "Модель за замовчуванням оновлено", "Default Prompt Suggestions": "Запропоновані запити за замовчуванням", - "Default titleGenerationPromt": "Створіть стислий, 3-5 слів заголовок для наступного запиту, суворо дотримуючись 3-5 слів обмеження та уникаючи використання слова 'заголовок':", + "Create a concise, 3-5 word phrase as a header for the following query, strictly adhering to the 3-5 word limit and avoiding the use of the word 'title':": "Створіть стислий, 3-5 слів заголовок для наступного запиту, суворо дотримуючись 3-5 слів обмеження та уникаючи використання слова 'заголовок':", "Default User Role": "Роль користувача за замовчуванням", "delete": "видалити", "Delete a model": "Видалити модель", diff --git a/src/routes/(app)/+page.svelte b/src/routes/(app)/+page.svelte index 0d6e1719a..9b8303122 100644 --- a/src/routes/(app)/+page.svelte +++ b/src/routes/(app)/+page.svelte @@ -770,7 +770,7 @@ if ($settings.titleAutoGenerate ?? true) { const title = await generateTitle( localStorage.token, - $settings?.titleGenerationPrompt ?? $i18n.t('Default titleGenerationPromt') + ' {{prompt}}', + $settings?.titleGenerationPrompt ?? $i18n.t("Create a concise, 3-5 word phrase as a header for the following query, strictly adhering to the 3-5 word limit and avoiding the use of the word 'title':") + ' {{prompt}}', $settings?.titleAutoGenerateModel ?? selectedModels[0], userPrompt ); diff --git a/src/routes/(app)/c/[id]/+page.svelte b/src/routes/(app)/c/[id]/+page.svelte index 156f40356..def4e8d7d 100644 --- a/src/routes/(app)/c/[id]/+page.svelte +++ b/src/routes/(app)/c/[id]/+page.svelte @@ -779,7 +779,7 @@ if ($settings.titleAutoGenerate ?? true) { const title = await generateTitle( localStorage.token, - $settings?.titleGenerationPrompt ?? $i18n.t('Default titleGenerationPromt') + ' {{prompt}}', + $settings?.titleGenerationPrompt ?? $i18n.t("Create a concise, 3-5 word phrase as a header for the following query, strictly adhering to the 3-5 word limit and avoiding the use of the word 'title':") + ' {{prompt}}', $settings?.titleAutoGenerateModel ?? selectedModels[0], userPrompt ); diff --git a/src/routes/(app)/prompts/edit/+page.svelte b/src/routes/(app)/prompts/edit/+page.svelte index e95487e17..b679d91a1 100644 --- a/src/routes/(app)/prompts/edit/+page.svelte +++ b/src/routes/(app)/prompts/edit/+page.svelte @@ -116,7 +116,7 @@
@@ -163,7 +163,9 @@