Skip to content

Commit

Permalink
Fix output label on untranslated output names (#1866)
Browse files Browse the repository at this point in the history
* Fix output label on untranslated output names

* nit

* Update test expectations [skip ci]

---------

Co-authored-by: github-actions <github-actions@github.com>
  • Loading branch information
huchenlei and github-actions authored Dec 11, 2024
1 parent d2bbf41 commit 20a3a95
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions src/scripts/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ import { type IBaseWidget } from '@comfyorg/litegraph/dist/types/widgets'
import { workflowService } from '@/services/workflowService'
import { useWidgetStore } from '@/stores/widgetStore'
import { deserialiseAndCreate } from '@/extensions/core/vintageClipboard'
import { st, t, te } from '@/i18n'
import { st } from '@/i18n'
import { normalizeI18nKey } from '@/utils/formatUtil'

export const ANIM_PREVIEW_WIDGET = '$$comfy_animation_preview'
Expand Down Expand Up @@ -1979,7 +1979,9 @@ export class ComfyApp {
const typeKey = `dataTypes.${normalizeI18nKey(output)}`
const outputOptions = {
...shapeOptions,
label: te(nameKey) ? t(nameKey) : st(typeKey, outputName)
label: nodeData['output_name'][o]
? st(nameKey, outputName)
: st(typeKey, outputName)
}
this.addOutput(outputName, output, outputOptions)
}
Expand Down

0 comments on commit 20a3a95

Please sign in to comment.