Skip to content

Android hardcodes six battery notification strings as Kotlin literals, so they ship English in every locale #867

Closed

Description

@ryanbr

Mirror image of the Apple gap fixed in #866.

android/app/src/main/java/com/noop/notif/BatteryAlertNotifier.kt builds three of its five battery
notifications from raw Kotlin string literals rather than R.string, so they are untranslatable and
ship English in all five shipped locales:

123  .setContentTitle("Strap battery low")
124  .setContentText("$label left on your WHOOP — recharge tonight.")
151  .setContentTitle("Low battery")
152  .setContentText("Recharge your WHOOP before tonight.")
163  .setContentTitle("Strap fully charged")
164  .setContentText("Your WHOOP is at 100%.")

The two escalations #864 added (battery_critical_*, battery_bedtime_*) do it correctly via
context.getString(...), so this is the older code, not a regression from that PR.

All six have Apple counterparts translated into all eight languages — four were already in the
catalog, the other two landed in #866 — so the English wording and the translations already exist
and only need moving into values/strings.xml plus the five locale files.

Suggested shape

Add battery_runtime_title / battery_runtime_body (%1$s), battery_low_title /
battery_low_body, battery_full_title / battery_full_body alongside the existing
battery_critical_* and battery_bedtime_* keys, and swap the six call sites to getString.

Two things to get right:

Nothing compiles Android in CI today (android.yml is disabled_manually), so whoever takes this
should run ./gradlew compileFullDebugKotlin locally and say so.

Activity

  1. ryanbr commented on Jul 27, 2026

    @ryanbr
    OwnerAuthor

    #866 has landed, so the Apple side of this is done and the English wording plus all eight translations now exist to copy from.

    One extra to fold in when the Kotlin strings get extracted: battery_bedtime_body in values-es ends Cárguela antes de acostarse — a feminine clitic with no antecedent in the sentence, where the device is masculine everywhere else (tu WHOOP). #866 changed the Apple side to name the object instead: Carga tu WHOOP antes de acostarte.

  2. added a commit that references this issue on Aug 2, 2026
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