mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-05 21:20:12 +00:00
[i18n] Split settings locale to separate json files (#1986)
Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
@@ -190,7 +190,7 @@ const handleSearch = (query: string) => {
|
||||
const idLower = setting.id.toLowerCase()
|
||||
const nameLower = setting.name.toLowerCase()
|
||||
const translatedName = t(
|
||||
`settingsDialog.${normalizeI18nKey(setting.id)}.name`
|
||||
`settings.${normalizeI18nKey(setting.id)}.name`
|
||||
).toLocaleLowerCase()
|
||||
|
||||
return (
|
||||
|
||||
@@ -37,7 +37,7 @@ function translateOptions(options: (SettingOption | string)[]) {
|
||||
|
||||
return {
|
||||
text: t(
|
||||
`settingsDialog.${normalizeI18nKey(props.setting.id)}.options.${normalizeI18nKey(optionLabel)}`,
|
||||
`settings.${normalizeI18nKey(props.setting.id)}.options.${normalizeI18nKey(optionLabel)}`,
|
||||
optionLabel
|
||||
),
|
||||
value: optionValue
|
||||
@@ -49,9 +49,9 @@ const formItem = computed(() => {
|
||||
const normalizedId = normalizeI18nKey(props.setting.id)
|
||||
return {
|
||||
...props.setting,
|
||||
name: t(`settingsDialog.${normalizedId}.name`, props.setting.name),
|
||||
name: t(`settings.${normalizedId}.name`, props.setting.name),
|
||||
tooltip: props.setting.tooltip
|
||||
? t(`settingsDialog.${normalizedId}.tooltip`, props.setting.tooltip)
|
||||
? t(`settings.${normalizedId}.tooltip`, props.setting.tooltip)
|
||||
: undefined,
|
||||
options: props.setting.options
|
||||
? translateOptions(props.setting.options)
|
||||
|
||||
Reference in New Issue
Block a user