← Back to Pull requests

Keep https:// addresses in order in right-to-left sentences on Android #566

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

In Arabic and Persian, the sign-in screen's "Use an https:// address" showed the address as "//:https": its colon and slashes have no direction of their own, so in a right-to-left sentence they took the sentence's and moved to the far side. #551 sets names apart with isolated(), but these addresses were written into the strings, so nothing set them apart.

The two sign-in errors now take the address as a value, %1$s, and the screen puts it in through isolated(), as it does the server's name: "https://" for the plain http error, and the field's example address for an address that can't be read. Every language's translation took the same change, with its address turned into %1$s, so the English and every translation read as before. fieldErrorAddress says which address each error gets.

The managed configuration's description, "an https:// address", is shown by the agency's device management console as it is, so the app can't put a value in. There the Arabic and Persian translations write https:// between \u2068 and \u2069, the isolates isolated() adds, and the English comment asks a right-to-left translation to do the same.

cmd/l10n's import used to write those isolates into strings.xml as raw, invisible characters, which GitHub warns about. It now writes direction marks and isolates as \u escapes, so an import keeps them visible. That is the first commit; its test fails without the change.

BidiTextTest reads the Arabic and Persian strings from the app and shows https:// coming out reversed without the isolates and in order with them, in the https error and in the console's description, and the example address in order in the other error. Another case checks the English reads exactly as it did.

Checked with go test ./... and go run ./cmd/l10n check (0 errors, 0 warnings), and testDebugUnitTest (946 pass) and lintDebug (no new warnings).

Part of #495

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

<!-- coderabbit-ai-generated:v1 -->

Summary by CodeRabbit

  • Bug Fixes

  • - Login address errors now show the relevant example address or required HTTPS prefix. Right-to-left languages display URLs in the correct order, and other server errors retain their existing text.
  • Documentation

  • - Clarified how managed server addresses are displayed in right-to-left languages.

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 302 lines (+226 / -76) across 3 files Reviewer: aaronbrethorst Review duration: 53m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 302 lines diff across 3 files
    0.40
    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.342
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #566"
    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: 40.1% (MEDIUM) · Higher = larger blast radius
    40.1%
    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: 15.8% · Safe to merge
    15.8%