mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-10 03:27:57 +00:00
refac
This commit is contained in:
parent
3c97ec0b95
commit
350fbce932
5 changed files with 14 additions and 4 deletions
|
|
@ -1,4 +1,8 @@
|
|||
<script lang="ts">
|
||||
// Keep keys in nested template expressions visible to i18next-parser.
|
||||
// $i18n.t("and");
|
||||
// $i18n.t("and {{COUNT}} others");
|
||||
|
||||
import dayjs from 'dayjs';
|
||||
import relativeTime from 'dayjs/plugin/relativeTime';
|
||||
import isToday from 'dayjs/plugin/isToday';
|
||||
|
|
|
|||
|
|
@ -1711,7 +1711,7 @@
|
|||
<span class="font-normal text-black dark:text-white">
|
||||
{typingUsers.map((user) => user.name).join(', ')}
|
||||
</span>
|
||||
{$i18n.t(typingUsers.length === 1 ? 'is typing...' : 'are typing...')}
|
||||
{typingUsers.length === 1 ? $i18n.t('is typing...') : $i18n.t('are typing...')}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
<script lang="ts">
|
||||
// Keep keys in nested template expressions visible to i18next-parser.
|
||||
// $i18n.t("Terminal unavailable");
|
||||
// $i18n.t("No preview available");
|
||||
|
||||
import { getContext, onDestroy } from 'svelte';
|
||||
import type { Writable } from 'svelte/store';
|
||||
import type { i18n as i18nType } from 'i18next';
|
||||
|
|
|
|||
|
|
@ -474,9 +474,9 @@
|
|||
? ''
|
||||
: 'outline-hidden'}"
|
||||
aria-pressed={role === 'assistant'}
|
||||
aria-label={$i18n.t(
|
||||
role === 'user' ? 'Switch to Assistant role' : 'Switch to User role'
|
||||
)}
|
||||
aria-label={role === 'user'
|
||||
? $i18n.t('Switch to Assistant role')
|
||||
: $i18n.t('Switch to User role')}
|
||||
on:click={() => {
|
||||
role = role === 'user' ? 'assistant' : 'user';
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
const i18n = getContext('i18n');
|
||||
|
||||
// Message roles arrive as data; keep their translation keys visible to the parser.
|
||||
// $i18n.t('user'); $i18n.t('assistant'); $i18n.t('system');
|
||||
export let message;
|
||||
export let idx;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue