Skip to content

Conversation

@snomiao
Copy link
Member

@snomiao snomiao commented Dec 29, 2025

Summary

Fixes the pt-BR locale generation issue by enabling immediate file persistence in the lobe-i18n configuration.

Problem

The pt-BR locale was added in PR #6943 with proper infrastructure, but translation files have remained empty ({}) despite the i18n workflow running successfully on version-bump PRs.

Root Cause

The lobe-i18n tool has a saveImmediately configuration option (defaults to false) that controls whether translations are persisted to disk immediately during generation. When bootstrapping from completely empty {} JSON files, without saveImmediately: true, the tool generates translations in memory but doesn't write them to disk, resulting in empty files.

Evidence:

  • All other locales: ~1,931 lines each (previously bootstrapped)
  • pt-BR before fix: 1 line ({} in all 4 files)
  • CI workflow runs successfully but pt-BR files remain empty
  • After adding saveImmediately: true: 18,787 lines generated across all 4 pt-BR files

Solution

Add saveImmediately: true to .i18nrc.cjs configuration:

module.exports = defineConfig({
  modelName: 'gpt-4.1',
  splitToken: 1024,
  saveImmediately: true,  // ← Enables immediate file persistence
  entry: 'src/locales/en',
  entryLocale: 'en',
  output: 'src/locales',
  outputLocales: ['zh', 'zh-TW', 'ru', 'ja', 'ko', 'fr', 'es', 'ar', 'tr', 'pt-BR'],
  // ...
});

This ensures that when lobe-i18n generates translations from empty files, they are immediately written to disk rather than kept only in memory.

Validation

This PR's commit history demonstrates the fix works:

  1. Commit 22e6e28f5: Applied the saveImmediately: true fix
  2. Commit cd7e93786: Temporarily enabled i18n workflow for this branch (for testing)
  3. Commit 84545c218: CI successfully generated complete pt-BR translations:
    • commands.json: 327 lines
    • main.json: 2,458 lines
    • nodeDefs.json: 15,539 lines
    • settings.json: 463 lines
    • Total: 18,787 lines of Portuguese translations
  4. Commits 85f282f98 & 05d097f7b: Reverted test commits to keep PR minimal

Changes

  • .i18nrc.cjs: Added saveImmediately: true configuration option (+1 line)

Impact

After this fix is merged, future version-bump-* PRs will automatically generate and persist pt-BR translations alongside all other locales, keeping Portuguese (Brazil) translations up-to-date with the codebase.

References

Fixes #6943 (comment)

Copilot AI review requested due to automatic review settings December 29, 2025 03:28
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Dec 29, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 29, 2025

📝 Walkthrough

Walkthrough

A configuration property saveImmediately: true was added to the i18n configuration object in .i18nrc.cjs. This is a configuration-only change with no modifications to logic or control flow.

Changes

Cohort / File(s) Summary
i18n Configuration
\.i18nrc\.cjs
Added saveImmediately: true property to the defineConfig call

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR partially addresses linked issue #6943 by bootstrapping pt-BR locale files with minimal structure to enable CI translation detection, but omits code changes to .i18nrc.cjs configuration, i18n loaders, and language selector integration. Complete the implementation by adding pt-BR to .i18nrc.cjs configuration, including loaders in src/i18n.ts and apps/desktop-ui/src/i18n.ts, and integrating Portuguese (Brazil) into the language selector.
Out of Scope Changes check ⚠️ Warning The PR includes a temporary workflow file modification (.github/workflows/i18n-update-core.yaml) marked for removal before merge, which is out of scope for the main objective of enabling pt-BR locale. Remove the temporary workflow modification (.github/workflows/i18n-update-core.yaml) before merging and only commit the permanent locale file changes.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d8af87f and 05d097f.

