Kaydet (Commit) 59f3098e authored tarafından Andras Timar's avatar Andras Timar

fix KeyID generation for a corner case

üst 7d8f3b19
...@@ -67,16 +67,23 @@ while ( <INFILE> ) ...@@ -67,16 +67,23 @@ while ( <INFILE> )
my $title = defined $14 ? $14 : ''; my $title = defined $14 ? $14 : '';
my $timestamp = defined $15 ? $15 : ''; my $timestamp = defined $15 ? $15 : '';
@path = split ( "\\\\" , $file ); @path = split ( "\\\\" , $file );
$key = $path[-3] . "_" . $path[-2] . "_" . $path[-1] . "#" . $gid . "."; if (defined $path[-3])
{
$key = $path[-3] . "_" . $path[-2] . "_" . $path[-1] . "#" . $gid . ".";
}
else
{
$key = $prj . "_" . $path[-2] . "_" . $path[-1] . "#" . $gid . ".";
}
if (length($lid)) {$key .= $lid . ".";} if (length($lid)) {$key .= $lid . ".";}
if (length($type)) {$key .= $type . ".";} if (length($type)) {$key .= $type . ".";}
# replace non-word characters to _ just as in po files in source keys # replace non-word characters to _ just as in po files in source keys
$key =~ s|[^\w#\./]|_|g; $key =~ s|[^\w#\./]|_|g;
# ISO 639 private use code # ISO 639 private use code
$lang = "qtz"; $lang = "qtz";
if ( $text ne "") {$text = makekeyidstr(keyidgen($key . "text"),$text);} if ( $text ne "") {$text = makekeyidstr(keyidgen($key . "text"),$text);}
if ( $quickhelptext ne "") {$quickhelptext = makekeyidstr(keyidgen($key . "quickhelptext"),$quickhelptext);} if ( $quickhelptext ne "") {$quickhelptext = makekeyidstr(keyidgen($key . "quickhelptext"),$quickhelptext);}
if ( $title ne "") {$title = makekeyidstr(keyidgen($key . "title"),$title);} if ( $title ne "") {$title = makekeyidstr(keyidgen($key . "title"),$title);}
print OUTFILE "$prj\t$file\t$dummy\t$type\t$gid\t$lid\t$helpid\t$platform\t$width\t$lang\t$text\t$helptext\t$quickhelptext\t$title\t$timestamp\n"; print OUTFILE "$prj\t$file\t$dummy\t$type\t$gid\t$lid\t$helpid\t$platform\t$width\t$lang\t$text\t$helptext\t$quickhelptext\t$title\t$timestamp\n";
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment