Use our own translation for "OK"
I missed this in the PR that it came with, but I guess it'll be useful if we go multiplatform. (cherry picked from commit f344831d5877d1d0a7772b00f498ddfb6e86da04) # Conflicts: # app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt
This commit is contained in:
parent
51fadb611e
commit
f3d47eaaa3
@ -437,7 +437,7 @@ private fun NsfwWarningDialog(
|
||||
},
|
||||
confirmButton = {
|
||||
TextButton(onClick = onClickConfirm) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
onDismissRequest = onClickConfirm,
|
||||
|
@ -169,7 +169,7 @@ fun FeedAddDialog(
|
||||
onDismissRequest = onDismiss,
|
||||
confirmButton = {
|
||||
TextButton(onClick = { onClickAdd(selected?.let { sources[it] }) }) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
)
|
||||
@ -205,7 +205,7 @@ fun FeedAddSearchDialog(
|
||||
onDismissRequest = onDismiss,
|
||||
confirmButton = {
|
||||
TextButton(onClick = { onClickAdd(source, selected?.let { savedSearches[it] }) }) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
)
|
||||
|
@ -302,7 +302,7 @@ fun SourceCategoriesDialog(
|
||||
onDismissRequest = onDismissRequest,
|
||||
confirmButton = {
|
||||
TextButton(onClick = { onClickCategories(newCategories.toList()) }) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
)
|
||||
|
@ -71,7 +71,7 @@ fun SavedSearchDeleteDialog(
|
||||
onDismissRequest()
|
||||
},
|
||||
) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
title = {
|
||||
@ -122,7 +122,7 @@ fun SavedSearchCreateDialog(
|
||||
}
|
||||
},
|
||||
) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
|
@ -132,7 +132,7 @@ fun CategoryRenameDialog(
|
||||
onDismissRequest()
|
||||
},
|
||||
) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
@ -185,7 +185,7 @@ fun CategoryDeleteDialog(
|
||||
onDelete()
|
||||
onDismissRequest()
|
||||
},) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
@ -255,7 +255,7 @@ fun ChangeCategoryDialog(
|
||||
)
|
||||
},
|
||||
) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -91,7 +91,7 @@ fun HistoryDeleteAllDialog(
|
||||
onDelete()
|
||||
onDismissRequest()
|
||||
},) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
|
@ -53,7 +53,7 @@ fun DeleteLibraryMangaDialog(
|
||||
)
|
||||
},
|
||||
) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
title = {
|
||||
|
@ -17,7 +17,7 @@ fun SyncFavoritesConfirmDialog(
|
||||
onDismissRequest = onDismissRequest,
|
||||
confirmButton = {
|
||||
TextButton(onClick = onAccept) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
|
@ -46,21 +46,21 @@ fun SyncFavoritesProgressDialog(
|
||||
openManga(status.manga)
|
||||
setStatusIdle()
|
||||
},
|
||||
negativeButtonText = context.getString(android.R.string.ok),
|
||||
negativeButtonText = context.getString(R.string.action_ok),
|
||||
negativeButton = setStatusIdle,
|
||||
)
|
||||
is FavoritesSyncStatus.CompleteWithErrors -> value = SyncFavoritesProgressProperties(
|
||||
title = context.getString(R.string.favorites_sync_done_errors),
|
||||
text = context.getString(R.string.favorites_sync_done_errors_message, status.message),
|
||||
canDismiss = false,
|
||||
positiveButtonText = context.getString(android.R.string.ok),
|
||||
positiveButtonText = context.getString(R.string.action_ok),
|
||||
positiveButton = setStatusIdle,
|
||||
)
|
||||
is FavoritesSyncStatus.Error -> value = SyncFavoritesProgressProperties(
|
||||
title = context.getString(R.string.favorites_sync_error),
|
||||
text = context.getString(R.string.favorites_sync_error_string, status.message),
|
||||
canDismiss = false,
|
||||
positiveButtonText = context.getString(android.R.string.ok),
|
||||
positiveButtonText = context.getString(R.string.action_ok),
|
||||
positiveButton = setStatusIdle,
|
||||
)
|
||||
is FavoritesSyncStatus.Idle -> value = null
|
||||
|
@ -29,7 +29,7 @@ fun SyncFavoritesWarningDialog(
|
||||
onDismissRequest = onDismissRequest,
|
||||
confirmButton = {
|
||||
TextButton(onClick = onAccept) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
title = {
|
||||
|
@ -252,7 +252,7 @@ private fun SetAsDefaultDialog(
|
||||
onDismissRequest()
|
||||
},
|
||||
) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
)
|
||||
|
@ -41,7 +41,7 @@ fun DeleteChaptersDialog(
|
||||
onConfirm()
|
||||
},
|
||||
) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
title = {
|
||||
@ -113,7 +113,7 @@ fun SelectScanlatorsDialog(
|
||||
onDismissRequest()
|
||||
},
|
||||
) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
|
@ -92,7 +92,7 @@ class ClearDatabaseScreen : Screen() {
|
||||
}
|
||||
},
|
||||
) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
|
@ -61,7 +61,7 @@ fun ConfigureExhDialog(run: Boolean, onRunning: () -> Unit) {
|
||||
warnDialogOpen = false
|
||||
},
|
||||
) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
title = {
|
||||
@ -110,7 +110,7 @@ fun ConfigureExhDialog(run: Boolean, onRunning: () -> Unit) {
|
||||
onDismissRequest = { configureFailedDialogOpen = null },
|
||||
confirmButton = {
|
||||
TextButton(onClick = { configureFailedDialogOpen = null }) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
title = {
|
||||
|
@ -449,7 +449,7 @@ object SettingsAdvancedScreen : SearchableSettings {
|
||||
uriHandler.openUri("https://shizuku.rikka.app/download")
|
||||
},
|
||||
) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
)
|
||||
@ -533,7 +533,7 @@ object SettingsAdvancedScreen : SearchableSettings {
|
||||
onCleanupDownloads(removeRead, removeNonFavorite)
|
||||
},
|
||||
) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
@ -777,7 +777,7 @@ object SettingsAdvancedScreen : SearchableSettings {
|
||||
securityPreferences.encryptDatabase().set(true)
|
||||
},
|
||||
) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
)
|
||||
|
@ -200,7 +200,7 @@ object SettingsBackupScreen : SearchableSettings {
|
||||
onConfirm(flag)
|
||||
},
|
||||
) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
)
|
||||
@ -253,7 +253,7 @@ object SettingsBackupScreen : SearchableSettings {
|
||||
},
|
||||
confirmButton = {
|
||||
TextButton(onClick = onDismissRequest) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
)
|
||||
|
@ -304,7 +304,7 @@ object SettingsEhScreen : SearchableSettings {
|
||||
onClick = { onValueChange(value.toIntOrNull() ?: return@TextButton) },
|
||||
enabled = isValid,
|
||||
) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
@ -589,7 +589,7 @@ object SettingsEhScreen : SearchableSettings {
|
||||
},
|
||||
confirmButton = {
|
||||
TextButton(onClick = { onValueChange(state.toPreference()) }) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
@ -755,7 +755,7 @@ object SettingsEhScreen : SearchableSettings {
|
||||
},
|
||||
confirmButton = {
|
||||
TextButton(onClick = { onValueChange(state.toPreference()) }) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
@ -885,7 +885,7 @@ object SettingsEhScreen : SearchableSettings {
|
||||
},
|
||||
confirmButton = {
|
||||
TextButton(onClick = onStartReset) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
@ -1033,7 +1033,7 @@ object SettingsEhScreen : SearchableSettings {
|
||||
},
|
||||
confirmButton = {
|
||||
TextButton(onClick = onDismissRequest) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
)
|
||||
|
@ -394,7 +394,7 @@ object SettingsLibraryScreen : SearchableSettings {
|
||||
},
|
||||
confirmButton = {
|
||||
TextButton(onClick = { onValueChanged(leadValue, followValue) }) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
)
|
||||
|
@ -204,7 +204,7 @@ object SettingsMangadexScreen : SearchableSettings {
|
||||
},
|
||||
confirmButton = {
|
||||
TextButton(onClick = { onSelectionConfirmed(items.filterIndexed { index, _ -> selection[index] }) }) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
|
@ -269,7 +269,7 @@ object SettingsSecurityScreen : SearchableSettings {
|
||||
)
|
||||
},
|
||||
) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
@ -344,7 +344,7 @@ object SettingsSecurityScreen : SearchableSettings {
|
||||
onReturnPassword(password)
|
||||
},
|
||||
) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
|
@ -83,7 +83,7 @@ fun EditTextPreferenceWidget(
|
||||
}
|
||||
},
|
||||
) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
|
@ -96,7 +96,7 @@ fun MultiSelectListPreferenceWidget(
|
||||
isDialogShown = false
|
||||
},
|
||||
) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
|
@ -137,7 +137,7 @@ fun <T> TriStateListDialog(
|
||||
onValueChanged(included, excluded)
|
||||
},
|
||||
) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
)
|
||||
|
@ -174,7 +174,7 @@ fun TrackDateSelector(
|
||||
Text(text = stringResource(android.R.string.cancel))
|
||||
}
|
||||
TextButton(onClick = { onConfirm(pickerState.selectedDateMillis!!) }) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -212,7 +212,7 @@ private fun BaseSelector(
|
||||
Text(text = stringResource(android.R.string.cancel))
|
||||
}
|
||||
TextButton(onClick = onConfirm) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -22,7 +22,7 @@ fun UpdatesDeleteConfirmationDialog(
|
||||
onConfirm()
|
||||
onDismissRequest()
|
||||
},) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
|
@ -49,7 +49,7 @@ fun IgneousDialog(
|
||||
onDismissRequest()
|
||||
},
|
||||
) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
|
@ -237,7 +237,7 @@ private fun ChipGroup.setChips(items: List<String>, scope: CoroutineScope) {
|
||||
.setTextInput {
|
||||
newTag = it.trimOrNull()
|
||||
}
|
||||
.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
.setPositiveButton(R.string.action_ok) { _, _ ->
|
||||
if (newTag != null) setChips(items + listOfNotNull(newTag), scope)
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
|
@ -87,7 +87,7 @@ class EditMergedSettingsState(
|
||||
MaterialAlertDialogBuilder(context)
|
||||
.setTitle(R.string.delete_merged_entry)
|
||||
.setMessage(R.string.delete_merged_entry_desc)
|
||||
.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
.setPositiveButton(R.string.action_ok) { _, _ ->
|
||||
onDeleteClick(mergeMangaReference)
|
||||
onDismissRequest()
|
||||
}
|
||||
@ -99,7 +99,7 @@ class EditMergedSettingsState(
|
||||
MaterialAlertDialogBuilder(context)
|
||||
.setTitle(R.string.chapter_updates_merged_entry)
|
||||
.setMessage(R.string.chapter_updates_merged_entry_desc)
|
||||
.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
.setPositiveButton(R.string.action_ok) { _, _ ->
|
||||
toggleChapterUpdates(position)
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
@ -127,7 +127,7 @@ class EditMergedSettingsState(
|
||||
MaterialAlertDialogBuilder(context)
|
||||
.setTitle(R.string.download_merged_entry)
|
||||
.setMessage(R.string.download_merged_entry_desc)
|
||||
.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
.setPositiveButton(R.string.action_ok) { _, _ ->
|
||||
toggleChapterDownloads(position)
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
|
@ -832,7 +832,7 @@ class ReaderActivity : BaseActivity() {
|
||||
MaterialAlertDialogBuilder(this)
|
||||
.setTitle(R.string.eh_autoscroll_help)
|
||||
.setMessage(R.string.eh_autoscroll_help_message)
|
||||
.setPositiveButton(android.R.string.ok, null)
|
||||
.setPositiveButton(R.string.action_ok, null)
|
||||
.show()
|
||||
}
|
||||
|
||||
@ -882,7 +882,7 @@ class ReaderActivity : BaseActivity() {
|
||||
MaterialAlertDialogBuilder(this)
|
||||
.setTitle(R.string.eh_retry_all_help)
|
||||
.setMessage(R.string.eh_retry_all_help_message)
|
||||
.setPositiveButton(android.R.string.ok, null)
|
||||
.setPositiveButton(R.string.action_ok, null)
|
||||
.show()
|
||||
}
|
||||
|
||||
@ -914,7 +914,7 @@ class ReaderActivity : BaseActivity() {
|
||||
MaterialAlertDialogBuilder(this)
|
||||
.setTitle(R.string.eh_boost_page_help)
|
||||
.setMessage(R.string.eh_boost_page_help_message)
|
||||
.setPositiveButton(android.R.string.ok, null)
|
||||
.setPositiveButton(R.string.action_ok, null)
|
||||
.show()
|
||||
}
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ private fun SetCoverDialog(
|
||||
},
|
||||
confirmButton = {
|
||||
TextButton(onClick = onConfirm) {
|
||||
Text(stringResource(android.R.string.ok))
|
||||
Text(stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
|
@ -136,7 +136,7 @@ fun PagePreviewPageDialog(
|
||||
onPageSelected(page.roundToInt())
|
||||
onDismissPageDialog()
|
||||
},) {
|
||||
Text(stringResource(android.R.string.ok))
|
||||
Text(stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
|
@ -157,7 +157,7 @@ class BatchAddScreen : Screen() {
|
||||
onDismissRequest = onDismissRequest,
|
||||
confirmButton = {
|
||||
TextButton(onClick = onDismissRequest) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(R.string.action_ok))
|
||||
}
|
||||
},
|
||||
title = {
|
||||
|
@ -122,7 +122,7 @@ class InterceptActivity : BaseActivity() {
|
||||
MaterialAlertDialogBuilder(this)
|
||||
.setTitle(R.string.chapter_error)
|
||||
.setMessage(getString(R.string.could_not_open_entry, it.reason))
|
||||
.setPositiveButton(android.R.string.ok, null)
|
||||
.setPositiveButton(R.string.action_ok, null)
|
||||
.setOnCancelListener { onBackPressed() }
|
||||
.setOnDismissListener { onBackPressed() }
|
||||
.show()
|
||||
|
Loading…
x
Reference in New Issue
Block a user