mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-05 13:10:24 +00:00
[i18n] Translate setting options (#1858)
* Collect options * Translate setting options * Update locales [skip ci] * Normalize key * Revert change of logic --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
@@ -55,8 +55,11 @@ function getFormAttrs(item: FormItem) {
|
||||
case 'combo':
|
||||
attrs['options'] =
|
||||
typeof item.options === 'function'
|
||||
? item.options(formValue.value)
|
||||
? // @ts-expect-error: Audit and deprecate usage of legacy options type:
|
||||
// (value) => [string | {text: string, value: string}]
|
||||
item.options(formValue.value)
|
||||
: item.options
|
||||
|
||||
if (typeof item.options[0] !== 'string') {
|
||||
attrs['optionLabel'] = 'text'
|
||||
attrs['optionValue'] = 'value'
|
||||
|
||||
Reference in New Issue
Block a user