📒 Files selected for processing (1)
  • .i18nrc.cjs
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 6300
File: src/locales/en/main.json:774-780
Timestamp: 2025-12-09T04:35:43.971Z
Learning: In the Comfy-Org/ComfyUI_frontend repository, locale files other than `src/locales/en/main.json` are generated automatically on every release. Developers only need to add English (en) key/values in `src/locales/en/main.json` when making PRs; manual updates to other locale files (fr, ja, ko, ru, zh, zh-TW, es, ar, tr, etc.) are not required and should not be suggested in reviews.
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/{components,composables}/**/*.{ts,tsx,vue} : Use vue-i18n for ALL user-facing strings by adding them to `src/locales/en/main.json`
🔇 Additional comments (1)
.i18nrc.cjs (1)

9-9: Clarify how saveImmediately addresses the root cause and whether locale file changes are part of this PR.

saveImmediately is a valid, documented configuration option for @lobehub/i18n-cli that writes translation results to output files as each chunk finishes. However, the PR objectives describe the root cause as lobe-i18n treating empty {} JSON objects as equal, preventing detection of pt-BR files needing translation. It's unclear how this write-timing option solves that detection problem. Please clarify:

  1. How does enabling saveImmediately address the empty {} object equality issue?
  2. Are the pt-BR locale file changes mentioned in the PR objectives (main.json, commands.json, settings.json, nodeDefs.json with minimal structure bootstrapping) part of this PR but omitted from review, or are they unnecessary with this config change?

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

github-actions bot commented Dec 29, 2025

🎭 Playwright Test Results

Some tests failed

⏰ Completed at: 01/03/2026, 03:09:14 AM UTC

📈 Summary

  • Total Tests: 511
  • Passed: 500 ✅
  • Failed: 1 ❌
  • Flaky: 2 ⚠️
  • Skipped: 8 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 490 / ❌ 1 / ⚠️ 1 / ⏭️ 8
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 7 / ❌ 0 / ⚠️ 1 / ⏭️ 0

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

@github-actions
Copy link

github-actions bot commented Dec 29, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 01/03/2026, 02:30:04 AM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@socket-security
Copy link

socket-security bot commented Dec 29, 2025

No dependency changes detected. Learn more about Socket for GitHub.

👍 No dependency changes detected in pull request

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the pt-BR locale generation issue by bootstrapping previously empty translation files with minimal valid JSON structure. The pt-BR locale was added over a month ago but remained empty because the lobe-i18n tool skips completely empty {} objects during its diff comparison. By adding a single top-level key to each of the four locale files, the tool will now properly detect missing translations and queue pt-BR for automatic translation generation.

Key Changes:

  • Bootstrapped all four pt-BR locale files with minimal top-level structure to trigger the i18n workflow
  • Added temporary workflow modification to enable testing on the PR branch (must be removed before merge)

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/locales/pt-BR/main.json Added "g": {} key to bootstrap the main translation file
src/locales/pt-BR/commands.json Added "Comfy_Canvas_FitView": {} key to bootstrap the commands translation file
src/locales/pt-BR/settings.json Added "Comfy_DevMode": {} key to bootstrap the settings translation file
src/locales/pt-BR/nodeDefs.json Added "AddNoise": {} key to bootstrap the node definitions translation file
.github/workflows/i18n-update-core.yaml Temporary modification to enable i18n workflow on this branch for testing - must be reverted before merge

@github-actions
Copy link

github-actions bot commented Dec 29, 2025

Bundle Size Report

Summary

  • Raw size: 17.3 MB baseline 17.3 MB — ⚪ 0 B
  • Gzip: 3.54 MB baseline 3.54 MB — ⚪ 0 B
  • Brotli: 2.7 MB baseline 2.7 MB — ⚪ 0 B
  • Bundles: 98 current • 98 baseline

Category Glance
Vendor & Third-Party ⚪ 0 B (9.12 MB) · Other ⚪ 0 B (3.47 MB) · App Entry Points ⚪ 0 B (3.21 MB) · Graph Workspace ⚪ 0 B (1000 kB) · Panels & Settings ⚪ 0 B (300 kB) · UI Components ⚪ 0 B (199 kB) · + 3 more

