po(mybestlink): fixed when fed with path beginning with /

Signed-off-by: intrigeri <intrigeri@boum.org>
master
intrigeri 2008-11-12 16:54:51 +01:00
parent 86c58119e0
commit f4815e3b12
1 changed files with 3 additions and 1 deletions

View File

@ -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);
}