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
This commit is contained in:
Matt Mower
2016-01-22 05:29:04 +01:00
committed by Dees Troy
parent 8e5692ffe0
commit 3c36697b2d
11 changed files with 58 additions and 60 deletions
+2 -2
View File
@@ -166,7 +166,7 @@ int OpenRecoveryScript::run_script_file(void) {
remove_nl = 0;
strncpy(value2, tok, line_len - remove_nl);
DataManager::SetValue(TW_BACKUP_NAME, value2);
gui_msg(Msg("backup_folder=Backup folder set to '{1}'")(value2));
gui_msg(Msg("backup_folder_set=Backup folder set to '{1}'")(value2));
if (PartitionManager.Check_Backup_Name(true) != 0) {
ret_val = 1;
continue;
@@ -568,7 +568,7 @@ int OpenRecoveryScript::Backup_Command(string Options) {
gui_err("backup_fail=Backup Failed");
return 1;
}
gui_msg("backup_complete=Backup complete!");
gui_msg("backup_complete=Backup Complete");
return 0;
}