From: Frank Lichtenheld Date: Sat, 9 Feb 2008 00:24:29 +0000 (+0100) Subject: create_index_pages: Avoid needless slices due to unused translations X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=6daa6764bc7c3efdcc589eac9f51f76f88646870;p=deb%2Fpackages.git 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. --- 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' ); }