diff options
author | Frank Lichtenheld <frank@lichtenheld.de> | 2008-02-09 01:24:29 +0100 |
---|---|---|
committer | Frank Lichtenheld <frank@lichtenheld.de> | 2008-02-09 01:24:29 +0100 |
commit | 6daa6764bc7c3efdcc589eac9f51f76f88646870 (patch) | |
tree | 6d6da49953dafcc8bc2b10a91906f0200f3a0a85 /bin | |
parent | a211e48a9da0cc2f24329ae11ee5aea2aeafca09 (diff) |
create_index_pages: Avoid needless slices due to unused translations
Ignore DDTP translations of languages that have no po translation.
We will not use them here and we might create needless slices
otherwise.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/create_index_pages | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/create_index_pages b/bin/create_index_pages index 0766f78..8b1f657 100755 --- a/bin/create_index_pages +++ b/bin/create_index_pages @@ -230,11 +230,13 @@ foreach my $pkg (@PACKAGES) { my %sdescs; my %trans_desc = split /\000|\001/, $trans_desc; while (my ($l, $d) = each %trans_desc) { - $d =~ s/\n.*//os; + # filter out non-po languages + next unless exists $lang_vars{$l}; + $d =~ s/\n.*//os; $sdescs{$l} = $d; } - $p{trans_desc} = \%sdescs; + $p{trans_desc} = \%sdescs if %sdescs; } $p{priority} = $entry->get_newest( 'priority' ); } |