From 3c36697b2d1572f963a8e6d34e648efa004029cc Mon Sep 17 00:00:00 2001 From: Matt Mower Date: Fri, 25 Dec 2015 19:28:31 -0600 Subject: Fix a bunch of messages * Find and rename/remove duplicate string variable names * Add missing string variables to en language file * Fix display of some strings missing @ in front of variable name * Fix several %s --> {1} * Be consistent in usage of cancelled vs. canceled (both spellings acceptable) Tip for finding strings missing from language files: 1) Find all messages: egrep -hr "gui_msg.+=" > /tmp/msgs.txt 2) Regex replace to trim them down WHAT: ^\s+gui_msg(?:[^"]+)"([a-zA-Z0-9_]+)=([^"]+).+ WITH: $1 Note that $2 can be used to retain the message 3) Find missing strings: for i in $(cat /tmp/msgs.txt); do if ! grep -q $i gui/theme/common/languages/en.xml; then echo $i; fi done Change-Id: Ic193162e4b5468bf027472928a370be39840ea1d --- gui/action.cpp | 4 ++-- gui/devices/common/res/languages/en.xml | 35 ++++++++++++++++++--------------- gui/theme/common/landscape.xml | 6 +++--- gui/theme/common/languages/en.xml | 29 +++++++++++---------------- gui/theme/common/portrait.xml | 6 +++--- gui/theme/common/watch.xml | 10 +++++----- 6 files changed, 44 insertions(+), 46 deletions(-) (limited to 'gui') diff --git a/gui/action.cpp b/gui/action.cpp index 1b30a2064..fe2091026 100644 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -347,7 +347,7 @@ void GUIAction::simulate_progress_bar(void) { if (PartitionManager.stop_backup.get_value()) { DataManager::SetValue("tw_cancel_backup", 1); - gui_msg("backup_cancel=Backup Canceled."); + gui_msg("backup_cancel=Backup Cancelled"); DataManager::SetValue("ui_progress", 0); PartitionManager.stop_backup.set_value(0); return; @@ -1197,7 +1197,7 @@ int GUIAction::nandroid(std::string arg) } else { DataManager::SetValue("tw_cancel_backup", 1); - gui_msg("backup_cancel=Backup Canceled."); + gui_msg("backup_cancel=Backup Cancelled"); ret = 0; } operation_end(ret); diff --git a/gui/devices/common/res/languages/en.xml b/gui/devices/common/res/languages/en.xml index 84b8c1e7f..b07eb8213 100644 --- a/gui/devices/common/res/languages/en.xml +++ b/gui/devices/common/res/languages/en.xml @@ -9,7 +9,7 @@ - + System System Image @@ -46,7 +46,6 @@ * MD5 Created. * MD5 Error! * Error computing MD5. - * MD5 Created. (Current Date) (Auto Generate) Unable to locate '{1}' partition for backup calculations. @@ -55,7 +54,7 @@ * Total size of all data: {1}MB * Available space: {1}MB Unable to locate storage device. - Not enough free space on storage. + Not enough free space on storage. [BACKUP STARTED] * Backup Folder: {1} Failed to make backup folder. @@ -64,19 +63,20 @@ [{1} MB TOTAL BACKED UP] [BACKUP COMPLETED IN {1} SECONDS] [RESTORE STARTED] - Restore folder: '%s' + Restore folder: '{1}' [{1} done ({2} seconds)] Verifying MD5 Skipping MD5 check based on user setting. Calculating restore details... - Cannot restore %s -- mounted read only. + Cannot restore {1} -- mounted read only. Unable to locate '{1}' partition for restoring. No partitions selected for restore. Restoring {1} partitions... Total restore size is {1}MB Updating System Details - [RESTORE COMPLETED IN {1} SECONDS] + Restore Complete + [RESTORE COMPLETED IN {1} SECONDS] Error opening: '{1}' ({2}) Unable to locate partition by backup name: '{1}' @@ -94,7 +94,7 @@ Unable to mount storage Failed to decrypt data. No crypto support was compiled into this build. - Data successfully decrypted, new block device: '{1}' + Data successfully decrypted, new block device: '{1}' Done. Partitioning SD Card... Unable to locate device to partition. @@ -115,7 +115,7 @@ No partitions selected for flashing. Too many partitions selected for flashing. Invalid flash partition specified. - IMAGE FLASH COMPLETED] + [IMAGE FLASH COMPLETED] Wiping {1} {1} does not exist! Cannot repair! Repairing {1} using {2}... @@ -126,29 +126,30 @@ Failed to mount '{1}' ({2}) - Failed to unmount '{1}' ({2}) + Failed to unmount '{1}' ({2}) Cannot resize {1}. Repairing {1} before resizing. Unable to resize {1}. No md5 file found for '{1}'. Please unselect Enable MD5 verification to restore. MD5 failed to match on '{1}'. - Restoring + Failed to decrypt tar file '{1}' You may need to reboot recovery to be able to use /data again. Unable to format to remove encryption. Formatting {1} using {2}... Unable to wipe {1}. + Partition {1} cannot be wiped. Removing all files under '{1}' Wiping data without wiping /data/media ... Backing up {1}... Backing Up - Backup file size for '%s' is 0 bytes. + Backup file size for '{1}' is 0 bytes. WARNING: This /data backup was made with {1} file system! The backup may not boot unless you change back to {1}. Restoring {1}... - Restoring + Restoring Unable to recreate {1} folder. Size of image is larger than target device Flashing {1}... - Backup folder set to '{1}' + Backup folder set to '{1}' Unable to locate backup '{1}' Setting restore options: '{1}': MD5 check skip is on @@ -174,7 +175,7 @@ Compression is on MD5 Generation is off Backup Failed - Backup complete! + Backup Failed. Cleaning Backup Folder. Running Recovery Commands Recovery Commands Complete Running OpenRecoveryScript @@ -200,12 +201,13 @@ Error creating backup. Error during restore process. Splitting thread ID {1} into archive {2} + %llu of %llu files, %i%% %lluMB of %lluMB, %i%% Attempting to decrypt data partition via command line. Failed to load base packages. Simulating actions... - Backup Canceled. + Backup Cancelled Configuring TWRP... Unable to configure TWRP with this kernel. Copied recovery log to {1}. @@ -219,9 +221,10 @@ (Current Date) Backup name is too long. Backup name '{1}' contains invalid character: '{1}' - A backup with this name already exists. + A backup with that name already exists! This device does not have a real SD Card! Aborting! Cancelling ADB sideload... Error changing file system. + Custom theme version does not match TWRP version. Using stock theme. diff --git a/gui/theme/common/landscape.xml b/gui/theme/common/landscape.xml index 57fef4040..ebee0a8eb 100755 --- a/gui/theme/common/landscape.xml +++ b/gui/theme/common/landscape.xml @@ -2321,7 +2321,7 @@ tw_back=restore_select - tw_complete_text1={@restore_completed=Restore Complete} + tw_complete_text1={@restore_complete=Restore Complete} tw_show_reboot=1 action_complete @@ -2437,7 +2437,7 @@ - {usb_storage_hdr=USB Storage} + {@usb_storage_hdr=USB Storage} @@ -2505,7 +2505,7 @@ - {@reboot_hdr=Reboot Menu} + {@reboot_hdr=Reboot}