From: Simon Paillard Date: Wed, 31 Aug 2011 21:03:23 +0000 (+0200) Subject: ddtp: for a description-md5, use most recent translation (Closes: #621476) X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=1deb5ef4f37a6ccea16346836a7097a43a257978;p=deb%2Fpackages.git ddtp: for a description-md5, use most recent translation (Closes: #621476) Thanks Michael Bramer http://lists.debian.org/4E42E104.90201@deb-support.de --- diff --git a/bin/parse-translations b/bin/parse-translations index 21bcaaa..d079b7f 100755 --- a/bin/parse-translations +++ b/bin/parse-translations @@ -45,11 +45,17 @@ $/ = ""; my $fixja = Text::Iconv->new("EUC-JP", "UTF-8"); +# FIXME: one database per dist +# http://lists.debian.org/4E42E104.90201@deb-support.de +# FIXME: unhardcode dists name +my @dists = ('sid', 'wheezy', 'squeeze', 'lenny'); + foreach my $lang (@DDTP_LANGUAGES) { (my $locale = $lang) =~ s/^([a-z]{2})-([a-z]{2})$/"$1_".uc($2)/e; print "Reading Translations for $lang ($locale)..."; - open PKG, "bzcat $TOPDIR/archive/*/*/*/i18n/Translation-$locale.bz2|"; my $count = 0; + foreach my $dist (@dists) { + open PKG, "bzcat $TOPDIR/archive/*/$dist/*/i18n/Translation-$locale.bz2|"; while () { next if /^\s*$/; my $data = ""; @@ -74,6 +80,7 @@ foreach my $lang (@DDTP_LANGUAGES) { $data{"description-".lc($locale)}; $count++; } + } print "($count)\n"; } close PKG;