Skip to content

fix(core): six components' fixed-English built-in text follows the locale; the hardcoded-string lint config has no exemption list and reports a stale entry - #12721

Open
nynexman4464 wants to merge 2 commits into
mainfrom
nynexman4464/fix/i18n-lint-exemptions
Open

nynexman4464 wants to merge 2 commits into
mainfrom
nynexman4464/fix/i18n-lint-exemptions

Conversation

@nynexman4464

@nynexman4464 nynexman4464 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

User impact

Six components still showed built-in text as fixed English under every locale: no catalog, translation or provider override could change it.

  • Tokenizer's +N more overflow count.
  • Slider's screen-reader "Required".
  • Timer's elapsed durations (34s, 2m 08s, 1h 05m).
  • CodeBlock's <language> diff header label, which also names the code region.
  • The default label of a token made by useChatPasteAsToken (2 lines, 300 chars).
  • The relative-date choices in PowerSearch's popover editor. The touch sheet already translated the same choices.

A person on a non-English page sees and hears these in English. After this change, five come from the catalog, so a translation or override applies, and Timer formats its durations in the provider locale through Intl (no catalog string, so an override does not apply to it).

Problem and solution fit

  • Why it happens: each site builds the text from literals or a template.
  • Why lint missed it: no-hardcoded-i18n-string reports all of them. But eslint.config.js exempted them in a list of "pre-existing hardcoded text awaiting catalog keys". 11 of its entries were stale: the text was already gone, and nothing reported an entry that matched nothing.
  • Why it matters: Astryx-owned text must be a catalog message (architecture:internationalization INV1a). Callers can't reword or translate any of these strings.
  • The fix:
    • Timer through Intl, not the catalog. The shared time formatter (utils/timeFormat.ts, already the locale-sensitive helper for TimeInput and DateTimeInput) gains formatElapsedDuration: Intl.NumberFormat in narrow unit style, each part after the first at two digits, joined by Intl.ListFormat in narrow unit style. English stays 34s, 2m 08s, 1h 02m; German reads 34 Sek., 2 Min., 08 Sek.. Intl.DurationFormat is not used: it is newer, and it cannot keep two-digit seconds after minutes, so English would become 2m 8s.
    • Five strings into the catalog.
      • New keys: tokenizer.overflowCount, slider.required, codeBlock.diffLabel. Each has a translator description.
      • The paste token and the pasted-text chip share one Chat-local helper, formatPastedTextLabel (Chat/pastedTextLabel.ts), over the existing chat.pastedText.label message, so the two cannot drift.
      • PowerSearch's popover passes its translator to the shared relative-date list. That list now always takes t; the popover was the one caller that left it out.
    • Two developer diagnostics renamed, not exempted. BottomSheet's ignored-snap-points warning and Markdown's plugin-failure warning go to the console, not the interface. Their bindings are renamed from …Message and message to …Warning and diagnostic, so the rule's text-sink name heuristic no longer reads them as interface copy.
    • The lint config has no exemption list. allowedStringsByFile is removed from eslint.config.js. Three inline eslint-disable comments remain in PowerSearch's formatTokenValue.ts: the popover token's own English summaries ("{n} items", "date range", "{n} filters"), which component:PowerSearch's known gap records. They are out of scope here.
    • Timer's two formatter caches are listed as memo caches in scripts/shared-identity.baseline.json, beside the same file's symbolsByLocale with the same reason: a second cache per copy changes no result.
    • The rule reports a stale exemption. An allowedStringsByFile entry that matches nothing in its file is reported, so a future list cannot keep entries for text that is gone.

