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

Commit 58244b1b authored by tom hsu's avatar tom hsu
Browse files

[Panlingual] Implement entries of Panlingual in settings UI part.

 - Path 1 : System -> Language & Input -> App Languages -> per app
 language
 - path 2 : System -> Apps -> App Info -> per app language
 Video: https://screencast.googleplex.com/cast/NjUyNTUzMDY0MTc5MzAyNHxjNTg2MzMwYS0yOA

Bug: 206854105
Test: local test pass
Test: atest pass

Change-Id: Ic06fa4f0c6ec68680eb828032b6e3f479b412dc4
parent f731c74f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -111,6 +111,7 @@
    <uses-permission android:name="android.permission.LAUNCH_MULTI_PANE_SETTINGS_DEEP_LINK" />
    <uses-permission android:name="android.permission.ALLOW_PLACE_IN_MULTI_PANE_SETTINGS" />
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
    <uses-permission android:name="android.permission.READ_APP_SPECIFIC_LOCALES" />

    <application
            android:name=".SettingsApplication"
+30 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 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.
-->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:gravity="center_horizontal" >
    <TextView
        android:id="@id/description"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="15dip"
        android:layout_marginRight="6dip"
        android:layout_marginTop="6dip"
        android:textAlignment="center"/>

</LinearLayout>
 No newline at end of file
+24 −1
Original line number Diff line number Diff line
@@ -461,7 +461,7 @@
    <string name="next_label">Next</string>
    <!-- LocalePicker -->
    <!-- Title for the locale picker activity -->
    <!-- Title for the locale picker activity. [CHAR LIMIT=30]-->
    <string name="language_picker_title">Languages</string>
    <!-- Menu item in the locale menu. Will remove the selected locales. [CHAR LIMIT=30] -->
@@ -470,6 +470,29 @@
    <!-- "Button" that opens a language picker. The selected language gets added to the language list. [CHAR LIMIT=30] -->
    <string name="add_a_language">Add a language</string>
    <!-- Title of preference for the locale picker activity. [CHAR LIMIT=30]-->
    <string name="app_locale_preference_title">Language</string>
    <!-- Title for the locale picker category. [CHAR LIMIT=50]-->
    <string name="locale_picker_category_title">Preferred Language</string>
    <!-- Title for the Apps' locale menu entry [CHAR LIMIT=50]-->
    <string name="app_locales_picker_menu_title">App Languages</string>
    <!-- Summary for the app's locale picker activity. [CHAR LIMIT=50]-->
    <string name="app_locale_picker_summary">Set the language for each app</string>
    <!-- Title for the App's locale picker activity. [CHAR LIMIT=50]-->
    <string name="app_locale_picker_title">App Language</string>
    <!-- Category for the suggested app's locales. [CHAR LIMIT=50]-->
    <string name="suggested_app_locales_title">Suggested languages</string>
    <!-- Category for the app's locale picker activity. [CHAR LIMIT=50]-->
    <string name="all_supported_app_locales_title">All languages</string>
    <!-- Description for the app without any supported languages. [CHAR LIMIT=NONE]-->
    <string name="no_multiple_language_supported">The app is set to <xliff:g id="default_language" example="English (United States)">%1$s</xliff:g> by default and doesn\u2019t support multiple languages.</string>
    <!-- The title of the confirmation dialog shown when the user selects one / several languages and tries to remove them [CHAR LIMIT=60] -->
    <plurals name="dlg_remove_locales_title">
        <item quantity="one">Remove selected language?</item>
+6 −0
Original line number Diff line number Diff line
@@ -88,6 +88,12 @@
        android:title="@string/power_usage_summary_title"
        android:summary="@string/summary_placeholder" />

    <Preference
        android:key="app_language_setting"
        android:title="@string/app_locale_preference_title"
        android:summary="@string/summary_placeholder"
        settings:controller="com.android.settings.applications.appinfo.AppLocalePreferenceController" />

    <Preference
        android:key="preferred_settings"
        android:title="@string/launch_by_default"
+37 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 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"
    xmlns:settings="http://schemas.android.com/apk/res-auto"
    android:title="@string/app_locale_picker_title">
    <com.android.settingslib.widget.LayoutPreference
        android:key="app_locale_description"
        android:layout="@layout/app_locale_details_description"
        android:selectable="false"
        android:visibility="gone"
        settings:allowDividerBelow="true"
        settings:searchable="false"/>

    <PreferenceCategory
        android:key="category_key_suggested_languages"
        android:title="@string/suggested_app_locales_title" />

    <PreferenceCategory
        android:key="category_key_all_languages"
        android:title="@string/all_supported_app_locales_title" />

</PreferenceScreen>
Loading