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:
@@ -24,7 +24,7 @@ import eu.kanade.tachiyomi.ui.browse.source.sourcesTab
|
||||
import eu.kanade.tachiyomi.ui.main.MainActivity
|
||||
import kotlinx.collections.immutable.persistentListOf
|
||||
import tachiyomi.i18n.MR
|
||||
import tachiyomi.presentation.core.i18n.localize
|
||||
import tachiyomi.presentation.core.i18n.stringResource
|
||||
|
||||
data class BrowseTab(
|
||||
private val toExtensions: Boolean = false,
|
||||
@@ -37,7 +37,7 @@ data class BrowseTab(
|
||||
val image = AnimatedImageVector.animatedVectorResource(R.drawable.anim_browse_enter)
|
||||
return TabOptions(
|
||||
index = 3u,
|
||||
title = localize(MR.strings.browse),
|
||||
title = stringResource(MR.strings.browse),
|
||||
icon = rememberAnimatedVectorPainter(image, isSelected),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import cafe.adriel.voyager.navigator.currentOrThrow
|
||||
import eu.kanade.presentation.browse.ExtensionFilterScreen
|
||||
import eu.kanade.presentation.util.Screen
|
||||
import kotlinx.coroutines.flow.collectLatest
|
||||
import tachiyomi.core.i18n.localize
|
||||
import tachiyomi.core.i18n.stringResource
|
||||
import tachiyomi.i18n.MR
|
||||
import tachiyomi.presentation.core.screens.LoadingScreen
|
||||
|
||||
@@ -41,7 +41,7 @@ class ExtensionFilterScreen : Screen() {
|
||||
screenModel.events.collectLatest {
|
||||
when (it) {
|
||||
ExtensionFilterEvent.FailedFetchingLanguages -> {
|
||||
context.localize(MR.strings.internal_error)
|
||||
context.stringResource(MR.strings.internal_error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import eu.kanade.tachiyomi.extension.model.Extension
|
||||
import eu.kanade.tachiyomi.ui.browse.extension.details.ExtensionDetailsScreen
|
||||
import kotlinx.collections.immutable.persistentListOf
|
||||
import tachiyomi.i18n.MR
|
||||
import tachiyomi.presentation.core.i18n.localize
|
||||
import tachiyomi.presentation.core.i18n.stringResource
|
||||
|
||||
@Composable
|
||||
fun extensionsTab(
|
||||
@@ -29,7 +29,7 @@ fun extensionsTab(
|
||||
searchEnabled = true,
|
||||
actions = persistentListOf(
|
||||
AppBar.Action(
|
||||
title = localize(MR.strings.action_filter),
|
||||
title = stringResource(MR.strings.action_filter),
|
||||
icon = Icons.Outlined.Translate,
|
||||
onClick = { navigator.push(ExtensionFilterScreen()) },
|
||||
),
|
||||
|
||||
@@ -49,7 +49,7 @@ import tachiyomi.domain.track.interactor.GetTracks
|
||||
import tachiyomi.domain.track.interactor.InsertTrack
|
||||
import tachiyomi.i18n.MR
|
||||
import tachiyomi.presentation.core.components.LabeledCheckbox
|
||||
import tachiyomi.presentation.core.i18n.localize
|
||||
import tachiyomi.presentation.core.i18n.stringResource
|
||||
import tachiyomi.presentation.core.screens.LoadingScreen
|
||||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
@@ -79,7 +79,7 @@ internal fun MigrateDialog(
|
||||
AlertDialog(
|
||||
onDismissRequest = onDismissRequest,
|
||||
title = {
|
||||
Text(text = localize(MR.strings.migration_dialog_what_to_include))
|
||||
Text(text = stringResource(MR.strings.migration_dialog_what_to_include))
|
||||
},
|
||||
text = {
|
||||
Column(
|
||||
@@ -87,7 +87,7 @@ internal fun MigrateDialog(
|
||||
) {
|
||||
flags.forEachIndexed { index, flag ->
|
||||
LabeledCheckbox(
|
||||
label = localize(flag.titleId),
|
||||
label = stringResource(flag.titleId),
|
||||
checked = selectedFlags[index],
|
||||
onCheckedChange = { selectedFlags[index] = it },
|
||||
)
|
||||
@@ -104,7 +104,7 @@ internal fun MigrateDialog(
|
||||
onClickTitle()
|
||||
},
|
||||
) {
|
||||
Text(text = localize(MR.strings.action_show_manga))
|
||||
Text(text = stringResource(MR.strings.action_show_manga))
|
||||
}
|
||||
|
||||
Spacer(modifier = Modifier.weight(1f))
|
||||
@@ -122,7 +122,7 @@ internal fun MigrateDialog(
|
||||
}
|
||||
},
|
||||
) {
|
||||
Text(text = localize(MR.strings.copy))
|
||||
Text(text = stringResource(MR.strings.copy))
|
||||
}
|
||||
TextButton(
|
||||
onClick = {
|
||||
@@ -138,7 +138,7 @@ internal fun MigrateDialog(
|
||||
}
|
||||
},
|
||||
) {
|
||||
Text(text = localize(MR.strings.migrate))
|
||||
Text(text = stringResource(MR.strings.migrate))
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
+2
-2
@@ -33,7 +33,7 @@ import tachiyomi.domain.manga.model.Manga
|
||||
import tachiyomi.i18n.MR
|
||||
import tachiyomi.presentation.core.components.material.ExtendedFloatingActionButton
|
||||
import tachiyomi.presentation.core.components.material.Scaffold
|
||||
import tachiyomi.presentation.core.i18n.localize
|
||||
import tachiyomi.presentation.core.i18n.stringResource
|
||||
import tachiyomi.source.local.LocalSource
|
||||
|
||||
data class SourceSearchScreen(
|
||||
@@ -66,7 +66,7 @@ data class SourceSearchScreen(
|
||||
floatingActionButton = {
|
||||
AnimatedVisibility(visible = state.filters.isNotEmpty()) {
|
||||
ExtendedFloatingActionButton(
|
||||
text = { Text(text = localize(MR.strings.action_filter)) },
|
||||
text = { Text(text = stringResource(MR.strings.action_filter)) },
|
||||
icon = { Icon(Icons.Outlined.FilterList, contentDescription = null) },
|
||||
onClick = screenModel::openFilterSheet,
|
||||
)
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@ import eu.kanade.presentation.components.TabContent
|
||||
import eu.kanade.tachiyomi.ui.browse.migration.manga.MigrateMangaScreen
|
||||
import kotlinx.collections.immutable.persistentListOf
|
||||
import tachiyomi.i18n.MR
|
||||
import tachiyomi.presentation.core.i18n.localize
|
||||
import tachiyomi.presentation.core.i18n.stringResource
|
||||
|
||||
@Composable
|
||||
fun Screen.migrateSourceTab(): TabContent {
|
||||
@@ -29,7 +29,7 @@ fun Screen.migrateSourceTab(): TabContent {
|
||||
titleRes = MR.strings.label_migration,
|
||||
actions = persistentListOf(
|
||||
AppBar.Action(
|
||||
title = localize(MR.strings.migration_help_guide),
|
||||
title = stringResource(MR.strings.migration_help_guide),
|
||||
icon = Icons.AutoMirrored.Outlined.HelpOutline,
|
||||
onClick = {
|
||||
uriHandler.openUri("https://tachiyomi.org/docs/guides/source-migration")
|
||||
|
||||
@@ -21,7 +21,7 @@ import kotlinx.collections.immutable.persistentListOf
|
||||
import kotlinx.coroutines.flow.collectLatest
|
||||
import kotlinx.coroutines.launch
|
||||
import tachiyomi.i18n.MR
|
||||
import tachiyomi.presentation.core.i18n.localize
|
||||
import tachiyomi.presentation.core.i18n.stringResource
|
||||
|
||||
@Composable
|
||||
fun Screen.sourcesTab(): TabContent {
|
||||
@@ -33,12 +33,12 @@ fun Screen.sourcesTab(): TabContent {
|
||||
titleRes = MR.strings.label_sources,
|
||||
actions = persistentListOf(
|
||||
AppBar.Action(
|
||||
title = localize(MR.strings.action_global_search),
|
||||
title = stringResource(MR.strings.action_global_search),
|
||||
icon = Icons.Outlined.TravelExplore,
|
||||
onClick = { navigator.push(GlobalSearchScreen()) },
|
||||
),
|
||||
AppBar.Action(
|
||||
title = localize(MR.strings.action_filter),
|
||||
title = stringResource(MR.strings.action_filter),
|
||||
icon = Icons.Outlined.FilterList,
|
||||
onClick = { navigator.push(SourcesFilterScreen()) },
|
||||
),
|
||||
@@ -70,7 +70,7 @@ fun Screen.sourcesTab(): TabContent {
|
||||
)
|
||||
}
|
||||
|
||||
val internalErrString = localize(MR.strings.internal_error)
|
||||
val internalErrString = stringResource(MR.strings.internal_error)
|
||||
LaunchedEffect(Unit) {
|
||||
screenModel.events.collectLatest { event ->
|
||||
when (event) {
|
||||
|
||||
@@ -59,7 +59,7 @@ import tachiyomi.domain.source.model.StubSource
|
||||
import tachiyomi.i18n.MR
|
||||
import tachiyomi.presentation.core.components.material.Scaffold
|
||||
import tachiyomi.presentation.core.components.material.padding
|
||||
import tachiyomi.presentation.core.i18n.localize
|
||||
import tachiyomi.presentation.core.i18n.stringResource
|
||||
import tachiyomi.source.local.LocalSource
|
||||
|
||||
data class BrowseSourceScreen(
|
||||
@@ -150,7 +150,7 @@ data class BrowseSourceScreen(
|
||||
)
|
||||
},
|
||||
label = {
|
||||
Text(text = localize(MR.strings.popular))
|
||||
Text(text = stringResource(MR.strings.popular))
|
||||
},
|
||||
)
|
||||
if ((screenModel.source as CatalogueSource).supportsLatest) {
|
||||
@@ -169,7 +169,7 @@ data class BrowseSourceScreen(
|
||||
)
|
||||
},
|
||||
label = {
|
||||
Text(text = localize(MR.strings.latest))
|
||||
Text(text = stringResource(MR.strings.latest))
|
||||
},
|
||||
)
|
||||
}
|
||||
@@ -186,7 +186,7 @@ data class BrowseSourceScreen(
|
||||
)
|
||||
},
|
||||
label = {
|
||||
Text(text = localize(MR.strings.action_filter))
|
||||
Text(text = stringResource(MR.strings.action_filter))
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ import tachiyomi.presentation.core.components.SortItem
|
||||
import tachiyomi.presentation.core.components.TextItem
|
||||
import tachiyomi.presentation.core.components.TriStateItem
|
||||
import tachiyomi.presentation.core.components.material.Button
|
||||
import tachiyomi.presentation.core.i18n.localize
|
||||
import tachiyomi.presentation.core.i18n.stringResource
|
||||
|
||||
@Composable
|
||||
fun SourceFilterDialog(
|
||||
@@ -52,7 +52,7 @@ fun SourceFilterDialog(
|
||||
) {
|
||||
TextButton(onClick = onReset) {
|
||||
Text(
|
||||
text = localize(MR.strings.action_reset),
|
||||
text = stringResource(MR.strings.action_reset),
|
||||
style = LocalTextStyle.current.copy(
|
||||
color = MaterialTheme.colorScheme.primary,
|
||||
),
|
||||
@@ -65,7 +65,7 @@ fun SourceFilterDialog(
|
||||
onFilter()
|
||||
onDismissRequest()
|
||||
}) {
|
||||
Text(localize(MR.strings.action_filter))
|
||||
Text(stringResource(MR.strings.action_filter))
|
||||
}
|
||||
}
|
||||
HorizontalDivider()
|
||||
|
||||
Reference in New Issue
Block a user