diff -urN trunk/makeinfo/html.c foo/makeinfo/html.c --- trunk/makeinfo/html.c 2006-02-16 13:03:48.000000000 +0100 +++ foo/makeinfo/html.c 2006-03-07 11:08:46.000000000 +0100 @@ -204,7 +204,7 @@ /* The should not have markup, so use text_expansion. */ if (!html_title) html_title = escape_string (title ? - text_expansion (title) : (char *) _("Untitled")); + text_expansion (title) : (char *) __("Untitled")); /* Make sure this is the very first string of the output document. */ output_paragraph_offset = 0; diff -urN trunk/makeinfo/lang.c foo/makeinfo/lang.c --- trunk/makeinfo/lang.c 2006-02-16 13:03:48.000000000 +0100 +++ foo/makeinfo/lang.c 2006-03-07 11:47:04.000000000 +0100 @@ -33,6 +33,9 @@ /* Current language code; default is English. */ language_code_type language_code = en; +/* interface_language. */ +char interface_language[21] = "C"; + /* By default, unsupported encoding is an empty string. */ char *unknown_encoding = NULL; diff -urN trunk/makeinfo/lang.h foo/makeinfo/lang.h --- trunk/makeinfo/lang.h 2006-02-16 13:03:48.000000000 +0100 +++ foo/makeinfo/lang.h 2006-03-07 11:44:40.000000000 +0100 @@ -145,4 +145,6 @@ extern char *current_document_encoding (void); +extern char interface_language[21]; + #endif /* not LANG_H */ diff -urN trunk/makeinfo/makeinfo.c foo/makeinfo/makeinfo.c --- trunk/makeinfo/makeinfo.c 2006-02-16 13:03:48.000000000 +0100 +++ foo/makeinfo/makeinfo.c 2006-03-07 11:48:37.000000000 +0100 @@ -350,6 +350,8 @@ printf (_("\ General options:\n\ --error-limit=NUM quit after NUM errors (default %d).\n\ + --document-language=STR locale to be used in translating certain\n\ + keywords in the output file (default C).\n\ --force preserve output even if errors.\n\ --help display this help and exit.\n\ --no-validate suppress node cross-reference validation.\n\ @@ -478,6 +480,7 @@ { "css-include", 1, 0, 'C' }, { "docbook", 0, 0, 'd' }, { "enable-encoding", 0, &enable_encoding, 1 }, + { "document-language", 1, 0, 'l' }, { "error-limit", 1, 0, 'e' }, { "fill-column", 1, 0, 'f' }, { "footnote-style", 1, 0, 's' }, @@ -685,6 +688,11 @@ append_to_include_path (optarg); break; + case 'l': + /* save the language code */ + strncpy(interface_language, optarg, 20); + break; + case 'i': if (sscanf (optarg, "%d", &xml_indentation_increment) != 1) { @@ -4155,3 +4163,14 @@ } return 0; } + +char *getdocumenttext (const char *msgid) +{ + char *safedlocale; + char *s; + safedlocale = setlocale(LC_ALL,NULL); + setlocale(LC_ALL,interface_language); + s=gettext(msgid); + setlocale(LC_ALL,safedlocale); + return(s); +} diff -urN trunk/makeinfo/makeinfo.h foo/makeinfo/makeinfo.h --- trunk/makeinfo/makeinfo.h 2006-02-16 13:03:48.000000000 +0100 +++ foo/makeinfo/makeinfo.h 2006-03-07 10:59:54.000000000 +0100 @@ -316,6 +316,10 @@ struct generic_list *next; } GENERIC_LIST; +/* gettext for file generation */ +extern char *getdocumenttext (const char *msgid); +#define __(s) getdocumenttext(s) + /* Reverse the order of a list. */ extern GENERIC_LIST * reverse_list (GENERIC_LIST *list); diff -urN trunk/makeinfo/node.c foo/makeinfo/node.c --- trunk/makeinfo/node.c 2006-02-16 13:03:48.000000000 +0100 +++ foo/makeinfo/node.c 2006-03-07 11:04:53.000000000 +0100 @@ -988,7 +988,7 @@ if (next) { tem = expansion (next, 0); - add_word ((char *) _("Next:")); + add_word ((char *) __("Next:")); add_word (" "); add_word ("<a rel=\"next\" accesskey=\"n\" href=\""); @@ -1004,7 +1004,7 @@ if (prev) { tem = expansion (prev, 0); - add_word ((char *) _("Previous:")); + add_word ((char *) __("Previous:")); add_word (" "); add_word ("<a rel=\"previous\" accesskey=\"p\" href=\""); add_anchor_name (tem, 1); @@ -1018,7 +1018,7 @@ if (up) { tem = expansion (up, 0); - add_word ((char *) _("Up:")); + add_word ((char *) __("Up:")); add_word (" "); add_word ("<a rel=\"up\" accesskey=\"u\" href=\""); add_anchor_name (tem, 1); @@ -1360,9 +1360,9 @@ switch (type) { case menu_reference: - return _("Menu"); + return __("Menu"); case followed_reference: - return _("Cross"); + return __("Cross"); default: return "Internal-bad-reference-type"; } @@ -1421,7 +1421,7 @@ /* If this node has a Next, then make sure that the Next exists. */ if (tags->next) { - validate (tags->next, tags->line_no, _("Next")); + validate (tags->next, tags->line_no, __("Next")); /* If the Next node exists, and there is no Up, then make sure that the Prev of the Next points back. But do nothing if @@ -1459,7 +1459,7 @@ field at this stage. */ if (!(tags->flags & TAG_FLAG_PREV_ERROR) && tags->prev) { - int valid_p = validate (tags->prev, tags->line_no, _("Prev")); + int valid_p = validate (tags->prev, tags->line_no, __("Prev")); if (!valid_p) tags->flags |= TAG_FLAG_PREV_ERROR; @@ -1521,7 +1521,7 @@ line_error (_("`%s' has no Up field (perhaps incorrect sectioning?)"), tags->node); else if (tags->up) { - int valid_p = validate (tags->up, tags->line_no, _("Up")); + int valid_p = validate (tags->up, tags->line_no, __("Up")); /* If node X has Up: Y, then warn if Y fails to have a menu item or note pointing at X, if Y isn't of the form "(Y)". */ Binärdateien trunk/po/de.gmo and foo/po/de.gmo sind verschieden.