Skip to content

Android: uiString(...) + "hardcoded suffix" — partial localization via engineered prefix (86 sites / 28 files) #557

Open

Description

@digitalerdude

Found while fixing #540 (the i18n audit's blindness to conditionally-hidden literals). This is a different, separate bug: a resource string engineered to end mid-sentence, concatenated with a hardcoded English literal tail.

The pattern

Text(
    uiString(R.string.l10n_add_device_wizard_noop_will_install_its_own_key_d3f6321e) +
        "longer control this ring. This is intended and it cannot be undone from NOOP.",
    ...
)

strings.xml confirms this is deliberate, not accidental — the resource itself is truncated mid-sentence with a trailing space:

<string name="l10n_add_device_wizard_noop_will_install_its_own_key_d3f6321e">NOOP will install its own key on the ring. If you ever want to go back to the official Oura app, or the ring stops responding, factory-reset it and it will no </string>

The resource-backed prefix is properly localized. Only the hardcoded suffix ("longer control this ring..." above) is not — it ships in English regardless of device language.

Scale

grep -rn 'uiString(R\.string\.[a-zA-Z0-9_]*)\s*+\s*$' android/app/src/main/java/com/noop/ui/ finds 86 occurrences across 28 files. AddDeviceWizard.kt alone has several (lines 619, 751, 795, 833, 1164, and more) — the device-pairing wizard's instructional copy is the heaviest user of this pattern, but it's spread across most of the Compose UI layer, not concentrated in one screen.

Why this is its own issue rather than folded into #540

#540's scanner fix deliberately does not flag +-concatenated literals (a literal whose nearest preceding token is + is skipped by design) — closing that class of bug needs real new translation content for each suffix, in German/Spanish/French, at a scale (86 sites) that doesn't fit "reuse an already-translated value" the way most of #540's backlog does. Rushing that risks exactly the "unreviewed machine output" problem raised in #543.

Suggested approach

For each site: either (a) extend the resource string to cover the full sentence and drop the hardcoded suffix, or (b) split the suffix into its own resource key. Either way it needs an actual DE/ES/FR translation for the suffix content, not just a mechanical wrap — a native-speaker pass (or a native contributor working through it a few files at a time) is the realistic path here, not a single bulk PR.

Activity

  1. evoveotech commented on Sep 10, 2026

    @evoveotech

    Verified fixed: 0 remaining uiString(...) + "<English tail" concatenations in Android sources (grep confirms). All hardcoded English suffixes have been replaced with proper localized strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions