summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2008-11-12 16:54:51 +0100
committerintrigeri <intrigeri@boum.org>2008-11-12 16:54:51 +0100
commitf4815e3b120f130ee0b88e3f301664f08df215a5 (patch)
tree86527fccf4c14449ce8fa8c07ad36a0f3d199af4
parent86c58119e0d98e67e19412d9c1ca7b0aa508473d (diff)
po(mybestlink): fixed when fed with path beginning with /
Signed-off-by: intrigeri <intrigeri@boum.org>
-rw-r--r--IkiWiki/Plugin/po.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm
index 45ed96c65..03ee9c33c 100644
--- a/IkiWiki/Plugin/po.pm
+++ b/IkiWiki/Plugin/po.pm
@@ -391,9 +391,11 @@ sub mybestlink ($$) { #{{{
my $link=shift;
my $res=$origsubs{'bestlink'}->(masterpage($page), $link);
+ my $normres=$res;
+ $normres=~s#^/##;
if (length $res
&& ($config{po_link_to} eq "current" || $config{po_link_to} eq "negotiated")
- && istranslatable($res)
+ && istranslatable($normres)
&& istranslation($page)) {
return $res . "." . lang($page);
}