diff options
author | Ali Abdin <aliabdin@aucegypt.edu> | 2000-12-23 11:25:05 +0000 |
---|---|---|
committer | Ali Abdin <rakholh@src.gnome.org> | 2000-12-23 11:25:05 +0000 |
commit | 08e278c58108b1c1108b0c8d2cfb48b2e4214280 (patch) | |
tree | e5ac1c82b6b3cd8d9facab8d7eab47362952998f | |
parent | b72191a526da67720177b4f6cace07d6fe204558 (diff) | |
download | nautilus-08e278c58108b1c1108b0c8d2cfb48b2e4214280.tar.gz |
More Fixing for bug #5118 (tags within a title do not appear in the TOC).
2000-12-23 Ali Abdin <aliabdin@aucegypt.edu>
More Fixing for bug #5118 (tags within a title do not appear in the
TOC). There are a few 'difficult' cases that are still not supported
and we probably won't support.
Thanks to jfleck@inkstain.net
* components/help/converters/gnome-db2html2/toc-elements.c:
Filled in function table to use toc_tag_characters where
appropriate.
(toc_tag_characters),
(toc_title_end_element),
(toc_title_start_element):
Some hackery to use an 'in_printed_title' variable (so we can
distinguish on wether we need to actually print the tag within the
title).
* components/help/converters/gnome-db2html2/gdb3html.c:
(xml_parse_document): This function was #if 0'd out and is now gone
from the tree
(parse_file): Remove #if 0'd code.
(main): Remove a really old unncessary comment
* components/help/converters/gnome-db2html2/gdb3html.c:
* components/help/converters/gnome-db2html2/sect-elements.c:
* components/help/converters/gnome-db2html2/toc-elements.c:
i18n'd a bunch of strings as some preliminary work to getting i18n
working with gnome-db2html2
* po/POTFILES.in:
Update to reflect the i18n'd strings in gnome-db2html2
-rw-r--r-- | ChangeLog | 35 | ||||
-rw-r--r-- | components/help/converters/gnome-db2html2/gdb3html.c | 54 | ||||
-rw-r--r-- | components/help/converters/gnome-db2html2/sect-elements.c | 50 | ||||
-rw-r--r-- | components/help/converters/gnome-db2html2/toc-elements.c | 99 | ||||
-rw-r--r-- | po/POTFILES.in | 3 |
5 files changed, 133 insertions, 108 deletions
@@ -1,3 +1,38 @@ +2000-12-23 Ali Abdin <aliabdin@aucegypt.edu> + + More Fixing for bug #5118 (tags within a title do not appear in the + TOC). There are a few 'difficult' cases that are still not supported + and we probably won't support. + + Thanks to jfleck@inkstain.net + + * components/help/converters/gnome-db2html2/toc-elements.c: + + Filled in function table to use toc_tag_characters where + appropriate. + + (toc_tag_characters), + (toc_title_end_element), + (toc_title_start_element): + Some hackery to use an 'in_printed_title' variable (so we can + distinguish on wether we need to actually print the tag within the + title). + + * components/help/converters/gnome-db2html2/gdb3html.c: + (xml_parse_document): This function was #if 0'd out and is now gone + from the tree + (parse_file): Remove #if 0'd code. + (main): Remove a really old unncessary comment + + * components/help/converters/gnome-db2html2/gdb3html.c: + * components/help/converters/gnome-db2html2/sect-elements.c: + * components/help/converters/gnome-db2html2/toc-elements.c: + i18n'd a bunch of strings as some preliminary work to getting i18n + working with gnome-db2html2 + + * po/POTFILES.in: + Update to reflect the i18n'd strings in gnome-db2html2 + 2000-12-23 Gene Z. Ragan <gzr@eazel.com> reviewed by: Pavel Cisler<pavel@eazel.com> diff --git a/components/help/converters/gnome-db2html2/gdb3html.c b/components/help/converters/gnome-db2html2/gdb3html.c index f9a15e566..b162ceb68 100644 --- a/components/help/converters/gnome-db2html2/gdb3html.c +++ b/components/help/converters/gnome-db2html2/gdb3html.c @@ -694,44 +694,6 @@ static xmlSAXHandler parser = { (cdataBlockSAXFunc) cdata_block }; -#if 0 -static xmlDocPtr -xml_parse_document (gchar *filename) -{ - /* This function is ripped from parser.c in libxml but slightly - * modified so as not to spew debug warnings all around */ - xmlDocPtr ret; - xmlParserCtxtPtr ctxt; - char *directory; - - directory = NULL; - - ctxt = xmlCreateFileParserCtxt(filename); - if (ctxt == NULL) { - return (NULL); - } - ctxt->sax = NULL; /* This line specifically stops the warnings */ - - if ((ctxt->directory == NULL) && (directory == NULL)) - directory = xmlParserGetDirectory (filename); - if ((ctxt->directory == NULL) && (directory != NULL)) - ctxt->directory = (char *) xmlStrdup ((xmlChar *) directory); - - xmlParseDocument (ctxt); - - if (ctxt->wellFormed) { - ret = ctxt->myDoc; - } else { - ret = NULL; - xmlFreeDoc (ctxt->myDoc); - ctxt->myDoc = NULL; - } - xmlFreeParserCtxt (ctxt); - - return (ret); -} -#endif - void print_footer (const char *prev, const char *home, const char *next) { @@ -742,21 +704,27 @@ print_footer (const char *prev, const char *home, const char *next) if (prev == NULL) { g_print (" "); } else { - g_print ("<A HREF=\"%s\"><<< Previous</A>", prev); + g_print ("<A HREF=\"%s\"><<< ", prev); + g_print (_("Previous")); + g_print ("</A>"); } g_print ("</TD>\n<TD WIDTH=\"34%%\" ALIGN=\"CENTER\" VALIGN=\"TOP\">"); if (home == NULL) { g_print (" "); } else { - g_print ("<A HREF=\"%s\">Home</A>", home); + g_print ("<A HREF=\"%s\">", home); + g_print (_("Home")); + g_print ("</A>"); } g_print ("</TD>\n<TD WIDTH=\"33%%\" ALIGN=\"RIGHT\" VALIGN=\"TOP\">"); if (next == NULL) { g_print (" "); } else { - g_print ("<A HREF=\"%s\">Next >>></A>", next); + g_print ("<A HREF=\"%s\">", next); + g_print (_("Next")); + g_print (" >>></A>"); } g_print ("</TD>\n</TR></TABLE>\n"); @@ -823,9 +791,6 @@ parse_file (gchar *filename, gchar *section, char *arg) context->ParserCtxt->sax = &parser; context->ParserCtxt->validate = 1; context->ParserCtxt->version = xmlStrdup (XML_DEFAULT_VERSION); -#if 0 - context->ParserCtxt->myDoc = xml_parse_document (filename); -#endif xmlSubstituteEntitiesDefault (1); dirpointer = strrchr (arg, '/'); @@ -886,7 +851,6 @@ main (int argc, char *argv[]) gchar *ptr2; if (argc != 2) { - /* It is '?SECTIONID' not '#SECTIONID' */ g_print ("Usage: gnome-db2html2 FILE[?SECTIONID]\n\n"); return 0; } diff --git a/components/help/converters/gnome-db2html2/sect-elements.c b/components/help/converters/gnome-db2html2/sect-elements.c index 8846a7bf7..c0cd1c484 100644 --- a/components/help/converters/gnome-db2html2/sect-elements.c +++ b/components/help/converters/gnome-db2html2/sect-elements.c @@ -243,8 +243,7 @@ sect_article_end_element (Context *context, const gchar *name) GSList *list; gint i = 1; - g_print ("<HR>"); - g_print ("<H4>Notes:</H4>"); + g_print ("<HR><H4>%s</H4>", _("Notes")); g_print ("<TABLE BORDER=\"0\" WIDTH=\"100%%\">\n\n"); for (list = context->footnotes; list; list = list->next) { g_print ("<TR><TD ALIGN=\"LEFT\" VALIGN=\"TOP\" WIDTH=\"5%%\">\n"); @@ -663,6 +662,7 @@ sect_title_start_element (Context *context, StackElement *stack_el; gchar **atrs_ptr; SectContext *sect_context; + char *table_msg; sect_context = (SectContext *) context->data; if (!IS_IN_SECT (context)) @@ -691,7 +691,10 @@ sect_title_start_element (Context *context, switch (stack_el->info->index) { case TABLE: - sect_print (context, "<P><B>Table %d. ", sect_context->table_count); + table_msg = g_strdup_printf (_("Table %d."), sect_context->table_count); + sect_print (context, "<P><B>"); + sect_print (context, "%s ", table_msg); + g_free (table_msg); break; case PREFACE: case CHAPTER: @@ -833,9 +836,11 @@ sect_title_characters (Context *context, sect_print (context, "<HEAD>\n<TITLE>%s</TITLE>\n</HEAD>\n", temp); sect_print (context, "<BODY BGCOLOR=\"#FFFFFF\" TEXT=\"#000000\" LINK=\"#0000FF\" VLINK=\"#840084\" ALINK=\"#0000FF\">\n"); - if (stack_el == NULL) - sect_print (context, "<A href=\"gnome-help:%s\"><font size=3>Up to Table of Contents</font></A><BR>\n", - context->base_file); + if (stack_el == NULL) { + sect_print (context, "<A href=\"gnome-help:%s\"><font size=3>", context->base_file); + sect_print (context, _("Up to Table of Contents")); + sect_print (context, "</font></A><BR>\n"); + } #if 0 else sect_print (context, "<A href=\"gnome-help:%s#%s\"><font size=3>Up to %s</font></A><BR>\n", @@ -979,7 +984,11 @@ sect_xref_start_element (Context *context, } if (fignum_from_figure_id != NULL) { - sect_print (context, "Figure %s", fignum_from_figure_id); + char *output_msg; + + output_msg = g_strdup_printf (_("Figure %s"), fignum_from_figure_id); + sect_print (context, "%s", output_msg); + g_free (output_msg); return; } @@ -997,9 +1006,9 @@ sect_xref_start_element (Context *context, title = g_hash_table_lookup (((SectContext *)context->data)->title_hash, *atrs_ptr); if (title == NULL) { - sect_print (context, "\">the section here</A>"); + sect_print (context, "\">%s</A>", _("the section here")); } else { - sect_print (context, "\">the section <EM>%s</EM></A>", title); + sect_print (context, "\">%s <EM>%s</EM></A>", _("the section"), title); } } @@ -1050,11 +1059,14 @@ sect_figure_end_element (Context *context, return; if (sect_context->figure->img != NULL) { + char *output_msg; + if (sect_context->figure->id) sect_print (context, "<A NAME=\"%s\">", sect_context->figure->id); - sect_print (context, "<P><B>Figure %d.", - sect_context->figure_count); + output_msg = g_strdup_printf (_("Figure %d"), sect_context->figure_count); + sect_print (context, "<P><B>%s.", output_msg); + g_free (output_msg); if (sect_context->figure->title) sect_print (context, " %s", sect_context->figure->title); @@ -1064,7 +1076,7 @@ sect_figure_end_element (Context *context, sect_print (context, "<IMG SRC=\"file://%s%s\" ALT=\"%s\"><P>", context->base_path, sect_context->figure->img, - (sect_context->figure->alt) ? sect_context->figure->alt : "IMAGE"); + (sect_context->figure->alt) ? sect_context->figure->alt : _("IMAGE")); } g_free (sect_context->figure->title); g_free (sect_context->figure->alt); @@ -2029,9 +2041,9 @@ sect_legalnotice_start_element (Context *context, } sect_context->state = IN_SECT; - sect_print (context, "<HEAD>\n<TITLE>Legal Notice</TITLE>\n</HEAD>\n"); + sect_print (context, "<HEAD>\n<TITLE>%s</TITLE>\n</HEAD>\n", _("Legal Notice")); sect_print (context, "<BODY BGCOLOR=\"#FFFFFF\" TEXT=\"#000000\" LINK=\"#0000FF\" VLINK=\"#840084\" ALINK=\"#0000FF\">\n"); - sect_print (context, "<H1>Legal Notice</H1>\n"); + sect_print (context, "<H1>%s</H1>\n", _("Legal Notice")); } @@ -2076,7 +2088,8 @@ sect_question_start_element (Context *context, if (!IS_IN_SECT (context)) return; - sect_print (context, "<P><B>Q: </B>"); + /* This 'Q' is short for 'Question:' */ + sect_print (context, "<P><B>%s: </B>", _("Q")); } void @@ -2087,7 +2100,8 @@ sect_answer_start_element (Context *context, if (!IS_IN_SECT (context)) return; - sect_print (context, "<P><B>A: </B>"); + /* This 'A' is short for 'Answer' */ + sect_print (context, "<P><B>%s: </B>", _("A")); } @@ -2110,7 +2124,7 @@ sect_glosssee_start_element (Context *context, const gchar *name, const xmlChar if (g_hash_table_lookup (context->glossary_data, *atrs_ptr)) { temp = g_hash_table_lookup (context->glossary_data, *atrs_ptr); - g_print("<BR>See: <A HREF=\"gnome-help:%s?%s\">%s</A>\n", context->base_file, *atrs_ptr, temp); + g_print("<BR>%s: <A HREF=\"gnome-help:%s?%s\">%s</A>\n", _("See"), context->base_file, *atrs_ptr, temp); } atrs_ptr += 2; } @@ -2137,7 +2151,7 @@ sect_glossseealso_start_element (Context *context, const gchar *name, const xmlC if ( g_hash_table_lookup (context->glossary_data, *atrs_ptr)) { temp = g_hash_table_lookup (context->glossary_data, *atrs_ptr); - g_print("<BR>See also: <A HREF=\"gnome-help:%s?%s\">%s</A>\n", context->base_file, *atrs_ptr, temp); + g_print("<BR>%s: <A HREF=\"gnome-help:%s?%s\">%s</A>\n", _("See also"), context->base_file, *atrs_ptr, temp); } atrs_ptr += 2; } diff --git a/components/help/converters/gnome-db2html2/toc-elements.c b/components/help/converters/gnome-db2html2/toc-elements.c index b06510807..56302cd23 100644 --- a/components/help/converters/gnome-db2html2/toc-elements.c +++ b/components/help/converters/gnome-db2html2/toc-elements.c @@ -1,9 +1,10 @@ #include <config.h> +#include <gnome.h> #include "sect-elements.h" #include "toc-elements.h" - +static gboolean in_printed_title = FALSE; typedef struct _TocContext TocContext; struct _TocContext { HeaderInfo *header; @@ -55,21 +56,21 @@ ElementInfo toc_elements[] = { { HOLDER, "holder", NULL, NULL, (charactersSAXFunc) toc_copyright_characters}, { TITLE, "title", (startElementSAXFunc) toc_title_start_element, (endElementSAXFunc) toc_title_end_element, (charactersSAXFunc) toc_title_characters }, { SUBTITLE, "subtitle", (startElementSAXFunc) toc_title_start_element, (endElementSAXFunc) toc_title_end_element, (charactersSAXFunc) toc_title_characters }, - { ULINK, "ulink", NULL, NULL, NULL}, + { ULINK, "ulink", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, { XREF, "xref", NULL, NULL, NULL}, - { FOOTNOTE, "footnote", NULL, NULL, NULL}, + { FOOTNOTE, "footnote", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, { FIGURE, "figure", NULL, NULL, NULL}, { GRAPHIC, "graphic", NULL, NULL, NULL}, - { CITETITLE, "citetitle", NULL, NULL, NULL}, - { APPLICATION, "application", NULL, NULL, NULL}, - { FILENAME, "filename", NULL, NULL, NULL}, + { CITETITLE, "citetitle", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { APPLICATION, "application", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { FILENAME, "filename", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, { ITEMIZEDLIST, "itemizedlist", NULL, NULL, NULL}, { ORDEREDLIST, "orderedlist", NULL, NULL, NULL}, { VARIABLELIST, "variablelist", NULL, NULL, NULL}, { LISTITEM, "listitem", NULL, NULL, NULL}, { PROGRAMLISTING, "programlisting", NULL, NULL, NULL}, - { SGMLTAG, "sgmltag", NULL, NULL, NULL}, - { EMPHASIS, "emphasis", NULL, NULL, NULL}, + { SGMLTAG, "sgmltag", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { EMPHASIS, "emphasis", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, { TIP, "tip", NULL, NULL, NULL}, { WARNING, "warning", NULL, NULL, NULL}, { IMPORTANT, "important", NULL, NULL, NULL}, @@ -78,38 +79,38 @@ ElementInfo toc_elements[] = { { SCREEN, "screen", NULL, NULL, NULL}, { SCREENSHOT, "screenshot", NULL, NULL, NULL}, { SCREENINFO, "screeninfo", NULL, NULL, NULL}, - { COMMAND, "command", NULL, NULL, NULL}, - { REPLACEABLE, "replaceable", NULL, NULL, NULL}, + { COMMAND, "command", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { REPLACEABLE, "replaceable", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, { FUNCTION, "function", NULL, NULL, (charactersSAXFunc) toc_tag_characters}, - { GUIBUTTON, "guibutton", NULL, NULL, NULL}, - { GUIICON, "guiicon", NULL, NULL, NULL}, - { GUILABEL, "guilabel", NULL, NULL, NULL}, - { GUIMENU, "guimenu", NULL, NULL, NULL}, - { GUIMENUITEM, "guimenuitem", NULL, NULL, NULL}, - { HARDWARE, "hardware", NULL, NULL, NULL}, - { KEYCAP, "keycap", NULL, NULL, NULL}, - { KEYCODE, "keycode", NULL, NULL, NULL}, - { KEYSYM, "keysym", NULL, NULL, NULL}, - { LITERAL, "literal", NULL, NULL, NULL}, - { PARAMETER, "parameter", NULL, NULL, NULL}, - { PROMPT, "prompt", NULL, NULL, NULL}, - { SYMBOL, "symbol", NULL, NULL, NULL}, - { USERINPUT, "userinput", NULL, NULL, NULL}, + { GUIBUTTON, "guibutton", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { GUIICON, "guiicon", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { GUILABEL, "guilabel", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { GUIMENU, "guimenu", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { GUIMENUITEM, "guimenuitem", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { HARDWARE, "hardware", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { KEYCAP, "keycap", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { KEYCODE, "keycode", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { KEYSYM, "keysym", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { LITERAL, "literal", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { PARAMETER, "parameter", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { PROMPT, "prompt", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { SYMBOL, "symbol", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { USERINPUT, "userinput", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, { CAUTION, "caution", NULL, NULL, NULL}, { LEGALPARA, "legalpara", NULL, NULL, NULL}, - { FIRSTTERM, "firstterm", NULL, NULL, NULL}, - { STRUCTNAME, "structname", NULL, NULL, NULL}, - { STRUCTFIELD, "structfield", NULL, NULL, NULL}, + { FIRSTTERM, "firstterm", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { STRUCTNAME, "structname", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { STRUCTFIELD, "structfield", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, { FUNCSYNOPSIS, "funcsynopsis", NULL, NULL, NULL}, { FUNCPROTOTYPE, "funcprototype", NULL, NULL, NULL}, { FUNCDEF, "funcdef", NULL, NULL, NULL}, { FUNCPARAMS, "funcparams", NULL, NULL, NULL}, { PARAMDEF, "paramdef", NULL, NULL, NULL}, { VOID, "void", NULL, NULL, NULL}, - { GUISUBMENU, "guisubmenu", NULL, NULL, NULL}, - { INTERFACE, "interface", NULL, NULL, NULL}, - { LINK, "link", NULL, NULL, NULL}, - { MENUCHOICE, "menuchoice", NULL, NULL, NULL}, + { GUISUBMENU, "guisubmenu", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { INTERFACE, "interface", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { LINK, "link", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { MENUCHOICE, "menuchoice", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, { TABLE, "table", NULL, NULL, NULL}, { INFORMALTABLE, "informaltable", NULL, NULL, NULL}, { ROW, "row", NULL, NULL, NULL}, @@ -117,18 +118,18 @@ ElementInfo toc_elements[] = { { THEAD, "thead", NULL, NULL, NULL}, { TBODY, "tbody", NULL, NULL, NULL}, { ACRONYM, "acronym", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, - { MARKUP, "markup", NULL, NULL, NULL}, + { MARKUP, "markup", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, { SIMPLELIST, "simplelist", NULL, NULL, NULL}, { MEMBER, "member", NULL, NULL, NULL}, - { MOUSEBUTTON, "mousebutton", NULL, NULL, NULL}, - { SUPERSCRIPT, "superscript", NULL, NULL, NULL}, - { SYSTEMITEM, "systemitem", NULL, NULL, NULL}, - { VARNAME, "varname", NULL, NULL, NULL}, + { MOUSEBUTTON, "mousebutton", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { SUPERSCRIPT, "superscript", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { SYSTEMITEM, "systemitem", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { VARNAME, "varname", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, { BLOCKQUOTE, "blockquote", NULL, NULL, NULL}, - { QUOTE, "quote", NULL, NULL, NULL}, - { OPTION, "option", NULL, NULL, NULL}, - { ENVAR, "envar", NULL, NULL, NULL}, - { COMPUTEROUTPUT, "computeroutput", NULL, NULL, NULL}, + { QUOTE, "quote", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { OPTION, "option", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { ENVAR, "envar", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, + { COMPUTEROUTPUT, "computeroutput", NULL, NULL, (charactersSAXFunc) toc_tag_characters }, { INLINEGRAPHIC, "inlinegraphic", NULL, NULL, NULL}, { LEGALNOTICE, "legalnotice", NULL, NULL, NULL}, { QUESTION, "question", NULL, NULL, NULL}, @@ -295,7 +296,7 @@ toc_artheader_end_element (Context *context, const gchar *name) if (header->title) g_print ("<TITLE>%s</TITLE>\n</HEAD>\n", header->title); else - g_print ("<TITLE>GNOME Documentation</TITLE>\n</HEAD>\n"); + g_print ("<TITLE>%s</TITLE>\n</HEAD>\n", _("GNOME Documentation")); g_print ("<BODY BGCOLOR=\"#FFFFFF\" TEXT=\"#000000\" LINK=\"#0000FF\" VLINK=\"#840084\" ALINK=\"#0000FF\">\n"); g_print ("<TABLE><TR><TD VALIGN=\"TOP\">\n"); @@ -325,8 +326,9 @@ toc_artheader_end_element (Context *context, const gchar *name) } g_print ("<P>"); if ((header->copyright_holder) && (header->copyright_year)) - g_print ("<A HREF=\"gnome-help:%s?legalnotice\">Copyright</A> © %s by %s", context->base_file, header->copyright_year, header->copyright_holder); - g_print ("<HR>\n<H2>Table of Contents</H2>\n\n"); + g_print ("<A HREF=\"gnome-help:%s?legalnotice\">%s</A> © %s %s %s", + context->base_file, _("Copyright"), header->copyright_year, _("by"),header->copyright_holder); + g_print ("<HR>\n<H2>%s</H2>\n\n", _("Table of Contents")); g_print ("<P>\n"); } @@ -471,6 +473,7 @@ toc_title_start_element (Context *context, case SECTION: case APPENDIX: case GLOSSDIV: + in_printed_title = TRUE; if (context->sect1 == 0) { g_print ("<DT>"); } else if (context->sect2 == 0) { @@ -487,7 +490,7 @@ toc_title_start_element (Context *context, } if (context->preface > 0) { - if (context->sect1 == 0) g_print ("PREFACE:<BR>"); + if (context->sect1 == 0) g_print ("%s:<BR>", _("PREFACE")); if (context->sect1 > 0) g_print (" %d", context->sect1); } else if (context->chapter > 0) { @@ -496,7 +499,7 @@ toc_title_start_element (Context *context, } else if (context->appendix > 0) { if (context->sect1 == 0) { - g_print ("APPENDIX:<BR>"); + g_print ("%s:<BR>", _("APPENDIX")); } else if (context->sect1 > 0) { g_print (" %d",context->sect1); } @@ -545,6 +548,7 @@ toc_title_start_element (Context *context, case SECT3: case SECT4: case SECT5: + in_printed_title = TRUE; if (context->sect2 == 0) { g_print ("<DT>"); } else if (context->sect3 == 0) { @@ -599,6 +603,7 @@ toc_title_end_element (Context *context, index = find_first_parent (context, element_list); + in_printed_title = FALSE; switch (index) { case PREFACE: case APPENDIX: @@ -794,6 +799,10 @@ toc_tag_characters (Context *context, const gchar *chars, int len) ElementIndex index; char *temp; + if (in_printed_title == FALSE) { + return; + } + element_list = g_slist_prepend (element_list, GINT_TO_POINTER (TITLE)); element_list = g_slist_prepend (element_list, GINT_TO_POINTER (GLOSSTERM)); diff --git a/po/POTFILES.in b/po/POTFILES.in index 11d9973eb..b5e0c6828 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,4 +1,7 @@ applets/launcher/nautilus-launcher-applet.c +components/help/converters/gnome-db2html2/gdb3html.c +components/help/converters/gnome-db2html2/sect-elements.c +components/help/converters/gnome-db2html2/toc-elements.c components/help/hyperbola-filefmt.c components/help/hyperbola-nav-index.c components/help/hyperbola-types.h |