Skip to content

refactor(website): fill translation placeholders with named values - #18945

Merged
benceruleanlu merged 7 commits into
mainfrom
bl/i18n-named-interpolation
Sep 28, 2026
Merged

benceruleanlu merged 7 commits into
mainfrom
bl/i18n-named-interpolation

Conversation

@benceruleanlu

@benceruleanlu benceruleanlu commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

Summary

Website components fill translation placeholders with named values passed to t() instead of calling String.replace on the returned copy, so the storage and runtime swap in #18013 no longer carries a 50-file call-site migration.

Changes

  • API: t(key, locale, named) interpolates {name} placeholders; a value the caller does not pass keeps its {name} visible, and values are inserted literally (no $& expansion). tAround(key, locale, slot, named) splits the unresolved message around one slot, then fills each side, so a heading can wrap that slot in markup; it throws unless the message contains that slot exactly once. The Cinematic Studio's tc(), the Reshoot rc() and the Router page's routerT() take the same named values through a shared src/i18n/interpolate.ts.
  • Migration: About 60 components, templates, utilities and the events/FDCT specs move off .replace, including every Cinematic Studio, Reshoot and Router call site. Label objects handed to child components carry functions instead of placeholder strings. The local interpolators in auth-schemas.ts and modelFaq.ts go.
  • Messages: The split models.list.heroTitle.before/.after pair becomes one message, {name} in {brand} / {brand} 中的 {name}, and the hero template no longer adds spacing of its own around the brand. gallery.heroTitle.before likewise becomes gallery.heroTitle with a {brand} slot, which stops the zh-CN gallery heading from repeating ComfyUI.
  • zh-CN copy: Product CTAs say 功能 instead of 属性, and the hub empty/count labels say 工作流 instead of 模板.
  • Tests: src/i18n joins unit-test coverage. tc(), rc() and routerT() each have a literal-output test for a parameterized message.

Review Focus

