From 1deb5ef4f37a6ccea16346836a7097a43a257978 Mon Sep 17 00:00:00 2001 From: Simon Paillard Date: Wed, 31 Aug 2011 23:03:23 +0200 Subject: [PATCH] ddtp: for a description-md5, use most recent translation (Closes: #621476) Thanks Michael Bramer http://lists.debian.org/4E42E104.90201@deb-support.de --- bin/parse-translations | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; -- 2.39.2