Skip to content

Commit

Permalink
Merge pull request #1874 from jannikstdl/update-i18n
Browse files Browse the repository at this point in the history
Added some i18n keys & updated german locale
  • Loading branch information
tjbck committed May 6, 2024
2 parents 0334ab7 + 2dcd9e7 commit 6fa8885
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/chat/ModelSelector.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
</div>
{:else}
<div class=" self-center disabled:text-gray-600 disabled:hover:text-gray-600 mr-2">
<Tooltip content="Remove Model">
<Tooltip content={$i18n.t('Remove Model')}>
<button
{disabled}
on:click={() => {
Expand Down
5 changes: 3 additions & 2 deletions src/lib/components/chat/ModelSelector/Selector.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@
{:else}
<div>
<div class="block px-3 py-2 text-sm text-gray-700 dark:text-gray-100">
No results found
{$i18n.t('No results found')}
</div>
</div>
{/each}
Expand All @@ -317,7 +317,8 @@
pullModelHandler();
}}
>
Pull "{searchValue}" from Ollama.com
{$i18n.t(`Pull "{{searchValue}}" from Ollama.com`, { searchValue: searchValue })}

</button>
{/if}

Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/chat/Settings/Account.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@
{/if}
</button>

<Tooltip content="Create new key">
<Tooltip content={$i18n.t('Create new key')}>
<button
class=" px-1.5 py-1 dark:hover:bg-gray-850transition rounded-lg"
on:click={() => {
Expand Down Expand Up @@ -479,7 +479,7 @@
>
<Plus strokeWidth="2" className=" size-3.5" />

Create new secret key</button
{$i18n.t('Create new secret key')}</button
>
{/if}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/chat/Settings/Connections.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
<div class="flex gap-1.5">
<input
class="w-full rounded-lg py-2 px-4 text-sm dark:text-gray-300 dark:bg-gray-850 outline-none"
placeholder="Enter URL (e.g. http://localhost:11434)"
placeholder={$i18n.t('Enter URL (e.g. http://localhost:11434)')}
bind:value={url}
/>

Expand Down
11 changes: 5 additions & 6 deletions src/lib/components/chat/ShareChatModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@
<div class=" text-sm dark:text-gray-300 mb-1">
{#if chat.share_id}
<a href="/s/{chat.share_id}" target="_blank"
>You have shared this chat <span class=" underline">before</span>.</a
>{$i18n.t("You have shared this chat")} <span class=" underline">{$i18n.t("before")}</span>.</a
>
Click here to
{$i18n.t("Click here to")}
<button
class="underline"
on:click={async () => {
Expand All @@ -108,11 +108,10 @@
if (res) {
chat = await getChatById(localStorage.token, chatId);
}
}}>delete this link</button
> and create a new shared link.
}}>{$i18n.t("delete this link")} </button
> {$i18n.t("and create a new shared link.")}
{:else}
Messages you send after creating your link won't be shared. Users with the URL will be
able to view the shared chat.
{$i18n.t("Messages you send after creating your link won't be shared. Users with the URL will beable to view the shared chat.")}
{/if}
</div>

Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/layout/Sidebar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@
await chats.set(await getChatList(localStorage.token));
}}
>
all
{$i18n.t('all')}
</button>
{#each $tags as tag}
<button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
{/each} -->
</div>
{:else}
<div class="text-left text-sm w-full mb-8">You have no archived conversations.</div>
<div class="text-left text-sm w-full mb-8">{$i18n.t('You have no archived conversations.')}</div>
{/if}
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/lib/components/layout/Sidebar/ChatMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
}}
>
<Share />
<div class="flex items-center">Share</div>
<div class="flex items-center">{$i18n.t('Share')}</div>
</DropdownMenu.Item>

<DropdownMenu.Item
Expand All @@ -59,7 +59,7 @@
}}
>
<Pencil strokeWidth="2" />
<div class="flex items-center">Rename</div>
<div class="flex items-center">{$i18n.t('Rename')}</div>
</DropdownMenu.Item>

<DropdownMenu.Item
Expand All @@ -69,7 +69,7 @@
}}
>
<GarbageBin strokeWidth="2" />
<div class="flex items-center">Delete</div>
<div class="flex items-center">{$i18n.t('Delete')}</div>
</DropdownMenu.Item>

