Replace remaining Android-specific strings

Also renaming the helper composables so it's a bit easier to find/replace everything
in forks.
This commit is contained in:
arkon
2023-11-18 19:41:33 -05:00
parent 46e734fc8e
commit 0d1bced122
165 changed files with 1179 additions and 1167 deletions
@@ -15,7 +15,7 @@ import eu.kanade.tachiyomi.util.storage.cacheImageDir
import eu.kanade.tachiyomi.util.storage.getUriCompat
import logcat.LogPriority
import okio.IOException
import tachiyomi.core.i18n.localize
import tachiyomi.core.i18n.stringResource
import tachiyomi.core.util.system.ImageUtil
import tachiyomi.core.util.system.logcat
import tachiyomi.i18n.MR
@@ -71,7 +71,7 @@ class ImageSaver(
val imageLocation = (image.location as Location.Pictures).relativePath
val relativePath = listOf(
Environment.DIRECTORY_PICTURES,
context.localize(MR.strings.app_name),
context.stringResource(MR.strings.app_name),
imageLocation,
).joinToString(File.separator)
@@ -86,7 +86,7 @@ class ImageSaver(
context.contentResolver.insert(
pictureDir,
contentValues,
) ?: throw IOException(context.localize(MR.strings.error_saving_picture))
) ?: throw IOException(context.stringResource(MR.strings.error_saving_picture))
}
try {
@@ -97,7 +97,7 @@ class ImageSaver(
}
} catch (e: Exception) {
logcat(LogPriority.ERROR, e)
throw IOException(context.localize(MR.strings.error_saving_picture))
throw IOException(context.stringResource(MR.strings.error_saving_picture))
}
DiskUtil.scanMedia(context, picture)
@@ -185,7 +185,7 @@ sealed interface Location {
is Pictures -> {
val file = File(
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES),
context.localize(MR.strings.app_name),
context.stringResource(MR.strings.app_name),
)
if (relativePath.isNotEmpty()) {
return File(