Skip to content

chore(i18n): make GPU picker labels translatable - replaces hardcoded English (v0.8.36)#11982

Open
LifetimeVip wants to merge 3 commits intoComfy-Org:mainfrom
LifetimeVip:fix/install-hardcoded-strings
Open

chore(i18n): make GPU picker labels translatable - replaces hardcoded English (v0.8.36)#11982
LifetimeVip wants to merge 3 commits intoComfy-Org:mainfrom
LifetimeVip:fix/install-hardcoded-strings

Conversation

@LifetimeVip
Copy link
Copy Markdown
Contributor

@LifetimeVip LifetimeVip commented May 5, 2026

Summary

Makes the GPU picker option labels translatable by replacing hardcoded English strings with vue-i18n keys.

Changes

apps/desktop-ui/src/components/install/GpuPicker.vue:

  • Replaced hardcoded placeholder-text values ("Apple Metal", "NVIDIA", "AMD", "CPU", "Manual Install") with $t() bindings
  • The subtitle for Apple Metal was also hardcoded — now uses $t() as well

src/locales/en/main.json:

  • Added 5 new i18n keys under install.gpuPicker:
    • appleMetal: "Apple Metal"
    • nvidia: "NVIDIA"
    • amd: "AMD"
    • cpu: "CPU"
    • manualInstall: "Manual Install"

Other locale files will be auto-generated during the next release. These strings are used as image alt text and fallback labels in the GPU option cards during the installation wizard.

┆Issue is synchronized with this Notion page by Unito

@LifetimeVip LifetimeVip requested a review from a team May 5, 2026 20:33
@LifetimeVip LifetimeVip requested a review from benceruleanlu as a code owner May 5, 2026 20:33
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label May 5, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 5, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: dce05793-7cf7-41bb-99e9-778dc9c02792

📥 Commits

Reviewing files that changed from the base of the PR and between 4a745ec and 810da1e.

📒 Files selected for processing (1)
  • src/locales/en/main.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/locales/en/main.json

📝 Walkthrough

Walkthrough

The GPU picker component template now sources user-facing labels and the Apple Metal subtitle from i18n via $t(...) for Apple Metal, NVIDIA, AMD, CPU, and Manual Install; English locale keys were added. Component logic and rendering behavior remain unchanged.

Changes

GPU Picker Internationalization

Layer / File(s) Summary
Locale entries
src/locales/en/main.json
Added install.gpuPicker.{appleMetal,nvidia,amd,cpu,manualInstall}, kept manualDescription, and added nodeCategories.string.
Template Localization
apps/desktop-ui/src/components/install/GpuPicker.vue
Converted placeholder-text props and Apple Metal subtitle from hardcoded strings to $t(...) translation calls.
Recommended Badge
apps/desktop-ui/src/components/install/GpuPicker.vue
Badge rendering unchanged; continues to conditionally render and use $t(...) for the badge label.
Description Rendering
apps/desktop-ui/src/components/install/GpuPicker.vue
Description paragraph rendering unchanged.
Script Logic
apps/desktop-ui/src/components/install/GpuPicker.vue
recommendedDevices, showRecommendedBadge, descriptionText, and pickGpu remain unchanged.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Soft paws on keys, I hopped to play,
I swapped some strings so words can say,
Metal, NVIDIA, AMD and CPU,
Manual install sings a tune anew,
Local voices now will lead the way.


Caution

Pre-merge checks failed

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

  • Ignore (reviewers only)

❌ Failed checks (1 error)

Check name Status Explanation Resolution
End-To-End Regression Coverage For Fixes ❌ Error The source branch 'fix/install-hardcoded-strings' uses bug-fix language. No browser_tests/ files changed, and the PR description lacks a concrete explanation for why an E2E test was not added. Add a Playwright regression test under browser_tests/ for GPU picker labels, or explain in the PR description why an E2E regression test is impractical.
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: making GPU picker labels translatable by replacing hardcoded English strings with i18n keys.
Description check ✅ Passed The description covers the key changes with specific details about file modifications and i18n keys, though it lacks a dedicated 'Review Focus' section from the template.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Adr Compliance For Entity/Litegraph Changes ✅ Passed ADR compliance check does not apply—PR modifies only GpuPicker.vue and localization files, not litegraph, ECS, or graph entity paths.
✨ 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 and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

🎨 Storybook: loading Building...

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

🎭 Playwright: ⏳ Running...

@LifetimeVip LifetimeVip changed the title fix(i18n): make GPU picker labels translatable (replaces hardcoded English strings) fix(i18n): make GPU picker labels translatable - replaces hardcoded English (v0.8.36) May 5, 2026
@LifetimeVip LifetimeVip changed the title fix(i18n): make GPU picker labels translatable - replaces hardcoded English (v0.8.36) chore(i18n): make GPU picker labels translatable - replaces hardcoded English (v0.8.36) May 5, 2026
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels May 6, 2026
Resolved files:
- src/locales/en/main.json
- apps/desktop-ui/src/components/install/GpuPicker.vue
@LifetimeVip LifetimeVip force-pushed the fix/install-hardcoded-strings branch from 551c9b4 to 4a745ec Compare May 8, 2026 14:12
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant