Conversation
andrew-polk
commented
Jul 27, 2026
Contributor
Author
|
Consulted Devin on 2026-07-27 21:39 UTC up to commit It found no bugs. It raised one item to investigate and three informational observations.
CI ( Claude Opus 5 (1M context) |
…-to-right BL-16593 isRTLScript now returns boolean | undefined, where undefined means the reading direction is genuinely unknown, and consumers omit isRtl rather than storing a fabricated false. Intl.Locale answers either ltr or rtl for every code it accepts, so placeholder script codes previously got a confident left-to-right answer: Zxxx (unwritten, 165 languages in our data, mostly sign languages), Zyyy (undetermined, 358), Zzzz (uncoded, 28), the Qaaa-Qabx private use range, and well formed but unregistered codes. Those now report undefined, so a consumer storing a writing system's direction can leave an existing setting alone instead of overwriting it with a guess. Consumers that want a hard boolean can use `script.isRtl ?? false`, which behaves as before, as does `if (script.isRtl)`. Script variant relationships are derived from ISO 15924's own names so a variant inherits its parent's direction (Aran to Arab, Syre/Syrj/Syrn to Syrc, Cyrs to Cyrl, Latf/Latg to Latn, Hans/Hant to Hani). This fixes Western Neo-Aramaic (amw-Syrj), which reported left-to-right even though Syriac is right-to-left, and pins Sidetic (Sidt), which CLDR marks right-to-left but which ICU builds predating Unicode 16 report as left-to-right. Verified against CLDR release-48-2 scriptMetadata.txt, whose RTL column is derived from the Unicode Bidi_Class property: no mismatches across all 179 script codes CLDR gives an explicit verdict for. A regression test pins Todhri (Todr) as left-to-right, since an earlier draft wrongly forced it right-to-left. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Consulted Devin on 2026-07-27 21:55 UTC up to commit No bugs. One item to investigate and four informational observations.
No other review bots are configured on this repo. Claude Opus 5 (1M context) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
isRTLScriptnow returnsboolean | undefined, whereundefinedmeans "we genuinely do not know this script's reading direction". Consumers omitisRtlentirely rather than storing a fabricatedfalse.Why
Intl.Localeanswers eitherltrorrtlfor every code it accepts — it has no way to say "no idea". So placeholder script codes were getting a confident left-to-right answer:ZyyyZxxxZzzzQaaa–QabxXyzw)A sign language has no reading direction at all, so
isRtl: falsewas an assertion we had not earned. Withundefined, a consumer storing a writing system's direction can leave an existing setting (or the user's own choice) alone instead of overwriting it with a guess. Anyone wanting a hard boolean writesscript.isRtl ?? false, which behaves exactly as before.Also fixed
Script variant relationships are now derived from ISO 15924's own names (
Aranis "Arabic (Nastaliq variant)",Syrjis "Syriac (Western variant)"), so a variant inherits its parent's direction:amw-Syrj) reported left-to-right despite Syriac being right-to-left. This is the one genuinely searchable bug fixed here.xsd-Sidt) is pinned right-to-left. CLDR marks it RTL, but ICU builds predating Unicode 16 report it left-to-right. The langtags API 1.4 data merged into this branch makes Sidetic searchable, so this now matters in the UI.Derivation resolves:
Aran→Arab,Syre/Syrj/Syrn→Syrc,Cyrs→Cyrl,Latf/Latg→Latn,Hans/Hant→Hani.Behavior across the whole dataset
484 language-script pairs report RTL, 8075 LTR, 554 unknown.
Reviewer notes
release-48-2scriptMetadata.txt(RTL column, derived from UnicodeBidi_Class): 0 mismatches across all 179 script codes CLDR has an explicit verdict for.Todr(Todhri) as left-to-right — an earlier draft of this work wrongly forced it RTL, which would have misrendered Albanian.isRtlwas already declaredisRtl?: boolean, soundefinedwas always representable; this is not a new shape.This change is
Devin review