h2 { border-bottom: solid 10px #0092C3; }
a { color: #0092C3; }
.newpo { color: #666; visibility: visible; }
+.qualifiedpo { background-color: #00FF00; }
</style>
<script type="text/javascript">
function getStyleClass (className) {
use POSIX qw(:math_h);
use I18N::LangTags::List;
+our $QUALIFIED_CUTOFF = 80;
+
my %opts;
getopts('U:', \%opts) or die;
my $po_url = $opts{'U'} || 'po';
if (not grep($_ eq $lang, @all_lang)) {
push @all_lang, $lang;
}
+
+ # Convert count to percentage here; can't do it above in case we
+ # hadn't seen the pot file yet.
+ $everything->{$catalog}{$lang} = floor($everything->{$catalog}{$lang}/$catalog_count{$catalog} * 100);
}
}
print "</th>\n";
foreach my $lang (@all_lang) {
- print "<td align=\"center\">";
- my $trans = $everything->{$catalog}{$lang};
- if (defined $trans and $trans>0) {
- my $total = $catalog_count{$catalog};
- my $pct = floor($trans/$total * 100);
+ my $pct = $everything->{$catalog}{$lang};
+ print "<td align=\"center\"";
+ print " class='qualifiedpo'" if (defined $pct and $pct >= $QUALIFIED_CUTOFF and !$errors->{"$catalog"}{"$lang"});
+ print ">";
+
+ if (defined $pct and $pct > 0) {
if (!$new->{$catalog}{$lang}) {
printf "<a href=\"$po_url/$catalog-$lang.po\">%.0f</a>", $pct;