Skip to content

Commit

Permalink
[i18n] Translate save/export workflow dialog (#1906)
Browse files Browse the repository at this point in the history
* [i18n] Translate save/export workflow dialog

* Update locales [skip ci]

---------

Co-authored-by: github-actions <[email protected]>
  • Loading branch information
huchenlei and github-actions authored Dec 14, 2024
1 parent 98912ef commit 59b62ea
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 6 deletions.
5 changes: 5 additions & 0 deletions src/locales/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,11 @@
"saveAsTemplate": "Save as template",
"enterName": "Enter name"
},
"workflowService": {
"exportWorkflow": "Export Workflow",
"enterFilename": "Enter the filename",
"saveWorkflow": "Save workflow"
},
"electronFileDownload": {
"inProgress": "In Progress",
"pause": "Pause Download",
Expand Down
5 changes: 5 additions & 0 deletions src/locales/ja/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -949,5 +949,10 @@
"welcome": {
"getStarted": "はじめる",
"title": "ComfyUIへようこそ"
},
"workflowService": {
"enterFilename": "ファイル名を入力",
"exportWorkflow": "ワークフローをエクスポート",
"saveWorkflow": "ワークフローを保存"
}
}
5 changes: 5 additions & 0 deletions src/locales/ko/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -949,5 +949,10 @@
"welcome": {
"getStarted": "시작하기",
"title": "ComfyUI에 오신 것을 환영합니다"
},
"workflowService": {
"enterFilename": "파일 이름 입력",
"exportWorkflow": "워크플로우 내보내기",
"saveWorkflow": "워크플로우 저장"
}
}
5 changes: 5 additions & 0 deletions src/locales/ru/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -949,5 +949,10 @@
"welcome": {
"getStarted": "Начать",
"title": "Добро пожаловать в ComfyUI"
},
"workflowService": {
"enterFilename": "Введите имя файла",
"exportWorkflow": "Экспорт рабочего процесса",
"saveWorkflow": "Сохранить рабочий процесс"
}
}
5 changes: 5 additions & 0 deletions src/locales/zh/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -949,5 +949,10 @@
"welcome": {
"getStarted": "开始使用",
"title": "欢迎使用 ComfyUI"
},
"workflowService": {
"enterFilename": "输入文件名",
"exportWorkflow": "导出工作流",
"saveWorkflow": "保存工作流"
}
}
4 changes: 2 additions & 2 deletions src/services/dialogService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import ExecutionErrorDialogContent from '@/components/dialog/content/ExecutionEr
import TemplateWorkflowsContent from '@/components/templates/TemplateWorkflowsContent.vue'
import PromptDialogContent from '@/components/dialog/content/PromptDialogContent.vue'
import ConfirmationDialogContent from '@/components/dialog/content/ConfirmationDialogContent.vue'
import { i18n } from '@/i18n'
import { t } from '@/i18n'
import type { MissingNodeType } from '@/types/comfy'

export function showLoadWorkflowWarning(props: {
Expand Down Expand Up @@ -60,7 +60,7 @@ export function showExecutionErrorDialog(error: ExecutionErrorWsMessage) {
export function showTemplateWorkflowsDialog() {
useDialogStore().showDialog({
key: 'global-template-workflows',
title: i18n.global.t('templateWorkflows.title'),
title: t('templateWorkflows.title'),
component: TemplateWorkflowsContent
})
}
Expand Down
8 changes: 4 additions & 4 deletions src/services/workflowService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import { useToastStore } from '@/stores/toastStore'
async function getFilename(defaultName: string): Promise<string | null> {
if (useSettingStore().get('Comfy.PromptFilename')) {
let filename = await showPromptDialog({
title: 'Export Workflow',
message: 'Enter the filename:',
title: t('workflowService.exportWorkflow'),
message: t('workflowService.enterFilename') + ':',
defaultValue: defaultName
})
if (!filename) return null
Expand Down Expand Up @@ -56,8 +56,8 @@ export const workflowService = {
*/
async saveWorkflowAs(workflow: ComfyWorkflow) {
const newFilename = await showPromptDialog({
title: 'Save workflow',
message: 'Enter the filename:',
title: t('workflowService.saveWorkflow'),
message: t('workflowService.enterFilename') + ':',
defaultValue: workflow.filename
})
if (!newFilename) return
Expand Down

0 comments on commit 59b62ea

Please sign in to comment.