20,22c20,22 < sub do_status($$) { < my ($dir, $may_miss_dir) = @_; < --- > sub do_status(\%$$) { > my $dir = $_[1]; > my $may_miss_dir = $_[2]; 23a24 > 53,56d53 < < print "\n"; < print "

$dir

\n"; < 58,64d54 < print "

Translation priority: $priority

\n"; < print "\n"; < print "\n"; < print "\n"; < printf("\n", $_, $LANGUAGES{$_}) for ('en', grep { $_ ne 'en' } @LANGUAGES); < print "\n"; < 76,79c66,69 < } < print ""; < printf "", $file; < printf 'Revision %s%s
--- > }; > > ${$_[0]}{$priority}->{$file}->{'data'} = sprintf '
> Revision %s%s
81a72 > $file, 87a79,81 > > ${$_[0]}{$priority}->{$file}->{'urgency'} = 0; > 116a111,112 > > ${$_[0]}{$priority}->{$file}->{'urgency'} += 1; 118c114,115 < printf '
', $color, $status; --- > > ${$_[0]}{$priority}->{$file}->{'data'} .= sprintf '', $color, $status; > ${$_[0]}{$priority}->{$file}->{'urgency'} += ($obs or $priority eq 'none') ? 0 : 2; 138d136 < print "\n\n"; 140d137 < print "
File%s (%s)
%s%s%s
--- > > ${$_[0]}{$priority}->{$file}->{'data'} .= sprintf '
%s
134c131,133 < printf '
%s%s
\n\n\n"; 170,174c167,198 < do_status('.', 0); < do_status('docs', 1); < do_status('torbrowser', 1); < #do_status('eff', 1); < #do_status('gui', 1); --- > sub sort_and_print(\%) { > my %rows = %{$_[0]}; > > for my $priority (sort {$a cmp $b} keys %rows) { > print "

Translation priority: $priority

\n"; > > print "\n"; > print "\n"; > print "\n"; > printf("\n", $_, $LANGUAGES{$_}) for ('en', grep { $_ ne 'en' } @LANGUAGES); > print "\n"; > > for my $row (sort {$rows{$priority}->{$b}->{'urgency'} <=> $rows{$priority}->{$a}->{'urgency'}} keys %{$rows{$priority}}) { > print ""; > print $rows{$priority}->{$row}->{'data'}; > delete ${$_[0]}{$priority}->{$row}; > print "\n\n"; > }; > > print "
File%s (%s)

\n\n\n"; > }; > }; > > # accumulate the table rows, then sort and print them > my %table_rows; > do_status(%table_rows, '.', 0); > do_status(%table_rows, 'docs', 1); > do_status(%table_rows, 'torbrowser', 1); > #do_status(%table_data, 'eff', 1); > #do_status(%table_data, 'gui', 1); > sort_and_print(%table_rows); >