From: Bruno Haible Date: Wed, 17 Sep 2003 08:27:22 +0000 (+0000) Subject: Documentation of programs of gettext-runtime package. X-Git-Tag: v0.13~251 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2551fcdc2cfb12e622193a80c8ae9dd4333977e6;p=thirdparty%2Fgettext.git Documentation of programs of gettext-runtime package. --- diff --git a/gettext-runtime/doc/ChangeLog b/gettext-runtime/doc/ChangeLog index f9d73ba4f..97052425b 100644 --- a/gettext-runtime/doc/ChangeLog +++ b/gettext-runtime/doc/ChangeLog @@ -1,3 +1,10 @@ +2003-09-13 Bruno Haible + + * 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 * matrix.texi: Update. diff --git a/gettext-runtime/doc/Makefile.am b/gettext-runtime/doc/Makefile.am index 1a0667005..111050aa5 100644 --- a/gettext-runtime/doc/Makefile.am +++ b/gettext-runtime/doc/Makefile.am @@ -22,6 +22,8 @@ EXTRA_DIST = EXTRA_DIST += nls.texi matrix.texi +EXTRA_DIST += rt-gettext.texi rt-ngettext.texi rt-envsubst.texi + # Documentation tag not known to automake. diff --git a/gettext-runtime/doc/rt-envsubst.texi b/gettext-runtime/doc/rt-envsubst.texi new file mode 100644 index 000000000..a08e3e35b --- /dev/null +++ b/gettext-runtime/doc/rt-envsubst.texi @@ -0,0 +1,55 @@ +@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. diff --git a/gettext-runtime/doc/rt-gettext.texi b/gettext-runtime/doc/rt-gettext.texi new file mode 100644 index 000000000..cd7f0bfd5 --- /dev/null +++ b/gettext-runtime/doc/rt-gettext.texi @@ -0,0 +1,64 @@ +@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. diff --git a/gettext-runtime/doc/rt-ngettext.texi b/gettext-runtime/doc/rt-ngettext.texi new file mode 100644 index 000000000..21e015116 --- /dev/null +++ b/gettext-runtime/doc/rt-ngettext.texi @@ -0,0 +1,60 @@ +@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}.