Per-category breakdown
App Entry Points — 3.21 MB (baseline 3.21 MB) • ⚪ 0 B

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-BgqM746D.js 345 B 345 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/index-D0dWKsno.js 193 kB 193 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/index-DEccpsBd.js 3.01 MB 3.01 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Graph Workspace — 1000 kB (baseline 1000 kB) • ⚪ 0 B

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-B_0BfZnj.js 1000 kB 1000 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Views & Navigation — 6.63 kB (baseline 6.63 kB) • ⚪ 0 B

Top-level views, pages, and routed surfaces

File Before After Δ Raw Δ Gzip Δ Brotli
assets/UserSelectView-DplY8c-U.js 6.63 kB 6.63 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Panels & Settings — 300 kB (baseline 300 kB) • ⚪ 0 B

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/AboutPanel-C5Rybyfe.js 9.16 kB 9.16 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/ExtensionPanel-0TOxgNAb.js 11.1 kB 11.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/KeybindingPanel-Bvh9SZrw.js 14.8 kB 14.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/LegacyCreditsPanel-QFuCwXiv.js 22.7 kB 22.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/ServerConfigPanel-CwTECYgi.js 7.51 kB 7.51 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-AN2JfZVQ.js 21.7 kB 21.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BhbWhsRg.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BIdKi-OT.js 26.2 kB 26.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Bu3OR-lX.js 24.6 kB 24.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-ByL6gy5c.js 25.4 kB 25.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CjlRFMdL.js 32.8 kB 32.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DkGwvylK.js 26.9 kB 26.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Dyd027Dx.js 24.7 kB 24.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-wwBxqLH5.js 21.3 kB 21.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-xx2Yb6R2.js 23.8 kB 23.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/UserPanel-Cg2UHFdE.js 6.88 kB 6.88 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
UI Components — 199 kB (baseline 199 kB) • ⚪ 0 B

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/ComfyQueueButton-E5eb7NCj.js 8.83 kB 8.83 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/LazyImage.vue_vue_type_script_setup_true_lang-CpfgkK16.js 60.1 kB 60.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/Load3D.vue_vue_type_script_setup_true_lang-H8Y9PIGm.js 56.4 kB 56.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-DYRhqHzf.js 897 B 897 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-DV-9JnFV.js 1.34 kB 1.34 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetButton-BmXOc3GF.js 2.21 kB 2.21 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-B0erLVFz.js 14.6 kB 14.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-CTOuEFex.js 2.14 kB 2.14 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-8Qr103P_.js 49 kB 49 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-gnx1im1r.js 3.72 kB 3.72 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Data & Services — 12.5 kB (baseline 12.5 kB) • ⚪ 0 B

Stores, services, APIs, and repositories

