Re: all of the web pages will now have a mirror list.
On Fri, Jun 08, 2001 at 05:00:48PM +0200, Josip Rodin wrote:
> > > Is it possible to sort the mirror list according to the specific
> > > translations?
> >
> > Same problem applies to ie. consultants page where countries are in
> > wrong order in translations[1]. Basically problem is same, so it would
> > be useful to think enough general solution for this. With my
> > knowledge about WML it would be some kind of Perl function to sort
> > those things that would be used everywhere when needed.
>
> Yes, I think it can be done the way it's done in the languages template.
> I'll look into it, unless someone beats me to it.
It could have been done, were it not for the dreaded slices[1].
I did this:
my %mirrors = (
"<ATc>" => "at",
"<AUc>" => "au",
"<BGc>" => "bg",
"<CNc>" => "cn",
"<DKc>" => "dk",
"<FRc>" => "fr",
"<DEc>" => "de",
"<JPc>" => "jp",
"<KRc>" => "kr",
"<ITc>" => "it",
"<NLc>" => "nl",
"<PLc>" => "pl",
"<RUc>" => "ru",
"<ZAc>" => "za",
"<ESc>" => "es",
"<TRc>" => "tr",
"<UKc>" => "uk",
);
foreach $m (sort keys %mirrors) {
print STDERR "$m\n";
print " <option value=\"http://www.$mirrors{$m}.debian.org\">$m</option>\n";
}
However, it doesn't work since the slices within each of the <XXc> tags
don't get expanded until pass 9, and eperl is pass 3. :(
Something like this works for the hash in the languages template because it
uses values for the paths from another hash, instead of sliced tags. It
would be a royal pain to get this done for the country names, I think.
Maybe Denis can show us an elegant way to do this?
--
Digital Electronic Being Intended for Assassination and Nullification
Reply to: