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

Commit 59b7bd2a authored by Beverly's avatar Beverly Committed by Beverly Tai
Browse files

Separate time string into two unique strings

In certain languages, "Until Tue, 9AM" and "Unil 3pm" are formatted
differently, so separate them into two unique strings for better translation.

Test: manual
Fixes: 165796742
Change-Id: Ib7c44714191acca427bcee0a4d88e1cb50a90afc
parent 67af626d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1326,7 +1326,8 @@ public class ZenModeConfig implements Parcelable {
            line2 = res.getString(R.string.zen_mode_until, formattedTime);
        } else {
            // display as day/time
            summary = line1 = line2 = res.getString(R.string.zen_mode_until, formattedTime);
            summary = line1 = line2 = res.getString(R.string.zen_mode_until_next_day,
                    formattedTime);
        }
        final Uri id = toCountdownConditionId(time, false);
        return new Condition(id, summary, line1, line2, 0, Condition.STATE_TRUE,
+3 −0
Original line number Diff line number Diff line
@@ -4888,6 +4888,9 @@
        <item quantity="other">For %d hr</item>
    </plurals>

    <!-- Zen mode condition - line two: ending time indicating the next day. [CHAR LIMIT=NONE] -->
    <string name="zen_mode_until_next_day">Until <xliff:g id="formattedTime" example="Tue, 10 PM">%1$s</xliff:g></string>

    <!-- Zen mode condition - line two: ending time. [CHAR LIMIT=NONE] -->
    <string name="zen_mode_until">Until <xliff:g id="formattedTime" example="10:00 PM">%1$s</xliff:g></string>

+1 −0
Original line number Diff line number Diff line
@@ -2393,6 +2393,7 @@
  <java-symbol type="plurals" name="zen_mode_duration_hours_short" />
  <java-symbol type="plurals" name="zen_mode_duration_minutes_summary_short" />
  <java-symbol type="plurals" name="zen_mode_duration_hours_summary_short" />
  <java-symbol type="string" name="zen_mode_until_next_day" />
  <java-symbol type="string" name="zen_mode_until" />
  <java-symbol type="string" name="zen_mode_feature_name" />
  <java-symbol type="string" name="zen_mode_downtime_feature_name" />