For current values, rendered output is unchanged apart from the two zh-CN wording fixes and the zh-CN gallery heading, which no longer says ComfyUI twice. A value containing a String.replace token such as $&, $` or $' now renders literally instead of expanding. The dictionary stays in translations.ts; #18013 moves it to JSON catalogs rendered with vue-i18n, which keeps the same t() signature and missing-value behavior.

Part of FE-2045: one localization system for the monorepo (one JSON catalog format, one translation pipeline and workflow).

t() takes named values and tAround splits a message around one slot, so
components stop filling placeholders with String.replace. A value the
caller does not pass keeps its {name} visible. The split heroTitle
before/after pair becomes one message, and the zh-CN product and hub
labels say features and workflows.
@benceruleanlu
benceruleanlu requested review from a team September 26, 2026 04:32
@benceruleanlu benceruleanlu self-assigned this Sep 26, 2026
@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measure

Executes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight ecosystem-matrix shard checks are a harness self-test; the pack verdict is matrix-verdict.

This candidate changes nothing the matrix measures, so every expensive stage was skipped.

Reproduce locally
# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
  npx vitest run --config vitest.matrix.config.mts

Full docs: scripts/registry-census/README.md

🌐 Website E2E

Tip

All tests passed.

Status ✅ Passed
Report View Report

🌾 Fallow: ✅ Passed

Fallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened.

Fallow gates on new findings in changed files only, so everything below was introduced or moved by this PR (87 changed files).

Kind Finding Where Usual remedy
Complexity <template>() — cyclomatic 68, CRAP undefined apps/website/src/components/workshop/PlaygroundOutput.vue:295 Extract a branch, or raise branch coverage — CRAP is CC² × (1−cov)³ + CC, so either moves it.
Complexity <template>() — cyclomatic 51, CRAP undefined apps/website/src/components/workshop/ModelDetail.vue:818 Extract a branch, or raise branch coverage — CRAP is CC² × (1−cov)³ + CC, so either moves it.
Complexity <template>() — cyclomatic 47, CRAP undefined apps/website/src/components/workshop/PlaygroundField.vue:319 Extract a branch, or raise branch coverage — CRAP is CC² × (1−cov)³ + CC, so either moves it.
Complexity <template>() — cyclomatic 28, CRAP undefined apps/website/src/components/hub/BrowseToolbar.vue:303 Extract a branch, or raise branch coverage — CRAP is CC² × (1−cov)³ + CC, so either moves it.
Complexity <template>() — cyclomatic 19, CRAP undefined apps/website/src/components/workshop/FacetSheet.vue:170 Extract a branch, or raise branch coverage — CRAP is CC² × (1−cov)³ + CC, so either moves it.
Complexity formatValue() — cyclomatic 15, CRAP 63.6 apps/website/src/components/workshop/PlaygroundField.vue:135 Extract a branch, or raise branch coverage — CRAP is CC² × (1−cov)³ + CC, so either moves it.
Complexity <template>() — cyclomatic 14, CRAP undefined apps/website/src/components/workshop/WorkshopCatalog.vue:72 Extract a branch, or raise branch coverage — CRAP is CC² × (1−cov)³ + CC, so either moves it.

Pre-existing findings are baselined in .fallow-baselines/ and are not your
responsibility — see ADR-DEVEX-LINT-0015.

Reproduce locally
# the base the gate compared against
npx fallow audit --root . --quiet --format json \
  --changed-since 7f38fbf7ed87f918fe05ee016e2e0a43c4185f5f

Full docs: ADR-DEVEX-LINT-0015

🔗 Website Preview

Website Preview: https://comfy-website-preview-pr-18945.vercel.app

Models is built and gated by PostHog (workshop-enabled), using staging Cloud.

This commit: https://website-frontend-llmxeke1n-comfyui.vercel.app

Last updated: 2026-09-28T21:22:29Z for 8cdb8a3

@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 17a64ead-ca49-40b1-b85c-d8841f955656

📥 Commits

Reviewing files that changed from the base of the PR and between 5a52023 and f102930.

📒 Files selected for processing (8)
  • apps/website/src/components/hub/BrowseToolbar.vue
  • apps/website/src/components/workshop/PlaygroundOutput.vue
  • apps/website/src/components/workshop/WorkflowPage.vue
  • apps/website/src/components/workshop/WorkshopFilterMenu.vue
  • apps/website/src/components/workshop/WorkshopSections.vue
  • apps/website/src/components/workshop/cinematic-studio/CinematicStudio.test.ts
  • apps/website/src/i18n/translations.ts
  • apps/website/src/lib/workshop/cinematic-studio/copy.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

Website translation APIs now support named-value interpolation and slot splitting. Components, routes, utilities, and tests pass dynamic values through those APIs instead of replacing placeholders in returned strings. Count-label contracts and selected Chinese translation copy also change.

Changes

Website translation updates

Layer / File(s) Summary
Translation API and shared contract
apps/website/src/i18n/*, apps/website/src/config/auth-schemas*, apps/website/src/lib/workshop/cinematic-studio/copy.ts, apps/website/src/lib/workshop/cinematic-studio/reshoot-copy.ts, apps/website/src/templates/platform/routerCopy.ts, apps/website/vitest.config.ts
t and the cinematic, reshoot, and router copy lookups accept named values. tAround splits text around one named slot, and tPlural uses shared interpolation. Tests cover interpolation and slot splitting. Auth schema translations pass parameters to t, and the local interpolate helper is removed.
Count-based browse labels
apps/website/src/components/hub/*, apps/website/src/components/workshop/FacetSheet*, apps/website/src/components/workshop/WorkshopFilterMenu.vue, apps/website/src/components/workshop/WorkshopSearchField.vue, apps/website/src/components/workshop/WorkshopSections.vue, apps/website/src/components/cloud-nodes/PackCard.vue, apps/website/src/templates/events/EventsDirectorySection.vue, apps/website/e2e/events.spec.ts
Browse, filter, event, and pack labels pass counts to translation calls. Toolbar, grid, and facet label contracts use count-formatting functions. Related tests use the updated label contracts.
Workshop interaction text
apps/website/src/components/workshop/*, apps/website/src/lib/workshop/task-label.ts
Workshop components and utilities pass dynamic values to translations for messages and labels, including workspace names, file limits, field values, and model names. A test checks a localized video-field error.
Cinematic and reshoot copy
apps/website/src/components/workshop/cinematic-studio/*, apps/website/src/lib/workshop/cinematic-studio/*
Cinematic and reshoot copy lookups accept interpolation values. Components and tests use those parameters for model names, counts, credits, frame details, and accessible labels.
Model, product, and integration consumers
apps/website/src/components/models/*, apps/website/src/components/product/*, apps/website/src/components/agent/*, apps/website/src/components/auth/*, apps/website/src/components/pricing/*, apps/website/src/routes/models/*, apps/website/src/pages/p/supported-models/[slug].astro, apps/website/src/utils/model*, apps/website/src/templates/cli/SetupSection.vue, apps/website/src/templates/cloud-nodes/PackDetailPage.astro, apps/website/src/templates/fdct/*, apps/website/src/templates/mcp/*, apps/website/src/config/*, apps/website/e2e/fdct.spec.ts
Model, product, account, pricing, setup, and MCP consumers pass dynamic values through translation parameters. Hero headings use tAround, and locale-specific heading tests were added.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~30 minutes

Change: Refactor

Merge Risk: ⚪ Minimal · up to f1029

The translation changes are mergeable after normal checks; no actionable issue remains established.

Security Architecture Review

Security architecture risk: 🔵 Low · up to f1029

The shared formatting change reaches many website labels, but the examined dynamic values remain in escaped text or attribute bindings, with no demonstrated increase in privileges or sensitive-data exposure. The breadth of the migration limits confidence in a minimal-risk assessment.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The evidenced change is a website-wide display-formatting contract, with dynamic workshop values and hub counts reaching UI labels. The examined paths do not establish a new privileged sink or cross-service dependency.

Trust Boundaries and Controls

  • observed — In the inspected component paths, formatted dynamic values render through Vue text or bound aria labels; BrowseToolbar and FacetSheet consume numeric count formatters through text bindings. These scoped paths do not show raw-HTML rendering of the changed values.
🚥 Pre-merge checks | ✅ 7
✅ Passed checks (7 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: replacing translation placeholder replacement with named values in the website.
Description check ✅ Passed The description is complete and relevant. It explains the API changes, migration scope, message updates, localization changes, tests, and review focus. The optional screenshots section is not needed f…
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.
End-To-End Regression Coverage For Fixes ✅ Passed PASS. A bug-fix signal appears in the commit subject fix(website): split tAround before filling named values; test rc and routerT output. However, the changed files are exclusively under `apps/websi…
Website End-To-End Regression Coverage ✅ Passed PASS. The PR changes website runtime files, but the described runtime changes are translation interpolation refactors and copy-only updates. The PR explicitly states that current rendered output is un…
Adr Compliance For Entity/Litegraph Changes ✅ Passed PASS. The changed-file list contains no files under src/lib/litegraph/ or src/ecs/, and no files related to graph entities such as nodes, links, widgets, slots, reroutes, groups, or subgraphs. The…
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

