Keep https:// and .local in order in right-to-left sentences on iOS #567
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 184 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.312
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #567"
general
weight: 0.35
aaronbrethorst
In Arabic and Persian, sign-in's "Use https://. Plain http:// is allowed only for localhost, 127.0.0.1 or a .local host." showed https:// as "//:https" and .local as "local.". Colons, slashes and dots have no direction of their own, so in a right-to-left sentence they take the sentence's and move to the far side. String(localized:) sets apart each value it puts into a sentence, which is what keeps names in order since #562, but these addresses were written into the string itself.
https://, http:// and .local are now values, so String(localized:) isolates each one. localhost and 127.0.0.1 already read in order and stay as text. The English reads exactly as before. The new string takes each language's translation of the old one, with the three addresses turned into values, and went in through cmd/l10n import -draft, so every translation stays machine_translated. The old string is gone from the catalog.
BidiTextTests lays the Arabic line out with Core Text. As main had it, the slashes land before "https" and .local's dot after "local"; the line the app builds now keeps both in order. Another test checks the English word for word. useHTTPS(in:) takes a bundle so the test can read the Arabic line; useHTTPS calls it with the app's own.
The Android side is #566.
Checked with go run ./cmd/l10n check (0 errors, 0 warnings, every language 300 of 300 on iOS), ./sync-string-catalogs.sh --check and the app's tests on the iOS 27 simulator (595 pass).
Part of #495