Skip to content

fix(i18n): honor type-named output slot labels - #15470

Open
yzxcj797 wants to merge 1 commit into
Comfy-Org:mainfrom
yzxcj797:fix/15347-type-named-output-slot-i18n
Open

yzxcj797 wants to merge 1 commit into
Comfy-Org:mainfrom
yzxcj797:fix/15347-type-named-output-slot-i18n

Conversation

@yzxcj797

Copy link
Copy Markdown

Summary

  • Type-named outputs now try the slot-specific resolver first (outputs.<index>.name) instead of always selecting the generic dataTypes.<TYPE> translation.
  • If no slot translation exists, they fall back to the data-type translation exactly as before.
  • Outputs whose name differs from their type retain the existing slot/backend behavior.
  • This keeps custom-node and backend-provided slot translations authoritative even when the source slot name equals its data type.

I also surveyed all bundled nodeDefs.json output entries against each locale's dataTypes table. The generated English bundle intentionally omits names for type-named outputs, so this change does not alter bundled English labels; it preserves the generic fallback while allowing slot-specific data supplied by custom nodes or the backend translation path.

Fixes #15347.

Tests

  • Added two regressions for a LATENT output named LATENT:
    • a slot-level translation wins over the canonical data-type translation;
    • the canonical data-type translation remains the fallback when no slot translation exists.

Validation:

  • pnpm exec vitest run src/services/litegraphService.test.ts — 8 passed
  • pnpm exec vue-tsc --noEmit — passed
  • Targeted ESLint — passed
  • Targeted type-aware Oxlint — passed
  • pnpm exec oxfmt --check src/services/litegraphService.ts src/services/litegraphService.test.ts — passed
  • git diff --check — passed

@yzxcj797
yzxcj797 requested a review from a team August 20, 2026 05:46
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Aug 20, 2026
@github-actions

github-actions Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook: ❌ Failed

Details

⏰ Completed at: 09/19/2026, 05:47:10 AM UTC

Links

🎭 Playwright: ⏳ Running...

📦 Bundle Size

⚠️ Size data collection failed. Check the CI workflow logs.

⚡ Performance

⚠️ Performance tests failed. Check the CI workflow logs.

🔬 E2E Coverage

⚠️ Coverage collection failed. Check the CI workflow logs.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f8653860-4cda-4497-ab4d-9920bc84b987

📥 Commits

Reviewing files that changed from the base of the PR and between ed091e4 and 7b61d81.

📒 Files selected for processing (2)
  • src/services/litegraphService.test.ts
  • src/services/litegraphService.ts

Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

The output localization logic now checks slot-specific translations for type-named outputs before using the localized data type. Tests cover slot translation precedence and data-type fallback.

Changes

Output localization

Layer / File(s) Summary
Slot translation precedence and validation
src/services/litegraphService.ts, src/services/litegraphService.test.ts
addOutputs checks slot-specific localization before data-type localization when output names match their types. Tests verify slot precedence and fallback behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 7b61d

This localized change adjusts output-label lookup with a preserved fallback and adds regression coverage; no actionable merge-blocking risk remains after normal checks and review.

Possibly related PRs

Suggested labels: risk:R2

Suggested reviewers: christian-byrne


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
End-To-End Regression Coverage For Fixes ❓ Inconclusive The changed files and description are available, but the PR title and commit subjects are not; the required bug-fix signal cannot be verified. Provide the PR title and commit subjects, then verify whether the description gives a concrete reason for not adding a browser_tests/ Playwright regression test.
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the localization fix for type-named output slot labels.
Description check ✅ Passed The description explains the behavior change, fallback rules, issue, tests, and validation, though it omits some template headings.
Linked Issues check ✅ Passed The implementation meets issue #15347 by prioritizing slot translations and falling back to data-type translations, with regression tests and a locale survey.
Out of Scope Changes check ✅ Passed The service change, regression tests, and documented validation are directly related to issue #15347 and introduce no unrelated code changes.
Website End-To-End Regression Coverage ✅ Passed The PR changes only src/services/litegraphService.ts and its test file. It changes no files under apps/website/src/ or apps/website/public/.
Adr Compliance For Entity/Litegraph Changes ✅ Passed The changed service and test concern output-slot localization only; metadata shows no entity mutation, god-object API, ECS component, or extension callback changes.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

i18n: type-named outputs skip slot-level translations in addOutputs

3 participants