Added more german translations + added more i18n keys

This commit is contained in:
Jannik Streidl
2024-04-28 14:39:06 +02:00
parent 9130428a55
commit 19843e39fd
13 changed files with 74 additions and 39 deletions

View File

@@ -70,7 +70,7 @@
>
<tr>
<th scope="col" class="px-3 py-2"> {$i18n.t('Name')} </th>
<th scope="col" class="px-3 py-2 hidden md:flex"> {$i18n.t('Created At')} </th>
<th scope="col" class="px-3 py-2 hidden md:flex"> {$i18n.t('Created at')} </th>
<th scope="col" class="px-3 py-2 text-right" />
</tr>
</thead>
@@ -96,7 +96,7 @@
<td class="px-3 py-1 text-right">
<div class="flex justify-end w-full">
<Tooltip content="Delete Chat">
<Tooltip content={$i18n.t('Delete Chat')}>
<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 () => {
@@ -133,7 +133,7 @@
{/each} -->
</div>
{:else}
<div class="text-left text-sm w-full mb-8">{user.name} has no conversations.</div>
<div class="text-left text-sm w-full mb-8">{user.name} {$i18n.t('has no conversations.')}</div>
{/if}
</div>
</div>

View File

@@ -492,7 +492,7 @@
{/if}
{#if !readOnly}
<Tooltip content="Edit" placement="bottom">
<Tooltip content={$i18n.t('Edit')} placement="bottom">
<button
class="{isLastMessage
? 'visible'
@@ -519,7 +519,7 @@
</Tooltip>
{/if}
<Tooltip content="Copy" placement="bottom">
<Tooltip content={$i18n.t('Copy')} placement="bottom">
<button
class="{isLastMessage
? 'visible'
@@ -546,7 +546,7 @@
</Tooltip>
{#if !readOnly}
<Tooltip content="Good Response" placement="bottom">
<Tooltip content={$i18n.t('Good Response')} placement="bottom">
<button
class="{isLastMessage
? 'visible'
@@ -581,7 +581,7 @@
</button>
</Tooltip>
<Tooltip content="Bad Response" placement="bottom">
<Tooltip content={$i18n.t('Bad Response')} placement="bottom">
<button
class="{isLastMessage
? 'visible'
@@ -616,7 +616,7 @@
</Tooltip>
{/if}
<Tooltip content="Read Aloud" placement="bottom">
<Tooltip content={$i18n.t('Read Aloud')} placement="bottom">
<button
id="speak-button-{message.id}"
class="{isLastMessage
@@ -765,7 +765,7 @@
{/if}
{#if message.info}
<Tooltip content="Generation Info" placement="bottom">
<Tooltip content={$i18n.t('Generation Info')} placement="bottom">
<button
class=" {isLastMessage
? 'visible'
@@ -794,7 +794,7 @@
{/if}
{#if isLastMessage && !readOnly}
<Tooltip content="Continue Response" placement="bottom">
<Tooltip content={$i18n.t('Continue Response')} placement="bottom">
<button
type="button"
class="{isLastMessage
@@ -826,7 +826,7 @@
</button>
</Tooltip>
<Tooltip content="Regenerate" placement="bottom">
<Tooltip content={$i18n.t('Regenerate')} placement="bottom">
<button
type="button"
class="{isLastMessage

View File

@@ -266,7 +266,7 @@
{/if}
{#if !readOnly}
<Tooltip content="Edit" placement="bottom">
<Tooltip content={$i18n.t('Edit')} placement="bottom">
<button
class="invisible group-hover:visible p-1 rounded dark:hover:text-white hover:text-black transition edit-user-message-button"
on:click={() => {
@@ -291,7 +291,7 @@
</Tooltip>
{/if}
<Tooltip content="Copy" placement="bottom">
<Tooltip content={$i18n.t('Copy')} placement="bottom">
<button
class="invisible group-hover:visible p-1 rounded dark:hover:text-white hover:text-black transition"
on:click={() => {
@@ -316,7 +316,7 @@
</Tooltip>
{#if !isFirstMessage && !readOnly}
<Tooltip content="Delete" placement="bottom">
<Tooltip content={$i18n.t('Delete')} placement="bottom">
<button
class="invisible group-hover:visible p-1 rounded dark:hover:text-white hover:text-black transition"
on:click={() => {

View File

@@ -57,7 +57,7 @@
{#if selectedModelIdx === 0}
<div class=" self-center mr-2 disabled:text-gray-600 disabled:hover:text-gray-600">
<Tooltip content="Add Model">
<Tooltip content={$i18n.t('Add Model')}>
<button
class=" "
{disabled}

View File

@@ -21,7 +21,7 @@
export let value = '';
export let placeholder = 'Select a model';
export let searchEnabled = true;
export let searchPlaceholder = 'Search a model';
export let searchPlaceholder = $i18n.t('Search a model');
export let items = [{ value: 'mango', label: 'Mango' }];

View File

@@ -1,6 +1,9 @@
<script lang="ts">
import TagInput from './Tags/TagInput.svelte';
import TagList from './Tags/TagList.svelte';
import { getContext } from 'svelte';
const i18n = getContext('i18n');
export let tags = [];
@@ -17,7 +20,7 @@
/>
<TagInput
label={tags.length == 0 ? 'Add Tags' : ''}
label={tags.length == 0 ? $i18n.t('Add Tags') : ''}
on:add={(e) => {
addTag(e.detail);
}}

View File

@@ -42,7 +42,7 @@
<div class="flex self-center w-[1px] h-5 mx-2 bg-gray-300 dark:bg-stone-700" />
{#if !shareEnabled}
<Tooltip content="Settings">
<Tooltip content={$i18n.t('Settings')}>
<button
class="cursor-pointer p-1.5 flex dark:hover:bg-gray-700 rounded-full transition"
id="open-settings-button"
@@ -104,7 +104,7 @@
</button>
</Menu>
{/if}
<Tooltip content="New Chat">
<Tooltip content={$i18n.t('New Chat')}>
<button
id="new-chat-button"
class=" cursor-pointer p-1.5 flex dark:hover:bg-gray-700 rounded-full transition"

View File

@@ -1,5 +1,6 @@
<script lang="ts">
import { DropdownMenu } from 'bits-ui';
import { getContext } from 'svelte';
import fileSaver from 'file-saver';
const { saveAs } = fileSaver;
@@ -12,6 +13,8 @@
import { downloadChatAsPDF } from '$lib/apis/utils';
const i18n = getContext('i18n');
export let shareEnabled: boolean = false;
export let shareHandler: Function;
export let downloadHandler: Function;
@@ -104,7 +107,7 @@
d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
/>
</svg>
<div class="flex items-center">Settings</div>
<div class="flex items-center">{$i18n.t('Settings')}</div>
</DropdownMenu.Item>
{#if shareEnabled}
@@ -126,7 +129,7 @@
clip-rule="evenodd"
/>
</svg>
<div class="flex items-center">Share</div>
<div class="flex items-center">{$i18n.t('Share')}</div>
</DropdownMenu.Item>
<!-- <DropdownMenu.Item
@@ -154,7 +157,7 @@
/>
</svg>
<div class="flex items-center">Download</div>
<div class="flex items-center">{$i18n.t('Download')}</div>
</DropdownMenu.SubTrigger>
<DropdownMenu.SubContent
class="w-full rounded-lg px-1 py-1.5 border border-gray-300/30 dark:border-gray-700/50 z-50 bg-white dark:bg-gray-900 dark:text-white shadow-lg"
@@ -167,7 +170,7 @@
downloadTxt();
}}
>
<div class="flex items-center line-clamp-1">Plain text (.txt)</div>
<div class="flex items-center line-clamp-1">{$i18n.t('Plain text (.txt)')}</div>
</DropdownMenu.Item>
<DropdownMenu.Item
@@ -176,7 +179,7 @@
downloadPdf();
}}
>
<div class="flex items-center line-clamp-1">PDF document (.pdf)</div>
<div class="flex items-center line-clamp-1">{$i18n.t('PDF document (.pdf)')}</div>
</DropdownMenu.Item>
</DropdownMenu.SubContent>
</DropdownMenu.Sub>

View File

@@ -610,7 +610,7 @@
</button>
</ChatMenu>
<Tooltip content="Archive">
<Tooltip content={$i18n.t('Archive')}>
<button
aria-label="Archive"
class=" self-center dark:hover:text-white transition"

View File

@@ -1,6 +1,7 @@
<script lang="ts">
import { DropdownMenu } from 'bits-ui';
import { flyAndScale } from '$lib/utils/transitions';
import { getContext } from 'svelte'
import Dropdown from '$lib/components/common/Dropdown.svelte';
import GarbageBin from '$lib/components/icons/GarbageBin.svelte';
@@ -9,6 +10,8 @@
import Tags from '$lib/components/chat/Tags.svelte';
import Share from '$lib/components/icons/Share.svelte';
const i18n = getContext('i18n');
export let shareHandler: Function;
export let renameHandler: Function;
export let deleteHandler: Function;
@@ -27,7 +30,7 @@
}
}}
>
<Tooltip content="More">
<Tooltip content={$i18n.t('More')}>
<slot />
</Tooltip>