Skip to content

Commit 7fd54fa

Browse files
committed
refactor: Consolidate and rename folder/file picker string resources
1 parent 0a0ed51 commit 7fd54fa

3 files changed

Lines changed: 8 additions & 11 deletions

File tree

app/src/main/java/app/morphe/manager/ui/screen/shared/FilePicker.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,8 @@ fun FilePicker(
322322
} else {
323323
Text(
324324
text = stringResource(
325-
if (allowFolderSelection) R.string.file_picker_title_folder
326-
else R.string.file_picker_title
325+
if (allowFolderSelection) R.string.select_folder
326+
else R.string.select_file
327327
),
328328
style = MaterialTheme.typography.titleLarge,
329329
fontWeight = FontWeight.Bold,
@@ -554,7 +554,7 @@ fun FilePicker(
554554
)
555555
if (allowFolderSelection) {
556556
MorpheDialogButton(
557-
text = stringResource(R.string.file_picker_select_folder),
557+
text = stringResource(R.string.select_folder),
558558
onClick = { currentDir?.let { onFilePicked(it) } },
559559
enabled = currentDir != null,
560560
modifier = Modifier.weight(1f)

app/src/main/java/app/morphe/manager/ui/screen/shared/MorpheDialogTextField.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ fun MorpheDialogTextField(
131131
) {
132132
Icon(
133133
imageVector = Icons.Outlined.FolderOpen,
134-
contentDescription = stringResource(R.string.patch_option_pick_folder),
134+
contentDescription = stringResource(R.string.select_folder),
135135
tint = textColor.copy(alpha = 0.7f)
136136
)
137137
}
@@ -145,7 +145,7 @@ fun MorpheDialogTextField(
145145
) {
146146
Icon(
147147
imageVector = Icons.AutoMirrored.Outlined.InsertDriveFile,
148-
contentDescription = stringResource(R.string.patch_option_pick_file),
148+
contentDescription = stringResource(R.string.select_file),
149149
tint = textColor.copy(alpha = 0.7f)
150150
)
151151
}
@@ -242,7 +242,7 @@ fun MorpheDialogDropdownTextField(
242242
) {
243243
Icon(
244244
imageVector = Icons.Outlined.FolderOpen,
245-
contentDescription = stringResource(R.string.patch_option_pick_folder),
245+
contentDescription = stringResource(R.string.select_folder),
246246
tint = textColor.copy(alpha = 0.7f)
247247
)
248248
}

app/src/main/res/values/strings.xml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,6 @@ For the best results, this app recommends patching a <b>full APK</b>
203203
<string name="patch_option_enter_value">Enter value</string>
204204
<string name="patch_option_enter_number">Enter number</string>
205205
<string name="patch_option_enter_decimal">Enter decimal</string>
206-
<string name="patch_option_pick_folder">Pick folder</string>
207-
<string name="patch_option_pick_file">Pick file</string>
208206
<string name="patch_option_list_duplicate">This value already exists</string>
209207
<string name="patch_option_list_empty">Value cannot be empty</string>
210208
<string name="patch_option_list_empty_state">No values added yet</string>
@@ -721,10 +719,7 @@ The image dimensions must be as follows:
721719
<string name="settings_system_custom_file_picker_description">Browse storage with Morphe\'s built-in file picker instead of the system default</string>
722720

723721
<!-- File Picker -->
724-
<string name="file_picker_title">Select file</string>
725-
<string name="file_picker_title_folder">Select folder</string>
726722
<string name="file_picker_previous_directory">Previous directory</string>
727-
<string name="file_picker_select_folder">Select folder</string>
728723
<string name="file_picker_no_files">No files here</string>
729724
<string name="file_picker_internal_storage">Internal storage</string>
730725
<string name="file_picker_sd_card">SD card</string>
@@ -747,6 +742,8 @@ The image dimensions must be as follows:
747742

748743
<!-- Shared strings -->
749744
<string name="app_name" translatable="false">Morphe</string>
745+
<string name="select_file">Select file</string>
746+
<string name="select_folder">Select folder</string>
750747
<string name="patches">Patches</string>
751748
<string name="home">Home</string>
752749
<string name="settings">Settings</string>

0 commit comments

Comments
 (0)