Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
>
<div class="shortcut-info flex-grow pr-4">
<div class="shortcut-name text-sm font-medium">
{{ command.label || command.id }}
{{ t(`commands.${normalizeI18nKey(command.id)}.label`) }}
</div>
</div>

Expand Down Expand Up @@ -50,6 +50,7 @@ import { computed } from 'vue'
import { useI18n } from 'vue-i18n'

import type { ComfyCommandImpl } from '@/stores/commandStore'
import { normalizeI18nKey } from '@/utils/formatUtil'

const { t } = useI18n()

Expand Down
7 changes: 3 additions & 4 deletions tests-ui/tests/components/bottomPanel/ShortcutsList.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const mockT = vi.fn((key: string) => {
'shortcuts.subcategories.node': 'Node',
'shortcuts.subcategories.queue': 'Queue',
'shortcuts.subcategories.view': 'View',
'shortcuts.subcategories.panelControls': 'Panel Controls'
'shortcuts.subcategories.panelControls': 'Panel Controls',
'commands.Workflow_New.label': 'New Blank Workflow'
}
return translations[key] || key
})
Expand Down Expand Up @@ -76,9 +77,7 @@ describe('ShortcutsList', () => {
expect(wrapper.text()).toContain('Queue')

// Check that commands are rendered
expect(wrapper.text()).toContain('New Workflow')
expect(wrapper.text()).toContain('Add Node')
expect(wrapper.text()).toContain('Clear Queue')
expect(wrapper.text()).toContain('New Blank Workflow')
})

it('should format keyboard shortcuts correctly', () => {
Expand Down