]> git.donarmstrong.com Git - lilypond.git/blobdiff - lilypond-texi2html.init
Merge branch 'master' into dev/texi2html
[lilypond.git] / lilypond-texi2html.init
index d8b61463a44bfc8ce31c9e96fbbef773f12f063b..fdb02c16829a2aa48b612b6891196846f51933a0 100644 (file)
@@ -171,7 +171,7 @@ sub load_map_file ($)
         }
         close (XREFFILE);
     } else {
-        print STDERR "Unable to load the map file $mapfile\n";
+        print STDERR "WARNING: Unable to load the map file $mapfile\n";
     }
     return $node_map;
 }
@@ -328,7 +328,8 @@ sub split_at_numbered_sections($$$)
 sub lilypond_init_map ()
 {
     my ($docu_dir, $docu_name) = split_texi_filename ($Texi2HTML::THISDOC{'input_file_name'});
-    my $map_filename = "$docu_dir/${docu_name}.xref-map";
+    my $map_filename = main::locate_include_file ("${docu_name}.$Texi2HTML::THISDOC{current_lang}.xref-map")
+       || main::locate_include_file ("${docu_name}.xref-map");
     $node_to_filename_map = load_map_file ($map_filename);
 }
 push @Texi2HTML::Config::command_handler_init, \&lilypond_init_map;
@@ -442,7 +443,8 @@ sub lilypond_external_href($$$)
     # Load the map if we haven't done so already
     if (!exists($translated_books{$map_name})) {
       my ($docu_dir, $docu_name) = split_texi_filename ($Texi2HTML::THISDOC{'input_file_name'});
-      my $map_filename = "$docu_dir/${map_name}.xref-map";
+      my $map_filename = main::locate_include_file ("${map_name}.$Texi2HTML::THISDOC{current_lang}.xref-map")
+         || main::locate_include_file ("${map_name}.xref-map");
       $translated_books{$map_name} = load_map_file ($map_filename);
     }
 
@@ -452,7 +454,7 @@ sub lilypond_external_href($$$)
     if (defined($section_name_map->{$node_text})) {
       ($node_id, $node_hxmlt_id) = @{$section_name_map->{$node_text}};
     } else {
-      print STDERR "Unable to find key '$node_text' in section_name_map for book $map_name\n";
+      print STDERR "WARNING: Unable to find node '$node_text' in book $map_name.\n";
     }
   }