[Android] Make crash description translatable

Nicolas Pomepuy git at videolan.org
Thu Aug 8 13:54:05 CEST 2019


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

Make crash description translatable

(cherry picked from commit ac9626e1d6a036b40223a331245833e4b998b223)

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

 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