File Before After Δ Raw Δ Gzip Δ Brotli
assets/audioService-CVPWUfXY.js 2.2 kB 2.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/keybindingService-yZK79dWT.js 7.51 kB 7.51 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/serverConfigStore-CulKZi3K.js 2.83 kB 2.83 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Utilities & Hooks — 1.41 kB (baseline 1.41 kB) • ⚪ 0 B

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/audioUtils-BuANbOI1.js 1.41 kB 1.41 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Vendor & Third-Party — 9.12 MB (baseline 9.12 MB) • ⚪ 0 B

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-chart-KBsqeQPQ.js 452 kB 452 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-other-CzYzbUcM.js 3.89 MB 3.89 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-primevue-Ch6rhmJJ.js 1.95 MB 1.95 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-three-DYL0ZbEr.js 2.02 MB 2.02 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-tiptap-XfQ74oRB.js 232 kB 232 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-vue-DLbRHZS7.js 160 kB 160 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-BF8peZ5_.js 420 kB 420 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Other — 3.47 MB (baseline 3.47 MB) • ⚪ 0 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/AudioPreviewPlayer-DO2KijoE.js 13.3 kB 13.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-bTEY9Mp6.js 13.8 kB 13.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BWp4HdfU.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CcfGaui5.js 14.4 kB 14.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CisfgZf5.js 13.7 kB 13.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CkU12Foh.js 13 kB 13 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CoH2DJa6.js 14.2 kB 14.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-COSt-Bjx.js 14.9 kB 14.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DalfIW5f.js 15.9 kB 15.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DfTl0eCm.js 13.5 kB 13.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DwSJL865.js 13.7 kB 13.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/Load3D-C5M5I8-5.js 424 B 424 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Bdc58rJq.js 97.1 kB 97.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BRKE6VDs.js 91 kB 91 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-C9ZJBRdI.js 81.5 kB 81.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CAL83XT3.js 84.6 kB 84.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CHLLfvpG.js 82.4 kB 82.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cw9RZWRY.js 89 B 89 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DDqR5EuX.js 71.3 kB 71.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DLHyaEcz.js 92.1 kB 92.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-O7KfJeMO.js 79.9 kB 79.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-OzGsrlqJ.js 112 kB 112 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/Media3DBottom-GT2xJsEf.js 1.5 kB 1.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/Media3DTop-ChXAHSje.js 1.49 kB 1.49 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaAudioBottom-BSPPXq-I.js 1.51 kB 1.51 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaAudioTop-DnMHwvAw.js 1.46 kB 1.46 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageBottom-C5IoI1Tm.js 1.55 kB 1.55 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageTop-BenufCTB.js 1.75 kB 1.75 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoBottom-CPJVULXo.js 1.5 kB 1.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoTop-uhl1tYxE.js 2.65 kB 2.65 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-aW9En70v.js 260 kB 260 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BIckSVgU.js 273 kB 273 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BiYpVi7D.js 263 kB 263 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bw_Jitw_.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CCEXtYfM.js 243 kB 243 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CvmVDWYd.js 323 kB 323 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-D_wreoPJ.js 267 kB 267 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DIAYlJwM.js 246 kB 246 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Dz-0ZIBN.js 297 kB 297 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-VZsNmhG7.js 264 kB 264 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/SubscriptionRequiredDialogContent-CX-2X1i3.js 29 kB 29 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/ValueControlPopover-DA_35ffW.js 5.49 kB 5.49 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetAudioUI-DUzQXYJG.js 2.89 kB 2.89 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetChart-CXIOBBuD.js 2.48 kB 2.48 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetColorPicker-CbG4Nphe.js 3.41 kB 3.41 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetGalleria-I7wX3-yI.js 4.1 kB 4.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetImageCompare-DOO74J4Y.js 3.18 kB 3.18 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetInputNumber-C_l7d3n7.js 673 B 673 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetInputText-DYKSMSnq.js 1.99 kB 1.99 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetLegacy-BCCm7TeF.js 364 B 364 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetMarkdown-BiXhptCv.js 3.08 kB 3.08 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widgetPropFilter-BIbGSUAt.js 1.28 kB 1.28 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetRecordAudio-hk_zdAVJ.js 20.4 kB 20.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetSelect-BO9OR52l.js 733 B 733 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetTextarea-DY887QmG.js 3.08 kB 3.08 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetToggleSwitch-BCpq1Nu8.js 1.76 kB 1.76 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 33d8cb7 and d08c503.

📒 Files selected for processing (5)
  • .github/workflows/i18n-update-core.yaml
  • src/locales/pt-BR/commands.json
  • src/locales/pt-BR/main.json
  • src/locales/pt-BR/nodeDefs.json
  • src/locales/pt-BR/settings.json
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,vue,js,jsx,json,css}

📄 CodeRabbit inference engine (AGENTS.md)

Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, and 80-character line width

Files:

  • src/locales/pt-BR/commands.json
  • src/locales/pt-BR/nodeDefs.json
  • src/locales/pt-BR/settings.json
  • src/locales/pt-BR/main.json
