[Android] Make crash description translatable

Nicolas Pomepuy git at videolan.org
Wed Aug 7 14:09:01 CEST 2019


vlc-android | branch: master | Nicolas Pomepuy <nicolas.pomepuy at gmail.com> | Wed Aug  7 11:30:53 2019 +0200| [ac9626e1d6a036b40223a331245833e4b998b223] | committer: Geoffrey Métais

Make crash description translatable

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

 vlc-android/res/values/strings.xml                        | 1 +
 vlc-android/src/org/videolan/vlc/gui/SendCrashActivity.kt | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/vlc-android/res/values/strings.xml b/vlc-android/res/values/strings.xml
index 5cada9cf2..e3e638b34 100644
--- a/vlc-android/res/values/strings.xml
+++ b/vlc-android/res/values/strings.xml
@@ -736,4 +736,5 @@
     <string name="send_crash_action_title">What do you want to do?</string>
     <string name="report_a_bug">Report a bug</string>
     <string name="report_a_crash">Report a crash</string>
+    <string name="describe_crash">Please describe how this crash happened</string>
 </resources>
diff --git a/vlc-android/src/org/videolan/vlc/gui/SendCrashActivity.kt b/vlc-android/src/org/videolan/vlc/gui/SendCrashActivity.kt
index 60687b3ae..46fd35c55 100644
--- a/vlc-android/src/org/videolan/vlc/gui/SendCrashActivity.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/SendCrashActivity.kt
@@ -115,7 +115,8 @@ class SendCrashActivity : AppCompatActivity(), DebugLogService.Client.Callback {
             emailIntent.putExtra(Intent.EXTRA_STREAM, logcatUri)
             emailIntent.type = "application/zip"
 
-            val body = "<p>Here are my crash logs for VLC</strong></p><p style=3D\"color:#16171A;\"> [Please enter any useful information here]</p><p>$appData</p>"
+            val describeCrash = getString(R.string.describe_crash)
+            val body = "<p>Here are my crash logs for VLC</strong></p><p style=3D\"color:#16171A;\"> [$describeCrash]</p><p>$appData</p>"
             val htmlBody = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) Html.fromHtml(body, HtmlCompat.FROM_HTML_MODE_LEGACY) else Html.fromHtml(body)
 
             emailIntent.putExtra(Intent.EXTRA_EMAIL, arrayOf("vlc.crashreport+androidcrash at gmail.com"))



More information about the Android mailing list