Skip to content

Conversation

@christian-byrne
Copy link
Contributor

@christian-byrne christian-byrne commented Sep 25, 2025

Summary

Fixes #5697 by adding internationalization support for Vue node widget labels and output slot names with fallback to original names.

Changes

  • What: Added label field to widget data structures and localized_name support for output slots
  • Breaking: None - all changes maintain backward compatibility with fallback to original names

Review Focus

Translation key resolution for node definitions and proper fallback chain for widget labels and slot names.

Screenshots (if applicable)

Observe that there is parity between Litegraph and Vue nodes w.r.t. localization of labels/names.

Screenshot from 2025-09-25 13-19-54 Screenshot from 2025-09-25 13-19-38

┆Issue is synchronized with this Notion page by Unito

@christian-byrne christian-byrne added area:i18n Anything related to translation area:vue-migration labels Sep 25, 2025
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Sep 25, 2025
@github-actions
Copy link

github-actions bot commented Sep 25, 2025

🎭 Playwright Test Results

Some tests failed

⏰ Completed at: 09/26/2025, 01:50:19 AM UTC

📈 Summary

  • Total Tests: 462
  • Passed: 431 ✅
  • Failed: 2 ❌
  • Flaky: 0
  • Skipped: 29 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 424 / ❌ 2 / ⚠️ 0 / ⏭️ 29
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 4 / ❌ 0 / ⚠️ 0 / ⏭️ 0

🎉 Click on the links above to view detailed test results for each browser configuration.

@christian-byrne
Copy link
Contributor Author

christian-byrne commented Sep 25, 2025

Test failures are expected (the text next to the widgets changed from the name to the label which changed the apperance of some UI baseline images): https://531ead11.comfyui-playwright-chromium.pages.dev/#?q=s:failed

@christian-byrne christian-byrne added the New Browser Test Expectations New browser test screenshot should be set by github action label Sep 25, 2025
AustinMroz
AustinMroz previously approved these changes Sep 25, 2025
Copy link
Collaborator

@AustinMroz AustinMroz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: (Annoying, but out of scope) changing the language setting while in vue mode does not trigger update of labels. Either toggling vue mode or a reload is required.

DrJKL
DrJKL previously approved these changes Sep 25, 2025
Comment on lines 135 to 140
name: widget.name,
type: widget.type,
value: widget.value,
label: widget.label,
options: widget.options,
callback: widget.callback
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it could just use the spread operator.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it's extracting safe properties, otherwise private fields would be included.

@christian-byrne christian-byrne dismissed stale reviews from DrJKL and AustinMroz via e6300f8 September 26, 2025 00:38
@christian-byrne
Copy link
Contributor Author

nit: (Annoying, but out of scope) changing the language setting while in vue mode does not trigger update of labels. Either toggling vue mode or a reload is required.

True we have that tracked here:

I think we can handle it easily in the next milestone (it's also in notion).

@christian-byrne christian-byrne added New Browser Test Expectations New browser test screenshot should be set by github action and removed New Browser Test Expectations New browser test screenshot should be set by github action labels Sep 26, 2025
@christian-byrne christian-byrne merged commit a6600aa into main Sep 26, 2025
2 checks passed
@christian-byrne christian-byrne deleted the vue-nodes/translations branch September 26, 2025 02:47
christian-byrne added a commit that referenced this pull request Sep 27, 2025
…to names) (#5773)

## Summary

Fixes #5697 by
adding internationalization support for Vue node widget labels and
output slot names with fallback to original names.

## Changes

- **What**: Added `label` field to widget data structures and
`localized_name` support for output slots
- **Breaking**: None - all changes maintain backward compatibility with
fallback to original names

## Review Focus

Translation key resolution for node definitions and proper fallback
chain for widget labels and slot names.

## Screenshots (if applicable)

Observe that there is parity between Litegraph and Vue nodes w.r.t.
localization of labels/names.

<img width="3455" height="1417" alt="Screenshot from 2025-09-25
13-19-54"
src="https://github.com/user-attachments/assets/93ee8fae-3671-4175-a941-6462f942d0f1"
/>

<img width="3455" height="1417" alt="Screenshot from 2025-09-25
13-19-38"
src="https://github.com/user-attachments/assets/9573eb86-d74a-40ed-a0b5-e30afd3da6eb"
/>

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-5773-Use-localized-labels-for-Vue-node-slots-and-inputs-outputs-fallback-to-names-2796d73d365081e08fb7d38464f4aa90)
by [Unito](https://www.unito.io)

---------

Co-authored-by: github-actions <[email protected]>
Co-authored-by: Alexander Brown <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:i18n Anything related to translation area:vue-migration New Browser Test Expectations New browser test screenshot should be set by github action size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lots of widget translations are missing in the Vue nodes.

3 participants