summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2006-04-03 11:23:56 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:13:06 +0200
commitaf9136deeb609577f0a9895417aa2b2bbf63586a (patch)
tree0fb3fbbe2d37876b391b3a979db2808ba561d6d8
parent98a82b77ea244938eb0a861ebdf914551936afd8 (diff)
downloadexternal_gettext-af9136deeb609577f0a9895417aa2b2bbf63586a.zip
external_gettext-af9136deeb609577f0a9895417aa2b2bbf63586a.tar.gz
external_gettext-af9136deeb609577f0a9895417aa2b2bbf63586a.tar.bz2
In HTML, use Unicode quotation marks instead of grave and acute accents.
-rw-r--r--gettext-tools/doc/ChangeLog11
-rw-r--r--gettext-tools/doc/Makefile.am8
-rw-r--r--gettext-tools/doc/gettext.texi48
-rw-r--r--gettext-tools/doc/msgattrib.texi43
-rwxr-xr-xgettext-tools/doc/texi2html68
5 files changed, 147 insertions, 31 deletions
diff --git a/gettext-tools/doc/ChangeLog b/gettext-tools/doc/ChangeLog
index 696a4b5..342d629 100644
--- a/gettext-tools/doc/ChangeLog
+++ b/gettext-tools/doc/ChangeLog
@@ -1,5 +1,16 @@
2006-04-01 Bruno Haible <bruno@clisp.org>
+ * texi2html: Add option -expandtex. Expand @ifhtml by default, not
+ @ifinfo. Use Unicode quotation marks instead of grave and acute
+ accents. Emit charset=UTF-8 declaration. Bump version number to 1.52b.
+ * Makefile.am (gettext.html, gettext_toc.html): Remove -expandinfo
+ option.
+ * gettext.texi: If in HTML mode, use Unicode quotation marks and
+ box drawing characters.
+ * msgattrib.texi: Likewise.
+
+2006-04-01 Bruno Haible <bruno@clisp.org>
+
* gettext.texi (Introduction): Swap paragraphs.
2006-04-01 Bruno Haible <bruno@clisp.org>
diff --git a/gettext-tools/doc/Makefile.am b/gettext-tools/doc/Makefile.am
index 120411e..c573223 100644
--- a/gettext-tools/doc/Makefile.am
+++ b/gettext-tools/doc/Makefile.am
@@ -1,5 +1,5 @@
## Makefile for the gettext-tools/doc subdirectory of GNU gettext
-## Copyright (C) 1995-1997, 2001-2005 Free Software Foundation, Inc.
+## Copyright (C) 1995-1997, 2001-2006 Free Software Foundation, Inc.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -181,14 +181,14 @@ html-split: gettext_toc.html
# Override of automake's definition.
# We want to use texi2html, not makeinfo --html.
gettext.html: gettext.texi version.texi $(gettext_TEXINFOS)
- $(TEXI2HTML) $(TEXINCLUDES) -expandinfo -number -monolithic `if test -f gettext.texi; then echo gettext.texi; else echo $(srcdir)/gettext.texi; fi`
+ $(TEXI2HTML) $(TEXINCLUDES) -number -monolithic `if test -f gettext.texi; then echo gettext.texi; else echo $(srcdir)/gettext.texi; fi`
gettext_toc.html: gettext.texi version.texi $(gettext_TEXINFOS)
case "@PERL@" in \
*"/missing perl") \
- $(TEXI2HTML) $(TEXINCLUDES) -expandinfo -number -split_chapter `if test -f gettext.texi; then echo gettext.texi; else echo $(srcdir)/gettext.texi; fi` || exit 0 ;; \
+ $(TEXI2HTML) $(TEXINCLUDES) -number -split_chapter `if test -f gettext.texi; then echo gettext.texi; else echo $(srcdir)/gettext.texi; fi` || exit 0 ;; \
*) $(RM) gettext_*.html ; \
- $(TEXI2HTML) $(TEXINCLUDES) -expandinfo -number -split_chapter `if test -f gettext.texi; then echo gettext.texi; else echo $(srcdir)/gettext.texi; fi` ;; \
+ $(TEXI2HTML) $(TEXINCLUDES) -number -split_chapter `if test -f gettext.texi; then echo gettext.texi; else echo $(srcdir)/gettext.texi; fi` ;; \
esac
install-html-monolithic: gettext.html
diff --git a/gettext-tools/doc/gettext.texi b/gettext-tools/doc/gettext.texi
index 635fc9b..233c515 100644
--- a/gettext-tools/doc/gettext.texi
+++ b/gettext-tools/doc/gettext.texi
@@ -1,5 +1,8 @@
\input texinfo @c -*-texinfo-*-
@c %**start of header
+@ifhtml
+@documentencoding UTF-8
+@end ifhtml
@setfilename gettext.info
@settitle GNU @code{gettext} utilities
@finalout
@@ -810,6 +813,31 @@ of these interrelations will surely help programmers, translators
and maintainers.
@example
+@ifhtml
+@group
+Original C Sources ───> Preparation ───> Marked C Sources ───╮
+ │
+ ╭─────────<─── GNU gettext Library │
+╭─── make <───┤ │
+│ ╰─────────<────────────────────┬───────────────╯
+│ │
+│ ╭─────<─── PACKAGE.pot <─── xgettext <───╯ ╭───<─── PO Compendium
+│ │ │ ↑
+│ │ ╰───╮ │
+│ ╰───╮ ├───> PO editor ───╮
+│ ├────> msgmerge ──────> LANG.po ────>────────╯ │
+│ ╭───╯ │
+│ │ │
+│ ╰─────────────<───────────────╮ │
+│ ├─── New LANG.po <────────────────────╯
+│ ╭─── LANG.gmo <─── msgfmt <───╯
+│ │
+│ ╰───> install ───> /.../LANG/PACKAGE.mo ───╮
+│ ├───> "Hello world!"
+╰───────> install ───> /.../bin/PROGRAM ───────╯
+@end group
+@end ifhtml
+@ifnothtml
@group
Original C Sources ---> Preparation ---> Marked C Sources ---.
|
@@ -832,6 +860,7 @@ Original C Sources ---> Preparation ---> Marked C Sources ---.
| +---> "Hello world!"
`-------> install ---> /.../bin/PROGRAM -------'
@end group
+@end ifnothtml
@end example
@cindex marking translatable strings
@@ -5038,8 +5067,14 @@ tries to solve the problem correctly looked like this:
@end smallexample
But this does not solve the problem. It helps languages where the
-plural form of a noun is not simply constructed by adding an `s' but
-that is all. Once again people fell into the trap of believing the
+plural form of a noun is not simply constructed by adding an
+@ifhtml
+‘s’
+@end ifhtml
+@ifnothtml
+`s'
+@end ifnothtml
+but that is all. Once again people fell into the trap of believing the
rules their language is using are universal. But the handling of plural
forms differs widely between the language families. For example,
Rafal Maszkowski @code{<rzm@@mat.uni.torun.pl>} reports:
@@ -5066,7 +5101,14 @@ The form how plural forms are built differs. This is a problem with
languages which have many irregularities. German, for instance, is a
drastic case. Though English and German are part of the same language
family (Germanic), the almost regular forming of plural noun forms
-(appending an `s') is hardly found in German.
+(appending an
+@ifhtml
+‘s’)
+@end ifhtml
+@ifnothtml
+`s')
+@end ifnothtml
+is hardly found in German.
@item
The number of plural forms differ. This is somewhat surprising for
diff --git a/gettext-tools/doc/msgattrib.texi b/gettext-tools/doc/msgattrib.texi
index d27912a..925c7a3 100644
--- a/gettext-tools/doc/msgattrib.texi
+++ b/gettext-tools/doc/msgattrib.texi
@@ -54,11 +54,25 @@ Keep untranslated messages, remove translated messages.
@item --no-fuzzy
@opindex --no-fuzzy@r{, @code{msgattrib} option}
-Remove `fuzzy' marked messages.
+Remove
+@ifhtml
+‘fuzzy’
+@end ifhtml
+@ifnothtml
+`fuzzy'
+@end ifnothtml
+marked messages.
@item --only-fuzzy
@opindex --only-fuzzy@r{, @code{msgattrib} option}
-Keep `fuzzy' marked messages, remove all other messsages.
+Keep
+@ifhtml
+‘fuzzy’
+@end ifhtml
+@ifnothtml
+`fuzzy'
+@end ifnothtml
+marked messages, remove all other messsages.
@item --no-obsolete
@opindex --no-obsolete@r{, @code{msgattrib} option}
@@ -82,11 +96,23 @@ that are listed in the @var{only-file} and not listed in the
@table @samp
@item --set-fuzzy
@opindex --set-fuzzy@r{, @code{msgattrib} option}
-Set all messages `fuzzy'.
+Set all messages
+@ifhtml
+‘fuzzy’.
+@end ifhtml
+@ifnothtml
+`fuzzy'.
+@end ifnothtml
@item --clear-fuzzy
@opindex --clear-fuzzy@r{, @code{msgattrib} option}
-Set all messages non-`fuzzy'.
+Set all messages
+@ifhtml
+non-‘fuzzy’.
+@end ifhtml
+@ifnothtml
+non-`fuzzy'.
+@end ifnothtml
@item --set-obsolete
@opindex --set-obsolete@r{, @code{msgattrib} option}
@@ -109,7 +135,14 @@ Limit the attribute changes to entries that are not listed in @var{file}.
@item --fuzzy
@opindex --fuzzy@r{, @code{msgattrib} option}
Synonym for @samp{--only-fuzzy --clear-fuzzy}: It keeps only the fuzzy
-messages and removes their `fuzzy' mark.
+messages and removes their
+@ifhtml
+‘fuzzy’
+@end ifhtml
+@ifnothtml
+`fuzzy'
+@end ifnothtml
+mark.
@item --obsolete
@opindex --obsolete@r{, @code{msgattrib} option}
diff --git a/gettext-tools/doc/texi2html b/gettext-tools/doc/texi2html
index e5e3d16..9e7e82c 100755
--- a/gettext-tools/doc/texi2html
+++ b/gettext-tools/doc/texi2html
@@ -9,9 +9,12 @@
# #
#-##############################################################################
-# @(#)texi2html 1.52a 01/05/98 Written (mainly) by Lionel Cons, Lionel.Cons@cern.ch
+# @(#)texi2html 1.52b 01/05/98 Written (mainly) by Lionel Cons, Lionel.Cons@cern.ch
# 1.52a: Use acute accent instead of apostrophe. Add support for ISO-8859-1
# characters with cedilla, circumflex etc.
+# 1.52b: Add option -expandtex. Expand @ifhtml by default, not @ifinfo.
+# Use Unicode quotation marks instead of grave and acute accents.
+# Emit charset=UTF-8 declaration.
# The man page for this program is included at the end of this file and can be
# viewed using the command 'nroff -man texi2html'.
@@ -39,7 +42,7 @@ $NODESRE = '[^@{}:\'`"]+'; # RE for a list of node names
$XREFRE = '[^@{}]+'; # RE for a xref (should use NODERE)
$ERROR = "***"; # prefix for errors and warnings
-$THISPROG = "texi2html 1.52a"; # program name and version
+$THISPROG = "texi2html 1.52b"; # program name and version
$HOMEPAGE = "http://wwwinfo.cern.ch/dis/texi2html/"; # program home page
$TODAY = &pretty_date; # like "20 September 1993"
$SPLITTAG = "<!-- SPLIT HERE -->\n"; # tag to know where to split
@@ -315,6 +318,7 @@ $debug = 0;
$doctype = '';
$check = 0;
$expandinfo = 0;
+$expandtex = 0;
$use_glossary = 0;
$invisible_mark = '';
$use_iso = 0;
@@ -329,7 +333,8 @@ $usage = <<EOT;
This is $THISPROG
To convert a Texinfo file to HMTL: $0 [options] file
where options can be:
- -expandinfo : use \@ifinfo sections, not \@iftex
+ -expandinfo : use \@ifinfo sections, not \@ifhtml
+ -expandtex : use \@iftex sections, not \@ifhtml
-glossary : handle a glossary
-invisible name: use 'name' as an invisible anchor
-Dname : define name like with \@set
@@ -350,7 +355,8 @@ while (@ARGV && $ARGV[0] =~ /^-/) {
if (/^-d(ebug)?(\d+)?$/) { $debug = $2 || shift(@ARGV); next; }
if (/^-doctype$/) { $doctype = shift(@ARGV); next; }
if (/^-c(heck)?$/) { $check = 1; next; }
- if (/^-e(xpandinfo)?$/) { $expandinfo = 1; next; }
+ if (/^-expandi(nfo)?$/) { $expandinfo = 1; next; }
+ if (/^-expandt(ex)?$/) { $expandtex = 1; next; }
if (/^-g(lossary)?$/) { $use_glossary = 1; next; }
if (/^-i(nvisible)?$/) { $invisible_mark = shift(@ARGV); next; }
if (/^-iso$/) { $use_iso = 1; next; }
@@ -383,9 +389,24 @@ if (($split_node || $split_chapter) && $monolithic) {
if ($expandinfo) {
$to_skip{'ifinfo'}++;
$to_skip{'end ifinfo'}++;
-} else {
+ $to_skip{'ifnottex'}++;
+ $to_skip{'end ifnottex'}++;
+ $to_skip{'ifnothtml'}++;
+ $to_skip{'end ifnothtml'}++;
+} elsif ($expandtex) {
+ $to_skip{'ifnotinfo'}++;
+ $to_skip{'end ifnotinfo'}++;
$to_skip{'iftex'}++;
$to_skip{'end iftex'}++;
+ $to_skip{'ifnothtml'}++;
+ $to_skip{'end ifnothtml'}++;
+} else {
+ $to_skip{'ifnotinfo'}++;
+ $to_skip{'end ifnotinfo'}++;
+ $to_skip{'ifnottex'}++;
+ $to_skip{'end ifnottex'}++;
+ $to_skip{'ifhtml'}++;
+ $to_skip{'end ifhtml'}++;
}
$invisible_mark = '<IMG SRC="invisible.xbm">' if $invisible_mark eq 'xbm';
die $usage unless @ARGV == 1;
@@ -412,7 +433,7 @@ if ($monolithic) {
# variables
#
$value{'html'} = 1; # predefine html (the output format)
-$value{'texi2html'} = '1.52a'; # predefine texi2html (the translator)
+$value{'texi2html'} = '1.52b'; # predefine texi2html (the translator)
# _foo: internal to track @foo
foreach ('_author', '_title', '_subtitle',
'_settitle', '_setfilename') {
@@ -582,8 +603,8 @@ while ($_ = &next_line) {
s/((^|[^\@])(\@\@)*)\@c(omment)? .*/$1/;
# non-@ substitutions cf. texinfmt.el
unless ($in_pre) {
- s/``/\"/g;
- s/''/\"/g;
+ s/``/“/g;
+ s/''/”/g;
s/([\w ])---([\w ])/$1--$2/g;
}
#
@@ -593,9 +614,17 @@ while ($_ = &next_line) {
# skip lines
&skip_until($tag), next if $tag eq 'ignore';
if ($expandinfo) {
+ &skip_until($tag), next if $tag eq 'ifnotinfo';
&skip_until($tag), next if $tag eq 'iftex';
+ &skip_until($tag), next if $tag eq 'ifhtml';
+ } elsif ($expandtex) {
+ &skip_until($tag), next if $tag eq 'ifinfo';
+ &skip_until($tag), next if $tag eq 'ifnottex';
+ &skip_until($tag), next if $tag eq 'ifhtml';
} else {
&skip_until($tag), next if $tag eq 'ifinfo';
+ &skip_until($tag), next if $tag eq 'iftex';
+ &skip_until($tag), next if $tag eq 'ifnothtml';
}
&skip_until($tag), next if $tag eq 'tex';
# handle special tables
@@ -1224,11 +1253,11 @@ while (@lines) {
if (@args == 5) { # reference to another manual
$sec = $args[2] || $node;
$man = $args[4] || $args[3];
- $_ = "${before}${type}section `$sec' in \@cite{$man}$after";
+ $_ = "${before}${type}section ‘$sec’ in \@cite{$man}$after";
} elsif ($type =~ /Info/) { # inforef
warn "$ERROR Wrong number of arguments: $_" unless @args == 3;
($nn, $_, $in) = @args;
- $_ = "${before}${type} file `$in', node `$nn'$after";
+ $_ = "${before}${type} file ‘$in’, node ‘$nn’$after";
} elsif ($sec) {
$href = $node2href{$node};
$_ = "${before}${type}section " . &anchor('', $href, $sec) . $after;
@@ -1751,7 +1780,7 @@ sub apply_style {
if (defined($style)) { # known style
if ($style =~ /^\"/) { # add quotes
$style = $';
- $text = "\`$text\&acute;";
+ $text = "\&lsquo;$text\&rsquo;";
}
if ($style =~ /^\&/) { # custom
$style = $';
@@ -1863,6 +1892,7 @@ sub print_header {
<HTML>
<HEAD>
$header
+<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
<TITLE>$_</TITLE>
</HEAD>
<BODY>
@@ -1906,7 +1936,7 @@ sub print_toplevel_footer {
print FILE <<EOT;
This document was generated on $TODAY using the
<A HREF=\"$HOMEPAGE\">texi2html</A>
-translator version 1.52a.</P>
+translator version 1.52b.</P>
EOT
&print_footer;
}
@@ -1990,8 +2020,8 @@ The HTML files created by
.I texi2html
are closer to TeX than to Info, that's why
.I texi2html
-converts @iftex sections and not @ifinfo ones by default. You can reverse
-this with the \-expandinfo option.
+converts @ifhtml sections and not @ifinfo or @iftex ones by default. You can
+change this with the \-expandinfo or \-expandtex options.
.SH OPTIONS
.TP 12
.B \-check
@@ -2001,7 +2031,10 @@ This may be used to check the output of
to find the Texinfo commands that have been left in the HTML file.
.TP
.B \-expandinfo
-Expand @ifinfo sections, not @iftex ones.
+Expand @ifinfo sections, not @ifhtml ones.
+.TP
+.B \-expandtex
+Expand @iftex sections, not @ifhtml ones.
.TP
.B \-glossary
Use the section named 'Glossary' to build a list of terms and put links in the HTML
@@ -2079,7 +2112,7 @@ without any modification.
.B @end ifhtml
This indicates the end of an HTML section.
.SH VERSION
-This is \fItexi2html\fP version 1.52a, 01/05/98.
+This is \fItexi2html\fP version 1.52b, 01/05/98.
.PP
The latest version of \fItexi2html\fP can be found in WWW, cf. URL
http://wwwinfo.cern.ch/dis/texi2html/
@@ -2100,7 +2133,4 @@ HyperText Markup Language (HTML),
World Wide Web (WWW).
.SH BUGS
This program does not understand all Texinfo commands (yet).
-.PP
-TeX specific commands (normally enclosed in @iftex) will be
-passed unmodified.
.ex