X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Flilypond-texi2html.init;h=57340912510302b52f96a6ee8a2c9953bb262cd2;hb=4e1c6143411ffed26d21c066a5eb4569ad54e18b;hp=8f46fd5ee21d3517cdcb29cad0e52fa66cb271eb;hpb=0179cdbafa368d50f6d237316d31a950b9483064;p=lilypond.git diff --git a/Documentation/lilypond-texi2html.init b/Documentation/lilypond-texi2html.init index 8f46fd5ee2..5734091251 100644 --- a/Documentation/lilypond-texi2html.init +++ b/Documentation/lilypond-texi2html.init @@ -1374,9 +1374,13 @@ sub lilypond_print_toc_div ($$) $lang = ""; } my $reldir = $ENV{DEPTH}; - # add a / at the end if there isn't one. I cannot believe perl syntax! - if (!($reldir =~ m/\/$/ )) { - $reldir .= '/' + # strip one depth level for translations + if ($lang and $lang ne "en" and substr ($reldir, 0, 3) eq '../') { + $reldir = substr ($reldir, 3); + } + # add a / at the end if there isn't one. + if (substr ($reldir, -1) ne '/') { + $reldir .= '/'; } my $uplink = $reldir."Documentation/web/manuals.${lang}html";