File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
src/components/bottomPanel/tabs/shortcuts
tests-ui/tests/components/bottomPanel Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 2020 >
2121 <div class =" shortcut-info flex-grow pr-4" >
2222 <div class =" shortcut-name text-sm font-medium" >
23- {{ command.label || command.id }}
23+ {{ t(`commands.${normalizeI18nKey( command.id)}.label`) }}
2424 </div >
2525 </div >
2626
@@ -50,6 +50,7 @@ import { computed } from 'vue'
5050import { useI18n } from ' vue-i18n'
5151
5252import type { ComfyCommandImpl } from ' @/stores/commandStore'
53+ import { normalizeI18nKey } from ' @/utils/formatUtil'
5354
5455const { t } = useI18n ()
5556
Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ const mockT = vi.fn((key: string) => {
1111 'shortcuts.subcategories.node' : 'Node' ,
1212 'shortcuts.subcategories.queue' : 'Queue' ,
1313 'shortcuts.subcategories.view' : 'View' ,
14- 'shortcuts.subcategories.panelControls' : 'Panel Controls'
14+ 'shortcuts.subcategories.panelControls' : 'Panel Controls' ,
15+ 'commands.Workflow_New.label' : 'New Blank Workflow'
1516 }
1617 return translations [ key ] || key
1718} )
@@ -76,9 +77,7 @@ describe('ShortcutsList', () => {
7677 expect ( wrapper . text ( ) ) . toContain ( 'Queue' )
7778
7879 // Check that commands are rendered
79- expect ( wrapper . text ( ) ) . toContain ( 'New Workflow' )
80- expect ( wrapper . text ( ) ) . toContain ( 'Add Node' )
81- expect ( wrapper . text ( ) ) . toContain ( 'Clear Queue' )
80+ expect ( wrapper . text ( ) ) . toContain ( 'New Blank Workflow' )
8281 } )
8382
8483 it ( 'should format keyboard shortcuts correctly' , ( ) => {
You can’t perform that action at this time.
0 commit comments