mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-21 23:34:31 +00:00
[Templates] Use fallbacks when translating template titles and category names (#3494)
This commit is contained in:
@@ -123,12 +123,13 @@ const overlayThumbnailSrc = computed(() =>
|
||||
)
|
||||
|
||||
const title = computed(() => {
|
||||
const fallback = template.title ?? template.name ?? `${sourceModule} Template`
|
||||
return sourceModule === 'default'
|
||||
? st(
|
||||
`templateWorkflows.template.${normalizeI18nKey(categoryTitle)}.${normalizeI18nKey(template.name)}`,
|
||||
template.name
|
||||
fallback
|
||||
)
|
||||
: template.name ?? `${sourceModule} Template`
|
||||
: fallback
|
||||
})
|
||||
|
||||
const description = computed(() => template.description.replace(/[-_]/g, ' '))
|
||||
|
||||
Reference in New Issue
Block a user