Repository navigation
Conversation
…he catalog The `/` menu built each agent's usage line, `/ask <prompt>`, and its summary, `name · description`, in code, so the placeholder word and the separator stayed English in every locale. Two catalog messages, `@astryx.commentComposer.agentCommandUsage` and `@astryx.commentComposer.agentCommandSummary`, now word them. English output is unchanged. Cherry-picked from #13739 (by @ernestt). Co-authored-by: Ernest Tien <ernesttien@meta.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec cf6dbc3 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet and runs once this pull request targets main and leaves draft.
Both agent-row lines now come from catalog messages, as the internationalization contract requires, and English output is unchanged from reading the code. The new French-override test covers the translated path; your test plan reports it passing, and CI runs it before merge.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Title: the agent command menu words its rows through the catalog — verified in the component's two translator calls.
- Before the change, the usage line and summary were built in code — verified in the base component.
- A non-English viewer sees the menu partly in English — verified for the shipped Vietnamese catalog, which translates the rest of the composer.
- The internationalization contract requires catalog text, and Core's strict lint enforces it — verified in the contract and the lint configuration.
- Two catalog messages word the rows, with the angle brackets quoted — verified in the English catalog.
- English output is unchanged — verified by tracing the message format for every string input.
- No API, visual or other behavior change — verified; the two new catalog keys are disclosed in the description.
- A locale can translate the placeholder word and the separator — verified by tracing the resolver's override and catalog lookup.
- A French override now applies — verified by trace; the new test covers it and has not run on this head.
- Before the change, a French override had no effect, and the new test fails without the fix — reported.
- Lab Comments tests, pre-review checks, formatting and lint pass — reported.
- The catalog and runtime checks pass with the new keys — reported; CI runs them.
- The changeset is valid — verified, run locally.
- Cherry-picked with credit to the original author, and stacked on #14157 — verified in the commit and the base branch.
- Files:
.changeset/comment-composer-agent-menu-catalog.mdclear;packages/core/locales/en.jsonclear;packages/lab/src/Comments/CommentComposer.test.tsxclear;packages/lab/src/Comments/CommentComposer.tsxclear.
…oser-agent-menu-catalog
|
/approve-spec 1826db7 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet and runs once this pull request targets main and leaves draft.
Both agent-row lines now come from catalog messages, as the internationalization contract requires, and English output is unchanged from reading the code. The new French-override test covers the translated path; your test plan reports it passing, and CI runs it before merge.
Claims and files checked
Review mode: incremental; reason: none
- Changed review rules since the last review: none.
- Title: the agent command menu words its rows through the catalog — verified in the component's two translator calls.
- Before the change, the usage line and summary were built in code — verified in the base component and on
main. - A non-English viewer sees the menu partly in English — reported; consistent with the shipped Vietnamese catalog, which translates the rest of the composer.
- The internationalization contract requires catalog text, and Core's strict lint enforces it — verified in the contract and the lint configuration.
- The component audit lists text built in code — reported; the audit is not in the repository, and its finding is verified on
main. - Two catalog messages word the rows, with the angle brackets quoted — verified in the English catalog.
- English output is unchanged — verified by tracing the message format for every string input.
- The catalog gains two described messages and a Core changeset names the change — verified.
- Each row renders through a small component that calls the translator — verified.
- No API, visual or other behavior change — verified in the changed files and their importers; the two new catalog keys are disclosed.
- A locale can translate the placeholder word and the separator — verified by tracing the resolver's override and catalog lookup.
- A French override now applies — verified by trace; the new test covers it and has not run on this head.
- Before the change, a French override had no effect, and the new test fails without the fix — reported.
- On the original pull request, the Comments tests, catalog checks and changeset check passed — reported.
- At this head, install, build, typecheck, formatting, lint, the catalog and runtime checks and the 19 CommentComposer tests pass — reported; the changeset check also passes, run locally, and CI runs the rest.
- The catalog check counts two more keys and messages than
main— reported; consistent with the English catalog. - Cherry-picked with credit to the original author, and stacked on #14157 — verified in the commit, the changeset and the base branch.
- Files:
.changeset/comment-composer-agent-menu-catalog.mdclear;packages/core/locales/en.jsonclear;packages/lab/src/Comments/CommentComposer.test.tsxclear;packages/lab/src/Comments/CommentComposer.tsxclear.
Cherry-picked from #13739 by @ernestt, who wrote this fix; the commit credits @ernestt with a
Co-authored-byline. This team pull request carries it onto currentmain. It is stacked on #14157, the #13738 replacement, because both add CommentComposer tests at the same place.User impact
A viewer in any locale but English who types
/in a comment composer sees the agent-command menu partly in English. Each row's usage line (/ask <prompt>) and summary (Release Assistant · Ask about the rollout) were built in code, so the placeholder word and the separator could not be translated or reordered.Problem and solution fit
architecture:internationalizationrequires that every word a component shows comes from the catalog. Core's strict lint enforces it, so the family could not graduate with this.Two catalog messages now word the rows:
@astryx.commentComposer.agentCommandUsage(/{command} '<prompt>', with the angle brackets quoted for the message format) and@astryx.commentComposer.agentCommandSummary({name} · {description}). English output is unchanged.Expected behavior and authority
architecture:internationalization: components take user-facing text from the catalog. A locale can reorder or re-punctuate an assembled string only when one message holds it.main.Smallest restoration
packages/core/locales/en.jsongains the two messages, with translator descriptions. A Core changeset names the catalog change.CommentComposerrenders each row through a small component that calls the translator.No API, visual, or other behavior change. English text is identical.
Evidence
/still shows/ask <prompt>./ask <demande>./ask <prompt>andRelease Assistant · Ask about the rollout, as before.CommentComposer.test.tsx"words the agent command menu through the catalog". It fails without the fix.check:i18n-catalogandgenerate-i18n-runtime --checkpass with the new keys.The rows look the same in English, so there are no screenshots.
Scope
Components: CommentComposer
Testing
vitest run packages/lab/src/Comments, the i18n catalog and runtime checks, andcheck:changesetspassed.tsc(core, lab),prettier,eslintandcheck:changesetsall pass;check:i18n-catalogpasses: 637 keys and 703 English messages, againstmain's 635 and 701, so the two new keys resolve;check:i18n-runtimepasses;Overlap checked: #14157, #13740, #13739, #13738, #13736, #13737, #13735 (separate: #13739 is the original by @ernestt, which this team pull request replaces on current main; it is stacked on #14157, the #13738 replacement, because both add CommentComposer tests at the same place; #13740, #13736, #13737 and #13735 are ernestt's other Comments pull requests)