Fix for FS#7574. It previously failed to properly deal with multiple dest
strings. I also added the numerical id number for strings in the generated header file, which is useful when the new lngdump tool is used and you want to compare the ids for the built-in strings to the ones in the generated binary files. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14274 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
39dfd68e2f
commit
d71339bf44
1 changed files with 16 additions and 8 deletions
|
@ -230,9 +230,20 @@ if($english) {
|
|||
push @phrase, $_;
|
||||
if($_ =~ /^ *\<dest\>/i) {
|
||||
$withindest=1;
|
||||
$deststr="";
|
||||
}
|
||||
elsif($withindest && ($_ =~ /^ *\<\/dest\>/i)) {
|
||||
$withindest=0;
|
||||
|
||||
if($update || ($deststr && ($deststr !~ /^none\z/i))) {
|
||||
# we unconditionally always use all IDs when the "update"
|
||||
# feature is used
|
||||
$id = $maybeid;
|
||||
# print STDERR "DEST: use this id $id\n";
|
||||
}
|
||||
else {
|
||||
# print "skip $maybeid for $name\n";
|
||||
}
|
||||
}
|
||||
elsif($withindest && ($_ =~ / *([^:]+): *(.*)/)) {
|
||||
my ($name, $val)=($1, $2);
|
||||
|
@ -240,13 +251,10 @@ if($english) {
|
|||
# model name isn't "our"
|
||||
dest($_, $name, $val);
|
||||
|
||||
# print STDERR "DEST: \"$dest\" for $name / $id\n";
|
||||
|
||||
if($update || ($dest && ($dest !~ /^none\z/i))) {
|
||||
# we unconditionally always use all IDs when the "update"
|
||||
# feature is used
|
||||
$id = $maybeid;
|
||||
# print STDERR "DEST: use this id $id\n";
|
||||
if($dest) {
|
||||
# Store the current dest string. If this target matches
|
||||
# multiple strings, it will get updated several times.
|
||||
$deststr = $dest;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -537,7 +545,7 @@ MOO
|
|||
|
||||
$name =~ s/\"//g; # cut off the quotes
|
||||
|
||||
printf HFILE (" %s,\n", $name);
|
||||
printf HFILE (" %s, /* %d */\n", $name, $i-1);
|
||||
}
|
||||
|
||||
# Output separation marker for last string ID and the upcoming voice IDs
|
||||
|
|
Loading…
Reference in a new issue