summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorAndras Timar <atimar@suse.com>2012-01-02 12:35:52 +0100
committerAndras Timar <atimar@suse.com>2012-01-02 12:36:41 +0100
commit59f3098eec1a82bf5f711bf032d5f2888e2c9d44 (patch)
treeb18c2bd4cb2d421225afff8799e15f980eeb0fde /l10ntools
parent7d8f3b19c69e741175bed035681cfacd3a30713d (diff)
fix KeyID generation for a corner case
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/scripts/keyidGen.pl17
1 files changed, 12 insertions, 5 deletions
diff --git a/l10ntools/scripts/keyidGen.pl b/l10ntools/scripts/keyidGen.pl
index bb9eae976125..cf95b2937830 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";
}
}