[Android] Fix 'clear media db' wording and improve dialog text

Nicolas Pomepuy git at videolan.org
Thu Dec 19 13:01:28 CET 2019


vlc-android | branch: master | Nicolas Pomepuy <nicolas.pomepuy at gmail.com> | Thu Dec 19 08:19:28 2019 +0100| [8ceeee5e2f241e011b7eeed8955144fb7cc152fa] | committer: Geoffrey Métais

Fix 'clear media db' wording and improve dialog text

Fixes #1128

> https://code.videolan.org/videolan/vlc-android/commit/8ceeee5e2f241e011b7eeed8955144fb7cc152fa
---

 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 9a5971411..8fbc37d43 100644
--- a/vlc-android/res/values/strings.xml
+++ b/vlc-android/res/values/strings.xml
@@ -443,7 +443,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>
@@ -777,4 +777,5 @@
     <string name="recently_played">Recently played</string>
     <string name="recently_added">Recently added</string>
     <string name="playback_multiple_errors">Multiple media cannot be played</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 1b709b844..c781b7992 100644
--- a/vlc-android/res/xml/preferences_adv.xml
+++ b/vlc-android/res/xml/preferences_adv.xml
@@ -20,7 +20,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 0cd3e7ecc..af7bab6da 100644
--- a/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAdvanced.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAdvanced.kt
@@ -95,7 +95,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) { _, _ -> lifecycleScope.launch(Dispatchers.IO) {
                             AbstractMedialibrary.getInstance().clearDatabase(true)



More information about the Android mailing list