@codecov

codecov Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.92308% with 21 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ps/website/src/components/workshop/ModelDetail.vue 0.00% 0 Missing and 2 partials ⚠️
...kshop/cinematic-studio/CinematicGenerateAction.vue 66.66% 0 Missing and 2 partials ⚠️
...te/src/templates/events/EventsDirectorySection.vue 33.33% 2 Missing ⚠️
...ps/website/src/components/cloud-nodes/PackCard.vue 0.00% 1 Missing ⚠️
apps/website/src/components/hub/BrowseToolbar.vue 50.00% 0 Missing and 1 partial ⚠️
apps/website/src/components/hub/HubBrowse.vue 75.00% 1 Missing ⚠️
...te/src/components/models/ModelCreationsSection.vue 0.00% 1 Missing ⚠️
...e/src/components/product/cloud/AudienceSection.vue 0.00% 1 Missing ⚠️
...pps/website/src/components/workshop/FacetSheet.vue 0.00% 0 Missing and 1 partial ⚠️
...ebsite/src/components/workshop/FileSourceInput.vue 75.00% 0 Missing and 1 partial ⚠️
... and 8 more

❌ Your patch check has failed because the patch coverage (76.92%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

@@            Coverage Diff             @@
##             main   #18945      +/-   ##
==========================================
- Coverage   84.21%   84.19%   -0.02%     
==========================================
  Files        3209     3174      -35     
  Lines      156522   155794     -728     
  Branches    40640    40476     -164     
==========================================
- Hits       131813   131174     -639     
+ Misses      23016    22971      -45     
+ Partials     1693     1649      -44     
Flag Coverage Δ
billing-web-unit ?
website-unit 78.34% <76.92%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ite/src/components/agent/AgentBetaWaitlistForm.vue 97.82% <100.00%> (ø)
...s/website/src/components/auth/AuthHeroCarousel.vue 85.71% <100.00%> (ø)
...pps/website/src/components/gallery/HeroSection.vue 100.00% <100.00%> (+100.00%) ⬆️
apps/website/src/components/hub/WorkflowGrid.vue 84.78% <100.00%> (ø)
...website/src/components/models/ModelHeroSection.vue 0.00% <ø> (ø)
...ebsite/src/components/models/ModelsHeroSection.vue 88.88% <100.00%> (+88.88%) ⬆️
.../website/src/components/pricing/PricingCredits.vue 75.00% <100.00%> (-2.78%) ⬇️
...ps/website/src/components/pricing/PricingPrice.vue 80.00% <100.00%> (ø)
...website/src/components/pricing/PricingTeamCard.vue 92.50% <100.00%> (ø)
...mponents/product/local/MobileDownloadEmailForm.vue 97.91% <ø> (-0.05%) ⬇️
... and 55 more

... and 49 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot added the risk:high PR risk grade (advisory shadow check; grader-owned) label Sep 26, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Sep 26, 2026
…the tAround slot

tc() takes the same named values as t() through a shared interpolate
module, so the studio's ten remaining .replace call sites go. tAround
throws when a message lacks its slot, the models hero title lets the
message own the spacing around the brand, and the i18n tests assert
exact output.
@vercel

vercel Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
billing-web Ignored Ignored Sep 28, 2026 9:17pm UTC
billing-web-test Ignored Ignored Sep 28, 2026 9:17pm UTC

Request Review

@vercel
vercel Bot temporarily deployed to Preview – billing-web-test September 26, 2026 07:54 Inactive
coderabbitai[bot]
coderabbitai Bot previously approved these changes Sep 26, 2026
@benceruleanlu benceruleanlu removed their assignment Sep 26, 2026
…me the gallery brand once

The Reshoot and Router copy dictionaries take named values like tc(), so
no website call site fills placeholders with .replace any more. The
gallery hero title becomes one message with a {brand} slot, which stops
the zh-CN heading from repeating ComfyUI.
coderabbitai[bot]
coderabbitai Bot previously approved these changes Sep 26, 2026

@DrJKL DrJKL left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verdict: needs follow-up on tAround marker handling and wrapper regression coverage

No P0 or P1 blockers found. I found one reproducible P2 rendering defect, two P2 test gaps, one P3 duplicate test, and two PR-description issues.

Findings without an anchorable line
  • P2: The Review Focus says rendered output is unchanged except for the listed zh-CN copy, but the new callback interpolation intentionally changes values containing JavaScript replacement tokens such as $&, $` , and $'. The new unit test confirms this behavior. Please qualify the claim so it distinguishes ordinary current values from replacement-token values.
  • P3 Nit: The single Changes bullet combines the API contract, migration scope, copy changes, and test coverage. Splitting those into separate bullets would make the exhaustive claims independently reviewable.
Existing findings confirmed or contested
  • CodeRabbit marker collision: confirmed. tAround('models.list.heroTitle', 'en', 'brand', { name: '{brand}' }) throws repeats slot {brand} even though the source translation contains one brand slot.
  • Codecov patch coverage: confirmed and narrowed. The reported 77.17% is accurate. The marker collision is the concrete missed branch I reproduced. The full website unit suite still passed 9,262 tests.
  • Fallow, PlaygroundOutput.vue template complexity: contested. The base has the same control flow; this diff removes chained replacements and shortens the block.
  • Fallow, ModelDetail.vue template complexity: contested. The base has the same structure; this diff replaces chained substitutions with one translation call.
  • Fallow, PlaygroundField.vue template complexity: contested. The base has the same template branches; the changed expressions are simpler.
  • Fallow, BrowseToolbar.vue template complexity: contested. The label-contract change adds no template control flow.
  • Fallow, FacetSheet.vue template complexity: contested. The diff replaces a placeholder label with a function call without adding branches.
  • Fallow, PlaygroundField.vue formatValue: contested. The base has the same branches; this diff deletes the local interpolation reducer.
  • Fallow, WorkshopCatalog.vue template complexity: contested. The changed expression only moves interpolation into t().
Checked and cleared
  • The seven Fallow rows above were not introduced or worsened by this diff.
  • I rejected a proposed placeholder-specific NamedValues type. The PR explicitly preserves visible missing placeholders and compatibility with the later vue-i18n wrapper, so a dynamic named-value record is part of the intended boundary.
  • Exact searches found no remaining placeholder-oriented String.replace call sites in the migrated website scope and no new any, assertions, suppressions, lint disables, prohibited Tailwind patterns, raw telemetry sinks, or PrimeVue usage.
Coverage
  • Depth: standard.
  • Lanes: correctness, maintainability, idiomaticity, tests, and documentation.
  • Scope: all 79 changed files; no path was sampled or left unread.
  • Tests: 475 unit files passed with 9,262 tests and 4 skips; website typecheck, ESLint, Astro formatting, and the production build passed; the two changed Playwright specs passed all 38 desktop cases.
  • Visual check: the preview rendered Grok Imagine in ComfyUI and the zh-CN gallery heading 在 ComfyUI 中构建、调整与创想 with one brand and no visible placeholders.
  • One initial Playwright launch exited because Astro's preview command daemonized. Reusing the confirmed listening preview completed the focused run successfully.

Comment thread apps/website/src/i18n/translations.ts Outdated
named: NamedValues = {}
): [string, string] {
const marker = `{${slot}}`
const message = t(key, locale, {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P2] tAround counts the slot marker after interpolating the other named values, so caller text can be mistaken for translation structure. I reproduced this with tAround('models.list.heroTitle', 'en', 'brand', { name: '{brand}' }): it throws repeats slot {brand} even though the source message contains one brand slot. This also contradicts the documented literal-value behavior. Please validate and split the unresolved message first, then interpolate each side, and add this marker-shaped value as a regression case.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 5a52023. tAround now finds and validates the slot in the unresolved message, then interpolates each side. translations.test.ts has your { name: '{brand}' } case, which now returns ['{brand} in ', '']. I confirmed it fails against the previous implementation.

): string {
const entry: LocalizedText = copy[key]
return entry[locale] ?? entry.en
return interpolate(entry[locale] ?? entry.en, named)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P2] This new named-interpolation path lacks an independent output test. ReshootMoveControls.test.ts builds its expected accessible name with rc itself, so an rc implementation that ignores named can leave {time} in both the UI and the test oracle and still pass. Please add a direct literal-output assertion for a parameterized rc message.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added reshoot-copy.test.ts in 5a52023. It asserts literal reshoot.frames output in en and zh-CN, so an rc that dropped named would fail independently of the component test.

): string {
const entry: LocalizedText = copy[key]
return entry[locale] ?? entry.en
return interpolate(entry[locale] ?? entry.en, named)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P2] I could not find a test that calls routerT with named values. The existing router copy tests only exercise unparameterized keys, so dropping this argument or interpolating the wrong locale would stay green. Please add one direct literal-output case for a parameterized router message.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added routerCopy.test.ts in 5a52023. It asserts literal platform.router.coverage.browseAll output with count: 120 in en and zh-CN, which also catches interpolating the wrong locale.

})

describe('tPlural', () => {
it.for([

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P3] Nit: this table duplicates the dedicated src/i18n/tPlural.test.ts suite, which already covers counts 1, 3, and 0, zh-CN rules, English fallback rules, and single-form messages. Removing this duplicate keeps one owner for plural behavior without losing a falsifier.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Removed in 5a52023; tPlural.test.ts is the single owner now.

@vercel
vercel Bot temporarily deployed to Preview – billing-web-test September 28, 2026 20:20 Inactive
@benceruleanlu

Copy link
Copy Markdown
Member Author

Addressed the review in 5a52023 and replied in each thread. For the two description findings: Review Focus now says output is unchanged for current values and calls out that $&, $` and $' render literally. The Changes section is split into API, Migration, Messages, zh-CN copy and Tests bullets.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Sep 28, 2026

@DrJKL DrJKL left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verdict: prior findings addressed; base conflict remains

I verified the follow-up commit against every finding from my previous review. All six are fixed, and I found no new issues in the four-file delta.

Prior finding dispositions
  • C1, fixed: tAround now validates and splits the unresolved translation before interpolating either side. The marker-shaped value regression returns ['{brand} in ', ''].
  • T2A, fixed: reshoot-copy.test.ts independently checks parameterized rc output in English and zh-CN.
  • T2B, fixed: routerCopy.test.ts independently checks parameterized routerT output in English and zh-CN.
  • T3, fixed: the duplicate plural table was removed; tPlural.test.ts remains the single owner.
  • D2, fixed: Review Focus now qualifies the no-output-change claim and names the literal replacement-token behavior.
  • D3, fixed: Changes is split into API, Migration, Messages, zh-CN copy, and Tests bullets.
Verification
  • Focused unit tests: 4 files, 21 tests passed.
  • Website typecheck: 0 errors.
  • Changed-file ESLint and formatting: passed.
  • Standard follow-up lanes: correctness, maintainability, idiomaticity, tests, and documentation; no new candidates.

GitHub currently reports the branch as conflicting with main, so this is not yet ready for approval.

@DrJKL

DrJKL commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Merged main at e4229433c30c410a096594c064ba2298c7013398 into the PR branch. The conflict resolution retained main’s new linked use-case workflow header and author row while preserving this PR’s named { author } interpolation.

@datadog-official

This comment has been minimized.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Sep 28, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

tc?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agreed—the abbreviation is opaque. I opened FE-3071 to remove both tc and rc when cinematic and reshoot copy moves into the shared catalog.

): string {
const entry: LocalizedText = copy[key]
return entry[locale] ?? entry.en
return interpolate(entry[locale] ?? entry.en, named)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we eliminate this here?, same for the other poorly named functions that just wrap a single function call.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The full cleanup is tracked in FE-3071. I would keep this PR focused on interpolation and remove these wrappers with the shared-catalog migration rather than rename or duplicate them here.

@DrJKL DrJKL removed their assignment Sep 28, 2026
@benceruleanlu
benceruleanlu added this pull request to the merge queue Sep 28, 2026
Merged via the queue into main with commit 868113d Sep 28, 2026
95 checks passed
@benceruleanlu
benceruleanlu deleted the bl/i18n-named-interpolation branch September 28, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:high PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants