Skip to content

fix(ChatTypingIndicator): build the typing status from the i18n catalog and Intl.ListFormat - #6220

Merged
cixzhang merged 1 commit into
meta:mainfrom
kyu-rong:fix/chat-typing-indicator-i18n
Sep 15, 2026
Merged

cixzhang merged 1 commit into
meta:mainfrom
kyu-rong:fix/chat-typing-indicator-i18n

Conversation

@kyu-rong

Copy link
Copy Markdown
Contributor

Summary

ChatTypingIndicator built 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 with Intl.ListFormat for 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, including Intl.ListFormat joining with "et" rather than "and"; each fails with the literal restored. The three existing English assertions are unchanged and still pass
  • pnpm check:i18n-catalog — 365 keys, 29 locales consistent
  • Lab/ChatAdditions → Typing And Unread renders the same sentence as before ("Ana and 2 others are typing…"), verified against the story's exact input

Related Issues

Closes #6215

@vercel

vercel Bot commented Sep 10, 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 Sep 10, 2026 4:44pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 10, 2026
@kyu-rong
kyu-rong marked this pull request as ready for review September 10, 2026 16:39
@github-actions github-actions Bot added community Authored by a community contributor (not on the eng/design team) needs:code-review High-risk change (new package/component/API) — needs human code review before merge labels Sep 10, 2026
github-actions Bot added a commit that referenced this pull request Sep 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

Modified Components

Chat (@astryxdesign/lab) · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 600 -
Complexity N/A High (20) -

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/lab N/A 3.5KB 1.5KB

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@astracat-bot

astracat-bot Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Sep 12, 2026, 4:14 AM UTC

@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.

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.

@cixzhang
cixzhang merged commit 1544a7a into meta:main Sep 15, 2026
33 checks passed
AKnassa added a commit to AKnassa/astryx that referenced this pull request Sep 26, 2026
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.

This branch was successfully deployed

1 active deployment
Preview — fbd97387 Deployed Sep 10, 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. community Authored by a community contributor (not on the eng/design team) needs:code-review High-risk change (new package/component/API) — needs human code review before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ChatTypingIndicator: generated status sentences bypass the translation runtime

2 participants