Repository navigation
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
a1f8b07 to
4ff6caa
Compare
4ff6caa to
c3b0eb6
Compare
There was a problem hiding this comment.
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 08sand1h 05m, and German reads2 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.DurationFormatcannot keep two-digit seconds after minutes. Verified: Node 24 gives2m 8s, or2m:08with 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
difflabel, 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.tsxandpackages/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.
…cale; the hardcoded-string lint config has no exemption list and reports a stale entry
c3b0eb6 to
356703c
Compare
|
/approve-spec 356703c |
PR Analysis Report🔎 Preview ·
|
| 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
There was a problem hiding this comment.
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
itemstest case still hasitemsin its code); wording such as "matches no report in this file" would say what to fix. - The description could add the
## Writing rubric resultssection 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 08sand1h 05m, German reads2 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.DurationFormatcannot keep two-digit seconds after minutes. Verified: Node 24 gives2m 8s, or2m:08with 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
difflabel, 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.
| '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. ' + |
There was a problem hiding this comment.
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.
|
/approve-spec de0c4ef |
There was a problem hiding this comment.
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
itemstest case still hasitemsin its code); wording such as "matches no report in this file" would say what to fix. - The description could add the
## Writing rubric resultssection 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 08sand1h 05m, German reads2 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.DurationFormatcannot keep two-digit seconds after minutes. Verified: Node 24 gives2m 8s, or2m:08with 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
difflabel, 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.
User impact
Six components still showed built-in text as fixed English under every locale: no catalog, translation or provider override could change it.
+N moreoverflow count.34s,2m 08s,1h 05m).<language> diffheader label, which also names the code region.useChatPasteAsToken(2 lines, 300 chars).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
no-hardcoded-i18n-stringreports all of them. Buteslint.config.jsexempted 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.architecture:internationalizationINV1a). Callers can't reword or translate any of these strings.utils/timeFormat.ts, already the locale-sensitive helper for TimeInput and DateTimeInput) gainsformatElapsedDuration:Intl.NumberFormatin narrow unit style, each part after the first at two digits, joined byIntl.ListFormatin narrow unit style. English stays34s,2m 08s,1h 02m; German reads34 Sek.,2 Min., 08 Sek..Intl.DurationFormatis not used: it is newer, and it cannot keep two-digit seconds after minutes, so English would become2m 8s.tokenizer.overflowCount,slider.required,codeBlock.diffLabel. Each has a translator description.formatPastedTextLabel(Chat/pastedTextLabel.ts), over the existingchat.pastedText.labelmessage, so the two cannot drift.t; the popover was the one caller that left it out.…Messageandmessageto…Warninganddiagnostic, so the rule's text-sink name heuristic no longer reads them as interface copy.allowedStringsByFileis removed fromeslint.config.js. Three inlineeslint-disablecomments remain in PowerSearch'sformatTokenValue.ts: the popover token's own English summaries ("{n} items", "date range", "{n} filters"), whichcomponent:PowerSearch's known gap records. They are out of scope here.scripts/shared-identity.baseline.json, beside the same file'ssymbolsByLocalewith the same reason: a second cache per copy changes no result.allowedStringsByFileentry 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-037andcomponent: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 toarchitecture: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 thetimeFormat.test.tselapsed-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:internationalizationINV1 and INV1a: component-owned labels, announcements and assistive text are catalog messages, not literals or assembled strings.component:Timerkeeps its ladder and visible precision: the English output is unchanged (34s,2m 08s,1h 05m), and the minutes and seconds stay two digits.architecture:internationalizationINV8 and INV9: locale-sensitive formatting goes through the named shared helpers with the provider locale;utils/timeFormat.tsis one of them.Smallest restoration
+1,000 more(it was+1000 more), and other locales get their own digits. The paste label keeps1234 charsungrouped, as before, and Timer's units are never grouped (useGrouping: false), so 1,000 hours still reads1000h 05m.difflabel (a diff with no language) stays as it is: like the language names it sits beside, it is the code-fence identifier, not prose.buildRelativeDateOptionsis internal; itstargument becomes required.Evidence
de-DErenders34s. Each new provider test fails with the old source.+2 autres,Obligatoire,diff tsx,201 car.,il y a 7 jours; Timer underde-DEreads34 Sek.and2 Min., 08 Sek..tsx diff, the paste token's labels and PowerSearch's sheet rows. A new English case pins1234 chars.formatElapsedDurationcase pins1000h 05m(no grouping).formatElapsedDurationunit tests pin English, German and Japanese output.First-load size (
architecture:component-import-boundariesINV10)utils/timeFormat.tsis a shared module this PR grows.pnpm size:pages, gzip bytes, measured against #12677's head before it merged: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).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-stringlint rule and configTesting
useChatPasteAsToken.test.tsbecomes.tsxso its provider wrapper can use JSX.pnpm check:knowledge: aligned.no-hardcoded-i18n-stringrule tests: all pass.scripts/shared-identity.test.mjsand the other node tests the change reaches: pass.node scripts/check-i18n-catalog.mjsandcheck:changesets: pass.tsc --noEmit(core): clean.CI=true eslint(strict) on every formerly exempted file and the config: no errors.ui×4) on the code at this head (1937b15cc5, before the record verification-row edits): all pass.