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

View File

@@ -5,7 +5,7 @@ import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import tachiyomi.i18n.MR
import tachiyomi.presentation.core.i18n.localize
import tachiyomi.presentation.core.i18n.stringResource
@Composable
fun UpdatesDeleteConfirmationDialog(
@@ -14,7 +14,7 @@ fun UpdatesDeleteConfirmationDialog(
) {
AlertDialog(
text = {
Text(text = localize(MR.strings.confirm_delete_chapters))
Text(text = stringResource(MR.strings.confirm_delete_chapters))
},
onDismissRequest = onDismissRequest,
confirmButton = {
@@ -22,12 +22,12 @@ fun UpdatesDeleteConfirmationDialog(
onConfirm()
onDismissRequest()
}) {
Text(text = localize(MR.strings.action_ok))
Text(text = stringResource(MR.strings.action_ok))
}
},
dismissButton = {
TextButton(onClick = onDismissRequest) {
Text(text = localize(MR.strings.action_cancel))
Text(text = stringResource(MR.strings.action_cancel))
}
},
)

View File

@@ -34,7 +34,7 @@ import tachiyomi.i18n.MR
import tachiyomi.presentation.core.components.FastScrollLazyColumn
import tachiyomi.presentation.core.components.material.PullRefresh
import tachiyomi.presentation.core.components.material.Scaffold
import tachiyomi.presentation.core.i18n.localize
import tachiyomi.presentation.core.i18n.stringResource
import tachiyomi.presentation.core.screens.EmptyScreen
import tachiyomi.presentation.core.screens.LoadingScreen
import kotlin.time.Duration.Companion.seconds
@@ -140,12 +140,12 @@ private fun UpdatesAppBar(
) {
AppBar(
modifier = modifier,
title = localize(MR.strings.label_recent_updates),
title = stringResource(MR.strings.label_recent_updates),
actions = {
AppBarActions(
persistentListOf(
AppBar.Action(
title = localize(MR.strings.action_update_library),
title = stringResource(MR.strings.action_update_library),
icon = Icons.Outlined.Refresh,
onClick = onUpdateLibrary,
),
@@ -158,12 +158,12 @@ private fun UpdatesAppBar(
AppBarActions(
persistentListOf(
AppBar.Action(
title = localize(MR.strings.action_select_all),
title = stringResource(MR.strings.action_select_all),
icon = Icons.Outlined.SelectAll,
onClick = onSelectAll,
),
AppBar.Action(
title = localize(MR.strings.action_select_inverse),
title = stringResource(MR.strings.action_select_inverse),
icon = Icons.Outlined.FlipToBack,
onClick = onInvertSelection,
),

View File

@@ -44,7 +44,7 @@ import tachiyomi.i18n.MR
import tachiyomi.presentation.core.components.ListGroupHeader
import tachiyomi.presentation.core.components.material.ReadItemAlpha
import tachiyomi.presentation.core.components.material.padding
import tachiyomi.presentation.core.i18n.localize
import tachiyomi.presentation.core.i18n.stringResource
import tachiyomi.presentation.core.util.selectedBackground
internal fun LazyListScope.updatesLastUpdatedItem(
@@ -56,7 +56,7 @@ internal fun LazyListScope.updatesLastUpdatedItem(
.padding(horizontal = MaterialTheme.padding.medium, vertical = MaterialTheme.padding.small),
) {
Text(
text = localize(MR.strings.updates_last_update_info, relativeTimeSpanString(lastUpdated)),
text = stringResource(MR.strings.updates_last_update_info, relativeTimeSpanString(lastUpdated)),
fontStyle = FontStyle.Italic,
)
}
@@ -100,7 +100,7 @@ internal fun LazyListScope.updatesUiItems(
readProgress = updatesItem.update.lastPageRead
.takeIf { !updatesItem.update.read && it > 0L }
?.let {
localize(
stringResource(
MR.strings.chapter_progress,
it + 1,
)
@@ -183,7 +183,7 @@ private fun UpdatesUiItem(
if (!update.read) {
Icon(
imageVector = Icons.Filled.Circle,
contentDescription = localize(MR.strings.unread),
contentDescription = stringResource(MR.strings.unread),
modifier = Modifier
.height(8.dp)
.padding(end = 4.dp),
@@ -193,7 +193,7 @@ private fun UpdatesUiItem(
if (update.bookmark) {
Icon(
imageVector = Icons.Filled.Bookmark,
contentDescription = localize(MR.strings.action_filter_bookmarked),
contentDescription = stringResource(MR.strings.action_filter_bookmarked),
modifier = Modifier
.sizeIn(maxHeight = with(LocalDensity.current) { textHeight.toDp() - 2.dp }),
tint = MaterialTheme.colorScheme.primary,