Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d34d96c7 authored by Mill Chen's avatar Mill Chen
Browse files

Update the battery string

Considering the tight character restriction in the Battery page, we
updated the following battery descriptions:

Less than 15 min remaining -> Less than 15 min left
More than 2 days remaining -> More than 2 day left

Bug: 143475287
Test: manual and robotest
Change-Id: I2092bdca61585010b9a6e343e647ab33ceabcdda
parent e9d2790c
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1080,14 +1080,14 @@
    <string name="power_suggestion_battery_run_out">Battery may run out by <xliff:g id="time" example="12 PM">%1$s</xliff:g></string>

    <!-- [CHAR_LIMIT=60] label for estimated remaining duration of battery when under a certain amount -->
    <string name="power_remaining_less_than_duration_only">Less than <xliff:g id="threshold">%1$s</xliff:g> remaining</string>
    <string name="power_remaining_less_than_duration_only">Less than <xliff:g id="threshold">%1$s</xliff:g> left</string>
    <!-- [CHAR_LIMIT=60] label for estimated remaining duration of battery when under a certain amount with the percentage -->
    <string name="power_remaining_less_than_duration">Less than <xliff:g id="threshold">%1$s</xliff:g> remaining (<xliff:g id="level">%2$s</xliff:g>)</string>
    <string name="power_remaining_less_than_duration">Less than <xliff:g id="threshold">%1$s</xliff:g> left (<xliff:g id="level">%2$s</xliff:g>)</string>

    <!-- Used to let users know that they have more than some amount of battery life remaining with percentage. ex: 75% - more than 1 day remaining [CHAR LIMIT = 80] -->
    <string name="power_remaining_more_than_subtext">More than <xliff:g id="time_remaining">%1$s</xliff:g> remaining (<xliff:g id="level">%2$s</xliff:g>)</string>
    <string name="power_remaining_more_than_subtext">More than <xliff:g id="time_remaining">%1$s</xliff:g> left (<xliff:g id="level">%2$s</xliff:g>)</string>
    <!-- Used to let users know that they have more than some amount of battery life remaining. ex: more than 1 day remaining [CHAR LIMIT = 40] -->
    <string name="power_remaining_only_more_than_subtext">More than <xliff:g id="time_remaining">%1$s</xliff:g> remaining</string>
    <string name="power_remaining_only_more_than_subtext">More than <xliff:g id="time_remaining">%1$s</xliff:g> left</string>

    <!-- [CHAR_LIMIT=50] Short label for imminent shutdown warning of device -->
    <string name="power_remaining_duration_only_shutdown_imminent" product="default">Phone may shut down soon</string>
+5 −5
Original line number Diff line number Diff line
@@ -137,9 +137,9 @@ public class PowerUtilTest {
                true /* basedOnUsage */);

        // shortened string should not have percentage
        assertThat(info).isEqualTo("Less than 15 min remaining");
        assertThat(info).isEqualTo("Less than 15 min left");
        // Add percentage to string when provided
        assertThat(info2).isEqualTo("Less than 15 min remaining (10%)");
        assertThat(info2).isEqualTo("Less than 15 min left (10%)");
    }

    @Test
@@ -171,9 +171,9 @@ public class PowerUtilTest {
                true /* basedOnUsage */);

        // shortened string should not have percentage
        assertThat(info).isEqualTo("More than 2 days remaining");
        assertThat(info).isEqualTo("More than 2 days left");
        // Add percentage to string when provided
        assertThat(info2).isEqualTo("More than 2 days remaining (10%)");
        assertThat(info2).isEqualTo("More than 2 days left (10%)");
    }

    @Test
@@ -181,7 +181,7 @@ public class PowerUtilTest {
        String info = PowerUtil.getBatteryTipStringFormatted(mContext,
                THREE_DAYS_MILLIS);

        assertThat(info).isEqualTo("More than 3 days remaining");
        assertThat(info).isEqualTo("More than 3 days left");
    }

    @Test