<hr class="border-gray-100 dark:border-gray-800 mt-2.5 mb-1.5" />
Expand Down
30 changes: 23 additions & 7 deletions src/lib/i18n/locales/de-DE/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"Already have an account?": "Hast du vielleicht schon ein Account?",
"an assistant": "ein Assistent",
"and": "und",
"and create a new shared link.": "und einen neuen geteilten Link zu erstellen.",
"API Base URL": "API Basis URL",
"API Key": "API Key",
"API Key created.": "API Key erstellt",
Expand All @@ -54,6 +55,7 @@
"available!": "verfügbar!",
"Back": "Zurück",
"Bad Response": "Schlechte Antwort",
"before": "",
"Being lazy": "Faul sein",
"Builder Mode": "Builder Modus",
"Cancel": "Abbrechen",
Expand All @@ -71,6 +73,7 @@
"Chunk Params": "Chunk Parameter",
"Chunk Size": "Chunk Size",
"Click here for help.": "Klicke hier für Hilfe.",
"Click here to": "Klicke hier, um",
"Click here to check other modelfiles.": "Klicke hier, um andere Modelfiles zu überprüfen.",
"Click here to select": "Klicke hier um auszuwählen",
"Click here to select a csv file.": "",
Expand All @@ -93,18 +96,21 @@
"Copy": "Kopieren",
"Copy last code block": "Letzten Codeblock kopieren",
"Copy last response": "Letzte Antwort kopieren",
"Copy Link": "kopiere Link",
"Copy Link": "Link kopieren",
"Copying to clipboard was successful!": "Das Kopieren in die Zwischenablage war erfolgreich!",
"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:",
"Create a modelfile": "Modelfiles erstellen",
"Create Account": "Konto erstellen",
"Create new key": "Neuen Schlüssel erstellen",
"Create new secret key": "Neuen API Schlüssel erstellen",
"Created at": "Erstellt am",
"Created At": "Erstellt am",
"Current Model": "Aktuelles Modell",
"Current Password": "Aktuelles Passwort",
"Custom": "Benutzerdefiniert",
"Customize Ollama models for a specific purpose": "Ollama-Modelle für einen bestimmten Zweck anpassen",
"Dark": "Dunkel",
"Dashboard": "",
"Database": "Datenbank",
"DD/MM/YYYY HH:mm": "DD.MM.YYYY HH:mm",
"Default": "Standard",
Expand All @@ -120,6 +126,7 @@
"Delete chat": "Chat löschen",
"Delete Chat": "Chat löschen",
"Delete Chats": "Chats löschen",
"delete this link": "diesen Link zu löschen",
"Delete User": "Benutzer löschen",
"Deleted {{deleteModelTag}}": "{{deleteModelTag}} gelöscht",
"Deleted {{tagName}}": "{{tagName}} gelöscht",
Expand Down Expand Up @@ -147,7 +154,7 @@
"Edit User": "Benutzer bearbeiten",
"Email": "E-Mail",
"Embedding Model Engine": "",
"Embedding model set to \"{{embedding_model}}\"": "Das Embedding Modell wurde auf \"{{embedding_model}}\" gesetzt",
"Embedding model set to \"{{embedding_model}}\"": "",
"Enable Chat History": "Chat-Verlauf aktivieren",
"Enable New Sign Ups": "Neue Anmeldungen aktivieren",
"Enabled": "Aktiviert",
Expand All @@ -167,6 +174,7 @@
"Enter stop sequence": "Stop-Sequenz eingeben",
"Enter Top K": "Gib Top K ein",
"Enter URL (e.g. http://127.0.0.1:7860/)": "Gib die URL ein (z.B. http://127.0.0.1:7860/)",
"Enter URL (e.g. http://localhost:11434)": "Gib die URL ein (z.B. http://localhost:11434)",
"Enter Your Email": "Gib deine E-Mail-Adresse ein",
"Enter Your Full Name": "Gib deinen vollständigen Namen ein",
"Enter Your Password": "Gib dein Passwort ein",
Expand Down Expand Up @@ -228,6 +236,7 @@
"Manage Ollama Models": "Ollama-Modelle verwalten",
"Max Tokens": "Maximale Tokens",
"Maximum of 3 models can be downloaded simultaneously. Please try again later.": "Es können maximal 3 Modelle gleichzeitig heruntergeladen werden. Bitte versuche es später erneut.",
"Messages you send after creating your link won't be shared. Users with the URL will beable to view the shared chat.": "Fortlaudende Nachrichten in diesem Chat werden nicht automatisch geteilt. Benutzer mit dem Link können den Chat einsehen.",
"Minimum Score": "",
"Mirostat": "Mirostat",
"Mirostat Eta": "Mirostat Eta",
Expand Down Expand Up @@ -258,14 +267,15 @@
"Name your modelfile": "Benenne dein modelfile",
"New Chat": "Neuer Chat",
"New Password": "Neues Passwort",
"No results found": "Keine Ergebnisse gefunden",
"Not factually correct": "Nicht sachlich korrekt.",
"Not sure what to add?": "Nicht sicher, was hinzugefügt werden soll?",
"Not sure what to write? Switch to": "Nicht sicher, was Du schreiben sollst? Wechsel zu",
"Note: If you set a minimum score, the search will only return documents with a score greater than or equal to the minimum score.": "",
"Notifications": "Desktop-Benachrichtigungen",
"Off": "Aus",
"Okay, Let's Go!": "Okay, los geht's!",
"OLED Dark": "",
"OLED Dark": "OLED Dunkel",
"Ollama": "",
"Ollama Base URL": "Ollama Basis URL",
"Ollama Version": "Ollama-Version",
Expand All @@ -286,20 +296,22 @@
"OpenAI URL/Key required.": "OpenAI URL/Key erforderlich.",
"or": "oder",
"Other": "Andere",
"Overview": "Übersicht",
"Parameters": "Parameter",
"Password": "Passwort",
"PDF document (.pdf)": "PDF-Dokument (.pdf)",
"PDF Extract Images (OCR)": "Text von Bildern aus PDFs extrahieren (OCR)",
"pending": "ausstehend",
"Permission denied when accessing microphone: {{error}}": "Zugriff auf das Mikrofon verweigert: {{error}}",
"Plain text (.txt)": "Nur Text (.txt)",
"Playground": "Spielplatz",
"Playground": "Testumgebung",
"Positive attitude": "Positive Einstellung",
"Profile Image": "Profilbild",
"Prompt (e.g. Tell me a fun fact about the Roman Empire)": "Prompt (z.B. Erzähle mir eine interessante Tatsache über das Römische Reich.",
"Prompt Content": "Prompt-Inhalt",
"Prompt suggestions": "Prompt-Vorschläge",
"Prompts": "Prompts",
"Pull \"{{searchValue}}\" from Ollama.com": "\"{{searchValue}}\" von Ollama.com herunterladen",
"Pull a model from Ollama.com": "Ein Modell von Ollama.com abrufen",
"Pull Progress": "Fortschritt abrufen",
"Query Params": "Query Parameter",
Expand All @@ -312,6 +324,8 @@
"Regenerate": "Neu generieren",
"Release Notes": "Versionshinweise",
"Remove": "Entfernen",
"Remove Model": "Modell entfernen",
"Rename": "Umbenennen",
"Repeat Last N": "Repeat Last N",
"Repeat Penalty": "Repeat Penalty",
"Request Mode": "Request-Modus",
Expand All @@ -331,7 +345,7 @@
"Scan complete!": "Scan abgeschlossen!",
"Scan for documents from {{path}}": "Dokumente von {{path}} scannen",
"Search": "Suchen",
"Search a model": "Ein Modell suchen",
"Search a model": "Nach einem Modell suchen",
"Search Documents": "Dokumente suchen",
"Search Prompts": "Prompts suchen",
"See readme.md for instructions": "Anleitung in readme.md anzeigen",
Expand Down Expand Up @@ -419,8 +433,8 @@
"Upload Progress": "Upload Progress",
"URL Mode": "URL Modus",
"Use '#' in the prompt input to load and select your documents.": "Verwende '#' in der Prompt-Eingabe, um deine Dokumente zu laden und auszuwählen.",
"Use Gravatar": "verwende Gravatar ",
"Use Initials": "verwende Initialen",
"Use Gravatar": "Gravatar verwenden",
"Use Initials": "Initialen verwenden",
"user": "Benutzer",
"User Permissions": "Benutzerberechtigungen",
"Users": "Benutzer",
Expand All @@ -441,6 +455,8 @@
"Write a prompt suggestion (e.g. Who are you?)": "Gebe einen Prompt-Vorschlag ein (z.B. Wer bist du?)",
"Write a summary in 50 words that summarizes [topic or keyword].": "Schreibe eine kurze Zusammenfassung in 50 Wörtern, die [Thema oder Schlüsselwort] zusammenfasst.",
"You": "Du",
"You have no archived conversations.": "Du hast keine archivierten Unterhaltungen.",
"You have shared this chat": "Du hast diesen Chat",
"You're a helpful assistant.": "Du bist ein hilfreicher Assistent.",
"You're now logged in.": "Du bist nun eingeloggt.",
"Youtube": ""
Expand Down
8 changes: 4 additions & 4 deletions src/routes/(app)/admin/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
<div class=" flex flex-col justify-center">
<div class=" px-6 pt-4">
<div class=" flex justify-between items-center">
<div class="flex items-center text-2xl font-semibold">Dashboard</div>
<div class="flex items-center text-2xl font-semibold">{$i18n.t('Dashboard')}</div>
<div>
<Tooltip content={$i18n.t('Admin Settings')}>
<button
Expand Down Expand Up @@ -140,8 +140,8 @@
</div>
</div>
<div class="px-6 flex text-sm gap-2.5">
<div class="py-3 border-b font-medium text-gray-100 cursor-pointer">Overview</div>
<div class="px-5 flex text-sm gap-2.5">
<div class="py-3 border-b font-medium text-gray-100 cursor-pointer">{$i18n.t('Overview')}</div>
<!-- <div class="py-3 text-gray-300 cursor-pointer">Users</div> -->
</div>
Expand Down Expand Up @@ -268,7 +268,7 @@
<td class="px-3 py-2 text-right">
<div class="flex justify-end w-full">
{#if user.role !== 'admin'}
<Tooltip content="Chats">
<Tooltip content={$i18n.t('Chats')}>
<button
class="self-center w-fit text-sm px-2 py-2 hover:bg-black/5 dark:hover:bg-white/5 rounded-xl"
on:click={async () => {
Expand Down

0 comments on commit 6fa8885

Please sign in to comment.