🧠 Learnings (3)
📓 Common learnings
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 6300
File: src/locales/en/main.json:774-780
Timestamp: 2025-12-09T04:35:43.971Z
Learning: In the Comfy-Org/ComfyUI_frontend repository, locale files other than `src/locales/en/main.json` are generated automatically on every release. Developers only need to add English (en) key/values in `src/locales/en/main.json` when making PRs; manual updates to other locale files (fr, ja, ko, ru, zh, zh-TW, es, ar, tr, etc.) are not required and should not be suggested in reviews.
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/{components,composables}/**/*.{ts,tsx,vue} : Use vue-i18n for ALL user-facing strings by adding them to `src/locales/en/main.json`
📚 Learning: 2025-12-09T04:35:43.971Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 6300
File: src/locales/en/main.json:774-780
Timestamp: 2025-12-09T04:35:43.971Z
Learning: In the Comfy-Org/ComfyUI_frontend repository, locale files other than `src/locales/en/main.json` are generated automatically on every release. Developers only need to add English (en) key/values in `src/locales/en/main.json` when making PRs; manual updates to other locale files (fr, ja, ko, ru, zh, zh-TW, es, ar, tr, etc.) are not required and should not be suggested in reviews.

Applied to files:

  • src/locales/pt-BR/commands.json
  • src/locales/pt-BR/settings.json
  • src/locales/pt-BR/main.json
📚 Learning: 2025-12-12T23:02:37.473Z
Learnt from: Myestery
Repo: Comfy-Org/ComfyUI_frontend PR: 7422
File: .github/workflows/pr-update-playwright-expectations.yaml:131-135
Timestamp: 2025-12-12T23:02:37.473Z
Learning: In the `.github/workflows/pr-update-playwright-expectations.yaml` workflow in the Comfy-Org/ComfyUI_frontend repository, the snapshot update process is intentionally scoped to only add and update snapshot images. Deletions of snapshot files are handled explicitly outside this workflow and should not be suggested as part of this automation.

Applied to files:

  • .github/workflows/i18n-update-core.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Cleanup artifacts
  • GitHub Check: lint-and-format
  • GitHub Check: setup
  • GitHub Check: test
  • GitHub Check: collect
  • GitHub Check: update-locales
🔇 Additional comments (2)
src/locales/pt-BR/main.json (1)

1-3: The "g" key is present in the English source with appropriate translation entries. The bootstrap structure is correct for the auto-generated locale file pattern.

src/locales/pt-BR/settings.json (1)

1-3: Bootstrapping implementation is correct.

The Comfy_DevMode key addition follows the correct pattern and the key exists in src/locales/en/settings.json. Per the locale automation, pt-BR files are generated on each release, making this a valid bootstrapping case for enabling that automation.

Comment on lines 15 to 16
# [TEST ONLY - REMOVE BEFORE MERGE] Added sno-fix-pt-br for testing pt-BR locale generation fix
if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.head.repo.full_name == github.repository && (startsWith(github.head_ref, 'version-bump-') || github.head_ref == 'sno-fix-pt-br'))
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Remove test-only workflow modification before merge.

The code explicitly states "[TEST ONLY - REMOVE BEFORE MERGE]". This temporary modification enables CI testing on the sno-fix-pt-br branch but must not be merged to main.