Expected behavior and authority

  • spec:AST-037 and component:Timer (both owned by cixzhang): their format tables show English. This PR adds one paragraph to AST-037's Standard formats, saying other locales use the locale's narrow unit names through the shared time helper. It adds the locale to the allowed variation in Timer's representative states, and links both records to architecture:internationalization. These record edits need an engineering owner's /approve-spec.

  • AST-037's and Timer's verification rows add the provider-locale cases (Timer.test.tsx "writes elapsed durations in the provider locale" and the timeFormat.test.ts elapsed-duration cases).

  • component:PowerSearch's known gap said the popover's relative-date editor writes its choices as English literals. This PR fixes those, so it removes that clause, and the closing sentence about sequencing. The token's own text remains in the gap.

  • architecture:internationalization INV1 and INV1a: component-owned labels, announcements and assistive text are catalog messages, not literals or assembled strings.

  • component:Timer keeps its ladder and visible precision: the English output is unchanged (34s, 2m 08s, 1h 05m), and the minutes and seconds stay two digits.

  • architecture:internationalization INV8 and INV9: locale-sensitive formatting goes through the named shared helpers with the provider locale; utils/timeFormat.ts is one of them.

Smallest restoration

  • No API, prop, default, layout or interaction change.
  • English output is unchanged, with one exception: Tokenizer's count is now a number placeholder, so 1,000 or more hidden tokens read +1,000 more (it was +1000 more), and other locales get their own digits. The paste label keeps 1234 chars ungrouped, as before, and Timer's units are never grouped (useGrouping: false), so 1,000 hours still reads 1000h 05m.
  • CodeBlock's bare diff label (a diff with no language) stays as it is: like the language names it sits beside, it is the code-fence identifier, not prose.
  • buildRelativeDateOptions is internal; its t argument becomes required.
  • Timer formats in the provider locale through the shared time helper; without a provider it is English, as before.
  • Shipped locales show English for the new keys until translators add them, as for any new key.

Evidence

  • Reproduction before the change: under a French provider with an override for each key, the five catalog components still render English, and Timer under de-DE renders 34s. Each new provider test fails with the old source.
  • Result after the change: each renders the provider's text: +2 autres, Obligatoire, diff tsx, 201 car., il y a 7 jours; Timer under de-DE reads 34 Sek. and 2 Min., 08 Sek..
  • Representative unchanged path: the existing English tests pass unchanged, including Timer's ladder, Slider's required description, CodeBlock's tsx diff, the paste token's labels and PowerSearch's sheet rows. A new English case pins 1234 chars.
  • Mutation-sensitive proof:
    • A formatElapsedDuration case pins 1000h 05m (no grouping).
    • Six new provider tests, red with the old source and green with the fix.
    • formatElapsedDuration unit tests pin English, German and Japanese output.
    • A new rule case reports an exemption that matches nothing; it fails with the old rule.
    • An existing rule case now also expects the stale report for its untrimmed entry; it fails with the old rule.
    • A new valid case checks that another file's exemption is not judged, which guards against over-reporting.

First-load size (architecture:component-import-boundaries INV10)

utils/timeFormat.ts is a shared module this PR grows. pnpm size:pages, gzip bytes, measured against #12677's head before it merged:

Page (components) Base Head Change
docs (Text, Heading, Link, Card, Divider, List) 75,983 75,983 +0
form (Button, IconButton, TextInput, CheckboxInput, Text, Heading, Card) 105,548 105,548 +0
menu (DropdownMenu, ContextMenu, Button, Text) 108,110 108,110 +0
table (Table, Text, Button) 119,329 119,329 +0
timer (Timer alone) 11,560 21,691 +10,131
timeinput (TimeInput) 177,363 177,362 −1
datetimeinput (DateTimeInput) 227,400 227,401 +1

A page that renders Timer alone grows 10.1 KB against this base: Timer now reads the provider locale through the i18n context, which loaded the message resolver. #12975, now on main, stops a locale-only reader from loading the resolver; with it, the same page grows 312 bytes (measured with this change on top of #12975). Every reference page already loads them, so they show +0. The locale is not an optional feature (Timer always formats), so that record's 0.3 KB allowance for an optional feature does not apply; this is the shared-module growth it asks to report.

Writing rubric results

Record edits: spec:AST-037 (one Standard formats paragraph, verification row), component:Timer (allowed variation, verification row), component:PowerSearch (gap clause removed).

  • R1 narration: none.
  • R2 research in the record: none.
  • R3 evidence naming a change: none.
  • R4 rejected alternatives: none.
  • R5 pull request or issue references: none.
  • R6 ruled open questions still listing options: none.
  • R7 project status: none.

Scope

Components: Tokenizer, Slider, Timer (and its AST-037 and component records), CodeBlock, useChatPasteAsToken and ChatPastedTextToken (shared label helper), PowerSearch (value editor; record gap clause), BottomSheet (dev warning name), Markdown (dev warning name), no-hardcoded-i18n-string lint rule and config

  • One defect is restored: built-in text that no translation could reach.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

  • Component suites (Chat, CodeBlock, PowerSearch, Slider, Timer, Tokenizer, BottomSheet, Markdown): all pass.
  • useChatPasteAsToken.test.ts becomes .tsx so its provider wrapper can use JSX.
  • pnpm check:knowledge: aligned.
  • no-hardcoded-i18n-string rule tests: all pass.
  • scripts/shared-identity.test.mjs and the other node tests the change reaches: pass.
  • node scripts/check-i18n-catalog.mjs and check:changesets: pass.
  • tsc --noEmit (core): clean.
  • CI=true eslint (strict) on every formerly exempted file and the config: no errors.
  • Local CI (lint, typecheck, ui ×4) on the code at this head (1937b15cc5, before the record verification-row edits): all pass.
  • Not covered: visual and WebKit runs. The changes are text sources only, with no layout or interaction change.

@vercel

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 19, 2026 8:58pm UTC

Request Review

@astracat-bot

astracat-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 19, 2026, 9:15 PM UTC

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 18, 2026
@nynexman4464
nynexman4464 force-pushed the nynexman4464/fix/i18n-lint-exemptions branch from a1f8b07 to 4ff6caa Compare November 18, 2026 23:40
@nynexman4464
nynexman4464 force-pushed the nynexman4464/fix/i18n-lint-exemptions branch from 4ff6caa to c3b0eb6 Compare November 19, 2026 01:45
@nynexman4464 nynexman4464 changed the title fix(core): the last fixed-English built-in strings come from the catalog; the hardcoded-string lint has no exemptions and reports a stale one fix(core): six components' fixed-English built-in text follows the locale; the hardcoded-string lint config has no exemption list and reports a stale entry Nov 19, 2026

@astracat-bot astracat-bot Bot 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.

Needs an engineering owner's spec decision; nothing else stands in the way. The earlier requested changes are addressed: Timer's units no longer group digits (1000h 05m), the title and release note name the six components, and the description carries the per-page size table.

Spec decision: the new AST-037 "Standard formats" paragraph and the Timer record's "Representative states" and verification rows change current records. Approval needs an engineering owner to decide whether Timer's elapsed text follows the provider locale through Intl narrow unit names (German 2 Min., 08 Sek., and 3h, 05 Min. at hour scale) with no catalog message that a translation or override can change, or whether its units should come from catalog messages. An engineering owner records the decision by commenting /approve-spec followed by the full head SHA; the author may do so as an engineering owner.

Claims and files checked

Review mode: full; reason: history

  • Release note: five strings now come from the catalog (Tokenizer count, Slider required text, CodeBlock diff label, the paste token label sharing the chip's message, the popover's relative dates). Verified: the six provider tests fail on the base and pass on the head.
  • Release note: Timer follows the locale through unit formatting, English stays 34s, 2m 08s and 1h 05m, and German reads 2 Min., 08 Sek.. Verified: the Timer and time-format tests and browser frames of a review story.
  • Release note: other English output is unchanged except Tokenizer's grouping, and Timer never groups (1000h 05m). Verified: the 1,000-hour test and the frames.
  • Release note: shipped locales show English for the new keys until they are translated. Verified: the keys exist only in the English catalog, and the catalog check passes.
  • Title: six components' built-in text follows the locale, and the lint config has no exemption list and reports a stale entry. Verified: the config has no list, and the rule tests cover the stale report.
  • Description: the lint exempted these sites, and 11 entries were already stale. Verified: strict lint has 0 errors on every formerly exempted file with the list removed.
  • Description: Timer formats through Intl, not the catalog, so an override does not apply to it. Verified: code.
  • Description: Intl.DurationFormat cannot keep two-digit seconds after minutes. Verified: Node 24 gives 2m 8s, or 2m:08 with two-digit seconds.
  • Description: three new keys with translator descriptions, one shared paste-label helper, and a relative-date builder that now always takes a translator, the popover being its one caller without one. Verified: catalog, code and callers.
  • Description: the two console warnings are renamed, not exempted. Verified: strict lint is clean on both files.
  • Description: three inline lint disables remain for the popover token's own text, which the PowerSearch record's gap keeps. Verified.
  • Description: the record edits need an engineering owner's approval. Verified: none exists at this head.
  • Description: the records' verification rows name the new test cases. Verified: the cases exist under those names.
  • Description: no API, prop, default, layout or interaction change. Verified: the API surface generator lists no rows.
  • Description: the bare diff label, the ungrouped paste count, and English Timer without a provider are unchanged. Verified: code and tests.
  • Description evidence: each new provider test and the rule's new and updated cases fail with the old source. Verified: a base run with the head's tests had 11 failures, all of them these cases.
  • Description: the first-load size table for the grown shared module. Verified within 1 B gzip; a Timer-only page grows 10,131 B.
  • Description testing: component suites, knowledge check, rule tests, catalog check, changesets, typecheck and strict lint pass. Verified: 133 test files and 4,020 tests in those folders, and every check passed.
  • Description: local CI passed on an earlier commit. Not verifiable at this head; not relied on.
  • Files with a finding: docs/specs/AST-037-timer/spec.md, docs/specs/components/Timer/Timer.spec.md, packages/core/src/Timer/Timer.tsx and packages/core/src/utils/timeFormat.ts (owner decision).
  • Files clear: .changeset/i18n-remaining-built-in-strings.md, docs/specs/components/PowerSearch/PowerSearch.spec.md, eslint.config.js, internal/eslint-plugin-astryx/no-hardcoded-i18n-string.js, internal/eslint-plugin-astryx/no-hardcoded-i18n-string.test.mjs, internal/eslint-plugin-astryx/no-raw-intl-locale.js, packages/core/locales/en.json, packages/core/src/BottomSheet/BottomSheetPanel.tsx, packages/core/src/Chat/ChatPastedTextToken.tsx, packages/core/src/Chat/pastedTextLabel.ts, packages/core/src/Chat/useChatPasteAsToken.test.tsx, packages/core/src/Chat/useChatPasteAsToken.ts, packages/core/src/CodeBlock/CodeBlock.test.tsx, packages/core/src/CodeBlock/CodeBlock.tsx, packages/core/src/Markdown/plugins/protocol.ts, packages/core/src/PowerSearch/PowerSearchValueEditor.test.tsx, packages/core/src/PowerSearch/PowerSearchValueEditor.tsx, packages/core/src/Slider/Slider.test.tsx, packages/core/src/Slider/Slider.tsx, packages/core/src/Timer/Timer.test.tsx, packages/core/src/Tokenizer/Tokenizer.test.tsx, packages/core/src/Tokenizer/Tokenizer.tsx, packages/core/src/i18n/useListFormatter.ts, packages/core/src/utils/timeFormat.test.ts.

Automated review (maintainer link)

…cale; the hardcoded-string lint config has no exemption list and reports a stale entry
@nynexman4464
nynexman4464 force-pushed the nynexman4464/fix/i18n-lint-exemptions branch from c3b0eb6 to 356703c Compare November 19, 2026 19:05
@nynexman4464
nynexman4464 changed the base branch from nynexman4464/fix/chat-trigger-empty-catalog to main November 19, 2026 19:05
@nynexman4464

Copy link
Copy Markdown
Contributor Author

