X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Flilypond-texi2html.init;h=e2d8638f2706cf7ee371fac97cf3295916ec02e7;hb=89192bb6e7e71cc438817d42f189142d4e44cc2b;hp=098caf43993d3f0ba82acf304a4df4255bc36d0d;hpb=0a0da41d935f7744e7ffd934034f25c40d4c59be;p=lilypond.git diff --git a/Documentation/lilypond-texi2html.init b/Documentation/lilypond-texi2html.init index 098caf4399..e2d8638f27 100644 --- a/Documentation/lilypond-texi2html.init +++ b/Documentation/lilypond-texi2html.init @@ -63,8 +63,25 @@ ### non-standard chars replaced by _xxxx (ascii char code) and forced to ### start with a letter by prepending t_g if necessary) +package main; +$original_normalise_node = \&normalise_node; + +sub t2h_default_normalise_node($) +{ + my $text = shift; + $original_normalise_node->($text); +} + +*normalise_node = sub($) +{ + my $text = shift; + return &$Texi2HTML::Config::normalise_node($text); +}; package Texi2HTML::Config; +##$normalise_node = \&t2h_default_normalise_node; +$normalise_node = \&lilypond_normalise_node; + use utf8; use Encode qw(decode); @@ -104,6 +121,11 @@ $LY_LANGUAGES->{'it'} = { '
Thanks to ${webdev_link} for hosting ${lily_site}.' => '', }; +$LY_LANGUAGES->{'nl'} = { + 'Back to Documentation Index' => 'Terug naar de Documentatieindex', + '
Met dank aan ${webdev_link} voor het hosten van ${lily_site}.' => '',
+};
+
# FIXME: request the translations below then send them to texi2html/texinfo devs
$LANGUAGES->{'it'} = {
' The buttons in the navigation panels have the following meaning:' => ' I bottoni nei pannelli di navigazione hanno il seguente significato:',
@@ -375,6 +397,141 @@ $LANGUAGES->{'hu'} = {
'{title_ref}' => '{title_ref}'
};
+$LANGUAGES->{'ja'} = {
+ ' The buttons in the navigation panels have the following meaning:' => ' ããã²ã¼ã·ã§ã³ ããã«ã®ä¸ã«ãããã¿ã³ã«ã¯ä»¥ä¸ã®ãããªæå³ãããã¾ã:',
+ ' where the @strong{ Example } assumes that the current position is at @strong{ Subsubsection One-Two-Three } of a document of the following structure:' => ' ãã®è¡¨ã§ã@strong{ è¡ãå
} ã¯ãç¾å¨ã®ä½ç½®ã以ä¸ã®ãããªæ§é ãæã¤ããã¥ã¡ã³ãã® @strong{ ãµããµãã»ã¯ã·ã§ã³ 1-2-3 } ã§ããã¨ä»®å®ãã¦ãã¾ã:',
+ ' Up ' => ' ä¸ã¸ ',
+ '(outside of any element)' => '(outside of any element)',
+ '(outside of any node)' => '(outside of any node)',
+ '@b{{quotation_arg}:} ' => '@b{{quotation_arg}:} ',
+ '@cite{{book}}' => '@cite{{book}}',
+ '@{No value for `{value}\'@}' => '@{No value for `{value}\'@}',
+ 'About' => 'æ
å ±',
+ 'About (help)' => 'æ
å ± (ãã«ã)',
+ 'About This Document' => 'ãã®ããã¥ã¡ã³ãã«ã¤ãã¦',
+ 'April' => '4 æ',
+ 'August' => '8 æ',
+ 'Back' => 'Back',
+ 'Back section in previous file' => '',
+ 'Beginning of this chapter or previous chapter' => 'ãã®ç« ãããã¯åã®ç« ã®å
é ',
+ 'Button' => 'ãã¿ã³',
+ 'Contents' => 'ç®æ¬¡',
+ 'Cover (top) of document' => 'ããã¥ã¡ã³ãã®è¡¨ç´ (å
é )',
+ 'Current' => '',
+ 'Current Position' => 'ç¾å¨ã®ä½ç½®',
+ 'Current section' => '',
+ 'December' => '12 æ',
+ 'FastBack' => '',
+ 'FastForward' => '',
+ 'February' => '2 æ',
+ 'First' => '',
+ 'First section in reading order' => '',
+ 'Following' => '',
+ 'Following node' => '',
+ 'Footnotes' => 'è注',
+ 'Forward' => '',
+ 'Forward section in next file' => '',
+ 'From 1.2.3 go to' => '1.2.3 ããã®è¡ãå
',
+ 'Go to' => 'è¡ãå
',
+ 'Index' => 'ã¤ã³ããã¯ã¹',
+ 'Index Entry' => 'ã¤ã³ããã¯ã¹ ã¨ã³ããª',
+ 'January' => '1 æ',
+ 'July' => '7 æ',
+ 'Jump to' => '',
+ 'June' => '6æ',
+ 'Last' => '',
+ 'Last section in reading order' => '',
+ 'March' => '3 æ',
+ 'May' => '5 æ',
+ 'Menu:' => 'ã¡ãã¥ã¼',
+ 'Name' => '',
+ 'Next' => '',
+ 'Next chapter' => '次ã®ç« ',
+ 'Next file' => '',
+ 'Next node' => '',
+ 'Next section in reading order' => '次ã®ã»ã¯ã·ã§ã³',
+ 'Next section on same level' => '',
+ 'NextFile' => '',
+ 'Node following in node reading order' => '',
+ 'Node up' => '',
+ 'NodeNext' => '',
+ 'NodePrev' => '',
+ 'NodeUp' => '',
+ 'November' => '11 æ',
+ 'October' => '10 æ',
+ 'Overview' => 'æ¦è¦',
+ 'Prev' => '',
+ 'PrevFile' => '',
+ 'Previous' => '',
+ 'Previous file' => '',
+ 'Previous node' => '',
+ 'Previous section in reading order' => 'åã®ã»ã¯ã·ã§ã³',
+ 'Previous section on same level' => '',
+ 'Section' => 'ã»ã¯ã·ã§ã³',
+ 'Section One' => 'ã»ã¯ã·ã§ã³ 1',
+ 'See ' => '',
+ 'See @cite{{book}}' => '',
+ 'See section `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}' => '',
+ 'See section `{section}\' in @cite{{book}}' => '',
+ 'See section {reference_name}' => '',
+ 'See {node_file_href}' => '',
+ 'See {node_file_href} @cite{{book}}' => '',
+ 'See {node_file_href} section `{section}\' in @cite{{book}}' => '',
+ 'See {reference_name}' => '',
+ 'See {ref}' => '',
+ 'See {title_ref}' => '',
+ 'September' => '9 æ',
+ 'Short Table of Contents' => '',
+ 'Short table of contents' => '',
+ 'Subsection One-Four' => 'ãµãã»ã¯ã·ã§ã³ 1-4',
+ 'Subsection One-One' => 'ãµãã»ã¯ã·ã§ã³ 1-1',
+ 'Subsection One-Three' => 'ãµãã»ã¯ã·ã§ã³ 1-3',
+ 'Subsection One-Two' => 'ãµãã»ã¯ã·ã§ã³ 1-2',
+ 'Subsubsection One-Two-Four' => 'ãµããµãã»ã¯ã·ã§ã³ 1-2-4',
+ 'Subsubsection One-Two-One' => 'ãµããµãã»ã¯ã·ã§ã³ 1-2-1',
+ 'Subsubsection One-Two-Three' => 'ãµããµãã»ã¯ã·ã§ã³ 1-2-3',
+ 'Subsubsection One-Two-Two' => 'ãµããµãã»ã¯ã·ã§ã³ 1-2-2',
+ 'T2H_today' => '%s, %d %d',
+ 'Table of Contents' => 'ç®æ¬¡',
+ 'Table of contents' => 'ç®æ¬¡',
+ 'The node you are looking for is at {href}.' => '',
+ 'This' => '',
+ 'This document was generated on @i{{date}} using @uref{{program_homepage}, @i{{program}}}.' => 'ãã®ããã¥ã¡ã³ã㯠@i{{date}} ã«ã@uref{{program_homepage}, @i{{program}}} ãç¨ãã¦çæããã¾ããã',
+ 'This document was generated using @uref{{program_homepage}, @emph{{program}}}.' => 'ãã®ããã¥ã¡ã³ã㯠@uref{{program_homepage}, @emph{{program}}} ãç¨ãã¦çæããã¾ããã',
+ 'Top' => 'ããã',
+ 'Untitled Document' => '',
+ 'Up' => 'ä¸',
+ 'Up node' => '',
+ 'Up section' => 'ä¸ã®ã»ã¯ã·ã§ã³',
+ 'current' => '',
+ 'on @emph{{date}}' => '@emph{{date}} ã«',
+ 'section `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}' => '',
+ 'section `{section}\' in @cite{{book}}' => '',
+ 'see ' => '',
+ 'see @cite{{book}}' => '',
+ 'see section `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}' => '',
+ 'see section `{section}\' in @cite{{book}}' => '',
+ 'see section {reference_name}' => '',
+ 'see {node_file_href}' => '',
+ 'see {node_file_href} @cite{{book}}' => '',
+ 'see {node_file_href} section `{section}\' in @cite{{book}}' => '',
+ 'see {reference_name}' => '',
+ 'see {ref}' => '',
+ 'see {title_ref}' => '',
+ '{acronym_like} ({explanation})' => '{acronym_like} ({explanation})',
+ '{name} of {class}' => '',
+ '{name} on {class}' => '',
+ '{node_file_href}' => '',
+ '{node_file_href} @cite{{book}}' => '',
+ '{node_file_href} section `{section}\' in @cite{{book}}' => '',
+ '{reference_name}' => '',
+ '{ref}' => '{ref}',
+ '{style} {number}' => '{style} {number}',
+ '{style}: {caption_first_line}' => '{style}: {caption_first_line}',
+ '{style}: {shortcaption_first_line}' => '{style}: {shortcaption_first_line}',
+ '{title_ref}' => '{title_ref}'
+ };
+
sub ly_get_string () {
my $lang = $Texi2HTML::THISDOC{current_lang};
@@ -409,30 +566,34 @@ $Texi2HTML::Config::DOCTYPE = ' "lilypond-web.css", TITLE => "Patrick McCarty's design"}
- );
- @Texi2HTML::Config::ALT_CSS_REFS = (
+ );
+ @Texi2HTML::Config::ALT_CSS_REFS = (
{FILENAME => "lilypond-web-alt1.css", TITLE => "Alternate style 1"},
{FILENAME => "lilypond-web-alt2.css", TITLE => "Alternate style 2"},
- );
+ );
}
-# web_settings() if (exists($main::value{'web_manual'}));
-
$Texi2HTML::Config::USE_ACCESSKEY = 1;
$Texi2HTML::Config::USE_LINKS = 1;
$Texi2HTML::Config::USE_REL_REV = 1;
$Texi2HTML::Config::SPLIT_INDEX = 0;
$Texi2HTML::Config::SEPARATED_FOOTNOTES = 0; # Print footnotes on same page, not separated
+my $bigpage = 0;
+my $have_index_entries = 0;
if ($Texi2HTML::Config::SPLIT eq 'section' or
$Texi2HTML::Config::SPLIT eq 'node') {
$Texi2HTML::Config::element_file_name = \&lilypond_element_file_name;
+ $bigpage = 0;
+} else {
+ $bigpage = 1;
}
+$Texi2HTML::Config::anchor = \&lilypond_anchor;
$Texi2HTML::Config::element_target_name = \&lilypond_element_target_name;
$default_print_element_header = $Texi2HTML::Config::print_element_header;
$Texi2HTML::Config::print_element_header = \&lilypond_print_element_header;
@@ -497,6 +658,22 @@ sub print_element_info($)
### HELPER FUNCTIONS
#############################################################################
+# only lc() the last portion of an href
+sub lc_last($)
+{
+ my $href = shift;
+ my @hrefsplit = split('/', $href);
+ # change the last portion (the filename), if it exists;
+ # if it is a plain filename with no path, change the string as a whole
+ if ($#hrefsplit > 0) {
+ @hrefsplit[$#hrefsplit] = lc( @hrefsplit[$#hrefsplit] );
+ $href = join("/", @hrefsplit);
+ } else {
+ $href = lc($href);
+ }
+ return $href;
+}
+
# Convert a given node name to its proper file name (normalization as explained
# in the texinfo manual:
# http://www.gnu.org/software/texinfo/manual/texinfo/html_node/HTML-Xref-Node-Name-Expansion.html
@@ -529,7 +706,7 @@ sub texinfo_file_name($)
$result = 't_g' . $result;
}
# DONE
- return lc($result)
+ return lc_last($result)
}
# Load a file containing a nodename<=>filename map (tab-sepatared, i.e.
@@ -537,33 +714,33 @@ sub texinfo_file_name($)
# Returns a ref to a hash "Node title" => ["FilenameWithoutExt", "Anchor"]
sub load_map_file ($)
{
- my $mapfile = shift;
- my $node_map = ();
-
- # For some unknown reason, Perl on my system (5.10.0 on Fedora 12)
- # refuses to open map files of translated documents with
- # '<:encoding(utf8)', but decoding from UTF-8 line by line works. -jm
- if (open(XREFFILE,'<', $mapfile)) {
- my $line;
- # print STDERR "*** PRINTING MAP FILE LINES ***\n";
- while ( $line = decode ('UTF-8', \n");
if ($web_manual) {
- push (@result, "$ind
\n");
@@ -1029,7 +1316,8 @@ sub lilypond_generate_page_toc_body($)
# it's not the top element
push (@toc_entries, " ' . &$anchor('',
$Texi2HTML::HREF{'Top'},
$topname,
@@ -1252,11 +1552,13 @@ sub lilypond_print_navigation
if ($Texi2HTML::HREF{$button_href})
{
my $anchor_attributes = '';
- if ($USE_ACCESSKEY and (defined($BUTTONS_ACCESSKEY{$button_href})) and ($BUTTONS_ACCESSKEY{$button_href} ne ''))
+ if ($USE_ACCESSKEY and (defined($BUTTONS_ACCESSKEY{$button_href})) and
+ ($BUTTONS_ACCESSKEY{$button_href} ne ''))
{
$anchor_attributes = "accesskey=\"$BUTTONS_ACCESSKEY{$button_href}\"";
}
- if ($USE_REL_REV and (defined($BUTTONS_REL{$button_href})) and ($BUTTONS_REL{$button_href} ne ''))
+ if ($USE_REL_REV and (defined($BUTTONS_REL{$button_href})) and
+ ($BUTTONS_REL{$button_href} ne ''))
{
$anchor_attributes .= " rel=\"$BUTTONS_REL{$button_href}\"";
}
@@ -1285,11 +1587,13 @@ sub lilypond_print_navigation
{ # button is active
my $btitle = $BUTTONS_GOTO{$button} ?
'title="' . $BUTTONS_GOTO{$button} . '"' : '';
- if ($USE_ACCESSKEY and (defined($BUTTONS_ACCESSKEY{$button})) and ($BUTTONS_ACCESSKEY{$button} ne ''))
+ if ($USE_ACCESSKEY and (defined($BUTTONS_ACCESSKEY{$button})) and
+ ($BUTTONS_ACCESSKEY{$button} ne ''))
{
$btitle .= " accesskey=\"$BUTTONS_ACCESSKEY{$button}\"";
}
- if ($USE_REL_REV and (defined($BUTTONS_REL{$button})) and ($BUTTONS_REL{$button} ne ''))
+ if ($USE_REL_REV and (defined($BUTTONS_REL{$button})) and
+ ($BUTTONS_REL{$button} ne ''))
{
$btitle .= " rel=\"$BUTTONS_REL{$button}\"";
}
@@ -1351,7 +1655,8 @@ sub lilypond_print_navigation
);
# buttons for misc stuff
-@Texi2HTML::Config::MISC_BUTTONS = ('center-aligned-cell-3', 'Top', 'Contents', 'Index', 'About');
+@Texi2HTML::Config::MISC_BUTTONS = ('center-aligned-cell-3',
+ 'Top', 'Contents', 'Index', 'About');
# buttons for chapter file footers
# (and headers but only if SECTION_NAVIGATION is false)
@@ -1422,8 +1727,11 @@ sub makeinfo_like_foot_line_and_ref($$$$$$$$)
$from_file = $footnote_file = '';
}
- my $foot_anchor = "" . &$anchor($docid, "$footnote_file#$footid", $relative_num) . "";
- $foot_anchor = &$anchor($docid, "$footnote_file#$footid", "($relative_num)") if ($state->{'preformatted'});
+ my $foot_anchor = "" .
+ &$anchor($docid, "$footnote_file#$footid", $relative_num) . "";
+ $foot_anchor = &$anchor($docid,
+ "$footnote_file#$footid",
+ "($relative_num)") if ($state->{'preformatted'});
# unshift @$lines, "