Normalize translation keys in template card component (#2574)

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: huchenlei <huchenlei@proton.me>
This commit is contained in:
bymyself
2025-02-16 08:17:49 -07:00
committed by GitHub
parent df11c99393
commit e3234aa0aa
7 changed files with 58 additions and 58 deletions

View File

@@ -55,6 +55,7 @@ import { computed, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { TemplateInfo } from '@/types/workflowTemplateTypes'
import { normalizeI18nKey } from '@/utils/formatUtil'
const { sourceModule, categoryTitle, loading, template } = defineProps<{
sourceModule: string
@@ -75,8 +76,7 @@ const thumbnailSrc = computed(() =>
const title = computed(() => {
return sourceModule === 'default'
? t(
`templateWorkflows.template.${categoryTitle}.${template.name}`,
template.name
`templateWorkflows.template.${normalizeI18nKey(categoryTitle)}.${normalizeI18nKey(template.name)}`
)
: template.name ?? `${sourceModule} Template`
})