🔎 Revert to original condition before merge
-    # [TEST ONLY - REMOVE BEFORE MERGE] Added sno-fix-pt-br for testing pt-BR locale generation fix
-    if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.head.repo.full_name == github.repository && (startsWith(github.head_ref, 'version-bump-') || github.head_ref == 'sno-fix-pt-br'))
+    if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.head.repo.full_name == github.repository && startsWith(github.head_ref, 'version-bump-'))
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# [TEST ONLY - REMOVE BEFORE MERGE] Added sno-fix-pt-br for testing pt-BR locale generation fix
if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.head.repo.full_name == github.repository && (startsWith(github.head_ref, 'version-bump-') || github.head_ref == 'sno-fix-pt-br'))
if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.head.repo.full_name == github.repository && startsWith(github.head_ref, 'version-bump-'))
🤖 Prompt for AI Agents
.github/workflows/i18n-update-core.yaml around lines 15 to 16: the workflow
contains a test-only condition that allows runs for branch 'sno-fix-pt-br' and
is marked "[TEST ONLY - REMOVE BEFORE MERGE]"; remove the temporary
branch-specific exception so the if condition reverts to its intended production
logic (only workflow_dispatch or repository pushes/PRs for version-bump
branches) — delete the "|| github.head_ref == 'sno-fix-pt-br'" clause (and any
test comment) so the workflow no longer triggers for the test branch.

