Because the translation heuristic is imperfect...
...it will sometimes pick up the same language twice for a given campaign. (Currently Invasion of Eliador has this issue with sv.) This isn't a problem on the campaign server side. However it looks bad on the web page. So I now have the campaign list suppressing duplicate langauges. I also fixed a bug where the languages weren't sorted the intended way.
This commit is contained in:
parent
30646880ea
commit
32588979cc
2 changed files with 12 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue