From: intrigeri Date: Wed, 12 Nov 2008 15:54:51 +0000 (+0100) Subject: po(mybestlink): fixed when fed with path beginning with / X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/commitdiff_plain/f4815e3b120f130ee0b88e3f301664f08df215a5?hp=86c58119e0d98e67e19412d9c1ca7b0aa508473d;ds=sidebyside po(mybestlink): fixed when fed with path beginning with / Signed-off-by: intrigeri --- 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); }