← Back to Pull requests

Keep https:// and .local in order in right-to-left sentences on iOS #567

Closed
unknown closed this pull request without merging on Nov 22, 2026 19:30 UTC
View on GitHub
unknown unknown commented on Nov 22, 2026 18:50 UTC
Author

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

Diff: 184 lines (+138 / -46) across 2 files Reviewer: aaronbrethorst Review duration: 40m
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
0.36
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 35.7% (MEDIUM) · Higher = larger blast radius
35.7%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 14.1% · Safe to merge
14.1%