+2003-09-13 Bruno Haible <bruno@clisp.org>
+
+ * rt-gettext.texi: New file.
+ * rt-ngettext.texi: New file.
+ * rt-envsubst.texi: New file.
+ * Makefile.am (EXTRA_DIST): Add them.
+
2003-08-23 Bruno Haible <bruno@clisp.org>
* matrix.texi: Update.
EXTRA_DIST += nls.texi matrix.texi
+EXTRA_DIST += rt-gettext.texi rt-ngettext.texi rt-envsubst.texi
+
# Documentation tag not known to automake.
--- /dev/null
+@pindex envsubst
+@cindex @code{envsubst} program, usage
+@example
+envsubst [@var{option}] [@var{shell-format}]
+@end example
+
+@cindex shell format string
+@cindex dollar substitution
+@cindex environment variables
+The @code{envsubst} program substitutes the values of environment variables.
+
+@noindent @strong{Operation mode}
+
+@table @samp
+@item -v
+@itemx --variables
+@opindex -v@r{, @code{envsubst} option}
+@opindex --variables@r{, @code{envsubst} option}
+Output the variables occurring in @var{shell-format}.
+
+@end table
+
+@noindent @strong{Informative output}
+
+@table @samp
+@item -h
+@itemx --help
+@opindex -h@r{, @code{envsubst} option}
+@opindex --help@r{, @code{envsubst} option}
+Display this help and exit.
+
+@item -V
+@itemx --version
+@opindex -V@r{, @code{envsubst} option}
+@opindex --version@r{, @code{envsubst} option}
+Output version information and exit.
+
+@end table
+
+In normal operation mode, standard input is copied to standard output,
+with references to environment variables of the form @code{$VARIABLE} or
+@code{$@{VARIABLE@}} being replaced with the corresponding values. If a
+@var{shell-format} is given, only those environment variables that are
+referenced in @var{shell-format} are substituted; otherwise all environment
+variables references occurring in standard input are substituted.
+
+These substitutions are a subset of the substitutions that a shell performs
+on unquoted and double-quoted strings. Other kinds of substitutions done
+by a shell, such as @code{$@{@var{variable}-@var{default}@}} or
+@code{$(@var{command-list})} or @code{`@var{command-list}`}, are not performed
+by the @code{envsubst} program, due to security reasons.
+
+When @code{--variables} is used, standard input is ignored, and the output
+consists of the environment variables that are referenced in
+@var{shell-format}, one per line.
--- /dev/null
+@pindex gettext
+@cindex @code{gettext} program, usage
+@example
+gettext [@var{option}] [[@var{textdomain}] @var{msgid}]
+gettext [@var{option}] -s [@var{msgid}]...
+@end example
+
+@cindex lookup message translation
+The @code{gettext} program displays the native language translation of a
+textual message.
+
+@noindent @strong{Arguments}
+
+@table @samp
+@item -d @var{textdomain}
+@itemx --domain=@var{textdomain}
+@opindex -d@r{, @code{gettext} option}
+@opindex --domain@r{, @code{gettext} option}
+Retrieve translated messages from @var{textdomain}. Usually a @var{textdomain}
+corresponds to a package, a program, or a module of a program.
+
+@item -e
+@opindex -e@r{, @code{gettext} option}
+Enable expansion of some escape sequences. This option is for compatibility
+with the @samp{echo} program or shell built-in. The escape sequences
+@samp{\b}, @samp{\c}, @samp{\f}, @samp{\n}, @samp{\r}, @samp{\t}, @samp{\v},
+@samp{\\}, and @samp{\} followed by one to three octal digits, are interpreted
+like the @samp{echo} program does.
+
+@item -E
+@opindex -E@r{, @code{gettext} option}
+This option is only for compatibility with the @samp{echo} program or shell
+built-in. It has no effect.
+
+@item -h
+@itemx --help
+@opindex -h@r{, @code{gettext} option}
+@opindex --help@r{, @code{gettext} option}
+Display this help and exit.
+
+@item -n
+@opindex -n@r{, @code{gettext} option}
+Suppress trailing newline. By default, @code{gettext} adds a newline to
+the output.
+
+@item -V
+@itemx --version
+@opindex -V@r{, @code{gettext} option}
+@opindex --version@r{, @code{gettext} option}
+Output version information and exit.
+
+@item [@var{textdomain}] @var{msgid}
+Retrieve translated message corresponding to @var{msgid} from @var{textdomain}.
+
+@end table
+
+If the @var{textdomain} parameter is not given, the domain is determined from
+the environment variable @code{TEXTDOMAIN}. If the message catalog is not
+found in the regular directory, another location can be specified with the
+environment variable @code{TEXTDOMAINDIR}.
+
+When used with the @code{-s} option the program behaves like the @samp{echo}
+command. But it does not simply copy its arguments to stdout. Instead those
+messages found in the selected catalog are translated.
--- /dev/null
+@pindex ngettext
+@cindex @code{ngettext} program, usage
+@example
+ngettext [@var{option}] [@var{textdomain}] @var{msgid} @var{msgid-plural} @var{count}
+@end example
+
+@cindex lookup plural message translation
+The @code{ngettext} program displays the native language translation of a
+textual message whose grammatical form depends on a number.
+
+@noindent @strong{Arguments}
+
+@table @samp
+@item -d @var{textdomain}
+@itemx --domain=@var{textdomain}
+@opindex -d@r{, @code{ngettext} option}
+@opindex --domain@r{, @code{ngettext} option}
+Retrieve translated messages from @var{textdomain}. Usually a @var{textdomain}
+corresponds to a package, a program, or a module of a program.
+
+@item -e
+@opindex -e@r{, @code{ngettext} option}
+Enable expansion of some escape sequences. This option is for compatibility
+with the @samp{gettext} program. The escape sequences
+@samp{\b}, @samp{\c}, @samp{\f}, @samp{\n}, @samp{\r}, @samp{\t}, @samp{\v},
+@samp{\\}, and @samp{\} followed by one to three octal digits, are interpreted
+like the @samp{echo} program does.
+
+@item -E
+@opindex -E@r{, @code{ngettext} option}
+This option is only for compatibility with the @samp{gettext} program. It has
+no effect.
+
+@item -h
+@itemx --help
+@opindex -h@r{, @code{ngettext} option}
+@opindex --help@r{, @code{ngettext} option}
+Display this help and exit.
+
+@item -V
+@itemx --version
+@opindex -V@r{, @code{ngettext} option}
+@opindex --version@r{, @code{ngettext} option}
+Output version information and exit.
+
+@item @var{textdomain}
+Retrieve translated message from @var{textdomain}.
+
+@item @var{msgid} @var{msgid-plural}
+Translate @var{msgid} (English singular) / @var{msgid-plural} (English plural).
+
+@item @var{count}
+Choose singular/plural form based on this value.
+
+@end table
+
+If the @var{textdomain} parameter is not given, the domain is determined from
+the environment variable @code{TEXTDOMAIN}. If the message catalog is not
+found in the regular directory, another location can be specified with the
+environment variable @code{TEXTDOMAINDIR}.