From c85fad90b5b359771a673e9e08e10bd0a020bc1c Mon Sep 17 00:00:00 2001 From: icarus Date: Mon, 13 Oct 2025 21:48:56 +0800 Subject: [PATCH] feat(toast): add i18n support for loading toast title Use i18next to translate the loading toast title for better localization support --- src/renderer/src/components/TopView/toast.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/components/TopView/toast.ts b/src/renderer/src/components/TopView/toast.ts index b5108315fa..67d0cfe77f 100644 --- a/src/renderer/src/components/TopView/toast.ts +++ b/src/renderer/src/components/TopView/toast.ts @@ -1,5 +1,6 @@ import { addToast, closeAll, closeToast, getToastQueue, isToastClosing } from '@heroui/toast' import { RequireSome } from '@renderer/types' +import { t } from 'i18next' type AddToastProps = Parameters[0] type ToastPropsColored = Omit @@ -54,7 +55,7 @@ export const loading = (args: RequireSome) => { if (args.timeout === undefined) { args.timeout = 1 } - return addToast(args) + return addToast({ title: t('common.loading'), ...args }) } export const getToastUtilities = () =>