]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/lilypond-texi2html.init
Fix 1323 - links "Back to documentation index" in HTML docs
[lilypond.git] / Documentation / lilypond-texi2html.init
index 8f46fd5ee21d3517cdcb29cad0e52fa66cb271eb..57340912510302b52f96a6ee8a2c9953bb262cd2 100644 (file)
@@ -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";