Repository navigation
fix(ChatTypingIndicator): build the typing status from the i18n catalog and Intl.ListFormat - #6220
Conversation
…og and Intl.ListFormat
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsChat (@astryxdesign/lab) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Localized applications now expose the typing status in the active language and use that locale’s list grammar for names.
AST-009 release evidence for exact head fbd9738771c02c58383b824a12420c9fb092799e: merge evidence is complete. The first stable release containing this change remains blocked until these pending rows pass or receive a current owner exception:
- NVDA + Chrome on Windows —
pending - VoiceOver + Safari on macOS —
pending
Scenario: in Lab/ChatAdditions → Typing And Unread, transition from no typing status to one, two, and many names, and verify the localized sentence and name list are announced once in order.
Addresses astracat-bot's review (CHANGES_REQUESTED, 2026-09-24) and the
two @astryx/no-hardcoded-i18n-string errors failing `lint`.
- F1: a single-value delimiter commit now announces
t('@astryx.tokenizer.tokenAdded', {label}), the same message the
Enter/click create path uses, instead of a hard-coded `Added ${label}`.
`t` is added to commitDelimitedText's useCallback deps.
- F2: a batch commit announces the new ICU-plural catalog message
@astryx.tokenizer.tokensAdded ("Added {count, number} {count, plural,
one {item} other {items}}") instead of `Added ${n} items`. Only en.json
gets the key (other locales fall back, per meta#6217/meta#6220). English output
is unchanged, so the existing English announce tests stay green. The
changeset mentions both keys.
- F3: TOKEN_MESSAGES.fr gains a tokensAdded override, and two tests
render the delimiter path under <InternationalizationProvider
locale="fr">: a typed "alice," and a pasted "a, b, c". Before the fix
they failed with "expected 'Added alice' to be 'Ajouté : alice'" and
"expected 'Added 3 items' to be '3 éléments ajoutés'"; both pass now.
Checks: Tokenizer/Typeahead/PowerSearch suites (14 files, 441 tests)
and the i18n suite pass; eslint (also ASTRYX_STRICT_LINT=1) is clean on
Tokenizer.tsx; core tsc, prettier, check:i18n-catalog,
check:changesets, check:sync and check:knowledge pass.
Summary
ChatTypingIndicatorbuilt its typing sentences from literals in component source and joined names with an English "and", so a localized app could not translate the status. The phrases now come from the catalog (@astryx.chatTypingIndicator.one/.many/.others) and the names are joined withIntl.ListFormatfor the active locale, so the conjunction, separator, and order follow the locale rather than this file. English output is unchanged.The issue also lists
"Several people are typing…". That string is not in the component, the repository, or its history (git log --all -S), so there was nothing to move; the component builds three sentences and all three are covered.Test Plan
pnpm test— three new cases in a French locale, includingIntl.ListFormatjoining with "et" rather than "and"; each fails with the literal restored. The three existing English assertions are unchanged and still passpnpm check:i18n-catalog— 365 keys, 29 locales consistentLab/ChatAdditions → Typing And Unreadrenders the same sentence as before ("Ana and 2 others are typing…"), verified against the story's exact inputRelated Issues
Closes #6215