l10ntools/scripts/keyidGen.pl | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
New commits: commit e1430a66abdbcd6cfeaa99c33fb6a97e95c118f0 Author: Andras Timar <ati...@suse.com> Date: Mon Jan 2 12:35:52 2012 +0100 fix KeyID generation for a corner case diff --git a/l10ntools/scripts/keyidGen.pl b/l10ntools/scripts/keyidGen.pl index bb9eae9..cf95b29 100644 --- a/l10ntools/scripts/keyidGen.pl +++ b/l10ntools/scripts/keyidGen.pl @@ -67,16 +67,23 @@ while ( <INFILE> ) my $title = defined $14 ? $14 : ''; my $timestamp = defined $15 ? $15 : ''; @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($type)) {$key .= $type . ".";} # replace non-word characters to _ just as in po files in source keys $key =~ s|[^\w#\./]|_|g; # ISO 639 private use code - $lang = "qtz"; - if ( $text ne "") {$text = makekeyidstr(keyidgen($key . "text"),$text);} - if ( $quickhelptext ne "") {$quickhelptext = makekeyidstr(keyidgen($key . "quickhelptext"),$quickhelptext);} - if ( $title ne "") {$title = makekeyidstr(keyidgen($key . "title"),$title);} + $lang = "qtz"; + if ( $text ne "") {$text = makekeyidstr(keyidgen($key . "text"),$text);} + if ( $quickhelptext ne "") {$quickhelptext = makekeyidstr(keyidgen($key . "quickhelptext"),$quickhelptext);} + 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"; } } _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits