[Android] Add the needed info the the remote access about screen

Nicolas Pomepuy git at videolan.org
Thu Jul 4 13:29:02 UTC 2024


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Jul  3 14:11:18 2024 +0200| [e9d485ee2fc0559ab30656c3b2935bac5fb78851] | committer: Duncan McNamara

Add the needed info the the remote access about screen

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

 application/resources/src/main/res/values/strings.xml     |  3 +++
 .../java/org/videolan/vlc/webserver/TranslationMapping.kt | 15 +++++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/application/resources/src/main/res/values/strings.xml b/application/resources/src/main/res/values/strings.xml
index d399c33dec..83b8bbd403 100644
--- a/application/resources/src/main/res/values/strings.xml
+++ b/application/resources/src/main/res/values/strings.xml
@@ -1265,4 +1265,7 @@
     <string name="metered_connection_warning">Your connection is metered. Fees may apply.</string>
     <string name="adding">Adding</string>
     <string name="to">to</string>
+    <string name="device">Device</string>
+    <string name="connected_device">Connected device</string>
+    <string name="model">Device model</string>
 </resources>
diff --git a/application/webserver/src/main/java/org/videolan/vlc/webserver/TranslationMapping.kt b/application/webserver/src/main/java/org/videolan/vlc/webserver/TranslationMapping.kt
index 339a6ee7f3..309840b4e3 100644
--- a/application/webserver/src/main/java/org/videolan/vlc/webserver/TranslationMapping.kt
+++ b/application/webserver/src/main/java/org/videolan/vlc/webserver/TranslationMapping.kt
@@ -25,8 +25,10 @@
 package org.videolan.vlc.webserver
 
 import android.content.Context
+import android.os.Build
 import androidx.annotation.StringRes
 import org.json.JSONObject
+import org.videolan.vlc.BuildConfig
 
 object TranslationMapping {
     fun generateTranslations(context: Context): String {
@@ -34,6 +36,9 @@ object TranslationMapping {
         StringMapping.values().forEach {
             map[it.name] = context.getString(it.id).replace("%s", "{msg}")
         }
+        map["PORT"] = "android"
+        map["DEVICE_NAME"] = "${Build.MANUFACTURER} - ${Build.MODEL}"
+        map["APP_VERSION"] = BuildConfig.VLC_VERSION_NAME
         return JSONObject(map.toMap()).toString()
     }
 
@@ -110,5 +115,15 @@ object TranslationMapping {
         NEW_PLAYLIST(R.string.create_new_playlist),
         CREATE(R.string.create),
         ADD(R.string.add),
+        ABOUT(R.string.about),
+        CONNECTED_DEVICE(R.string.connected_device),
+        DEVICE_MODEL(R.string.model),
+        VLC_VERSION(R.string.app_name_full),
+        REMOTE_ACCESS_TITLE(R.string.remote_access),
+        REMOTE_ACCESS_HASH_TITLE(R.string.remote_access_hash_title),
+        REMOTE_ACCESS_VERSION_TITLE(R.string.remote_access_version_title),
+        REMOTE_ACCESS_VERSION(R.string.remote_access_version),
+        REMOTE_ACCESS_HASH(R.string.build_remote_access_revision),
+        LIBRARIES(R.string.libraries),
     }
 }
\ No newline at end of file



More information about the Android mailing list