summaryrefslogtreecommitdiffstats
path: root/partitionmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'partitionmanager.cpp')
-rw-r--r--partitionmanager.cpp26
1 files changed, 22 insertions, 4 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index f94b6aa22..9afc67727 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -2383,8 +2383,8 @@ void TWPartitionManager::Translate_Partition(const char* path, const char* resou
TWPartition* part = PartitionManager.Find_Partition_By_Path(path);
if (part) {
if (part->Is_Adopted_Storage) {
+ part->Backup_Display_Name = part->Display_Name + " - " + gui_lookup("data_backup", "Data (excl. storage)");
part->Display_Name = part->Display_Name + " - " + gui_lookup("data", "Data");
- part->Backup_Display_Name = part->Display_Name;
part->Storage_Name = part->Storage_Name + " - " + gui_lookup("adopted_storage", "Adopted Storage");
} else {
part->Display_Name = gui_lookup(resource_name, default_value);
@@ -2395,6 +2395,22 @@ void TWPartitionManager::Translate_Partition(const char* path, const char* resou
}
}
+void TWPartitionManager::Translate_Partition(const char* path, const char* resource_name, const char* default_value, const char* storage_resource_name, const char* storage_default_value, const char* backup_name, const char* backup_default) {
+ TWPartition* part = PartitionManager.Find_Partition_By_Path(path);
+ if (part) {
+ if (part->Is_Adopted_Storage) {
+ part->Backup_Display_Name = part->Display_Name + " - " + gui_lookup(backup_name, backup_default);
+ part->Display_Name = part->Display_Name + " - " + gui_lookup("data", "Data");
+ part->Storage_Name = part->Storage_Name + " - " + gui_lookup("adopted_storage", "Adopted Storage");
+ } else {
+ part->Display_Name = gui_lookup(resource_name, default_value);
+ part->Backup_Display_Name = gui_lookup(backup_name, backup_default);
+ if (part->Is_Storage)
+ part->Storage_Name = gui_lookup(storage_resource_name, storage_default_value);
+ }
+ }
+}
+
void TWPartitionManager::Translate_Partition_Display_Names() {
LOGINFO("Translating partition display names\n");
Translate_Partition("/system", "system", "System");
@@ -2402,17 +2418,19 @@ void TWPartitionManager::Translate_Partition_Display_Names() {
Translate_Partition("/vendor", "vendor", "Vendor");
Translate_Partition("/vendor_image", "vendor_image", "Vendor Image");
Translate_Partition("/cache", "cache", "Cache");
- Translate_Partition("/data", "data", "Data", "internal", "Internal Storage");
Translate_Partition("/boot", "boot", "Boot");
Translate_Partition("/recovery", "recovery", "Recovery");
if (!datamedia) {
+ Translate_Partition("/data", "data", "Data", "internal", "Internal Storage");
Translate_Partition("/sdcard", "sdcard", "SDCard", "sdcard", "SDCard");
Translate_Partition("/internal_sd", "sdcard", "SDCard", "sdcard", "SDCard");
Translate_Partition("/internal_sdcard", "sdcard", "SDCard", "sdcard", "SDCard");
Translate_Partition("/emmc", "sdcard", "SDCard", "sdcard", "SDCard");
+ } else {
+ Translate_Partition("/data", "data", "Data", "internal", "Internal Storage", "data_backup", "Data (excl. storage)");
}
- Translate_Partition("/external_sd", "microsd", "Micro SDCard", "microsd", "Micro SDCard");
- Translate_Partition("/external_sdcard", "microsd", "Micro SDCard", "microsd", "Micro SDCard");
+ Translate_Partition("/external_sd", "microsd", "Micro SDCard", "microsd", "Micro SDCard", "data_backup", "Data (excl. storage)");
+ Translate_Partition("/external_sdcard", "microsd", "Micro SDCard", "microsd", "Micro SDCard", "data_backup", "Data (excl. storage)");
Translate_Partition("/usb-otg", "usbotg", "USB OTG", "usbotg", "USB OTG");
Translate_Partition("/sd-ext", "sdext", "SD-EXT");