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

Commit 6461d16c authored by tom hsu's avatar tom hsu
Browse files

[Regional preferences] Add numbering system page.

 - Add language selection page
 - Add number format page
 - Refactor some part for readability.

Bug: b/247073388
Bug: b/246929960
Test: atest pass

Change-Id: I617698a3146b6e461467a97de8c08f4c4dc6e7f2
parent 2aab7ae0
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -1361,15 +1361,14 @@
    <string-array name="allowlist_hide_summary_in_battery_usage" translatable="false">
    </string-array>

    <!-- A list for all temperature units. [CHAR LIMIT=NONE] -->
    <!-- A list for all temperature units. [DO NOT TRANSLATE] -->
    <string-array name="temperature_units">
        <item>default</item>
        <item>celsius</item>
        <item>fahrenheit</item>
        <item>kelvin</item>
        <item>fahrenhe</item>
    </string-array>

    <!-- A list for all days of a week. [CHAR LIMIT=NONE] -->
    <!-- A list for all days of a week. [DO NOT TRANSLATE] -->
    <string-array name="first_day_of_week">
        <item>default</item>
        <item>sun</item>
@@ -1381,7 +1380,7 @@
        <item>sat</item>
    </string-array>

    <!-- A list for all supported calendar types. [CHAR LIMIT=NONE] -->
    <!-- A list for all supported calendar types. [DO NOT TRANSLATE] -->
    <string-array name="calendar_type">
        <item>default</item>
        <item>chinese</item>
+7 −7
Original line number Diff line number Diff line
@@ -360,9 +360,11 @@
    <!-- The summary of the  menu entry of regional preferences. [CHAR LIMIT=NONE] -->
    <string name="regional_preferences_summary">Set units and number preferences</string>
    <!-- The subtitle of main page of regional preferences. [CHAR LIMIT=NONE] -->
    <string name="regional_preferences_main_page_sub_title">Apps can use your regional preferences to personalize your experience</string>
    <string name="regional_preferences_main_page_sub_title">Let apps know your regional preferences so they can personalize your experience.</string>
    <!-- The subtitle of option's page of regional preferences for Temperature units, Calendar and First day of week. [CHAR LIMIT=NONE] -->
    <string name="regional_preferences_option_page_sub_title">Apps will use your regional preferences where possible.</string>
    <!-- The title of menu entry of Temperature unit preference. [CHAR LIMIT=50] -->
    <string name="temperature_preferences_title">Temperature</string>
    <string name="temperature_preferences_title">Temperature units</string>
    <!-- The title of the  menu entry of Calendar type preference. [CHAR LIMIT=50]  -->
    <string name="calendar_preferences_title">Calendar</string>
    <!-- The title of the  menu entry of First day of week preference. [CHAR LIMIT=50]  -->
@@ -370,13 +372,11 @@
    <!-- The title of the menu entry of Numbers system preference. [CHAR LIMIT=50]  -->
    <string name="numbers_preferences_title">Numbers</string>
    <!-- The summary of default string for each regional preference. [CHAR LIMIT=50] -->
    <string name="default_string_of_regional_preference">[No preference]</string>
    <string name="default_string_of_regional_preference">Use app default</string>
    <!-- The title of Celsius for preference of temperature unit. [CHAR LIMIT=50] -->
    <string name="celsius_temperature_unit">Celsius</string>
    <string name="celsius_temperature_unit">Celsius(\u00B0C)</string>
    <!-- The title of Fahrenheit for preference of temperature unit. [CHAR LIMIT=50] -->
    <string name="fahrenheit_temperature_unit">Fahrenheit</string>
    <!-- The title of Kevin for preference of temperature unit. [CHAR LIMIT=50] -->
    <string name="kevin_temperature_unit">Kevin</string>
    <string name="fahrenheit_temperature_unit">Fahrenheit(\u00B0F)</string>
    <!-- The title of sunday for preference of first day of week. [CHAR LIMIT=50] -->
    <string name="sunday_first_day_of_week">Sunday</string>
    <!-- The title of monday for preference of first day of week. [CHAR LIMIT=50] -->
+4 −0
Original line number Diff line number Diff line
@@ -15,4 +15,8 @@
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">

    <com.android.settingslib.widget.TopIntroPreference
        android:key="key_option_page_sub_title"
        android:title="@string/regional_preferences_option_page_sub_title"
        android:persistent="false" />
</PreferenceScreen>
 No newline at end of file
+24 −4
Original line number Diff line number Diff line
@@ -26,24 +26,44 @@
        android:key="key_temperature_unit"
        android:title="@string/temperature_preferences_title"
        android:summary="@string/default_string_of_regional_preference"
        settings:controller="com.android.settings.regionalpreferences.TemperatureUnitController"/>
        settings:controller="com.android.settings.regionalpreferences.TemperatureUnitController"
        settings:fragment="com.android.settings.regionalpreferences.RegionalPreferencesFragment">
        <extra
            android:name="arg_key_regional_preference"
            android:value="mu" />
    </Preference>

    <Preference
        android:key="key_calendar_type"
        android:title="@string/calendar_preferences_title"
        android:summary="@string/default_string_of_regional_preference"
        settings:controller="com.android.settings.regionalpreferences.CalendarTypeController"/>
        settings:controller="com.android.settings.regionalpreferences.CalendarTypeController"
        settings:fragment="com.android.settings.regionalpreferences.RegionalPreferencesFragment">
        <extra
            android:name="arg_key_regional_preference"
            android:value="ca" />
    </Preference>

    <Preference
        android:key="key_first_day_of_week"
        android:title="@string/first_day_of_week_preferences_title"
        android:summary="@string/default_string_of_regional_preference"
        settings:controller="com.android.settings.regionalpreferences.FirstDayOfWeekController"/>
        settings:controller="com.android.settings.regionalpreferences.FirstDayOfWeekController"
        settings:fragment="com.android.settings.regionalpreferences.RegionalPreferencesFragment">
        <extra
            android:name="arg_key_regional_preference"
            android:value="fw" />
    </Preference>

    <Preference
        android:key="key_numbering_system"
        android:title="@string/numbers_preferences_title"
        android:summary="@string/default_string_of_regional_preference"
        settings:controller="com.android.settings.regionalpreferences.NumberingSystemController"/>
        settings:controller="com.android.settings.regionalpreferences.NumberingSystemController"
        settings:fragment="com.android.settings.regionalpreferences.NumberingPreferencesFragment">
        <extra
            android:name="arg_key_regional_preference"
            android:value="arg_value_language_select" />
    </Preference>

</PreferenceScreen>
+16 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2023 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" />
Loading