From 6f9a984541374499cf8592280bfff2aa7d0c1f18 Mon Sep 17 00:00:00 2001 From: Ax333l Date: Fri, 5 Jul 2024 20:31:49 +0200 Subject: [PATCH] fix: improve bundle page strings --- .../manager/ui/component/bundle/BaseBundleDialog.kt | 8 ++++---- app/src/main/res/values/plurals.xml | 4 ++++ app/src/main/res/values/strings.xml | 6 ++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/app/revanced/manager/ui/component/bundle/BaseBundleDialog.kt b/app/src/main/java/app/revanced/manager/ui/component/bundle/BaseBundleDialog.kt index c2e1feca..f2bb3de5 100644 --- a/app/src/main/java/app/revanced/manager/ui/component/bundle/BaseBundleDialog.kt +++ b/app/src/main/java/app/revanced/manager/ui/component/bundle/BaseBundleDialog.kt @@ -19,6 +19,7 @@ import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.res.pluralStringResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import app.revanced.manager.R @@ -115,8 +116,8 @@ fun BaseBundleDialog( if (remoteUrl != null) { BundleListItem( - headlineText = stringResource(R.string.automatically_update), - supportingText = stringResource(R.string.automatically_update_description), + headlineText = stringResource(R.string.bundle_auto_update), + supportingText = stringResource(R.string.bundle_auto_update_description), trailingContent = { Switch( checked = autoUpdate, @@ -163,8 +164,7 @@ fun BaseBundleDialog( val patchesClickable = LocalContext.current.isDebuggable && patchCount > 0 BundleListItem( headlineText = stringResource(R.string.patches), - supportingText = if (patchCount == 0) stringResource(R.string.no_patches) - else stringResource(R.string.patches_available, patchCount), + supportingText = pluralStringResource(R.plurals.bundle_patches_available, patchCount, patchCount), modifier = Modifier.clickable(enabled = patchesClickable, onClick = onPatchesClick) ) { if (patchesClickable) diff --git a/app/src/main/res/values/plurals.xml b/app/src/main/res/values/plurals.xml index d0178073..9bcfcc08 100644 --- a/app/src/main/res/values/plurals.xml +++ b/app/src/main/res/values/plurals.xml @@ -11,4 +11,8 @@ %d selected + + %d patch available + %d patches available + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f1ef966c..68d3dd00 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -182,8 +182,6 @@ Failed to load updated patch bundle: %s Failed to update integrations: %s No patched apps found - No patches available to view - %d Patches available, tap to view Tap on the patches to get more information about them %s selected Unsupported app @@ -300,8 +298,8 @@ Source URL Successfully updated %s No update available for %s - Automatically update - Automatically update this bundle when ReVanced starts + Auto update + Automatically update this bundle when ReVanced starts Bundle type Choose the type of bundle you want About ReVanced Manager