facebook / facebook/astryx

[Tracker] i18n & RTL support — string injection + RTL correctness

Open
#3,636 1 comment 0 reactions 1 assignee Claimed by @nynexman4464 View on GitHub
enhancement
Dominant language
TypeScript
Stars
13k
Forks
1.1k
Avg merge
1d 15h
Merged PRs (30d)
690

Description

## Problem

Astryx originally shipped user-facing and assistive text hardcoded in English, with no consumer translation path. Several components also rendered or behaved incorrectly in right-to-left layouts. Together those gaps blocked localized and RTL applications from adopting the library without forks or component replacements.

This issue tracks the cross-library i18n and RTL program. Individual component bugs and API proposals remain in their own issues and PRs.

## Approach

1. **String translation and locale behavior.** Ship a provider, English fallback catalog, translator hook, locale-aware formatting APIs, community translation pipeline, and enforcement against new hardcoded or ambient-locale behavior.
2. **RTL correctness.** Prefer logical CSS, mirror directional decoration exactly once, make keyboard behavior direction-aware, and continuously audit rendered components.
3. **International input correctness.** Treat IME composition and grapheme clusters as first-class correctness constraints rather than English-input edge cases.

Design context: proposal #3618 · RFC #3641.

## Status

_Last refreshed September 1, 2026._

### Shipped — i18n runtime and string migration

- [x] Provider, English fallback catalog, and `useTranslator` runtime — #3618, #3765
- [x] Full core string migration — #3922, #3941, #4011, #4013
- [x] Table and assistive-technology strings — #4073, #4376, #4387
- [x] Chat strings — #4452
- [x] Consumer documentation — #4016, #4243
- [x] Hardcoded-string lint enforcement — #4010, #4014, #4015
- [x] Live-region `announce()` strings included in enforcement — #4920

### Shipped — provider locale and deterministic formatting

- [x] Provider-backed locale hooks — #5194
- [x] Non-date locale-sensitive consumers migrated to the provider locale — #5195
- [x] Calendar and date-input formatting/parsing follow the provider locale — #5120
- [x] Date helpers default deterministically, use Gregorian semantics unless explicitly overridden, and rerender on provider changes — #5303
- [x] Raw/ambient `Intl` and omitted-locale helper calls are linted — #5171
- [x] Compact Calendar weekday names generated from Unicode CLDR data — #5190
- [x] Localized grouped-number parsing — #5450
- [x] Calendar announcements and TransferList strings localized — #5453, #5457

NOTE: umbrella bug #5074 remains open for bookkeeping, but its reported implementation paths have been addressed by the provider-locale stack above. It should be reconciled and closed after a final issue-level audit.

### Shipped — catalogs and Crowdin

- [x] Deterministic catalog presence/stale-key validation in the repo check suite — #4925
- [x] Crowdin catalogs restored, nightly downloads enabled, and generated translation PRs allowed to run CI — #5185, #5186, #5189
- [x] Translation updates flowing through the automated pipeline — #5405, #5596, #5677
- [x] Calendar CLDR data regenerated when translation locale coverage changes — #5190
- [ ] ICU syntax, runtime-contract, and plural-category validation — #5188

### Shipped — international input correctness

- [x] Grapheme-safe counting, truncation, and capitalization — #4759
- [x] Shared IME composition predicate — #4907
- [x] Editable command-key handlers guarded during IME composition — #4908
- [x] New unguarded IME key handlers rejected by lint — #4909

### Shipped — RTL foundation and auditing

- [x] Direction API (`useDirection`, `getLocaleDirection`, and provider `dir`) — #4269
- [x] Physical-to-logical CSS migration — #4434, #4614
- [x] Shared directional-icon mirroring — #4438
- [x] Calendar, Carousel, SideNav, TreeList, Slider, Chat, Table, ResizeHandle, ProgressBar, Switch, Layer, Dialog, and Pagination RTL migrations — #4472, #4473, #4520, #4549, #4562, #4568, #4682, #4687
- [x] Physical-property lint promoted to an error — #4437, #4615
- [x] PR and weekly rendered RTL auditing — #4517, #5141
- [x] Contextual directional-decoration detection, applicability coverage, and Breadcrumb slash mirroring — #5365
- [x] Carousel single-edge fade direction corrected — #5586

### Active follow-ups

- [ ] #5177 / #5170 — center coarse-pointer Checkbox, Radio, and Switch hit targets in RTL
- [ ] #5141 — resolve current weekly D1 findings and monitor the new D6/applicability coverage
- [ ] #4763 — make PowerSearch filter presentation reorderable and honest across languages
- [ ] #5188 — land ICU catalog contract and plural validation

### Design-stage / deferred

- [ ] #4029 / #4404 — adapter for consumers that already have an i18n runtime
- [ ] #5684 — competing `IntlProvider` proposal; resolve whether a second public API is warranted before implementation proceeds
- [ ] #4030 — server/RSC translation path
- [ ] #5498 — explicit alternative calendar-system support; Gregorian remains the component contract pending demand and value-semantics research

## Current design questions

1. Should external-runtime interop extend `InternationalizationProvider` through the existing `Translator` contract (#4404), or is there a justified reason to introduce and migrate to a separate `IntlProvider` API (#5684)?
2. Is an RSC translation path worth its API and concurrency complexity given the currently small set of components that can remain server-only (#4030)?
3. What is the right grammatical model for consumer-defined PowerSearch fields and values (#4763)?
4. Is there demonstrated demand for non-Gregorian display, entry, and navigation, and what value/serialization semantics would those calendars use (#5498)?

## Related

- #3343 — accessibility and keyboard-management program
- #5074 — provider-locale umbrella bug pending issue reconciliation
- #5141 — automatically maintained weekly RTL findings

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.