diff --git a/changelog b/changelog index 29ab8672e03..636720f0910 100644 --- a/changelog +++ b/changelog @@ -59,6 +59,9 @@ SVN trunk: * updated weblist.pl and webtgz.pl to use standard wesnoth logo banner * updated webtgz.pl to request campaign info only for the campaign of interest * updated weblist.pl to display sizes in KB. + * because the heuristic for determining translations will sometimes give + duplicates, I changed the web page to remove duplicate languages + * I fixed a bug in how the language list was sorted on the web page * fix untranslated unit create dialog (#4424) * random map generator now uses island_size (#4458) * various bug fixes and code cleanups diff --git a/utils/weblist.pl b/utils/weblist.pl index e2401b7dafe..80beaaa0366 100755 --- a/utils/weblist.pl +++ b/utils/weblist.pl @@ -218,15 +218,22 @@ foreach my $campaign (@sorted) { push @row, escapeHTML($campaign->{'attr'}->{'version'}); my $trans = ''; my $first = 1; + my $last = ''; my @lang = &wml::get_children($campaign,'translation'); - foreach my $lang (sort @lang) { + foreach my $lang (sort {$a->{'attr'}->{'language'} cmp + $b->{'attr'}->{'language'}} @lang) { if (!$first) { $first = 0; + $trans = $lang->{'attr'}->{'language'}; + $last = $trans; } else { $trans .= ' '; + if ($last ne $lang->{'attr'}->{'language'}) { + $trans .= $lang->{'attr'}->{'language'}; + $last = $lang->{'attr'}->{'language'}; + } } - $trans .= $lang->{'attr'}->{'language'}; } $trans =~ s/\001[^\003]*\003//g; $trans =~ s/[\001-\037\177-\237]/ /g;