Skip to content
Snippets Groups Projects
Commit e9d485ee authored by Nicolas Pomepuy's avatar Nicolas Pomepuy Committed by Duncan McNamara
Browse files

Add the needed info the the remote access about screen

parent 0d9c8eff
No related branches found
No related tags found
1 merge request!1939Add the needed info the the remote access about screen
Pipeline #488113 passed with stage
in 7 minutes and 1 second
......@@ -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>
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment