Skip to content

Commit da47dff

Browse files
committed
feat: Rename strings
1 parent 71a2a73 commit da47dff

15 files changed

+72
-76
lines changed

app/src/main/java/app/revanced/manager/domain/bundles/PatchBundleSource.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ sealed class PatchBundleSource(initialName: String, val uid: Int, directory: Fil
3434

3535
private val _nameFlow = MutableStateFlow(initialName)
3636
val nameFlow =
37-
_nameFlow.map { it.ifEmpty { app.getString(if (isDefault) R.string.bundle_name_default else R.string.bundle_name_fallback) } }
37+
_nameFlow.map { it.ifEmpty { app.getString(if (isDefault) R.string.patches_name_default else R.string.patches_name_fallback) } }
3838

3939
suspend fun getName() = nameFlow.first()
4040

app/src/main/java/app/revanced/manager/domain/repository/PatchBundleRepository.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ class PatchBundleRepository(
165165
getBundlesByType<RemotePatchBundle>().forEach { it.downloadLatest() }
166166

167167
suspend fun updateCheck() =
168-
uiSafe(app, R.string.source_download_fail, "Failed to update bundles") {
168+
uiSafe(app, R.string.patches_download_fail, "Failed to update bundles") {
169169
coroutineScope {
170170
if (!networkInfo.isSafe()) {
171171
Log.d(tag, "Skipping update check because the network is down or metered.")

app/src/main/java/app/revanced/manager/ui/component/ExceptionViewerDialog.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ fun ExceptionViewerDialog(text: String, onDismiss: () -> Unit) {
3636
Scaffold(
3737
topBar = {
3838
BundleTopBar(
39-
title = stringResource(R.string.bundle_error),
39+
title = stringResource(R.string.patches_error),
4040
onBackClick = onDismiss,
4141
backIcon = {
4242
Icon(

app/src/main/java/app/revanced/manager/ui/component/bundle/BaseBundleDialog.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ fun BaseBundleDialog(
8787

8888
if (remoteUrl != null) {
8989
BundleListItem(
90-
headlineText = stringResource(R.string.bundle_auto_update),
91-
supportingText = stringResource(R.string.bundle_auto_update_description),
90+
headlineText = stringResource(R.string.auto_update),
91+
supportingText = stringResource(R.string.auto_update_description),
9292
trailingContent = {
9393
HapticSwitch(
9494
checked = autoUpdate,
@@ -108,7 +108,7 @@ fun BaseBundleDialog(
108108
if (showUrlInputDialog) {
109109
TextInputDialog(
110110
initial = url,
111-
title = stringResource(R.string.bundle_input_source_url),
111+
title = stringResource(R.string.patches_url),
112112
onDismissRequest = { showUrlInputDialog = false },
113113
onConfirm = {
114114
showUrlInputDialog = false
@@ -129,7 +129,7 @@ fun BaseBundleDialog(
129129
showUrlInputDialog = true
130130
}
131131
),
132-
headlineText = stringResource(R.string.bundle_input_source_url),
132+
headlineText = stringResource(R.string.patches_url),
133133
supportingText = url.ifEmpty {
134134
stringResource(R.string.field_not_set)
135135
}
@@ -139,7 +139,7 @@ fun BaseBundleDialog(
139139
val patchesClickable = patchCount > 0
140140
BundleListItem(
141141
headlineText = stringResource(R.string.patches),
142-
supportingText = stringResource(R.string.bundle_view_patches),
142+
supportingText = stringResource(R.string.patches_view),
143143
modifier = Modifier.clickable(
144144
enabled = patchesClickable,
145145
onClick = onPatchesClick

app/src/main/java/app/revanced/manager/ui/component/bundle/BundleInformationDialog.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ fun BundleInformationDialog(
6868
Scaffold(
6969
topBar = {
7070
BundleTopBar(
71-
title = stringResource(R.string.patch_bundle_field),
71+
title = stringResource(R.string.patches),
7272
onBackClick = onDismissRequest,
7373
backIcon = {
7474
Icon(
@@ -124,8 +124,8 @@ fun BundleInformationDialog(
124124
)
125125

126126
BundleListItem(
127-
headlineText = stringResource(R.string.bundle_error),
128-
supportingText = stringResource(R.string.bundle_error_description),
127+
headlineText = stringResource(R.string.patches_error),
128+
supportingText = stringResource(R.string.patches_error_description),
129129
trailingContent = {
130130
Icon(
131131
Icons.AutoMirrored.Outlined.ArrowRight,
@@ -138,8 +138,8 @@ fun BundleInformationDialog(
138138

139139
if (state is PatchBundleSource.State.Missing && !isLocal) {
140140
BundleListItem(
141-
headlineText = stringResource(R.string.bundle_error),
142-
supportingText = stringResource(R.string.bundle_not_downloaded),
141+
headlineText = stringResource(R.string.patches_error),
142+
supportingText = stringResource(R.string.patches_not_downloaded),
143143
modifier = Modifier.clickable(onClick = onUpdate)
144144
)
145145
}

app/src/main/java/app/revanced/manager/ui/component/bundle/BundleItem.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ fun BundleItem(
8888
Row {
8989
val icon = remember(state) {
9090
when (state) {
91-
is PatchBundleSource.State.Failed -> Icons.Outlined.ErrorOutline to R.string.bundle_error
92-
is PatchBundleSource.State.Missing -> Icons.Outlined.Warning to R.string.bundle_missing
91+
is PatchBundleSource.State.Failed -> Icons.Outlined.ErrorOutline to R.string.patches_error
92+
is PatchBundleSource.State.Missing -> Icons.Outlined.Warning to R.string.patches_missing
9393
is PatchBundleSource.State.Loaded -> null
9494
}
9595
}

app/src/main/java/app/revanced/manager/ui/component/bundle/BundlePatchesDialog.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fun BundlePatchesDialog(
5151
Scaffold(
5252
topBar = {
5353
BundleTopBar(
54-
title = stringResource(R.string.bundle_patches),
54+
title = stringResource(R.string.patches),
5555
onBackClick = onDismissRequest,
5656
backIcon = {
5757
Icon(
@@ -138,10 +138,10 @@ fun PatchItem(
138138
verticalAlignment = Alignment.CenterVertically
139139
) {
140140
PatchInfoChip(
141-
text = "$PACKAGE_ICON ${stringResource(R.string.bundle_view_patches_any_package)}"
141+
text = "$PACKAGE_ICON ${stringResource(R.string.patches_view_any_package)}"
142142
)
143143
PatchInfoChip(
144-
text = "$VERSION_ICON ${stringResource(R.string.bundle_view_patches_any_version)}"
144+
text = "$VERSION_ICON ${stringResource(R.string.patches_view_any_version)}"
145145
)
146146
}
147147
} else {

app/src/main/java/app/revanced/manager/ui/component/bundle/BundleSelector.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ import androidx.compose.runtime.LaunchedEffect
1515
import androidx.compose.runtime.getValue
1616
import androidx.compose.ui.Alignment
1717
import androidx.compose.ui.Modifier
18+
import androidx.compose.ui.res.stringResource
1819
import androidx.compose.ui.unit.dp
20+
import app.revanced.manager.R
1921
import app.revanced.manager.domain.bundles.PatchBundleSource
2022
import app.revanced.manager.domain.bundles.PatchBundleSource.Extensions.nameState
2123

@@ -47,7 +49,7 @@ fun BundleSelector(bundles: List<PatchBundleSource>, onFinish: (PatchBundleSourc
4749
.fillMaxWidth()
4850
) {
4951
Text(
50-
text = "Select bundle",
52+
text = stringResource(R.string.select),
5153
style = MaterialTheme.typography.titleLarge,
5254
color = MaterialTheme.colorScheme.onSurface
5355
)

app/src/main/java/app/revanced/manager/ui/component/bundle/ImportBundleDialog.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ fun ImportPatchBundleDialog(
7777
AlertDialogExtended(
7878
onDismissRequest = onDismiss,
7979
title = {
80-
Text(stringResource(if (currentStep == 0) R.string.select else R.string.add_patch_bundle))
80+
Text(stringResource(if (currentStep == 0) R.string.select else R.string.add_patches))
8181
},
8282
text = {
8383
steps[currentStep]()
@@ -126,7 +126,7 @@ fun SelectBundleTypeStep(
126126
) {
127127
Text(
128128
modifier = Modifier.padding(horizontal = 24.dp),
129-
text = stringResource(R.string.select_bundle_type_dialog_description)
129+
text = stringResource(R.string.select_patches_type_dialog_description)
130130
)
131131
Column {
132132
ListItem(
@@ -136,7 +136,7 @@ fun SelectBundleTypeStep(
136136
),
137137
headlineContent = { Text(stringResource(R.string.enter_url)) },
138138
overlineContent = { Text(stringResource(R.string.recommended)) },
139-
supportingContent = { Text(stringResource(R.string.remote_bundle_description)) },
139+
supportingContent = { Text(stringResource(R.string.remote_patches_description)) },
140140
leadingContent = {
141141
HapticRadioButton(
142142
selected = bundleType == BundleType.Remote,
@@ -152,7 +152,7 @@ fun SelectBundleTypeStep(
152152
onClick = { onBundleTypeSelected(BundleType.Local) }
153153
),
154154
headlineContent = { Text(stringResource(R.string.select_from_storage)) },
155-
supportingContent = { Text(stringResource(R.string.local_bundle_description)) },
155+
supportingContent = { Text(stringResource(R.string.local_patches_description)) },
156156
overlineContent = { },
157157
leadingContent = {
158158
HapticRadioButton(
@@ -185,7 +185,7 @@ fun ImportBundleStep(
185185
) {
186186
ListItem(
187187
headlineContent = {
188-
Text(stringResource(R.string.patch_bundle_field))
188+
Text(stringResource(R.string.patches))
189189
},
190190
supportingContent = { Text(stringResource(if (patchBundle != null) R.string.file_field_set else R.string.file_field_not_set)) },
191191
trailingContent = {
@@ -206,7 +206,7 @@ fun ImportBundleStep(
206206
OutlinedTextField(
207207
value = remoteUrl,
208208
onValueChange = onRemoteUrlChange,
209-
label = { Text(stringResource(R.string.bundle_url)) }
209+
label = { Text(stringResource(R.string.patches_url)) }
210210
)
211211
}
212212
Column(

app/src/main/java/app/revanced/manager/ui/screen/DashboardScreen.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ enum class DashboardPage(
7777
val icon: ImageVector
7878
) {
7979
DASHBOARD(R.string.tab_apps, Icons.Outlined.Apps),
80-
BUNDLES(R.string.tab_bundles, Icons.Outlined.Source),
80+
BUNDLES(R.string.tab_patches, Icons.Outlined.Source),
8181
}
8282

8383
@SuppressLint("BatteryLife")
@@ -91,7 +91,7 @@ fun DashboardScreen(
9191
onDownloaderPluginClick: () -> Unit,
9292
onAppClick: (String) -> Unit
9393
) {
94-
val bundlesSelectable by remember { derivedStateOf { vm.selectedSources.size > 0 } }
94+
val bundlesSelectable by remember { derivedStateOf { vm.selectedSources.isNotEmpty() } }
9595
val availablePatches by vm.availablePatches.collectAsStateWithLifecycle(0)
9696
val showNewDownloaderPluginsNotification by vm.newDownloaderPluginsAvailable.collectAsStateWithLifecycle(
9797
false
@@ -158,7 +158,7 @@ fun DashboardScreen(
158158
topBar = {
159159
if (bundlesSelectable) {
160160
BundleTopBar(
161-
title = stringResource(R.string.bundles_selected, vm.selectedSources.size),
161+
title = stringResource(R.string.patches_selected, vm.selectedSources.size),
162162
onBackClick = vm::cancelSourceSelection,
163163
backIcon = {
164164
Icon(
@@ -224,7 +224,7 @@ fun DashboardScreen(
224224
when (pagerState.currentPage) {
225225
DashboardPage.DASHBOARD.ordinal -> {
226226
if (availablePatches < 1) {
227-
androidContext.toast(androidContext.getString(R.string.patches_unavailable))
227+
androidContext.toast(androidContext.getString(R.string.no_patch_found))
228228
composableScope.launch {
229229
pagerState.animateScrollToPage(
230230
DashboardPage.BUNDLES.ordinal

0 commit comments

Comments
 (0)