Comment on lines 1 to 3
{
"AddNoise": {}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash

# 1. Check if AddNoise exists in English nodeDefs
echo "=== Checking for AddNoise in en/nodeDefs.json ==="
if [ -f "src/locales/en/nodeDefs.json" ]; then
  cat src/locales/en/nodeDefs.json | head -50
  echo ""
  echo "=== Searching for AddNoise key ==="
  grep -o "AddNoise" src/locales/en/nodeDefs.json || echo "AddNoise NOT found"
else
  echo "File src/locales/en/nodeDefs.json not found"
fi

echo ""
echo "=== Checking pt-BR/nodeDefs.json current state ==="
if [ -f "src/locales/pt-BR/nodeDefs.json" ]; then
  wc -l src/locales/pt-BR/nodeDefs.json
  cat src/locales/pt-BR/nodeDefs.json
else
  echo "File src/locales/pt-BR/nodeDefs.json not found"
fi

echo ""
echo "=== Checking for git info on pt-BR/nodeDefs.json ==="
git log --oneline src/locales/pt-BR/nodeDefs.json 2>/dev/null | head -5 || echo "No git history available"

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 1356


This file should not be committed to the main branch.

The git history shows this commit is marked [TEST ONLY - REMOVE BEFORE MERGE]. Additionally, per project standards, locale files for non-English languages are auto-generated on release and should not be manually edited. The empty AddNoise object will be overwritten or regenerated by the automation workflow.

Remove this file from the PR and rely on the automated i18n generation to create the pt-BR translations.

🤖 Prompt for AI Agents
In src/locales/pt-BR/nodeDefs.json (lines 1-3) remove this file from the PR by
deleting it from the branch and committing that deletion (e.g., git rm
src/locales/pt-BR/nodeDefs.json && git commit -m "Remove autogenerated pt-BR
locale file - do not commit manually" && git push), or if you prefer to keep
commits tidy, remove it and amend/rebase to drop the test-only commit; do not
add manual edits to non-English locale files — rely on the automated i18n
generation for pt-BR.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bdc3986 and d8af87f.

📒 Files selected for processing (4)
  • src/locales/pt-BR/commands.json
  • src/locales/pt-BR/main.json
  • src/locales/pt-BR/nodeDefs.json
  • src/locales/pt-BR/settings.json
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,vue,js,jsx,json,css}

📄 CodeRabbit inference engine (AGENTS.md)

Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, and 80-character line width

Files:

  • src/locales/pt-BR/main.json
  • src/locales/pt-BR/nodeDefs.json
  • src/locales/pt-BR/commands.json
  • src/locales/pt-BR/settings.json
🧠 Learnings (3)
📓 Common learnings
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 6300
File: src/locales/en/main.json:774-780
Timestamp: 2025-12-09T04:35:43.971Z
Learning: In the Comfy-Org/ComfyUI_frontend repository, locale files other than `src/locales/en/main.json` are generated automatically on every release. Developers only need to add English (en) key/values in `src/locales/en/main.json` when making PRs; manual updates to other locale files (fr, ja, ko, ru, zh, zh-TW, es, ar, tr, etc.) are not required and should not be suggested in reviews.
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/{components,composables}/**/*.{ts,tsx,vue} : Use vue-i18n for ALL user-facing strings by adding them to `src/locales/en/main.json`
📚 Learning: 2025-12-09T04:35:43.971Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 6300
File: src/locales/en/main.json:774-780
Timestamp: 2025-12-09T04:35:43.971Z
Learning: In the Comfy-Org/ComfyUI_frontend repository, locale files other than `src/locales/en/main.json` are generated automatically on every release. Developers only need to add English (en) key/values in `src/locales/en/main.json` when making PRs; manual updates to other locale files (fr, ja, ko, ru, zh, zh-TW, es, ar, tr, etc.) are not required and should not be suggested in reviews.

Applied to files:

  • src/locales/pt-BR/main.json
  • src/locales/pt-BR/nodeDefs.json
  • src/locales/pt-BR/commands.json
  • src/locales/pt-BR/settings.json
📚 Learning: 2025-12-12T23:02:37.473Z
Learnt from: Myestery
Repo: Comfy-Org/ComfyUI_frontend PR: 7422
File: .github/workflows/pr-update-playwright-expectations.yaml:131-135
Timestamp: 2025-12-12T23:02:37.473Z
Learning: In the `.github/workflows/pr-update-playwright-expectations.yaml` workflow in the Comfy-Org/ComfyUI_frontend repository, the snapshot update process is intentionally scoped to only add and update snapshot images. Deletions of snapshot files are handled explicitly outside this workflow and should not be suggested as part of this automation.

Applied to files:

  • src/locales/pt-BR/nodeDefs.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: lint-and-format
  • GitHub Check: setup
  • GitHub Check: test
  • GitHub Check: update-locales
  • GitHub Check: collect
🔇 Additional comments (3)
src/locales/pt-BR/main.json (1)

1-5: Bootstrap approach approved; key verified in English source.

This minimal English placeholder correctly addresses the chicken-and-egg problem where completely empty {} files were not detected by lobe-i18n. The g.empty key exists in en/main.json, so the structure will trigger the i18n automation to generate actual Portuguese translations.

src/locales/pt-BR/settings.json (1)

1-5: Remove manual edits to non-English locale files.

The pt-BR/settings.json file is auto-generated on every release. Do not manually maintain or add content to locale files outside of src/locales/en/main.json. Add the Comfy_DevMode.name key only to the English source file if it is not already present; other locales will be generated automatically during the next release.

Likely an incorrect or invalid review comment.

src/locales/pt-BR/nodeDefs.json (1)

1-5: Bootstrap file approach is appropriate for this i18n automation fix.

The Portuguese locale file with minimal English placeholders correctly triggers the lobe-i18n automation to generate actual translations. The AddNoise.display_name key exists in the English source and will be properly detected and translated.

Comment on lines 1 to 3
{
"Comfy_Canvas_FitView": {
"label": "Fit View"
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if the English commands file exists and has the key
echo "=== Checking English commands file ==="
if [ -f "src/locales/en/commands.json" ]; then
  echo "✓ File exists"
  echo "Checking for Comfy_Canvas_FitView key..."
  jq -r '.Comfy_Canvas_FitView.label // "KEY_NOT_FOUND"' src/locales/en/commands.json
else
  echo "✗ src/locales/en/commands.json not found"
fi

# Check locale directory structure
echo -e "\n=== Locale directory structure ==="
find src/locales -type d | head -20

# Look for i18n automation/configuration
echo -e "\n=== Looking for i18n automation setup ==="
fd -e "package.json|tsconfig|lobe-i18n|i18n" | head -20

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 452


🏁 Script executed:

#!/bin/bash
# Check for lobe-i18n or automation configuration
echo "=== Checking for i18n/lobe-i18n configuration ==="
rg -l "lobe-i18n|i18n.*generate|translate.*auto" --type json --type js --type ts | head -10

# Check if there's a script or workflow for locale generation
echo -e "\n=== Looking for locale generation scripts ==="
rg "locale|translate|i18n" package.json --context 2

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 1095


Remove the pt-BR/commands.json entry. Locale files for non-English languages are automatically generated by lobe-i18n on every release. Only add English key/values to src/locales/en/commands.json; the key already exists there as "Fit view to selected nodes". Manual edits to pt-BR and other non-English locale files will be overwritten during the next release and should not be included in PRs.

🤖 Prompt for AI Agents
In src/locales/pt-BR/commands.json around lines 1 to 5, remove the manual entry
for "Comfy_Canvas_FitView" because non-English locale files are generated
automatically; instead ensure the English key/value exists only in
src/locales/en/commands.json (the canonical source). Delete this file entry from
the PR so pt-BR is not modified and will remain managed by lobe-i18n during
releases.

@snomiao snomiao marked this pull request as draft December 29, 2025 12:33
Add saveImmediately: true to lobe-i18n configuration to fix pt-BR locale
generation. Without this option, translations from empty {} files are
generated by the API but not saved to disk, leaving files empty.

This enables proper bootstrapping of new locales from empty files.
This commit will be reverted after CI validates the fix works.
It temporarily enables the i18n workflow to run on this PR branch.
github-actions and others added 3 commits January 3, 2026 02:17
This reverts commit 84545c218f46b0856e8d9a0d9d35d476cad59b28.

The translations were successfully generated by CI, validating that the
saveImmediately fix works. Removing them to keep the PR minimal - they
will be regenerated automatically after merge.
This reverts commit cd7e937867a9bd2cd3ff90aae60dc8fc5b8e33ce.

The test modification is no longer needed - CI has validated the fix
works by successfully generating pt-BR translations.
@snomiao snomiao marked this pull request as ready for review January 3, 2026 02:56
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Jan 3, 2026
@snomiao snomiao changed the title fix: bootstrap pt-BR locale files to enable automatic translation fix: enable immediate file saving for i18n translations Jan 3, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.i18nrc.cjs (1)

6-23: Reminder: Revert the temporary workflow changes before merging.

According to the PR objectives, there's a temporary test modification in .github/workflows/i18n-update-core.yaml (commit d08c503) that must be reverted before this PR is merged. Please ensure this workflow change is removed to avoid unintended CI behavior.

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d8af87f and 05d097f.

📒 Files selected for processing (1)
  • .i18nrc.cjs
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 6300
File: src/locales/en/main.json:774-780
Timestamp: 2025-12-09T04:35:43.971Z
Learning: In the Comfy-Org/ComfyUI_frontend repository, locale files other than `src/locales/en/main.json` are generated automatically on every release. Developers only need to add English (en) key/values in `src/locales/en/main.json` when making PRs; manual updates to other locale files (fr, ja, ko, ru, zh, zh-TW, es, ar, tr, etc.) are not required and should not be suggested in reviews.
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/{components,composables}/**/*.{ts,tsx,vue} : Use vue-i18n for ALL user-facing strings by adding them to `src/locales/en/main.json`
🔇 Additional comments (1)
.i18nrc.cjs (1)

9-9: Clarify how saveImmediately addresses the root cause and whether locale file changes are part of this PR.

saveImmediately is a valid, documented configuration option for @lobehub/i18n-cli that writes translation results to output files as each chunk finishes. However, the PR objectives describe the root cause as lobe-i18n treating empty {} JSON objects as equal, preventing detection of pt-BR files needing translation. It's unclear how this write-timing option solves that detection problem. Please clarify:

  1. How does enabling saveImmediately address the empty {} object equality issue?
  2. Are the pt-BR locale file changes mentioned in the PR objectives (main.json, commands.json, settings.json, nodeDefs.json with minimal structure bootstrapping) part of this PR but omitted from review, or are they unnecessary with this config change?

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

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants