Skip to content

Commit 8dd6e73

Browse files
committed
feat: Rename strings
1 parent 7ca003a commit 8dd6e73

16 files changed

+79
-86
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/bundles/RemotePatchBundle.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ sealed class RemotePatchBundle(name: String, id: Int, directory: File, val endpo
5050
suspend fun setAutoUpdate(value: Boolean) = configRepository.setAutoUpdate(uid, value)
5151

5252
companion object {
53-
const val updateFailMsg = "Failed to update patch bundle(s)"
53+
const val updateFailMsg = "Failed to update patches"
5454
}
5555
}
5656

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
@@ -30,7 +30,7 @@ fun ExceptionViewerDialog(text: String, onDismiss: () -> Unit) {
3030
Scaffold(
3131
topBar = {
3232
BundleTopBar(
33-
title = stringResource(R.string.bundle_error),
33+
title = stringResource(R.string.patches_error),
3434
onBackClick = onDismiss,
3535
backIcon = {
3636
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
@@ -63,7 +63,7 @@ fun BundleInformationDialog(
6363
Scaffold(
6464
topBar = {
6565
BundleTopBar(
66-
title = stringResource(R.string.patch_bundle_field),
66+
title = stringResource(R.string.patches),
6767
onBackClick = onDismissRequest,
6868
backIcon = {
6969
Icon(
@@ -119,8 +119,8 @@ fun BundleInformationDialog(
119119
)
120120

121121
BundleListItem(
122-
headlineText = stringResource(R.string.bundle_error),
123-
supportingText = stringResource(R.string.bundle_error_description),
122+
headlineText = stringResource(R.string.patches_error),
123+
supportingText = stringResource(R.string.patches_error_description),
124124
trailingContent = {
125125
Icon(
126126
Icons.AutoMirrored.Outlined.ArrowRight,
@@ -133,8 +133,8 @@ fun BundleInformationDialog(
133133

134134
if (state is PatchBundleSource.State.Missing && !isLocal) {
135135
BundleListItem(
136-
headlineText = stringResource(R.string.bundle_error),
137-
supportingText = stringResource(R.string.bundle_not_downloaded),
136+
headlineText = stringResource(R.string.patches_error),
137+
supportingText = stringResource(R.string.patches_not_downloaded),
138138
modifier = Modifier.clickable(onClick = onUpdate)
139139
)
140140
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ fun BundleItem(
6868
onDelete()
6969
viewBundleDialogPage = false
7070
},
71-
title = stringResource(R.string.bundle_delete_single_dialog_title),
72-
description = stringResource(R.string.bundle_delete_single_dialog_description, name),
71+
title = stringResource(R.string.delete),
72+
description = stringResource(R.string.patches_delete_single_dialog_description, name),
7373
icon = Icons.Outlined.Delete
7474
)
7575
}
@@ -101,8 +101,8 @@ fun BundleItem(
101101
Row {
102102
val icon = remember(state) {
103103
when (state) {
104-
is PatchBundleSource.State.Failed -> Icons.Outlined.ErrorOutline to R.string.bundle_error
105-
is PatchBundleSource.State.Missing -> Icons.Outlined.Warning to R.string.bundle_missing
104+
is PatchBundleSource.State.Failed -> Icons.Outlined.ErrorOutline to R.string.patches_error
105+
is PatchBundleSource.State.Missing -> Icons.Outlined.Warning to R.string.patches_missing
106106
is PatchBundleSource.State.Loaded -> null
107107
}
108108
}

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
@@ -46,7 +46,7 @@ fun BundlePatchesDialog(
4646
Scaffold(
4747
topBar = {
4848
BundleTopBar(
49-
title = stringResource(R.string.bundle_patches),
49+
title = stringResource(R.string.patches),
5050
onBackClick = onDismissRequest,
5151
backIcon = {
5252
Icon(
@@ -133,10 +133,10 @@ fun PatchItem(
133133
verticalAlignment = Alignment.CenterVertically
134134
) {
135135
PatchInfoChip(
136-
text = "$PACKAGE_ICON ${stringResource(R.string.bundle_view_patches_any_package)}"
136+
text = "$PACKAGE_ICON ${stringResource(R.string.patches_view_any_package)}"
137137
)
138138
PatchInfoChip(
139-
text = "$VERSION_ICON ${stringResource(R.string.bundle_view_patches_any_version)}"
139+
text = "$VERSION_ICON ${stringResource(R.string.patches_view_any_version)}"
140140
)
141141
}
142142
} 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(

0 commit comments

Comments
 (0)