Skip to content

Commit

Permalink
Use i18n keys for workflow tree type labels (#1839)
Browse files Browse the repository at this point in the history
* fix: use i18n keys for workflow tree type labels

* Inline translations

---------

Co-authored-by: huchenlei <huchenlei@proton.me>
  • Loading branch information
shinshin86 and huchenlei authored Dec 7, 2024
1 parent c17d446 commit 059dfcb
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 7 deletions.
18 changes: 15 additions & 3 deletions src/components/sidebar/tabs/WorkflowsSidebarTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@
class="comfyui-workflows-open"
v-if="workflowTabsPosition === 'Sidebar'"
>
<TextDivider text="Open" type="dashed" class="ml-2" />
<TextDivider
:text="t('sideToolbar.workflowTab.workflowTreeType.open')"
type="dashed"
class="ml-2"
/>
<TreeExplorer
:roots="
renderTreeNode(openWorkflowsTree, WorkflowTreeType.Open).children
Expand Down Expand Up @@ -74,7 +78,11 @@
class="comfyui-workflows-bookmarks"
v-show="workflowStore.bookmarkedWorkflows.length > 0"
>
<TextDivider text="Bookmarks" type="dashed" class="ml-2" />
<TextDivider
:text="t('sideToolbar.workflowTab.workflowTreeType.bookmarks')"
type="dashed"
class="ml-2"
/>
<TreeExplorer
:roots="
renderTreeNode(
Expand All @@ -89,7 +97,11 @@
</TreeExplorer>
</div>
<div class="comfyui-workflows-browse">
<TextDivider text="Browse" type="dashed" class="ml-2" />
<TextDivider
:text="t('sideToolbar.workflowTab.workflowTreeType.browse')"
type="dashed"
class="ml-2"
/>
<TreeExplorer
:roots="
renderTreeNode(workflowsTree, WorkflowTreeType.Browse).children
Expand Down
7 changes: 6 additions & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,12 @@
"dirtyCloseTitle": "Save Changes?",
"dirtyClose": "The files below have been changed. Would you like to save them before closing?",
"confirmOverwriteTitle": "Overwrite existing file?",
"confirmOverwrite": "The file below already exists. Would you like to overwrite it?"
"confirmOverwrite": "The file below already exists. Would you like to overwrite it?",
"workflowTreeType": {
"browse": "Browse",
"bookmarks": "Bookmarks",
"open": "Open"
}
}
},
"menu": {
Expand Down
7 changes: 6 additions & 1 deletion src/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -1518,7 +1518,12 @@
"deleteFailedTitle": "削除に失敗しました",
"deleted": "ワークフローが削除されました",
"dirtyClose": "以下のファイルが変更されました。閉じる前に保存しますか?",
"dirtyCloseTitle": "変更を保存しますか?"
"dirtyCloseTitle": "変更を保存しますか?",
"workflowTreeType": {
"bookmarks": "ブックマーク",
"browse": "ブラウズ",
"open": "開く"
}
},
"workflows": "ワークフロー"
},
Expand Down
7 changes: 6 additions & 1 deletion src/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -1518,7 +1518,12 @@
"deleteFailedTitle": "Не удалось удалить",
"deleted": "Рабочий процесс удален",
"dirtyClose": "Файлы ниже были изменены. Вы хотите сохранить их перед закрытием?",
"dirtyCloseTitle": "Сохранить изменения?"
"dirtyCloseTitle": "Сохранить изменения?",
"workflowTreeType": {
"bookmarks": "Закладки",
"browse": "Просмотреть",
"open": "Открыть"
}
},
"workflows": "Рабочие процессы"
},
Expand Down
7 changes: 6 additions & 1 deletion src/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -1518,7 +1518,12 @@
"deleteFailedTitle": "删除失败",
"deleted": "工作流已删除",
"dirtyClose": "以下文件已被更改。您想在关闭之前保存它们吗?",
"dirtyCloseTitle": "保存更改?"
"dirtyCloseTitle": "保存更改?",
"workflowTreeType": {
"bookmarks": "书签",
"browse": "浏览",
"open": "打开"
}
},
"workflows": "工作流"
},
Expand Down

0 comments on commit 059dfcb

Please sign in to comment.