summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-08-15 22:18:05 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-08-15 22:18:05 -0400
commit4ff3e2a540d154d49dfc70fb89dcc8422f2047e3 (patch)
treecb1d25fbd3fafc7acc5313e18f04aa8f014cf42d /IkiWiki
parent1be07eae46e4993ecfea3da750727e1ec2d4b07d (diff)
po: Better fix for missing underlay translation problem.
If a page is taken from the underlay, and one of the specified languages does not have po files in the underlay, it would create a broken link to the translated version of the page for that language. With this change, there's no broken link.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/po.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm
index ce32aab05..aa3d72b90 100644
--- a/IkiWiki/Plugin/po.pm
+++ b/IkiWiki/Plugin/po.pm
@@ -891,7 +891,7 @@ sub percenttranslated ($) {
my $page=shift;
$page=~s/^\///;
- return gettext("0") unless istranslation($page);
+ return gettext("N/A") unless istranslation($page);
my $file=srcfile($pagesources{$page});
my $masterfile = srcfile($pagesources{masterpage($page)});
my %options = (
@@ -934,7 +934,7 @@ sub otherlanguagesloop ($) {
master => 1,
};
}
- else {
+ elsif (istranslation($otherpage)) {
push @ret, {
url => urlto_with_orig_beautiful_urlpath($otherpage, $page),
code => $lang,