mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 10:42:44 +00:00
Support i18n
This commit is contained in:
@@ -41,7 +41,9 @@ const mockCommands: ComfyCommandImpl[] = [
|
||||
icon: 'pi pi-test',
|
||||
tooltip: 'Test tooltip',
|
||||
menubarLabel: 'Other Command',
|
||||
keybinding: null
|
||||
keybinding: null,
|
||||
getTranslatedLabel: () => 'Other Command',
|
||||
getTranslatedMenubarLabel: () => 'Other Command'
|
||||
} as ComfyCommandImpl
|
||||
]
|
||||
|
||||
|
||||
@@ -32,7 +32,8 @@ describe('ShortcutsList', () => {
|
||||
combo: {
|
||||
getKeySequences: () => ['Control', 'n']
|
||||
}
|
||||
}
|
||||
},
|
||||
getTranslatedLabel: () => 'New Workflow'
|
||||
} as ComfyCommandImpl,
|
||||
{
|
||||
id: 'Node.Add',
|
||||
@@ -42,7 +43,8 @@ describe('ShortcutsList', () => {
|
||||
combo: {
|
||||
getKeySequences: () => ['Shift', 'a']
|
||||
}
|
||||
}
|
||||
},
|
||||
getTranslatedLabel: () => 'Add Node'
|
||||
} as ComfyCommandImpl,
|
||||
{
|
||||
id: 'Queue.Clear',
|
||||
@@ -52,7 +54,8 @@ describe('ShortcutsList', () => {
|
||||
combo: {
|
||||
getKeySequences: () => ['Control', 'Shift', 'c']
|
||||
}
|
||||
}
|
||||
},
|
||||
getTranslatedLabel: () => 'Clear Queue'
|
||||
} as ComfyCommandImpl
|
||||
]
|
||||
|
||||
@@ -104,7 +107,8 @@ describe('ShortcutsList', () => {
|
||||
id: 'No.Keybinding',
|
||||
label: 'No Keybinding',
|
||||
category: 'essentials',
|
||||
keybinding: null
|
||||
keybinding: null,
|
||||
getTranslatedLabel: () => 'No Keybinding'
|
||||
} as ComfyCommandImpl
|
||||
]
|
||||
|
||||
@@ -130,7 +134,8 @@ describe('ShortcutsList', () => {
|
||||
combo: {
|
||||
getKeySequences: () => ['Meta', 'ArrowUp', 'Enter', 'Escape', ' ']
|
||||
}
|
||||
}
|
||||
},
|
||||
getTranslatedLabel: () => 'Special Keys'
|
||||
} as ComfyCommandImpl
|
||||
|
||||
const wrapper = mount(ShortcutsList, {
|
||||
|
||||
Reference in New Issue
Block a user