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
@@ -27,7 +27,7 @@ import tachiyomi.domain.history.model.HistoryWithRelations
import tachiyomi.i18n.MR
import tachiyomi.presentation.core.components.FastScrollLazyColumn
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 uy.kohesive.injekt.Injekt
@@ -47,14 +47,14 @@ fun HistoryScreen(
Scaffold(
topBar = { scrollBehavior ->
SearchToolbar(
titleContent = { AppBarTitle(localize(MR.strings.history)) },
titleContent = { AppBarTitle(stringResource(MR.strings.history)) },
searchQuery = state.searchQuery,
onChangeSearchQuery = onSearchQueryChange,
actions = {
AppBarActions(
persistentListOf(
AppBar.Action(
title = localize(MR.strings.pref_clear_history),
title = stringResource(MR.strings.pref_clear_history),
icon = Icons.Outlined.DeleteSweep,
onClick = {
onDialogChange(HistoryScreenModel.Dialog.DeleteAll)
@@ -15,7 +15,7 @@ import androidx.compose.ui.unit.dp
import eu.kanade.presentation.theme.TachiyomiTheme
import tachiyomi.i18n.MR
import tachiyomi.presentation.core.components.LabeledCheckbox
import tachiyomi.presentation.core.i18n.localize
import tachiyomi.presentation.core.i18n.stringResource
@Composable
fun HistoryDeleteDialog(
@@ -26,16 +26,16 @@ fun HistoryDeleteDialog(
AlertDialog(
title = {
Text(text = localize(MR.strings.action_remove))
Text(text = stringResource(MR.strings.action_remove))
},
text = {
Column(
verticalArrangement = Arrangement.spacedBy(8.dp),
) {
Text(text = localize(MR.strings.dialog_with_checkbox_remove_description))
Text(text = stringResource(MR.strings.dialog_with_checkbox_remove_description))
LabeledCheckbox(
label = localize(MR.strings.dialog_with_checkbox_reset),
label = stringResource(MR.strings.dialog_with_checkbox_reset),
checked = removeEverything,
onCheckedChange = { removeEverything = it },
)
@@ -47,12 +47,12 @@ fun HistoryDeleteDialog(
onDelete(removeEverything)
onDismissRequest()
}) {
Text(text = localize(MR.strings.action_remove))
Text(text = stringResource(MR.strings.action_remove))
}
},
dismissButton = {
TextButton(onClick = onDismissRequest) {
Text(text = localize(MR.strings.action_cancel))
Text(text = stringResource(MR.strings.action_cancel))
}
},
)
@@ -65,10 +65,10 @@ fun HistoryDeleteAllDialog(
) {
AlertDialog(
title = {
Text(text = localize(MR.strings.action_remove_everything))
Text(text = stringResource(MR.strings.action_remove_everything))
},
text = {
Text(text = localize(MR.strings.clear_history_confirmation))
Text(text = stringResource(MR.strings.clear_history_confirmation))
},
onDismissRequest = onDismissRequest,
confirmButton = {
@@ -76,12 +76,12 @@ fun HistoryDeleteAllDialog(
onDelete()
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))
}
},
)
@@ -29,7 +29,7 @@ import eu.kanade.tachiyomi.util.lang.toTimestampString
import tachiyomi.domain.history.model.HistoryWithRelations
import tachiyomi.i18n.MR
import tachiyomi.presentation.core.components.material.padding
import tachiyomi.presentation.core.i18n.localize
import tachiyomi.presentation.core.i18n.stringResource
private val HistoryItemHeight = 96.dp
@@ -69,7 +69,7 @@ fun HistoryItem(
val readAt = remember { history.readAt?.toTimestampString() ?: "" }
Text(
text = if (history.chapterNumber > -1) {
localize(
stringResource(
MR.strings.recent_manga_time,
formatChapterNumber(history.chapterNumber),
readAt,
@@ -85,7 +85,7 @@ fun HistoryItem(
IconButton(onClick = onClickDelete) {
Icon(
imageVector = Icons.Outlined.Delete,
contentDescription = localize(MR.strings.action_delete),
contentDescription = stringResource(MR.strings.action_delete),
tint = MaterialTheme.colorScheme.onSurface,
)
}