/approve-spec 356703c

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · de0c4ef

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
Timer · Storybook 🔴 25.1 kB (+9.8 kB) · 6.1 kB CSS (0) 201 (+15) — · — · —
CodeBlock · Storybook 83.0 kB (+25 B) · 12.6 kB CSS (0) 2,277 (0) — · — · —
Markdown · Storybook 207.6 kB (+20 B) · 23.0 kB CSS (0) 8,879 (0) — · — · —
42 more components
Component Size LoC Visual · A11y · RTL
Slider · Storybook 115.5 kB (+11 B) · 8.9 kB CSS (0) 2,464 (+2) — · — · —
Tokenizer · Storybook 107.8 kB (+7 B) · 21.1 kB CSS (0) 2,616 (+2) — · — · —
ChatComposer 86.5 kB (+6 B) · 13.0 kB CSS (0) — — · — · —
DateTimeInput 227.4 kB (+3 B) · 19.9 kB CSS (0) — — · — · —
PowerSearch · Storybook 313.2 kB (+3 B) · 26.5 kB CSS (0) 7,196 (−3) — · — · —
DateInput 203.9 kB (+2 B) · 18.1 kB CSS (0) — — · — · —
BottomSheet 75.3 kB (0) · 7.8 kB CSS (0) — — · — · —
BottomSheetSwitcher 18.8 kB (0) · 3.4 kB CSS (0) — — · — · —
ChatComposerDrawer 18.4 kB (0) · 4.8 kB CSS (0) — — · — · —
ChatComposerInput 84.1 kB (0) · 12.2 kB CSS (0) — — · — · —
ChatDictationButton 67.5 kB (0) · 10.9 kB CSS (0) — — · — · —
ChatLayout 90.5 kB (0) · 11.4 kB CSS (0) — — · — · —
ChatLayoutScrollButton 67.5 kB (0) · 11.0 kB CSS (0) — — · — · —
ChatMessage 17.2 kB (0) · 3.7 kB CSS (0) — — · — · —
ChatMessageBubble 7.6 kB (0) · 3.8 kB CSS (0) — — · — · —
ChatMessageList 30.1 kB (0) · 7.1 kB CSS (0) — — · — · —
ChatMessageMetadata 20.8 kB (0) · 4.2 kB CSS (0) — — · — · —
ChatSendButton 67.3 kB (0) · 10.9 kB CSS (0) — — · — · —
ChatSystemMessage 7.1 kB (0) · 3.8 kB CSS (0) — — · — · —
ChatTokenizedText 7.6 kB (0) · 4.1 kB CSS (0) — — · — · —
ChatToolCalls 34.4 kB (0) · 8.5 kB CSS (0) — — · — · —
ContextMenu 104.4 kB (0) · 19.3 kB CSS (0) — — · — · —
DropdownMenu 109.8 kB (0) · 19.4 kB CSS (0) — — · — · —
FileInput 75.9 kB (0) · 11.8 kB CSS (0) — — · — · —
MoreMenu 110.0 kB (0) · 19.4 kB CSS (0) — — · — · —
MultiSelector 104.4 kB (0) · 18.1 kB CSS (0) — — · — · —
Pagination 148.8 kB (0) · 19.3 kB CSS (0) — — · — · —
Selector 115.9 kB (0) · 18.9 kB CSS (0) — — · — · —
TableCell 105.6 kB (0) · 19.8 kB CSS (0) — — · — · —
TableHeaderCell 105.4 kB (0) · 19.7 kB CSS (0) — — · — · —
ChatComposerTokenElement 84.1 kB (−1 B) · 12.2 kB CSS (0) — — · — · —
Popover 100.8 kB (−1 B) · 15.2 kB CSS (0) — — · — · —
Table 123.3 kB (−1 B) · 20.8 kB CSS (0) — — · — · —
TimeInput 178.5 kB (−3 B) · 17.0 kB CSS (0) — — · — · —
lab/ChatEmojiPicker 123.4 kB (new) · 773 B CSS (new) — — · — · —
lab/ChatReactionBar 124.7 kB (new) · 1.1 kB CSS (new) — — · — · —
lab/CommentComposer 181.9 kB (new) · 1.9 kB CSS (new) — — · — · —
lab/Comments 383.8 kB (new) · 2.5 kB CSS (new) — — · — · —
lab/CommentThread 376.7 kB (new) · 2.4 kB CSS (new) — — · — · —
richtext/RichTextEditor 309.5 kB (new) · 2.7 kB CSS (new) — — · — · —
richtext/RichTextEditorToolbar 310.8 kB (new) · 454 B CSS (new) — — · — · —
richtext/RichTextView 286.7 kB (new) · 2.4 kB CSS (new) — — · — · —

