feat(overview): Say how many earbud charges the case still holds

The case percentage alone doesn't answer the question people actually have,
which is whether the case can top the earbuds up again. The card now says so in
words, below the case row.

The reading is treated as the interval it really is: a decile source at 20% on
a 4.0-charge case means 0.8 to 1.2 charges, which is not an answer, so the line
stays neutral instead of flipping colour as the reading bounces between
adjacent frames. Only an interval that lies wholly above or below one full
charge is coloured, which removes the need to remember anything between frames.

The line is stacked rather than inline: the case row already has four children
with only the capsule weighted, so a plural in front of it would collapse the
capsule at large font scales and in locales with long plural forms.
This commit is contained in:
darken
2026-08-25 22:33:42 +02:00
committed by Matthias Urhahn
parent b10b42eede
commit 11d6ddf3fa
6 changed files with 415 additions and 54 deletions
+14
View File
@@ -276,6 +276,20 @@
<string name="battery_unavailable_label">Battery unavailable</string>
<string name="battery_state_low_cd">Battery low</string>
<string name="battery_state_critical_cd">Battery critically low</string>
<!-- Case charges: how often the case can still fully recharge BOTH earbuds. Not charge cycles, and not a statement that anything is charging right now. -->
<plurals name="battery_case_charges_approx">
<item quantity="one">~%d more full charge for both earbuds</item>
<item quantity="other">~%d more full charges for both earbuds</item>
</plurals>
<plurals name="battery_case_charges_at_least">
<item quantity="one">At least %d more full charge for both earbuds</item>
<item quantity="other">At least %d more full charges for both earbuds</item>
</plurals>
<string name="battery_case_charges_less_than_one">Less than one more full charge for both earbuds</string>
<string name="battery_case_charges_empty">Case is empty, no charges left for your earbuds</string>
<string name="battery_case_charges_state_enough_cd">Enough for a full charge</string>
<string name="battery_case_charges_state_not_enough_cd">Not enough for a full charge</string>
<string name="battery_case_charges_state_uncertain_cd">May not be enough for a full charge</string>
<string name="pods_case_status_open_label">Open</string>
<string name="pods_case_status_closed_label">Closed</string>
<string name="pods_connection_state_disconnected_label">Not connected to a device</string>