mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 08:20:32 +05:30
added missing translations
This commit is contained in:
parent
bf2ac25567
commit
fc9fbb0db2
@ -113,15 +113,15 @@ class DownloadService : Service() {
|
|||||||
"mux" -> {
|
"mux" -> {
|
||||||
audioDir = File(tempDir, "$videoId-audio")
|
audioDir = File(tempDir, "$videoId-audio")
|
||||||
videoDir = File(tempDir, "$videoId-video")
|
videoDir = File(tempDir, "$videoId-video")
|
||||||
downloadId = downloadManagerRequest("Video", "Downloading", videoUrl, videoDir)
|
downloadId = downloadManagerRequest(getString(R.string.video), getString(R.string.downloading), videoUrl, videoDir)
|
||||||
}
|
}
|
||||||
"video" -> {
|
"video" -> {
|
||||||
videoDir = File(libretubeDir, "$videoId-video")
|
videoDir = File(libretubeDir, "$videoId-video")
|
||||||
downloadId = downloadManagerRequest("Video", "Downloading", videoUrl, videoDir)
|
downloadId = downloadManagerRequest(getString(R.string.video), getString(R.string.downloading), videoUrl, videoDir)
|
||||||
}
|
}
|
||||||
"audio" -> {
|
"audio" -> {
|
||||||
audioDir = File(libretubeDir, "$videoId-audio")
|
audioDir = File(libretubeDir, "$videoId-audio")
|
||||||
downloadId = downloadManagerRequest("Audio", "Downloading", audioUrl, audioDir)
|
downloadId = downloadManagerRequest(getString(R.string.audio), getString(R.string.downloading), audioUrl, audioDir)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e: IllegalArgumentException) {
|
} catch (e: IllegalArgumentException) {
|
||||||
@ -136,7 +136,7 @@ class DownloadService : Service() {
|
|||||||
// Checking if the received broadcast is for our enqueued download by matching download id
|
// Checking if the received broadcast is for our enqueued download by matching download id
|
||||||
if (downloadId == id) {
|
if (downloadId == id) {
|
||||||
if (downloadType == "mux") {
|
if (downloadType == "mux") {
|
||||||
downloadManagerRequest("Audio", "Downloading", audioUrl, audioDir)
|
downloadManagerRequest(getString(R.string.video), getString(R.string.downloading), audioUrl, audioDir)
|
||||||
} else {
|
} else {
|
||||||
downloadSucceededNotification()
|
downloadSucceededNotification()
|
||||||
onDestroy()
|
onDestroy()
|
||||||
@ -178,7 +178,7 @@ class DownloadService : Service() {
|
|||||||
NotificationCompat.Builder(this@DownloadService, "download_service")
|
NotificationCompat.Builder(this@DownloadService, "download_service")
|
||||||
.setSmallIcon(R.drawable.ic_download)
|
.setSmallIcon(R.drawable.ic_download)
|
||||||
.setContentTitle("LibreTube")
|
.setContentTitle("LibreTube")
|
||||||
.setContentText("Downloading")
|
.setContentText(getString(R.string.downloading))
|
||||||
.setPriority(NotificationCompat.PRIORITY_LOW)
|
.setPriority(NotificationCompat.PRIORITY_LOW)
|
||||||
.setOngoing(true)
|
.setOngoing(true)
|
||||||
.setOnlyAlertOnce(true)
|
.setOnlyAlertOnce(true)
|
||||||
@ -192,7 +192,7 @@ class DownloadService : Service() {
|
|||||||
val builder = NotificationCompat.Builder(this@DownloadService, "download_service")
|
val builder = NotificationCompat.Builder(this@DownloadService, "download_service")
|
||||||
.setSmallIcon(R.drawable.ic_download)
|
.setSmallIcon(R.drawable.ic_download)
|
||||||
.setContentTitle(resources.getString(R.string.downloadfailed))
|
.setContentTitle(resources.getString(R.string.downloadfailed))
|
||||||
.setContentText("failure")
|
.setContentText(getString(R.string.fail))
|
||||||
.setPriority(NotificationCompat.PRIORITY_HIGH)
|
.setPriority(NotificationCompat.PRIORITY_HIGH)
|
||||||
with(NotificationManagerCompat.from(this@DownloadService)) {
|
with(NotificationManagerCompat.from(this@DownloadService)) {
|
||||||
// notificationId is a unique int for each notification that you must define
|
// notificationId is a unique int for each notification that you must define
|
||||||
@ -205,7 +205,7 @@ class DownloadService : Service() {
|
|||||||
val builder = NotificationCompat.Builder(this@DownloadService, "download_service")
|
val builder = NotificationCompat.Builder(this@DownloadService, "download_service")
|
||||||
.setSmallIcon(R.drawable.ic_download)
|
.setSmallIcon(R.drawable.ic_download)
|
||||||
.setContentTitle(resources.getString(R.string.success))
|
.setContentTitle(resources.getString(R.string.success))
|
||||||
.setContentText("success")
|
.setContentText(getString(R.string.fail))
|
||||||
.setPriority(NotificationCompat.PRIORITY_HIGH)
|
.setPriority(NotificationCompat.PRIORITY_HIGH)
|
||||||
with(NotificationManagerCompat.from(this@DownloadService)) {
|
with(NotificationManagerCompat.from(this@DownloadService)) {
|
||||||
// notificationId is a unique int for each notification that you must define
|
// notificationId is a unique int for each notification that you must define
|
||||||
|
@ -71,7 +71,7 @@ class DownloadDialog : DialogFragment() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
var vidName = arrayListOf<String>()
|
var vidName = arrayListOf<String>()
|
||||||
vidName.add("No video")
|
vidName.add(getString(R.string.no_video))
|
||||||
var vidUrl = arrayListOf<String>()
|
var vidUrl = arrayListOf<String>()
|
||||||
vidUrl.add("")
|
vidUrl.add("")
|
||||||
for (vid in streams.videoStreams!!) {
|
for (vid in streams.videoStreams!!) {
|
||||||
@ -80,7 +80,7 @@ class DownloadDialog : DialogFragment() {
|
|||||||
vidUrl.add(vid.url!!)
|
vidUrl.add(vid.url!!)
|
||||||
}
|
}
|
||||||
var audioName = arrayListOf<String>()
|
var audioName = arrayListOf<String>()
|
||||||
audioName.add("No audio")
|
audioName.add(getString(R.string.no_audio))
|
||||||
var audioUrl = arrayListOf<String>()
|
var audioUrl = arrayListOf<String>()
|
||||||
audioUrl.add("")
|
audioUrl.add("")
|
||||||
for (audio in streams.audioStreams!!) {
|
for (audio in streams.audioStreams!!) {
|
||||||
|
@ -184,4 +184,9 @@
|
|||||||
<string name="buffering_goal">Preloading</string>
|
<string name="buffering_goal">Preloading</string>
|
||||||
<string name="buffering_goal_summary">Max. amount of seconds of video to buffer.</string>
|
<string name="buffering_goal_summary">Max. amount of seconds of video to buffer.</string>
|
||||||
<string name="playerVideoFormat">Video format for player</string>
|
<string name="playerVideoFormat">Video format for player</string>
|
||||||
|
<string name="no_audio">No audio</string>
|
||||||
|
<string name="no_video">No video</string>
|
||||||
|
<string name="audio">Audio</string>
|
||||||
|
<string name="video">Video</string>
|
||||||
|
<string name="downloading">Downloading</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user