Package size: measured; main has no measurement of the merge base to compare yet.

API changes: unknown (base surface unavailable): richtext, theme-butter, theme-chocolate, theme-gothic, theme-matcha, theme-neutral, theme-stone, theme-y2k

Wide change (8 components): add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.

Current run: CI concluded failure; parts of this report may be missing.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot 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.

Approved pending CI: CI has not run on this head yet (every CI job was skipped on the draft), so the required checks still have to pass before merge. The engineering owner's spec approval for this head settles the Timer record edits, and no blocking finding remains.

Two optional follow-ups:

  • The new lint message says an exemption "no longer appears in this file", but it fires when an entry matches no report (the updated items test case still has items in its code); wording such as "matches no report in this file" would say what to fix.
  • The description could add the ## Writing rubric results section the contributing guide asks for when a record changes; the three record edits have nothing to report under R1 to R7.
Claims and files checked

Review mode: full; reason: rebase

  • Release note: five strings now come from the catalog (Tokenizer count, Slider required text, CodeBlock diff label, the paste token label sharing the chip's message, the popover's relative dates). Verified: the six provider tests fail on the base source and pass on the head.
  • Release note: Timer follows the locale through unit formatting; English stays 34s, 2m 08s and 1h 05m, German reads 2 Min., 08 Sek.. Verified: the Timer and time-format tests and a browser probe under a German provider.
  • Release note: other English output is unchanged except Tokenizer's grouping, and Timer never groups (1000h 05m). Verified: the 1,000-hour test, the count message's number argument, and the unchanged English tests.
  • Release note: shipped locales show English for the new keys until they are translated. Verified: the keys exist only in the English catalog, and the catalog check passes.
  • Title: the lint config has no exemption list, and the rule reports a stale entry. Verified: the config, and the rule's new and updated test cases.
  • Description: the lint exempted these sites, and 11 entries were already stale. Verified: the new rule over the base sources with the old list reports exactly 11.
  • Description: Timer formats through Intl in the shared time helper, so a message override does not apply to it. Verified: code.
  • Description: Intl.DurationFormat cannot keep two-digit seconds after minutes. Verified: Node 24 gives 2m 8s, or 2m:08 with two-digit seconds.
  • Description: three new keys with translator descriptions, one shared paste-label helper, and a relative-date builder that always takes a translator. Verified: catalog, code and every caller.
  • Description: the two console warnings are renamed, not exempted. Verified: strict lint is clean on both files.
  • Description: three inline lint disables remain for the popover token's own text, which the PowerSearch record's gap keeps. Verified: unchanged from the base.
  • Description: the record edits need an engineering owner's approval. Verified: an engineering owner approved this head.
  • Description: the records' verification rows name the new test cases, and the PowerSearch gap clause for the fixed editor text is removed. Verified.
  • Description: no API, prop, default, layout or interaction change. Verified: the API surface generator lists no rows.
  • Description: the bare diff label, the ungrouped paste count and English Timer without a provider are unchanged. Verified: code and tests.
  • Description evidence: each new provider test and the rule's new and updated cases fail with the old source. Verified: 11 failures with the head's tests on the base.
  • Description: the first-load size table for the grown shared module. Verified: the four reference pages are +0 here; a Timer-only page grows 10,118 B gzip against the reported 10,131 B on an older base.
  • Description testing: component suites, knowledge check, rule tests, catalog check, changesets, typecheck and strict lint pass. Verified: 154 test files and 4,295 tests, and every check passed.
  • Description: local CI passed on an earlier commit. Not verifiable at this head; not relied on.
  • Description: visual and WebKit runs are not covered. Accurate; Chromium frames of the changed text were taken for this review.
  • Files with a non-blocking note: internal/eslint-plugin-astryx/no-hardcoded-i18n-string.js (message wording).
  • Files clear: .changeset/i18n-remaining-built-in-strings.md, docs/specs/AST-037-timer/spec.md, docs/specs/components/PowerSearch/PowerSearch.spec.md, docs/specs/components/Timer/Timer.spec.md, eslint.config.js, internal/eslint-plugin-astryx/no-hardcoded-i18n-string.test.mjs, internal/eslint-plugin-astryx/no-raw-intl-locale.js, packages/core/locales/en.json, packages/core/src/BottomSheet/BottomSheetPanel.tsx, packages/core/src/Chat/ChatPastedTextToken.tsx, packages/core/src/Chat/pastedTextLabel.ts, packages/core/src/Chat/useChatPasteAsToken.test.tsx, packages/core/src/Chat/useChatPasteAsToken.ts, packages/core/src/CodeBlock/CodeBlock.test.tsx, packages/core/src/CodeBlock/CodeBlock.tsx, packages/core/src/Markdown/plugins/protocol.ts, packages/core/src/PowerSearch/PowerSearchValueEditor.test.tsx, packages/core/src/PowerSearch/PowerSearchValueEditor.tsx, packages/core/src/Slider/Slider.test.tsx, packages/core/src/Slider/Slider.tsx, packages/core/src/Timer/Timer.test.tsx, packages/core/src/Timer/Timer.tsx, packages/core/src/Tokenizer/Tokenizer.test.tsx, packages/core/src/Tokenizer/Tokenizer.tsx, packages/core/src/i18n/useListFormatter.ts, packages/core/src/utils/timeFormat.test.ts, packages/core/src/utils/timeFormat.ts.

Automated review (maintainer link)

'Hardcoded user-facing string {{value}} passed to `{{name}}()`. ' +
'Route through `t(\'<namespace>.<component>.<key>\')` via `useTranslator()` so it can be localized.',
staleExemption:
'Exempted string {{value}} no longer appears in this file. ' +

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.

Non-blocking: this fires when an entry matches no report, not only when its text is gone. In the updated items test case, items is still in the code, yet the message says "items" no longer appears. Wording such as "matches no report in this file" would tell the developer what to fix.

@nynexman4464
nynexman4464 marked this pull request as ready for review November 19, 2026 19:47
@nynexman4464

Copy link
Copy Markdown
Contributor Author

/approve-spec de0c4ef

@astracat-bot astracat-bot Bot 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.

Approved pending CI: this head's CI run was cancelled before its test, typecheck and build jobs ran, because CI had no capacity, so those required checks still have to pass before merge (Lint and the CLI smoke test passed). Re-run CI once there is room. The engineering owner's spec approval for this head settles the Timer record edits, and no blocking finding remains.

Two optional follow-ups:

  • The new lint message says an exemption "no longer appears in this file", but it fires whenever an entry matches no report (the updated items test case still has items in its code); wording such as "matches no report in this file" would say what to fix.
  • The description could add the ## Writing rubric results section the contributing guide asks for when a record changes; the three record edits have nothing to report under R1 to R7.
Claims and files checked

