mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
Translate template categories (#2937)
Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
@@ -10,7 +10,7 @@ module.exports = defineConfig({
|
||||
entryLocale: 'en',
|
||||
output: 'src/locales',
|
||||
outputLocales: ['zh', 'ru', 'ja', 'ko', 'fr'],
|
||||
reference: `Special names to keep untranslated: flux, photomaker, clip, vae, cfg, stable audio, stable cascade.
|
||||
reference: `Special names to keep untranslated: flux, photomaker, clip, vae, cfg, stable audio, stable cascade, controlnet, lora.
|
||||
'latent' is the short form of 'latent space'.
|
||||
'mask' is in the context of image processing.
|
||||
`
|
||||
|
||||
@@ -417,6 +417,20 @@
|
||||
},
|
||||
"templateWorkflows": {
|
||||
"title": "Get Started with a Template",
|
||||
"category": {
|
||||
"ComfyUI Examples": "ComfyUI Examples",
|
||||
"Custom Nodes": "Custom Nodes",
|
||||
"Basics": "Basics",
|
||||
"Flux": "Flux",
|
||||
"ControlNet": "ControlNet",
|
||||
"Upscaling": "Upscaling",
|
||||
"Video": "Video",
|
||||
"SD3_5": "SD3.5",
|
||||
"SDXL": "SDXL",
|
||||
"Area Composition": "Area Composition",
|
||||
"3D": "3D",
|
||||
"Audio": "Audio"
|
||||
},
|
||||
"template": {
|
||||
"Flux": {
|
||||
"flux_dev_checkpoint_example": "Flux Dev",
|
||||
|
||||
@@ -826,6 +826,20 @@
|
||||
"removeFromBookmarks": "Retirer des Favoris"
|
||||
},
|
||||
"templateWorkflows": {
|
||||
"category": {
|
||||
"3D": "3D",
|
||||
"Area Composition": "Composition de zone",
|
||||
"Audio": "Audio",
|
||||
"Basics": "Basiques",
|
||||
"ComfyUI Examples": "Exemples ComfyUI",
|
||||
"ControlNet": "ControlNet",
|
||||
"Custom Nodes": "Nœuds personnalisés",
|
||||
"Flux": "Flux",
|
||||
"SD3_5": "SD3.5",
|
||||
"SDXL": "SDXL",
|
||||
"Upscaling": "Mise à l'échelle",
|
||||
"Video": "Vidéo"
|
||||
},
|
||||
"template": {
|
||||
"3D": {
|
||||
"stable_zero123_example": "Stable Zero123"
|
||||
|
||||
@@ -826,6 +826,20 @@
|
||||
"removeFromBookmarks": "ブックマークから削除"
|
||||
},
|
||||
"templateWorkflows": {
|
||||
"category": {
|
||||
"3D": "3D",
|
||||
"Area Composition": "エリア構成",
|
||||
"Audio": "オーディオ",
|
||||
"Basics": "基本",
|
||||
"ComfyUI Examples": "ComfyUIの例",
|
||||
"ControlNet": "ControlNet",
|
||||
"Custom Nodes": "カスタムノード",
|
||||
"Flux": "Flux",
|
||||
"SD3_5": "SD3.5",
|
||||
"SDXL": "SDXL",
|
||||
"Upscaling": "アップスケーリング",
|
||||
"Video": "ビデオ"
|
||||
},
|
||||
"template": {
|
||||
"3D": {
|
||||
"stable_zero123_example": "Stable Zero123"
|
||||
|
||||
@@ -826,6 +826,20 @@
|
||||
"removeFromBookmarks": "북마크에서 제거"
|
||||
},
|
||||
"templateWorkflows": {
|
||||
"category": {
|
||||
"3D": "3D",
|
||||
"Area Composition": "영역 구성",
|
||||
"Audio": "오디오",
|
||||
"Basics": "기본",
|
||||
"ComfyUI Examples": "ComfyUI 예시",
|
||||
"ControlNet": "ControlNet",
|
||||
"Custom Nodes": "사용자 정의 노드",
|
||||
"Flux": "Flux",
|
||||
"SD3_5": "SD3.5",
|
||||
"SDXL": "SDXL",
|
||||
"Upscaling": "업스케일링",
|
||||
"Video": "비디오"
|
||||
},
|
||||
"template": {
|
||||
"3D": {
|
||||
"stable_zero123_example": "스테이블 제로123"
|
||||
|
||||
@@ -826,6 +826,20 @@
|
||||
"removeFromBookmarks": "Удалить из закладок"
|
||||
},
|
||||
"templateWorkflows": {
|
||||
"category": {
|
||||
"3D": "3D",
|
||||
"Area Composition": "Композиция области",
|
||||
"Audio": "Аудио",
|
||||
"Basics": "Основы",
|
||||
"ComfyUI Examples": "Примеры ComfyUI",
|
||||
"ControlNet": "ControlNet",
|
||||
"Custom Nodes": "Пользовательские узлы",
|
||||
"Flux": "Flux",
|
||||
"SD3_5": "SD3.5",
|
||||
"SDXL": "SDXL",
|
||||
"Upscaling": "Увеличение разрешения",
|
||||
"Video": "Видео"
|
||||
},
|
||||
"template": {
|
||||
"3D": {
|
||||
"stable_zero123_example": "Stable Zero123"
|
||||
|
||||
@@ -826,6 +826,20 @@
|
||||
"removeFromBookmarks": "从书签中移除"
|
||||
},
|
||||
"templateWorkflows": {
|
||||
"category": {
|
||||
"3D": "3D",
|
||||
"Area Composition": "区域组成",
|
||||
"Audio": "音频",
|
||||
"Basics": "基础",
|
||||
"ComfyUI Examples": "ComfyUI示例",
|
||||
"ControlNet": "ControlNet",
|
||||
"Custom Nodes": "自定义节点",
|
||||
"Flux": "Flux",
|
||||
"SD3_5": "SD3.5",
|
||||
"SDXL": "SDXL",
|
||||
"Upscaling": "放大",
|
||||
"Video": "视频"
|
||||
},
|
||||
"template": {
|
||||
"3D": {
|
||||
"stable_zero123_example": "稳定Zero123"
|
||||
|
||||
@@ -1,23 +1,34 @@
|
||||
import { groupBy } from 'lodash'
|
||||
import { defineStore } from 'pinia'
|
||||
import { computed, ref, shallowRef } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
import { api } from '@/scripts/api'
|
||||
import type {
|
||||
TemplateGroup,
|
||||
WorkflowTemplates
|
||||
} from '@/types/workflowTemplateTypes'
|
||||
import { normalizeI18nKey } from '@/utils/formatUtil'
|
||||
|
||||
export const useWorkflowTemplatesStore = defineStore(
|
||||
'workflowTemplates',
|
||||
() => {
|
||||
const { t } = useI18n()
|
||||
const customTemplates = shallowRef<{ [moduleName: string]: string[] }>({})
|
||||
const coreTemplates = shallowRef<WorkflowTemplates[]>([])
|
||||
const isLoaded = ref(false)
|
||||
|
||||
const groupedTemplates = computed<TemplateGroup[]>(() => {
|
||||
const allTemplates = [
|
||||
...coreTemplates.value,
|
||||
...coreTemplates.value.map((template) => ({
|
||||
...template,
|
||||
title: t(
|
||||
`templateWorkflows.category.${normalizeI18nKey(template.title)}`,
|
||||
{
|
||||
defaultValue: template.title
|
||||
}
|
||||
)
|
||||
})),
|
||||
...Object.entries(customTemplates.value).map(
|
||||
([moduleName, templates]) => ({
|
||||
moduleName,
|
||||
@@ -33,8 +44,14 @@ export const useWorkflowTemplatesStore = defineStore(
|
||||
]
|
||||
|
||||
return Object.entries(
|
||||
groupBy(allTemplates, (t) =>
|
||||
t.moduleName === 'default' ? 'ComfyUI Examples' : 'Custom Nodes'
|
||||
groupBy(allTemplates, (template) =>
|
||||
template.moduleName === 'default'
|
||||
? t('templateWorkflows.category.ComfyUI Examples', {
|
||||
defaultValue: 'ComfyUI Examples'
|
||||
})
|
||||
: t('templateWorkflows.category.Custom Nodes', {
|
||||
defaultValue: 'Custom Nodes'
|
||||
})
|
||||
)
|
||||
).map(([label, modules]) => ({ label, modules }))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user