Merge branch 'dev' into update-chat-timestamp-locale

This commit is contained in:
Timothy Jaeryang Baek
2024-05-07 11:00:31 -07:00
committed by GitHub
11 changed files with 53 additions and 46 deletions

View File

@@ -107,7 +107,7 @@
reader.readAsText(file);
} else {
toast.error(`File not found.`);
toast.error($i18n.t('File not found.'));
}
}
};

View File

@@ -24,7 +24,7 @@
{
name: 'All Documents',
type: 'collection',
title: 'All Documents',
title: $i18n.t('All Documents'),
collection_names: $documents.map((doc) => doc.collection_name)
}
]

View File

@@ -1,6 +1,8 @@
<script lang="ts">
import Bolt from '$lib/components/icons/Bolt.svelte';
import { onMount } from 'svelte';
import { onMount, getContext } from 'svelte';
const i18n = getContext('i18n');
export let submitPrompt: Function;
export let suggestionPrompts = [];
@@ -33,7 +35,7 @@
{#if prompts.length > 0}
<div class="mb-2 flex gap-1 text-sm font-medium items-center text-gray-400 dark:text-gray-600">
<Bolt />
Suggested
{$i18n.t('Suggested')}
</div>
{/if}
@@ -71,7 +73,7 @@
<div
class="text-xs text-gray-400 group-hover:text-gray-500 dark:text-gray-600 dark:group-hover:text-gray-500 transition self-center"
>
Prompt
{$i18n.t('Prompt')}
</div>
<div

View File

@@ -151,7 +151,7 @@
models.set(await getModels(localStorage.token));
} else {
toast.error('Download canceled');
toast.error($i18n.t('Download canceled'));
}
delete $MODEL_DOWNLOAD_POOL[sanitizedModelTag];
@@ -368,7 +368,7 @@
</div>
<div class="mr-2 translate-y-0.5">
<Tooltip content="Cancel">
<Tooltip content={$i18n.t('Cancel')}>
<button
class="text-gray-800 dark:text-gray-100"
on:click={() => {

View File

@@ -245,7 +245,7 @@
models.set(await getModels(localStorage.token));
} else {
toast.error('Download canceled');
toast.error($i18n.t('Download canceled'));
}
delete $MODEL_DOWNLOAD_POOL[sanitizedModelTag];
@@ -652,7 +652,7 @@
</div>
</div>
<Tooltip content="Cancel">
<Tooltip content={$i18n.t('Cancel')}>
<button
class="text-gray-800 dark:text-gray-100"
on:click={() => {

View File

@@ -17,7 +17,7 @@
tagName = '';
showTagInput = false;
} else {
toast.error('Invalid Tag');
toast.error($i18n.t(`Invalid Tag`));
}
};
</script>

View File

@@ -134,7 +134,7 @@
const editChatTitle = async (id, _title) => {
if (_title === '') {
toast.error('Title cannot be an empty string.');
toast.error($i18n.t('Title cannot be an empty string.'));
} else {
title = _title;