Skip to content

fix(i18n): enforce ja key parity and backfill the 31 missing strings - #20991

Open
OrangerXu wants to merge 1 commit into
Comfy-Org:mainfrom
OrangerXu:fix/ja-locale-parity
Open

OrangerXu wants to merge 1 commit into
Comfy-Org:mainfrom
OrangerXu:fix/ja-locale-parity

Conversation

@OrangerXu

Copy link
Copy Markdown

Fixes #20978

What was wrong

The catalog parity test in translations.test.ts hard-coded zh-CN, so ja sat outside the check entirely — deleting any ja key passed every gate (measured in the issue), and ja/main.json had drifted to 31 missing keys with CI green.

The fix

The check, not just the keys. The parity test now derives its locale list from LOCALE_CODES minus DEFAULT_LOCALE, so ja is covered by construction and any future locale lands inside the check automatically instead of needing another one-line edit that someone has to remember:

it.for(LOCALE_CODES.filter((locale) => locale !== DEFAULT_LOCALE))(
  'includes %s copy for every eligible English message',
  ...

The backfill. The 31 keys ja was missing are restored: the two footer brand labels, the four model-launch comparison labels, and the 25 keys of the nvidiaRtx page. Brand and product names stay untranslated per the glossary; wording follows the existing ja conventions in the neighbouring fishAudio section (e.g. 2026年10月更新, ドキュメントを見る, Q&A).

Verification

  • translations.test.ts: 14 passed with the backfill.
  • Gate proof — deleting nvidiaRtx.hero.title from ja/main.json makes the suite fail with that key listed (1 failed), restoring it goes back to green. That is the failure mode Nothing enforces ja locale parity: a deleted ja key passes every gate, and ja/main.json is already missing 31 keys #20978 asked for: the missing keys become a failing test someone fixes once.
  • npm run locale:check: All locales are up to date with the English sources. (it also independently reports the same 31 keys before the backfill).
  • prettier --check on both changed files: clean.
  • Post-backfill parity audit: 0 eligible keys missing from ja, 0 extra keys beyond en (excluding the six legal namespaces translationExclusions already exempts).

Not in scope

The six excluded legal namespaces (tos, privacy, enterprise-msa, desktop_privacy, affiliate-terms, minimaxLicense) stay exempt for every locale exactly as before — extending coverage there is a separate decision, since those pages are long-form legal copy.

@OrangerXu
OrangerXu requested a review from a team October 14, 2026 09:16
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

✅ All contributors have signed the CLA. Thank you! This PR is ready to be merged.
Posted by the CLA Assistant Lite bot.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters: 1
  • apps/website/src/locales/ja/main.json is excluded by !apps/website/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration
  • Configuration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: bfe202fe-fdf4-4458-8bc7-5498fe679e43

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

coderabbitai[bot]
coderabbitai Bot previously approved these changes Oct 14, 2026
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

⚡ Performance: ⚠️ Performance tests failed — check the CI workflow logs

🔬 E2E Coverage: ⚠️ Coverage collection failed — check the CI workflow logs

🎭 Playwright: ⏳ Running...

🎨 Storybook: ❌ Failed

❌ Storybook failed. Open the workflow run and fix the build before merging.

Details

⏰ Completed at: 11/14/2026, 07:41:59 AM UTC

Links

@datadog-official

This comment has been minimized.

@benceruleanlu

Copy link
Copy Markdown
Member

Heads up: this conflicts with #21032. That PR makes English fallback the website policy. It deletes the includes Chinese copy for every eligible English message test in apps/website/src/i18n/translations.test.ts, and a workflow translates new English copy into a bot PR after it lands on main. Both PRs edit the same hunk. Extending the parity test to ja would fail CI on every English-only PR, and on any bot PR that leaves a string out.

The 31 missing ja strings are exactly what that workflow generates, so once #21032 merges they arrive in its first translation PR without a hand backfill. Could this one wait for #21032, or be narrowed to any ja fixes the generated copy would not cover?

@benceruleanlu

Copy link
Copy Markdown
Member

That was my agent above

I do think we should only have english or just one language be the requirement for PRs, because it seems to scale better when we have a lot more languages, and uses the translation pipeline for more trustable quality

but that is only my opinion, maybe I am biased?

@benceruleanlu

Copy link
Copy Markdown
Member

Separately, are you a native Japanese speaker? If you are, we can take these 31 strings. If not, I think there's some ongoing work and open PR that should just make the translation run on a cron job or when English locale is added

@OrangerXu

Copy link
Copy Markdown
Author

I have read and agree to the Contributor License Agreement

comfy-legal added a commit to Comfy-Org/comfy-cla that referenced this pull request Oct 15, 2026
Narrowed per review feedback on Comfy-Org#20991: drop the ja parity-test
enforcement (it would conflict with the auto-translation workflow in
Comfy-Org#21032 and fail CI on English-only PRs) and keep only the Japanese
backfill of the strings that were missing at the time.
@OrangerXu

Copy link
Copy Markdown
Author

Thanks for the detailed context! To answer your questions:

  • I'm not a native Japanese speaker, so agreed that the generated translation pipeline is the more trustable source for quality.
  • I've narrowed this PR (fcba8e9): dropped the ja parity-test enforcement entirely (the test file is back to main), keeping only the ja backfill of the strings that were missing. No CI policy change and no overlap with ci(website): open translation PRs automatically #21032's test edits.

Happy to hold this until #21032 lands, or close it if the workflow's first translation PR covers these strings — whichever is easier for you.

@dante01yoon dante01yoon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for backfilling these strings. Unfortunately this can't land here anymore: apps/website was removed from this repo in #21861 (the site now lives in Comfy-Org/comfy-website), and the PR currently conflicts with main. Separately, the description still describes a translations.test.ts parity change that the narrowed commit no longer contains, and #21032 moved the website to an English-fallback policy.

"company": "会社情報",
"contact": "お問い合わせ",
"enterpriseMsa": "エンタープライズMSA",
"fishAudio": "Fish Audio",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

issue: This file no longer exists on main. #21861 removed apps/website and moved comfy.org to Comfy-Org/comfy-website, so the PR cannot merge here. Could we port the backfill to that repo (if the missing ja keys still apply there) and close this one?

This branch was previously deployed

1 inactive deployment
website-approval — fcba8e99 Deployed Oct 15, 2026 by OrangerXu via fast-lane #4053
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nothing enforces ja locale parity: a deleted ja key passes every gate, and ja/main.json is already missing 31 keys

3 participants