From abba7c128c2b38199ff1a50a9de1fb277d4c840a Mon Sep 17 00:00:00 2001
From: Erik <erik.weisser@gmail.com>
Date: Tue, 1 Apr 2025 08:21:03 +0200
Subject: [PATCH] [FEAT]-Adjust Translations for temporary chat

---
 .../components/chat/ChatPlaceholder.svelte    | 20 ++++++++++---------
 src/lib/components/chat/Placeholder.svelte    | 20 ++++++++++---------
 src/lib/i18n/locales/de-DE/translation.json   |  5 +++--
 src/lib/i18n/locales/en-GB/translation.json   |  1 +
 src/lib/i18n/locales/en-US/translation.json   |  1 +
 5 files changed, 27 insertions(+), 20 deletions(-)

diff --git a/src/lib/components/chat/ChatPlaceholder.svelte b/src/lib/components/chat/ChatPlaceholder.svelte
index 9804dcaca..99eb8cbce 100644
--- a/src/lib/components/chat/ChatPlaceholder.svelte
+++ b/src/lib/components/chat/ChatPlaceholder.svelte
@@ -29,6 +29,8 @@
 
 	$: models = modelIds.map((id) => $_models.find((m) => m.id === id));
 
+	const tempChatTooltipText = 'This chat won’t appear in history and your messages will not be saved.';
+	
 	onMount(() => {
 		mounted = true;
 	});
@@ -67,15 +69,15 @@
 		</div>
 
 		{#if $temporaryChatEnabled}
-			<Tooltip
-				content="This chat won't appear in history and your messages will not be saved."
-				className="w-fit"
-				placement="top-start"
-			>
-				<div class="flex items-center gap-2 text-gray-500 font-medium text-lg my-2 w-fit">
-					<EyeSlash strokeWidth="2.5" className="size-5" /> Temporary Chat
-				</div>
-			</Tooltip>
+		<Tooltip
+			content={$i18n.t(tempChatTooltipText)}
+			className="w-full flex justify-center mb-0.5"
+			placement="top"
+		>
+			<div class="flex items-center gap-2 text-gray-500 font-medium text-lg my-2 w-fit">
+				<EyeSlash strokeWidth="2.5" className="size-5" />{$i18n.t('Temporary Chat')}
+			</div>
+		</Tooltip>
 		{/if}
 
 		<div
diff --git a/src/lib/components/chat/Placeholder.svelte b/src/lib/components/chat/Placeholder.svelte
index 3bfddda9d..db70d7602 100644
--- a/src/lib/components/chat/Placeholder.svelte
+++ b/src/lib/components/chat/Placeholder.svelte
@@ -87,20 +87,22 @@
 
 	$: models = selectedModels.map((id) => $_models.find((m) => m.id === id));
 
+	const tempChatTooltipText = 'This chat won’t appear in history and your messages will not be saved.';
+	
 	onMount(() => {});
 </script>
 
 <div class="m-auto w-full max-w-6xl px-2 @2xl:px-20 translate-y-6 py-24 text-center">
 	{#if $temporaryChatEnabled}
-		<Tooltip
-			content="This chat won't appear in history and your messages will not be saved."
-			className="w-full flex justify-center mb-0.5"
-			placement="top"
-		>
-			<div class="flex items-center gap-2 text-gray-500 font-medium text-lg my-2 w-fit">
-				<EyeSlash strokeWidth="2.5" className="size-5" /> Temporary Chat
-			</div>
-		</Tooltip>
+	<Tooltip
+		content={$i18n.t(tempChatTooltipText)}
+		className="w-full flex justify-center mb-0.5"
+		placement="top"
+	>
+		<div class="flex items-center gap-2 text-gray-500 font-medium text-lg my-2 w-fit">
+			<EyeSlash strokeWidth="2.5" className="size-5" />{$i18n.t('Temporary Chat')}
+		</div>
+	</Tooltip>
 	{/if}
 
 	<div
diff --git a/src/lib/i18n/locales/de-DE/translation.json b/src/lib/i18n/locales/de-DE/translation.json
index 60e9f2185..db8bd496c 100644
--- a/src/lib/i18n/locales/de-DE/translation.json
+++ b/src/lib/i18n/locales/de-DE/translation.json
@@ -379,7 +379,7 @@
 	"Enable Mirostat sampling for controlling perplexity.": "",
 	"Enable New Sign Ups": "Registrierung erlauben",
 	"Enabled": "Aktiviert",
-	"Enforce Temporary Chat": "",
+	"Enforce Temporary Chat": "Temporären Chat erzwingen",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Stellen Sie sicher, dass Ihre CSV-Datei 4 Spalten in dieser Reihenfolge enthält: Name, E-Mail, Passwort, Rolle.",
 	"Enter {{role}} message here": "Geben Sie die {{role}}-Nachricht hier ein",
 	"Enter a detail about yourself for your LLMs to recall": "Geben Sie ein Detail über sich selbst ein, das Ihre Sprachmodelle (LLMs) sich merken sollen",
@@ -1021,7 +1021,8 @@
 	"Tell us more:": "Erzähl uns mehr",
 	"Temperature": "Temperatur",
 	"Template": "Vorlage",
-	"Temporary Chat": "Temporärer Chat",
+	"Temporary Chat": "Temporäre Unterhaltung",
+	"This chat won’t appear in history and your messages will not be saved.": "Diese Unterhaltung erscheint nicht in deinem Chat-Verlauf. Alle Nachrichten sind privat und werden nicht gespeichert.",
 	"Text Splitter": "Text-Splitter",
 	"Text-to-Speech Engine": "Text-zu-Sprache-Engine",
 	"Tfs Z": "Tfs Z",
diff --git a/src/lib/i18n/locales/en-GB/translation.json b/src/lib/i18n/locales/en-GB/translation.json
index d02bdaba7..f5b2040cb 100644
--- a/src/lib/i18n/locales/en-GB/translation.json
+++ b/src/lib/i18n/locales/en-GB/translation.json
@@ -1022,6 +1022,7 @@
 	"Temperature": "",
 	"Template": "",
 	"Temporary Chat": "",
+	"This chat won’t appear in history and your messages will not be saved.": "",
 	"Text Splitter": "",
 	"Text-to-Speech Engine": "",
 	"Tfs Z": "",
diff --git a/src/lib/i18n/locales/en-US/translation.json b/src/lib/i18n/locales/en-US/translation.json
index d02bdaba7..f5b2040cb 100644
--- a/src/lib/i18n/locales/en-US/translation.json
+++ b/src/lib/i18n/locales/en-US/translation.json
@@ -1022,6 +1022,7 @@
 	"Temperature": "",
 	"Template": "",
 	"Temporary Chat": "",
+	"This chat won’t appear in history and your messages will not be saved.": "",
 	"Text Splitter": "",
 	"Text-to-Speech Engine": "",
 	"Tfs Z": "",