Review mode: incremental; reason: none

  • Release note: five strings now come from the catalog (Tokenizer count, Slider required text, CodeBlock diff label, the paste token label sharing the chip's message, the popover's relative dates). Verified: the six provider tests fail on the base source and pass on the head.
  • Release note: Timer follows the locale through unit formatting; English stays 34s, 2m 08s and 1h 05m, German reads 2 Min., 08 Sek.. Verified: the formatter and Timer tests, and a browser probe under a German provider.
  • Release note: other English output is unchanged except Tokenizer's grouping, and Timer never groups (1000h 05m). Verified: the 1,000-hour test, the count message's number argument, and the unchanged English tests.
  • Release note: shipped locales show English for the new keys until they are translated. Verified: the keys exist only in the English catalog, and the catalog check passes.
  • Title: the lint config has no exemption list, and the rule reports a stale entry. Verified: the config, and the rule's new and updated test cases.
  • Description: the lint exempted these sites, and 11 entries were already stale. Verified: the new rule over the base sources with the old list reports exactly 11.
  • Description: Timer formats through Intl in the shared time helper, so a message override does not apply to it. Verified: code.
  • Description: Intl.DurationFormat cannot keep two-digit seconds after minutes. Verified: Node 24 gives 2m 8s, or 2m:08 with two-digit seconds.
  • Description: three new keys with translator descriptions, one shared paste-label helper, and a relative-date builder that always takes a translator. Verified: catalog, code and both callers.
  • Description: the two console warnings are renamed, not exempted. Verified: strict lint is clean on both files.
  • Description: three inline lint disables remain for the popover token's own text, which the PowerSearch record's gap keeps. Verified: unchanged from the base.
  • Description: Timer's two formatter caches are listed as memo caches beside the existing entry with the same reason. Verified: the identity test passes with them and finds both caches unlisted without them.
  • Description: the record edits need an engineering owner's approval. Verified: an engineering owner approved this head.
  • Description: the records' verification rows name the new test cases, and the PowerSearch gap clause for the fixed editor text is removed while the token's own text stays in the gap. Verified.
  • Description: no API, prop, default, layout or interaction change. Verified: the API surface generator lists no rows.
  • Description: the bare diff label, the ungrouped paste count and English Timer without a provider are unchanged. Verified: code and tests.
  • Description evidence: each new provider test and the rule's new and updated cases fail with the old source. Verified: 11 failures with the head's tests on the base.
  • Description: the first-load size table for the grown shared module. Verified: the four reference pages are +0, and a Timer-only page grows about 10.1 KB gzip.
  • Description testing: component suites, knowledge check, rule tests, identity test, catalog check, changesets, typecheck and strict lint pass. Verified at this head.
  • Description: local CI passed on an earlier commit. Not verifiable at this head; not relied on.
  • Description: visual and WebKit runs are not covered. Accurate; Chromium frames of the changed text were taken for this review.
  • Files with a non-blocking note: internal/eslint-plugin-astryx/no-hardcoded-i18n-string.js (message wording).
  • Files clear: .changeset/i18n-remaining-built-in-strings.md, docs/specs/AST-037-timer/spec.md, docs/specs/components/PowerSearch/PowerSearch.spec.md, docs/specs/components/Timer/Timer.spec.md, eslint.config.js, internal/eslint-plugin-astryx/no-hardcoded-i18n-string.test.mjs, internal/eslint-plugin-astryx/no-raw-intl-locale.js, packages/core/locales/en.json, packages/core/src/BottomSheet/BottomSheetPanel.tsx, packages/core/src/Chat/ChatPastedTextToken.tsx, packages/core/src/Chat/pastedTextLabel.ts, packages/core/src/Chat/useChatPasteAsToken.test.tsx, packages/core/src/Chat/useChatPasteAsToken.ts, packages/core/src/CodeBlock/CodeBlock.test.tsx, packages/core/src/CodeBlock/CodeBlock.tsx, packages/core/src/Markdown/plugins/protocol.ts, packages/core/src/PowerSearch/PowerSearchValueEditor.test.tsx, packages/core/src/PowerSearch/PowerSearchValueEditor.tsx, packages/core/src/Slider/Slider.test.tsx, packages/core/src/Slider/Slider.tsx, packages/core/src/Timer/Timer.test.tsx, packages/core/src/Timer/Timer.tsx, packages/core/src/Tokenizer/Tokenizer.test.tsx, packages/core/src/Tokenizer/Tokenizer.tsx, packages/core/src/i18n/useListFormatter.ts, packages/core/src/utils/timeFormat.test.ts, packages/core/src/utils/timeFormat.ts, scripts/shared-identity.baseline.json.

Automated review (maintainer link)

@nynexman4464
nynexman4464 marked this pull request as ready for review November 19, 2026 21:20

This branch was successfully deployed

1 active deployment
Preview — de0c4ef5 Deployed Nov 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant