[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problem with several descriptions



Hi

On 07/11/2011 03:12 AM, Simon Paillard wrote:
On Sun, Jul 03, 2011 at 11:46:28AM +0200, Erik Esterer wrote:
The code that imports translations in the database is:
http://anonscm.debian.org/gitweb/?p=webwml/packages.git;a=blob;f=bin/parse-translations

Thanks, I found the Problem...

In the code you make a
open PKG, "bzcat $TOPDIR/archive/*/*/*/i18n/Translation-$locale.bz2|";

This open all Translation files oldstable, stable, testing and
unstable.

But oldstable, stable don't have updated Translation-LANG files.

In /dists/lenny/main/i18n/Translation-de.bz2 is this broken sub
translation. And other old stuff...

can you change parse-translations to read the dists in order of the
age. First sid, lastest oldstable

like this way:

---
my @dists = ('sid', 'wheezy', 'squeeze', 'lenny');
# better if you habe the links
# my @dists = ('unstable', 'testing', 'stable', 'oldstable');

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)...";
    my $count = 0;
    foreach my $dist (@dists) {
open PKG, "bzcat $TOPDIR/archive/*/$dist/*/i18n/Translation-$locale.bz2|";
       while (<PKG>) {
           ....
       }
    }
    print "($count)\n";
}
close PKG;
---

Comments?

Thanks

Gruss
Grisu


Reply to: