summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2009-01-02 12:35:46 +0100
committerintrigeri <intrigeri@boum.org>2009-01-02 12:36:07 +0100
commitd1642e4cd9d77b2be6c20690912559b89b1dce2b (patch)
tree158ff0ea081c4a03885ba4003b237ad8d313e4e5
parentf58cb48f1f5b718886109642ec2caed45709b5e7 (diff)
po: cosmetic changes to percent translated display
Signed-off-by: intrigeri <intrigeri@boum.org>
-rw-r--r--IkiWiki/Plugin/po.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm
index c8b5e8fde..61331edeb 100644
--- a/IkiWiki/Plugin/po.pm
+++ b/IkiWiki/Plugin/po.pm
@@ -541,7 +541,7 @@ sub mynicepagetitle ($;$) {
my $res = $origsubs{'nicepagetitle'}->($page, $unescaped);
return $res unless istranslation($page);
return $res unless $config{po_translation_status_in_links};
- return $res.' ('.percenttranslated($page).' %)';
+ return $res.' ('.percenttranslated($page).'&nbsp;%)';
}
# ,----
@@ -795,6 +795,7 @@ sub percenttranslated ($) {
'file_out_charset' => 'utf-8',
) or error("[po/percenttranslated:$page]: failed to translate");
my ($percent,$hit,$queries) = $doc->stats();
+ $percent =~ s/\.[0-9]+$//;
return $percent;
}