[i18n] Translate toast messages (#3228)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Chenlei Hu
2025-03-24 22:22:17 -04:00
committed by GitHub
parent 6c18781663
commit 24dcaa7f72
16 changed files with 191 additions and 43 deletions

View File

@@ -1,3 +1,4 @@
import { t } from '@/i18n'
import type { Settings } from '@/schemas/apiSchema'
import type { ComfyApp } from '@/scripts/app'
import { useSettingStore } from '@/stores/settingStore'
@@ -85,7 +86,9 @@ export class ComfySettingsDialog extends ComfyDialog<HTMLDialogElement> {
useSettingStore()
.set(id, value)
.catch((err) => {
useToastStore().addAlert(`Error saving setting '${id}': ${err}`)
useToastStore().addAlert(
t('toastMessages.errorSaveSetting', { id, err })
)
})
}