From 235289e3c318f97c2dc45a20d869ff60c4905b0e Mon Sep 17 00:00:00 2001 From: gedoor Date: Wed, 15 Jul 2020 18:11:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=A6=BB=E7=BA=BF=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/service/DownloadService.kt | 6 +++--- app/src/main/res/values-zh-rCN/strings.xml | 2 ++ app/src/main/res/values-zh-rHK/strings.xml | 2 ++ app/src/main/res/values-zh-rTW/strings.xml | 2 ++ app/src/main/res/values-zh/strings.xml | 5 +++++ app/src/main/res/values/strings.xml | 2 ++ 6 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 app/src/main/res/values-zh/strings.xml diff --git a/app/src/main/java/io/legado/app/service/DownloadService.kt b/app/src/main/java/io/legado/app/service/DownloadService.kt index 71cd0311d..20416a677 100644 --- a/app/src/main/java/io/legado/app/service/DownloadService.kt +++ b/app/src/main/java/io/legado/app/service/DownloadService.kt @@ -43,7 +43,7 @@ class DownloadService : BaseService() { @Volatile private var downloadingCount = 0 - private var notificationContent = "正在启动下载" + private var notificationContent = getString(R.string.starting_download) private val notificationBuilder by lazy { val builder = NotificationCompat.Builder(this, AppConst.channelIdDownload) @@ -126,7 +126,7 @@ class DownloadService : BaseService() { private fun addDownloadData(bookUrl: String?, start: Int, end: Int) { bookUrl ?: return if (downloadMap.containsKey(bookUrl)) { - toast("该书已在下载列表") + toast(R.string.already_in_download) return } downloadCount[bookUrl] = DownloadCount() @@ -256,7 +256,7 @@ class DownloadService : BaseService() { content: String ) { notificationContent = - "进度:${downloadCount.downloadFinishedCount}/$totalCount,成功:${downloadCount.successCount},$content" + "进度:" + downloadCount.downloadFinishedCount + "/" + totalCount + ",成功:" + downloadCount.successCount + "," + content } /** diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index fd7b7d7e2..b9037d58f 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -707,4 +707,6 @@ 选择旧版备份文件夹 已启用 已禁用 + 正在启动下载 + 该书已在下载列表 diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml index 6a125cd87..0ab1eb27f 100644 --- a/app/src/main/res/values-zh-rHK/strings.xml +++ b/app/src/main/res/values-zh-rHK/strings.xml @@ -707,4 +707,6 @@ 已啓用 已禁用 文字底部對齊 + 正在启动下载 + 该书已在下载列表 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 22cae7f0a..b8a3f1365 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -707,5 +707,7 @@ 已啓用 已禁用 文字底部對齊 + 正在启动下载 + 该书已在下载列表 diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml new file mode 100644 index 000000000..a1b3f9f27 --- /dev/null +++ b/app/src/main/res/values-zh/strings.xml @@ -0,0 +1,5 @@ + + + 正在启动下载 + 该书已在下载列表 + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a78c83a5d..45a10b7c1 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -707,4 +707,6 @@ Select legacy backup folder Enabled Disabled + 正在启动下载 + 该书已在下载列表 \ No newline at end of file