Localize some restore strings

This commit is contained in:
arkon
2020-04-25 15:55:28 -04:00
parent 19507d1837
commit 7c014292d2
3 changed files with 5 additions and 4 deletions

View File

@ -224,7 +224,7 @@ class BackupRestoreService : Service() {
json.get(CATEGORIES)?.let {
backupManager.restoreCategories(it.asJsonArray)
restoreProgress += 1
showRestoreProgress(restoreProgress, restoreAmount, "Categories added")
showRestoreProgress(restoreProgress, restoreAmount, getString(R.string.categories))
}
mangasJson

View File

@ -111,8 +111,8 @@ internal class BackupNotifier(private val context: Context) {
}
fun showRestoreComplete(time: Long, errorCount: Int, path: String?, file: String?) {
val timeString = String.format(
"%02d min, %02d sec",
val timeString = context.getString(
R.string.restore_duration,
TimeUnit.MILLISECONDS.toMinutes(time),
TimeUnit.MILLISECONDS.toSeconds(time) - TimeUnit.MINUTES.toSeconds(
TimeUnit.MILLISECONDS.toMinutes(time)