From 9c81d84e165ab298dfb0fe569041677305449857 Mon Sep 17 00:00:00 2001 From: SimonOriginal Date: Mon, 24 Jun 2024 17:18:39 +0200 Subject: [PATCH] Add toasts i18n key --- src/lib/components/admin/Settings/Pipelines.svelte | 12 ++++++------ .../Settings/Personalization/AddMemoryModal.svelte | 2 +- .../Settings/Personalization/EditMemoryModal.svelte | 2 +- .../Settings/Personalization/ManageModal.svelte | 4 ++-- src/lib/components/workspace/Functions.svelte | 4 ++-- src/lib/components/workspace/Tools.svelte | 4 ++-- .../components/workspace/common/ValvesModal.svelte | 2 +- src/lib/i18n/locales/ar-BH/translation.json | 13 +++++++++++++ src/lib/i18n/locales/bg-BG/translation.json | 13 +++++++++++++ src/lib/i18n/locales/bn-BD/translation.json | 13 +++++++++++++ src/lib/i18n/locales/ca-ES/translation.json | 13 +++++++++++++ src/lib/i18n/locales/ceb-PH/translation.json | 13 +++++++++++++ src/lib/i18n/locales/de-DE/translation.json | 13 +++++++++++++ src/lib/i18n/locales/dg-DG/translation.json | 13 +++++++++++++ src/lib/i18n/locales/en-GB/translation.json | 13 +++++++++++++ src/lib/i18n/locales/en-US/translation.json | 13 +++++++++++++ src/lib/i18n/locales/es-ES/translation.json | 13 +++++++++++++ src/lib/i18n/locales/fa-IR/translation.json | 13 +++++++++++++ src/lib/i18n/locales/fi-FI/translation.json | 13 +++++++++++++ src/lib/i18n/locales/fr-CA/translation.json | 13 +++++++++++++ src/lib/i18n/locales/fr-FR/translation.json | 13 +++++++++++++ src/lib/i18n/locales/he-IL/translation.json | 13 +++++++++++++ src/lib/i18n/locales/hi-IN/translation.json | 13 +++++++++++++ src/lib/i18n/locales/hr-HR/translation.json | 13 +++++++++++++ src/lib/i18n/locales/it-IT/translation.json | 13 +++++++++++++ src/lib/i18n/locales/ja-JP/translation.json | 13 +++++++++++++ src/lib/i18n/locales/ka-GE/translation.json | 13 +++++++++++++ src/lib/i18n/locales/ko-KR/translation.json | 13 +++++++++++++ src/lib/i18n/locales/lt-LT/translation.json | 13 +++++++++++++ src/lib/i18n/locales/nb-NO/translation.json | 13 +++++++++++++ src/lib/i18n/locales/nl-NL/translation.json | 13 +++++++++++++ src/lib/i18n/locales/pa-IN/translation.json | 13 +++++++++++++ src/lib/i18n/locales/pl-PL/translation.json | 13 +++++++++++++ src/lib/i18n/locales/pt-BR/translation.json | 13 +++++++++++++ src/lib/i18n/locales/pt-PT/translation.json | 13 +++++++++++++ src/lib/i18n/locales/ru-RU/translation.json | 13 +++++++++++++ src/lib/i18n/locales/sr-RS/translation.json | 13 +++++++++++++ src/lib/i18n/locales/sv-SE/translation.json | 13 +++++++++++++ src/lib/i18n/locales/tk-TW/translation.json | 13 +++++++++++++ src/lib/i18n/locales/tr-TR/translation.json | 13 +++++++++++++ src/lib/i18n/locales/uk-UA/translation.json | 13 +++++++++++++ src/lib/i18n/locales/vi-VN/translation.json | 13 +++++++++++++ src/lib/i18n/locales/zh-CN/translation.json | 13 +++++++++++++ src/lib/i18n/locales/zh-TW/translation.json | 13 +++++++++++++ 44 files changed, 496 insertions(+), 15 deletions(-) diff --git a/src/lib/components/admin/Settings/Pipelines.svelte b/src/lib/components/admin/Settings/Pipelines.svelte index a830ee12d..6826cb92b 100644 --- a/src/lib/components/admin/Settings/Pipelines.svelte +++ b/src/lib/components/admin/Settings/Pipelines.svelte @@ -60,13 +60,13 @@ }); if (res) { - toast.success('Valves updated successfully'); + toast.success($i18n.t('Valves updated successfully')); setPipelines(); models.set(await getModels(localStorage.token)); saveHandler(); } } else { - toast.error('No valves to update'); + toast.error($i18n.t('No valves to update')); } }; @@ -122,7 +122,7 @@ }); if (res) { - toast.success('Pipeline downloaded successfully'); + toast.success($i18n.t('Pipeline downloaded successfully')); setPipelines(); models.set(await getModels(localStorage.token)); } @@ -147,12 +147,12 @@ ); if (res) { - toast.success('Pipeline downloaded successfully'); + toast.success($i18n.t('Pipeline downloaded successfully')); setPipelines(); models.set(await getModels(localStorage.token)); } } else { - toast.error('No file selected'); + toast.error($i18n.t('No file selected')); } pipelineFiles = null; @@ -176,7 +176,7 @@ }); if (res) { - toast.success('Pipeline deleted successfully'); + toast.success($i18n.t('Pipeline deleted successfully')); setPipelines(); models.set(await getModels(localStorage.token)); } diff --git a/src/lib/components/chat/Settings/Personalization/AddMemoryModal.svelte b/src/lib/components/chat/Settings/Personalization/AddMemoryModal.svelte index 98d77c07a..6e16576b0 100644 --- a/src/lib/components/chat/Settings/Personalization/AddMemoryModal.svelte +++ b/src/lib/components/chat/Settings/Personalization/AddMemoryModal.svelte @@ -24,7 +24,7 @@ if (res) { console.log(res); - toast.success('Memory added successfully'); + toast.success($i18n.t('Memory added successfully')); content = ''; show = false; dispatch('save'); diff --git a/src/lib/components/chat/Settings/Personalization/EditMemoryModal.svelte b/src/lib/components/chat/Settings/Personalization/EditMemoryModal.svelte index 7eecc4c30..773309ff9 100644 --- a/src/lib/components/chat/Settings/Personalization/EditMemoryModal.svelte +++ b/src/lib/components/chat/Settings/Personalization/EditMemoryModal.svelte @@ -35,7 +35,7 @@ if (res) { console.log(res); - toast.success('Memory updated successfully'); + toast.success($i18n.t('Memory updated successfully')); dispatch('save'); show = false; } diff --git a/src/lib/components/chat/Settings/Personalization/ManageModal.svelte b/src/lib/components/chat/Settings/Personalization/ManageModal.svelte index 8474e89e8..92b4936e9 100644 --- a/src/lib/components/chat/Settings/Personalization/ManageModal.svelte +++ b/src/lib/components/chat/Settings/Personalization/ManageModal.svelte @@ -129,7 +129,7 @@ }); if (res) { - toast.success('Memory deleted successfully'); + toast.success($i18n.t('Memory deleted successfully')); memories = await getMemories(localStorage.token); } }} @@ -182,7 +182,7 @@ }); if (res) { - toast.success('Memory cleared successfully'); + toast.success($i18n.t('Memory cleared successfully')); memories = []; } }}>{$i18n.t('Clear memory')}