This commit is contained in:
Timothy Jaeryang Baek 2026-10-09 17:52:02 +04:00
parent 3c97ec0b95
commit 350fbce932
5 changed files with 14 additions and 4 deletions

View file

@ -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';

View file

@ -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>

View file

@ -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';

View file

@ -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';
}}

View file

@ -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;