[Android] Fix 'clear media db' wording and improve dialog text
Nicolas Pomepuy
git at videolan.org
Thu Dec 19 14:54:53 CET 2019
vlc-android | branch: 3.2.x | Nicolas Pomepuy <nicolas.pomepuy at gmail.com> | Thu Dec 19 08:19:28 2019 +0100| [7b684102d8085ad87c2c0683164756fa04b7ed69] | committer: Geoffrey Métais
Fix 'clear media db' wording and improve dialog text
Fixes #1128
(cherry picked from commit 8ceeee5e2f241e011b7eeed8955144fb7cc152fa)
> https://code.videolan.org/videolan/vlc-android/commit/7b684102d8085ad87c2c0683164756fa04b7ed69
---
vlc-android/res/values/strings.xml | 3 ++-
vlc-android/res/xml/preferences_adv.xml | 2 +-
.../src/org/videolan/vlc/gui/preferences/PreferencesAdvanced.kt | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/vlc-android/res/values/strings.xml b/vlc-android/res/values/strings.xml
index e7206408f..5112e12a3 100644
--- a/vlc-android/res/values/strings.xml
+++ b/vlc-android/res/values/strings.xml
@@ -439,7 +439,7 @@
<string name="dump_media_db">Dump media database</string>
<string name="dump_media_db_summary">Copy database to internal storage root</string>
<string name="clear_media_db">Clear media database</string>
- <string name="clear_media_db_summary">Access Android VLC info to clear data</string>
+ <string name="clear_media_database_summary">Clears the database to start over</string>
<string name="clear_history">Clear history</string>
<string name="media_db_cleared">Media database cleared!</string>
<string name="set_locale">Set locale</string>
@@ -742,4 +742,5 @@
<string name="video_group_size_summary">Group by %s first letters</string>
<string name="video_group_size">Group videos by name</string>
<string name="url_copied_to_clipboard">Url copied to clipboard</string>
+ <string name="clear_media_db_warning">You will lose your progresses and the playlists you created.\n%s</string>
</resources>
diff --git a/vlc-android/res/xml/preferences_adv.xml b/vlc-android/res/xml/preferences_adv.xml
index 4b03c48d2..719e57987 100644
--- a/vlc-android/res/xml/preferences_adv.xml
+++ b/vlc-android/res/xml/preferences_adv.xml
@@ -27,7 +27,7 @@
<Preference
android:enabled="true"
android:key="clear_media_db"
- android:summary="@string/clear_media_db_summary"
+ android:summary="@string/clear_media_database_summary"
android:title="@string/clear_media_db"/>
<PreferenceScreen
diff --git a/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAdvanced.kt b/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAdvanced.kt
index 85609f63e..4c1517969 100644
--- a/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAdvanced.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAdvanced.kt
@@ -92,7 +92,7 @@ class PreferencesAdvanced : BasePreferenceFragment(), SharedPreferences.OnShared
"clear_media_db" -> {
AlertDialog.Builder(requireContext())
.setTitle(R.string.clear_media_db)
- .setMessage(R.string.validation)
+ .setMessage(getString(R.string.clear_media_db_warning, getString(R.string.validation)))
.setIcon(android.R.drawable.ic_dialog_alert)
.setPositiveButton(R.string.yes) { _, _ -> launch(Dispatchers.IO) {
AbstractMedialibrary.getInstance().clearDatabase(true)
More information about the Android
mailing list