For#3278 - Updates strings in preferences (#4184)

This commit is contained in:
Jeff Boek 2019-07-19 12:31:55 -07:00 committed by GitHub
parent c74cb61455
commit 5630904f93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 36 additions and 26 deletions

View File

@ -59,6 +59,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- #3865 - Added a new nightly icon and app name
### Changed
- #3278 - Updates strings in preferences
- #2673 - Fixed can't upload files using third party apps from the file manager.
- #1429 - Updated site permissions ui for MVP
- #1599 - Fixed a crash creating a bookmark for a custom tab

View File

@ -37,7 +37,7 @@ class DataChoicesFragment : PreferenceFragmentCompat() {
override fun onResume() {
super.onResume()
(activity as AppCompatActivity).title = getString(R.string.preferences_data_choices)
(activity as AppCompatActivity).title = getString(R.string.preferences_data_collection)
(activity as AppCompatActivity).supportActionBar?.show()
}
@ -53,6 +53,9 @@ class DataChoicesFragment : PreferenceFragmentCompat() {
val telemetryPreference = findPreference<SwitchPreference>(getString(R.string.pref_key_telemetry))?.apply {
isChecked = Settings.getInstance(context).isTelemetryEnabled
val appName = context.getString(R.string.app_name)
summary = context.getString(R.string.preferences_usage_data_description, appName)
}
telemetryPreference?.setOnPreferenceChangeListener { preference, newValue ->
Settings.getInstance(preference.context).preferences.edit().putBoolean(preference.key, newValue as Boolean)

View File

@ -6,6 +6,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.preference.SwitchPreference
android:key="@string/pref_key_telemetry"
android:title="@string/preferences_telemetry"
android:summary="@string/preferences_usage_data_description"
android:title="@string/preference_usage_data"
app:iconSpaceReserved="false" />
</PreferenceScreen>

View File

@ -52,7 +52,7 @@
</androidx.preference.PreferenceCategory>
<androidx.preference.PreferenceCategory
android:title="@string/preferences_category_advanced"
android:title="@string/preferences_category_privacy"
app:iconSpaceReserved="false">
<androidx.preference.Preference
android:icon="@drawable/ic_tracking_protection"
@ -69,7 +69,7 @@
<androidx.preference.Preference
android:icon="@drawable/ic_data_collection"
android:key="@string/pref_key_data_choices"
android:title="@string/preferences_data_choices" />
android:title="@string/preferences_data_collection" />
<androidx.preference.Preference
android:key="@string/pref_key_privacy_link"
android:title="@string/preferences_privacy_link" />

View File

@ -2,35 +2,40 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<androidx.preference.PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.preference.Preference
android:icon="@drawable/ic_internet"
android:key="@string/pref_key_show_site_exceptions"
android:title="@string/preference_exceptions"/>
<androidx.preference.Preference
android:icon="@drawable/ic_camera"
android:key="@string/pref_key_phone_feature_camera"
android:title="@string/preference_phone_feature_camera"
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
<androidx.preference.PreferenceCategory
android:title="@string/permissions_header"
app:iconSpaceReserved="false"
app:allowDividerAbove="false">
<androidx.preference.Preference
android:icon="@drawable/ic_camera"
android:key="@string/pref_key_phone_feature_camera"
android:title="@string/preference_phone_feature_camera"
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
<androidx.preference.Preference
android:icon="@drawable/ic_location"
android:key="@string/pref_key_phone_feature_location"
android:title="@string/preference_phone_feature_location"
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
<androidx.preference.Preference
android:icon="@drawable/ic_location"
android:key="@string/pref_key_phone_feature_location"
android:title="@string/preference_phone_feature_location"
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
<androidx.preference.Preference
android:icon="@drawable/ic_microphone"
android:key="@string/pref_key_phone_feature_microphone"
android:title="@string/preference_phone_feature_microphone"
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
<androidx.preference.Preference
android:icon="@drawable/ic_microphone"
android:key="@string/pref_key_phone_feature_microphone"
android:title="@string/preference_phone_feature_microphone"
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
<androidx.preference.Preference
android:icon="@drawable/ic_notification"
android:key="@string/pref_key_phone_feature_notification"
android:title="@string/preference_phone_feature_notification"
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
<androidx.preference.Preference
android:icon="@drawable/ic_notification"
android:key="@string/pref_key_phone_feature_notification"
android:title="@string/preference_phone_feature_notification"
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
</androidx.preference.PreferenceCategory>
</androidx.preference.PreferenceScreen>