From: Bruno Haible
-This document was generated on 25 Febuary 2003 using the +This document was generated on 12 June 2003 using the texi2html translator version 1.52a.
diff --git a/gettext-runtime/libasprintf/autosprintf.info b/gettext-runtime/libasprintf/autosprintf.info index c8bf1ad3f..7773fa4d8 100644 --- a/gettext-runtime/libasprintf/autosprintf.info +++ b/gettext-runtime/libasprintf/autosprintf.info @@ -1,9 +1,9 @@ -This is autosprintf.info, produced by makeinfo version 4.3 from +This is autosprintf.info, produced by makeinfo version 4.6 from autosprintf.texi. -INFO-DIR-SECTION GNU autosprintf +INFO-DIR-SECTION C++ libraries START-INFO-DIR-ENTRY -* autosprintf: (autosprintf). GNU autosprintf +* autosprintf: (autosprintf). Support for printf format strings in C++. END-INFO-DIR-ENTRY This file provides documentation for GNU `autosprintf' library. @@ -30,7 +30,7 @@ File: autosprintf.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir GNU autosprintf *************** - This manual documents the GNU autosprintf class, version 1.0. +This manual documents the GNU autosprintf class, version 1.0. * Menu: @@ -44,7 +44,7 @@ File: autosprintf.info, Node: Introduction, Next: Class autosprintf, Prev: To Introduction ************ - This package makes the C formatted output routines (`fprintf' et al.) +This package makes the C formatted output routines (`fprintf' et al.) usable in C++ programs, for use with the `catgets@@ -65,7 +65,7 @@ therefore part of all Unix implementation (implementations, which are
@@ -78,7 +78,7 @@ for the functions and the needed definitions are in the
-
+
catopen is used like in this:
open.
-
+
This handle is of course used in the catgets function which can
be used like this:
@@ -129,8 +129,8 @@ should better be const char *, but the standard is published in
- -The last of these function functions is used and behaves as expected: + +The last of these functions is used and behaves as expected:
@@ -146,7 +146,7 @@ After this nocatgets call using the descriptor is legal anymore.
catgets Interface?!@@ -167,20 +167,20 @@ more easy to manage.
gettext
The definition of the gettext interface comes from a Uniforum
-proposal and it is followed by at least one major Unix vendor
-(Sun) in its last developments. It is not specified in any official
-standard, though.
+proposal. It was submitted there by Sun, who had implemented the
+gettext function in SunOS 4, around 1990. Nowadays, the
+gettext interface is specified by the OpenI18N standard.
-The main points about this solution is that it does not follow the +The main point about this solution is that it does not follow the method of normal file handling (open-use-close) and that it does not -burden the programmer so many task, especially the unique key handling. +burden the programmer with so many tasks, especially the unique key handling. Of course here also a unique key is needed, but this key is the message itself (how long or short it is). See section 10.3 Comparing the Two Interfaces for a more detailed comparison of the two methods. @@ -198,7 +198,7 @@ in using this library will be interested in this description.
@@ -244,12 +244,12 @@ char *gettext (const char *msgid);
is to be used. This is the simplest reasonable form one can imagine.
The translation of the string msgid is returned if it is available
-in the current domain. If not available the argument itself is
+in the current domain. If it is not available, the argument itself is
returned. If the argument is NULL the result is undefined.
-One things which should come into mind is that no explicit dependency to
+One thing which should come into mind is that no explicit dependency to
the used domain is given. The current value of the domain for the
LC_MESSAGES locale is used. If this changes between two
executions of the same gettext call in the program, both calls
@@ -269,9 +269,9 @@ your language.
@@ -347,7 +347,7 @@ unreliabilities.
@@ -387,8 +387,8 @@ The value of the locale is determined through
gettext uses@@ -420,7 +420,7 @@ recommended that all msgids be US-ASCII strings.
bind_textdomain_codeset function can be used to specify the
output character set for message catalogs for domain domainname.
The codeset argument must be a valid codeset name which can be used
@@ -454,7 +454,7 @@ global variable errno is set accordingly.
@@ -574,7 +574,7 @@ purpose.
ngettext function is similar to the gettext function
as it finds the message catalogs in the same way. But it takes two
extra arguments. The msgid1 parameter must contain the singular
@@ -604,7 +604,7 @@ Please note that the numeric value n has to be passed to the
dngettext is similar to the dgettext function in the
way the message catalog is selected. The difference is that it takes
two extra parameter to provide the correct plural form. These two
@@ -615,7 +615,7 @@ parameters are handled in the same way ngettext handles them.
dcngettext is similar to the dcgettext function in the
way the message catalog is selected. The difference is that it takes
two extra parameter to provide the correct plural form. These two
@@ -640,9 +640,9 @@ possibility of extensions to not prevent the use of new languages).
-
-
-
+
+
+
The information about the plural form selection has to be stored in the
header entry of the PO file (the one with the empty msgid string).
The plural form information looks like this:
@@ -668,7 +668,7 @@ value of nplurals.
- + The following rules are known at this point. The language with families are listed. But this does not necessarily mean the information can be generalized for the whole family (as can be easily seen in the table @@ -831,7 +831,26 @@ Languages with this property include:
+Plural-Forms: nplurals=3; \ + plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2; ++ +Languages with this property include: + +
gettext in GUI programs@@ -957,7 +976,7 @@ fine:
char * @@ -1034,7 +1053,7 @@ quite some memory and disk space by doing this.10.2.7 Optimization of the *gettext functions
@@ -1089,8 +1108,8 @@ find the result through a single cache lookup.
10.3 Comparing the Two Interfaces
@@ -1140,7 +1159,7 @@ by#include <libintl.h> @@ -1155,7 +1174,7 @@ can use any that becomes available.- + The same procedure can be done for the
gettext_noopinvocations (see section 3.6 Special Cases of Translatable Strings). One usually definesgettext_noopas a no-op macro. So you should consider the following code for your project: @@ -1263,7 +1282,7 @@ is a list comments:
_nl_msg_cat_cntr is defined in `loadmsgcat.c´.
You don't need to know what this is for. But it can be used to detect
whether a gettext implementation is GNU gettext and not non-GNU
diff --git a/gettext-tools/doc/gettext_11.html b/gettext-tools/doc/gettext_11.html
index de2d3ec34..d41f710a1 100644
--- a/gettext-tools/doc/gettext_11.html
+++ b/gettext-tools/doc/gettext_11.html
@@ -1,7 +1,7 @@
+ from gettext.texi on 30 November 2003 -->
-
+
Here a more details. The GNU libintl library (but not the
corresponding functions in GNU libc) supports an environment variable
GETTEXT_LOG_UNTRANSLATED. The GNU libintl library will
diff --git a/gettext-tools/doc/gettext_12.html b/gettext-tools/doc/gettext_12.html
index cd554d58b..8b9f741e2 100644
--- a/gettext-tools/doc/gettext_12.html
+++ b/gettext-tools/doc/gettext_12.html
@@ -1,7 +1,7 @@
@@ -87,9 +87,9 @@ use this as an opportunity to unflatten their package structure.
@@ -238,8 +238,8 @@ It can be invoked as follows:
gettextize [ option... ] [ directory ] @@ -255,8 +255,8 @@ and accepts the following options:
gettext code
available on the system, but it might disturb some mechanism the
@@ -267,13 +267,13 @@ maintainer is used to apply to the sources. Because running
gettextize
logs all changes (file additions, modifications and removals) in a
file called `ChangeLog´ in each affected directory.
@@ -292,20 +292,20 @@ file called `ChangeLog´ in each affected directory.
gettextize would normally execute are inhibited and instead only
listed on standard output.
@@ -438,7 +438,7 @@ changes needed in each.
So, here comes a list of files, each one followed by a description of
all alterations it needs. Many examples are taken out from the GNU
-gettext 0.12.1 distribution itself, or from the GNU
+gettext 0.13 distribution itself, or from the GNU
hello distribution (http://www.franken.de/users/gnu/ke/hello
or http://www.gnu.franken.de/ke/hello/) You may indeed
refer to the source code of the GNU gettext and GNU hello
@@ -451,7 +451,7 @@ gettext functionality.
@@ -497,7 +497,7 @@ case of bison), not the generated C file.
@@ -546,7 +546,7 @@ directory; they are also installed by running gettextize.
@@ -566,8 +566,8 @@ needing to mess with `po/Makefile.in.in´.
-
-
+
+
GNU gettext comes with a `Rules-quot´ file, containing rules for
building catalogs `en@quot.po´ and `en@boldquot.po´. The
effect of `en@quot.po´ is that people who set their LANGUAGE
@@ -596,14 +596,14 @@ GUI programs. To enable it, similarly add en@boldquot to the
PACKAGE=gettext -VERSION=0.12.1 +VERSION=0.13 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") AC_DEFINE_UNQUOTED(VERSION, "$VERSION") AC_SUBST(PACKAGE) @@ -614,13 +614,13 @@ or, if you are using GNUautomake, by a line like this:-AM_INIT_AUTOMAKE(gettext, 0.12.1) +AM_INIT_AUTOMAKE(gettext, 0.13)Of course, you replace `gettext´ with the name of your package, -and `0.12.1´ by its version numbers, exactly as they +and `0.13´ by its version numbers, exactly as they should appear in the packagedtarfile name of your distribution -(`gettext-0.12.1.tar.gz´, here). +(`gettext-0.13.tar.gz´, here).
@@ -730,17 +730,20 @@ AC_CONFIG_AUX_DIR([subdir])
If you do not have an `aclocal.m4´ file in your distribution,
the simplest is to concatenate the files `codeset.m4´,
`gettext.m4´, `glibc21.m4´, `iconv.m4´, `intdiv0.m4´,
-`inttypes.m4´, `inttypes_h.m4´, `inttypes-pri.m4´,
-`isc-posix.m4´, `lcmessage.m4´, `lib-ld.m4´,
-`lib-link.m4´, `lib-prefix.m4´, `progtest.m4´,
-`stdint_h.m4´, `uintmax_t.m4´, `ulonglong.m4´
+`intmax.m4´, `inttypes.m4´, `inttypes_h.m4´,
+`inttypes-pri.m4´, `isc-posix.m4´, `lcmessage.m4´,
+`lib-ld.m4´, `lib-link.m4´, `lib-prefix.m4´,
+`longdouble.m4´, `longlong.m4´, `printf-posix.m4´,
+`progtest.m4´, `signed.m4´, `size_max.m4´,
+`stdint_h.m4´, `uintmax_t.m4´, `ulonglong.m4´,
+`wchar_t.m4´, `wint_t.m4´, `xsize.m4´
from GNU gettext's
`m4/´ directory into a single file. If you have suppressed the
`intl/´ directory, only `gettext.m4´, `iconv.m4´,
@@ -785,7 +788,7 @@ piece of m4 code will be the same for all projects using GNU
@@ -801,7 +804,7 @@ independently from the `intl/´ directory.
@@ -1050,9 +1053,9 @@ dist: Makefile $(DISTFILES)
@@ -1089,7 +1092,7 @@ to 0 in C preprocessor expressions.
-
+
`gettext.h´ is a convenience header file for conditional use of
`<libintl.h>´, depending on the ENABLE_NLS macro. If
ENABLE_NLS is set, it includes `<libintl.h>´; otherwise it
@@ -1130,7 +1133,7 @@ package that needs it should contain a copy of it on its own.
@@ -1146,7 +1149,7 @@ The primary macro is, of course, AM_GNU_GETTEXT.
-
+
The AM_GNU_GETTEXT macro tests for the presence of the GNU gettext
function family in either the C library or a separate libintl
library (shared or static libraries are both supported) or in the package's
@@ -1211,7 +1214,7 @@ The complexities that AM_GNU_GETTEXT deals with are the following:
gettext in the C library, for example
glibc. Some have it in a separate library libintl. GNU libintl
might have been installed as part of the GNU gettext package.
@@ -1250,7 +1253,7 @@ and LTLIBINTL variables.
-
+
The
-
+
The
-
+
The AM_GNU_GETTEXT_VERSION macro declares the version number of
the GNU gettext infrastructure that is used by the package.
@@ -1265,7 +1268,7 @@ use of it (see section 12.6 Integrating with C
12.5.3 AM_PO_SUBDIRS in `po.m4´
AM_PO_SUBDIRS macro prepares the `po/´ directories of the
package for building. This macro should be used in internationalized
programs written in other programming languages than C, C++, Objective C,
@@ -1285,7 +1288,7 @@ variables in each `po/´ directory.
12.5.4 AM_ICONV in `iconv.m4´
AM_ICONV macro tests for the presence of the POSIX/XSI
iconv function family in either the C library or a separate
libiconv library. If found, it sets the am_cv_func_iconv
@@ -1309,7 +1312,7 @@ The complexities that AM_ICONV deals with are the following:
iconv in the C library, for example
glibc. Some have it in a separate library libiconv, for example
OSF/1 or FreeBSD. Regardless of the operating system, GNU libiconv
@@ -1441,7 +1444,7 @@ Each of these three approaches has different advantages and drawbacks.
The advantage is that anyone can check out the CVS at any moment and
gets a working build. The drawbacks are: 1a. It requires some frequent
-"cvs commit" actions by the maintainers. 1b. The reposity grows in size
+"cvs commit" actions by the maintainers. 1b. The repository grows in size
quite fast.
-AM_GNU_GETTEXT_VERSION(0.12.1) +AM_GNU_GETTEXT_VERSION(0.13)
@@ -1494,8 +1497,8 @@ and adds to the package's pre-build script an invocation of
autopoint Programautopoint [option]... @@ -1520,16 +1523,16 @@ this version into the package.
autopoint would normally execute are inhibited and instead only
listed on standard output.
@@ -1544,20 +1547,20 @@ listed on standard output.
autopoint supports the GNU gettext versions from 0.10.35 to
-the current one, 0.12.1. In order to apply autopoint to
-a package using a gettext version newer than 0.12.1, you
+the current one, 0.13. In order to apply autopoint to
+a package using a gettext version newer than 0.13, you
need to install this same version of GNU gettext at least.
@@ -42,9 +42,8 @@ means the following:
You should add to the language a syntax for translatable strings. In
principle, a function call of gettext would do, but a shorthand
syntax helps keeping the legibility of internationalized programs. For
-example, in C we use the syntax _("string"), in bash we use the
-syntax $"string", and in GNU awk we use the shorthand
-_"string".
+example, in C we use the syntax _("string"), and in GNU awk we use
+the shorthand _"string".
+Although format strings with positions that reorder arguments, such as + +
+ ++"Only %2$d bytes free on '%1$s'." ++ +
+which is semantically equivalent to + +
+ ++"'%s' has only %d bytes free." ++ +
+are a POSIX/XSI feature and not specified by ISO C 99, translators can rely
+on this reordering ability: On the few platforms where printf(),
+fprintf() etc. don't support this feature natively, `libintl.a´
+or `libintl.so´ provides replacement functions, and GNU <libintl.h>
+activates these replacement functions automatically.
+
+
+Objective C format strings are like C format strings. They support an
+additional format directive: "$@", which when executed consumes an argument
+of type Object *.
+
+
+Shell format strings, as supported by GNU gettext and the `envsubst´
+program, are strings with references to shell variables in the form
+$variable or ${variable}. References of the form
+${variable-default},
+${variable:-default},
+${variable=default},
+${variable:=default},
+${variable+replacement},
+${variable:+replacement},
+${variable?ignored},
+${variable:?ignored},
+that would be valid inside shell scripts, are not supported. The
+variable names must consist solely of alphanumeric or underscore
+ASCII characters, not start with a digit and be nonempty; otherwise such
+a variable reference is ignored.
+
Python format strings are described in @@ -202,7 +259,7 @@ Python Library reference /
-Lisp format strings are described in the Common Lisp HyperSpec, @@ -212,7 +269,7 @@ chapter 22.3 Formatted Output,
-Emacs Lisp format strings are documented in the Emacs Lisp reference, @@ -224,7 +281,7 @@ in format strings while FSF Emacs doesn't.
-librep format strings are documented in the librep manual, section @@ -235,7 +292,7 @@ Formatted Output,
-Smalltalk format strings are described in the GNU Smalltalk documentation, @@ -248,7 +305,7 @@ or a nonzero digit (`1´ to `9´).
-Java format strings are described in the JDK documentation for class @@ -260,7 +317,7 @@ See also the ICU documentation
-awk format strings are described in the gawk documentation, section @@ -270,7 +327,7 @@ Printf,
-Where is this documented? @@ -278,7 +335,7 @@ Where is this documented?
-YCP sformat strings are described in the libycp documentation @@ -289,7 +346,7 @@ or a nonzero digit (`1´ to `9´).
-Tcl format strings are described in the `format.n´ manual page, @@ -298,7 +355,31 @@ Tcl format strings are described in the `format.n´ manual page,
-
+There are two kinds format strings in Perl: those acceptable to the
+Perl built-in function printf, labelled as `perl-format´,
+and those acceptable to the libintl-perl function __x,
+labelled as `perl-brace-format´.
+
+
+Perl printf format strings are described in the sprintf
+section of `man perlfunc´.
+
+
+Perl brace format strings are described in the +`Locale::TextDomain(3pm)´ manual page of the CPAN package +libintl-perl. In brief, Perl format uses placeholders put between +braces (`{´ and `}´). The placeholder must have the syntax +of simple identifiers. + +
+ + +PHP format strings are described in the documentation of the PHP function @@ -308,7 +389,39 @@ PHP format strings are described in the documentation of the PHP function
-+These format strings are used inside the GCC sources. In such a format +string, a directive starts with `%´, is optionally followed by a +size specifier `l´, an optional flag `+´, another optional flag +`#´, and is finished by a specifier: `%´ denotes a literal +percent sign, `c´ denotes a character, `s´ denotes a string, +`i´ and `d´ denote an integer, `o´, `u´, `x´ +denote an unsigned integer, `.*s´ denotes a string preceded by a +width specification, `H´ denotes a `location_t *´ pointer, +`D´ denotes a general declaration, `F´ denotes a function +declaration, `T´ denotes a type, `A´ denotes a function argument, +`C´ denotes a tree code, `E´ denotes an expression, `L´ +denotes a programming language, `O´ denotes a binary operator, +`P´ denotes a function parameter, `Q´ denotes an assignment +operator, `V´ denotes a const/volatile qualifier. + +
+ + ++Qt format strings are described in the documentation of the QString class +file:/usr/lib/qt-3.0.5/doc/html/qstring.html. +In summary, a directive consists of a `%´ followed by a digit. The same +directive cannot occur more than once in a format string. + +
+ + +
For the maintainer, the general procedure differs from the C language
@@ -339,13 +452,13 @@ that language, and to combine the resulting files using msgcat.
-
fprintf "%2$d %1$d" (POSIX/XSI but not C 99)
+fprintf "%2$d %1$d"
autosprintf "%2$d %1$d"
(see section `Introduction' in GNU autosprintf)
@@ -414,11 +527,18 @@ autoconf (gettext.m4) and #if ENABLE_NLS
yes
+The following examples are available in the `examples´ directory:
+hello-c, hello-c-gnome, hello-c++, hello-c++-qt,
+hello-c++-kde, hello-c++-gnome, hello-objc,
+hello-objc-gnustep, hello-objc-gnome.
+
+
"`gettext "abc"`"
+"`gettext \"abc\"`"
gettext, ngettext programs
+eval_gettext, eval_ngettext shell functions
TEXTDOMAIN
TEXTDOMAINDIR
. gettext.sh
xgettext
+An example is available in the `examples´ directory: hello-sh.
+
+
+Preparing a shell script for internationalization is conceptually similar +to the steps described in section 3 Preparing Program Sources. The concrete steps for shell +scripts are as follows. -
sh
+"abc", 'abc', abc
+Insert the line
-$"abc"
-gettext, ngettext programs
++. gettext.sh +-
TEXTDOMAIN
+near the top of the script. gettext.sh is a shell function library
+that provides the functions
+eval_gettext (see section 13.5.2.6 Invoking the eval_gettext function) and
+eval_ngettext (see section 13.5.2.7 Invoking the eval_ngettext function).
+You have to ensure that gettext.sh can be found in the PATH.
-TEXTDOMAINDIR
+TEXTDOMAIN and TEXTDOMAINDIR environment
+variables. Usually TEXTDOMAIN is the package or program name, and
+TEXTDOMAINDIR is the absolute pathname corresponding to
+$prefix/share/locale, where $prefix is the installation location.
-+TEXTDOMAIN=@PACKAGE@ +export TEXTDOMAIN +TEXTDOMAINDIR=@LOCALEDIR@ +export TEXTDOMAINDIR +-
bash --dump-po-strings
+"`...`" or "$(...)"), variable access with defaulting (like
+${variable-default}), access to positional arguments
+(like $0, $1, ...) or highly volatile shell variables (like
+$?). This can always be done through simple local code restructuring.
+For example,
++echo "Usage: $0 [OPTION] FILE..." +-
+program_name=$0 +echo "Usage: $program_name [OPTION] FILE..." +-
py
+Similarly,
-'abc', u'abc', r'abc', ur'abc',
-"abc", u"abc", r"abc", ur"abc",
-"'abc"', u"'abc"', r"'abc"', ur"'abc"',
-"""abc""", u"""abc""", r"""abc""", ur"""abc"""
-_('abc') etc.
++echo "Remaining files: `ls | wc -l`" +-
gettext.gettext, gettext.dgettext,
-gettext.ngettext, gettext.dngettext,
-also ugettext, ungettext
+becomes
-gettext.textdomain function, or
-gettext.install(domain) function
-gettext.bindtextdomain function, or
-gettext.install(domain,localedir) function
++filecount="`ls | wc -l`" +echo "Remaining files: $filecount" +-
import gettext
+For each translatable string, change the output command `echo´ or
+`$echo´ to `gettext´ (if the string contains no references to
+shell variables) or to `eval_gettext´ (if it refers to shell variables),
+followed by a no-argument `echo´ command (to account for the terminating
+newline). Similarly, for cases with plural handling, replace a conditional
+`echo´ command with an invocation of `ngettext´ or
+`eval_ngettext´, followed by a no-argument `echo´ command.
+
-xgettext
-'...%(ident)d...' % { 'ident': value }
+gettext.sh
+gettext.sh, contained in the run-time package of GNU gettext, provides
+the following:
+
+
echo is set to a command that outputs its first argument
+and a newline, without interpreting backslashes in the argument string.
+
+eval_gettext function.
+
+eval_ngettext function.
+gettext program+gettext [option] [[textdomain] msgid] +gettext [option] -s [msgid]... ++ +
+
+The gettext program displays the native language translation of a
+textual message.
-
lisp
+
+
+Retrieve translated messages from textdomain. Usually a textdomain
+corresponds to a package, a program, or a module of a program.
-"abc"
+
+Enable expansion of some escape sequences. This option is for compatibility
+with the `echo´ program or shell built-in. The escape sequences
+`\b´, `\c´, `\f´, `\n´, `\r´, `\t´, `\v´,
+`\\´, and `\´ followed by one to three octal digits, are interpreted
+like the `echo´ program does.
-(_ "abc"), (ENGLISH "abc")
+
+This option is only for compatibility with the `echo´ program or shell
+built-in. It has no effect.
-i18n:gettext, i18n:ngettext
-
-i18n:textdomain
+
+
+Display this help and exit.
-i18n:textdomaindir
+
+Suppress trailing newline. By default, gettext adds a newline to
+the output.
-xgettext -k_ -kENGLISH
+format "~1@*~D ~0@*~D"
+
+If the textdomain parameter is not given, the domain is determined from
+the environment variable TEXTDOMAIN. If the message catalog is not
+found in the regular directory, another location can be specified with the
+environment variable TEXTDOMAINDIR.
-
+When used with the -s option the program behaves like the `echo´
+command. But it does not simply copy its arguments to stdout. Instead those
+messages found in the selected catalog are translated.
-
ngettext program+ngettext [option] [textdomain] msgid msgid-plural count ++
+
+The ngettext program displays the native language translation of a
+textual message whose grammatical form depends on a number.
-
d
+
+
+Retrieve translated messages from textdomain. Usually a textdomain
+corresponds to a package, a program, or a module of a program.
-"abc"
+
+Enable expansion of some escape sequences. This option is for compatibility
+with the `gettext´ program. The escape sequences
+`\b´, `\c´, `\f´, `\n´, `\r´, `\t´, `\v´,
+`\\´, and `\´ followed by one to three octal digits, are interpreted
+like the `echo´ program does.
-ENGLISH ? "abc" : ""
-GETTEXT("abc")
-GETTEXTL("abc")
+
+This option is only for compatibility with the `gettext´ program. It has
+no effect.
-clgettext, clgettextl
-
-#include "lispbibl.c"
+Retrieve translated message from textdomain.
-clisp-xgettext
+Choose singular/plural form based on this value.
-
+If the textdomain parameter is not given, the domain is determined from
+the environment variable TEXTDOMAIN. If the message catalog is not
+found in the regular directory, another location can be specified with the
+environment variable TEXTDOMAINDIR.
+
+
envsubst program+envsubst [option] [shell-format] ++ +
+
+
+
+The envsubst program substitutes the values of environment variables.
+
+
+Operation mode + +
+fprintf "%2$d %1$d" (POSIX/XSI but not C 99)
+
+
+Output the variables occurring in shell-format.
-+Informative output + +
+
+In normal operation mode, standard input is copied to standard output,
+with references to environment variables of the form $VARIABLE or
+${VARIABLE} being replaced with the corresponding values. If a
+shell-format is given, only those environment variables that are
+referenced in 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 ${variable-default} or
+$(command-list) or `command-list`, are not performed
+by the envsubst program, due to security reasons.
+
+
+When --variables is used, standard input is ignored, and the output
+consists of the environment variables that are referenced in
+shell-format, one per line.
+
+
eval_gettext function+eval_gettext msgid ++ +
+ +This function outputs the native language translation of a textual message, +performing dollar-substitution on the result. Note that only shell variables +mentioned in msgid will be dollar-substituted in the result. + +
+ + +eval_ngettext function+eval_ngettext msgid msgid-plural count ++ +
+ +This function outputs the native language translation of a textual message +whose grammatical form depends on a number, performing dollar-substitution +on the result. Note that only shell variables mentioned in msgid or +msgid-plural will be dollar-substituted in the result. + +
+ + +
+GNU bash 2.0 or newer has a special shorthand for translating a
+string and substituting variable values in it: $"msgid". But
+the use of this construct is discouraged, due to the security
+holes it opens and due to its portability problems.
+
+
+The security holes of $"..." come from the fact that after looking up
+the translation of the string, bash processes it like it processes
+any double-quoted string: dollar and backquote processing, like `eval´
+does.
+
+
0x60. For example, the byte sequence \xe0\x60 is a single
+character in these locales. Many versions of bash (all versions
+up to bash-2.05, and newer versions on platforms without mbsrtowcs()
+function) don't know about character boundaries and see a backquote character
+where there is only a particular Chinese character. Thus it can start
+executing part of the translation as a command list. This situation can occur
+even without the translator being aware of it: if the translator provides
+translations in the UTF-8 encoding, it is the gettext() function which
+will, during its conversion from the translator's encoding to the user's
+locale's encoding, produce the dangerous \x60 bytes.
+
+"`...`" or dollar-parentheses "$(...)" in her translations.
+The enclosed strings would be executed as command lists by the shell.
+
+The portability problem is that bash must be built with
+internationalization support; this is normally not the case on systems
+that don't have the gettext() function in libc.
+
+
el
+py
"abc"
+'abc', u'abc', r'abc', ur'abc',
+"abc", u"abc", r"abc", ur"abc",
+"'abc"', u"'abc"', r"'abc"', ur"'abc"',
+"""abc""", u"""abc""", r"""abc""", ur"""abc"""
(_"abc")
+_('abc') etc.
gettext, dgettext (xemacs only)
+gettext.gettext, gettext.dgettext,
+gettext.ngettext, gettext.dngettext,
+also ugettext, ungettext
domain special form (xemacs only)
+gettext.textdomain function, or
+gettext.install(domain) function
bind-text-domain function (xemacs only)
+gettext.bindtextdomain function, or
+gettext.install(domain,localedir) function
import gettext
format "%2$d %1$d"
+'...%(ident)d...' % { 'ident': value }
I18N3 defined at build time, no translation.
+fully portable
+An example is available in the `examples´ directory: hello-python.
+
+
jl
+lisp
(_"abc")
+(_ "abc"), (ENGLISH "abc")
gettext
+i18n:gettext, i18n:ngettext
textdomain function
+i18n:textdomain
bindtextdomain function
+i18n:textdomaindir
(require 'rep.i18n.gettext)
+---
xgettext
+xgettext -k_ -kENGLISH
format "%2$d %1$d"
+format "~1@*~D ~0@*~D"
+An example is available in the `examples´ directory: hello-clisp.
+
+
st
+d
'abc'
+"abc"
NLS ? 'abc'
+ENGLISH ? "abc" : ""
+GETTEXT("abc")
+GETTEXTL("abc")
LcMessagesDomain>>#at:, LcMessagesDomain>>#at:plural:with:
+clgettext, clgettextl
LcMessages>>#domain:localeDirectory: (returns a LcMessagesDomain
-object).I18N Locale default messages domain: 'gettext' localeDirectory: /usr/local/share/locale'
+---
LcMessages>>#domain:localeDirectory:, see above.
+---
I18N Locale default.
+automatic
PackageLoader fileInPackage: 'I18N'!
+#include "lispbibl.c"
xgettext
+clisp-xgettext
'%1 %2' bindWith: 'Hello' with: 'world'
+fprintf "%2$d %1$d"
java
+el
"abc"
(_"abc")
GettextResource.gettext, GettextResource.ngettext
+gettext, dgettext (xemacs only)
ResourceBundle.getResource instead
+domain special form (xemacs only)
bind-text-domain function (xemacs only)
xgettext -k_
+xgettext
MessageFormat.format "{1,number} {0,number}"
+format "%2$d %1$d"
I18N3 defined at build time, no translation.
-Before marking strings as internationalizable, uses of the string
-concatenation operator need to be converted to MessageFormat
-applications. For example, "file "+filename+" not found" becomes
-MessageFormat.format("file {0} not found", new Object[] { filename }).
-Only after this is done, can the strings be marked and extracted.
-
-GNU gettext uses the native Java internationalization mechanism, namely
-ResourceBundles. There are two formats of ResourceBundles:
-.properties files and .class files. The .properties
-format is a text file which the translators can directly edit, like PO
-files, but which doesn't support plural forms. Whereas the .class
-format is compiled from .java source code and can support plural
-forms (provided it is accessed through an appropriate API, see below).
-
-To convert a PO file to a .properties file, the msgcat
-program can be used with the option --properties-output. To convert
-a .properties file back to a PO file, the msgcat program
-can be used with the option --properties-input. All the tools
-that manipulate PO files can work with .properties files as well,
-if given the --properties-input and/or --properties-output
-option.
+
-To convert a PO file to a ResourceBundle class, the msgfmt program
-can be used with the option --java or --java2. To convert a
-ResourceBundle back to a PO file, the msgunfmt program can be used
-with the option --java.
+
-Two different programmatic APIs can be used to access ResourceBundles.
-Note that both APIs work with all kinds of ResourceBundles, whether
-GNU gettext generated classes, or other .class or .properties
-files.
+
jl
-"abc"
-The java.util.ResourceBundle API.
+(_"abc")
-In particular, its getString function returns a string translation.
-Note that a missing translation yields a MissingResourceException.
+gettext
-This has the advantage of being the standard API. And it does not require
-any additional libraries, only the msgcat generated .properties
-files or the msgfmt generated .class files. But it cannot do
-plural handling, even if the resource was generated by msgfmt from
-a PO file with plural handling.
+textdomain function
+
+bindtextdomain function
+
+(require 'rep.i18n.gettext)
+
+xgettext
+
+format "%2$d %1$d"
+
+
+An example is available in the `examples´ directory: hello-librep.
+
+
st
+
+'abc'
+
+NLS ? 'abc'
+
+LcMessagesDomain>>#at:, LcMessagesDomain>>#at:plural:with:
+
+LcMessages>>#domain:localeDirectory: (returns a LcMessagesDomain
+object).I18N Locale default messages domain: 'gettext' localeDirectory: /usr/local/share/locale'
+
+LcMessages>>#domain:localeDirectory:, see above.
+
+I18N Locale default.
+
+PackageLoader fileInPackage: 'I18N'!
+
+xgettext
+
+'%1 %2' bindWith: 'Hello' with: 'world'
+
+
+An example is available in the `examples´ directory:
+hello-smalltalk.
+
+
java
+
+GettextResource.gettext, GettextResource.ngettext
+
+ResourceBundle.getResource instead
+
+xgettext -k_
+
+MessageFormat.format "{1,number} {0,number}"
+
+
+Before marking strings as internationalizable, uses of the string
+concatenation operator need to be converted to MessageFormat
+applications. For example, "file "+filename+" not found" becomes
+MessageFormat.format("file {0} not found", new Object[] { filename }).
+Only after this is done, can the strings be marked and extracted.
+
+
+GNU gettext uses the native Java internationalization mechanism, namely
+ResourceBundles. There are two formats of ResourceBundles:
+.properties files and .class files. The .properties
+format is a text file which the translators can directly edit, like PO
+files, but which doesn't support plural forms. Whereas the .class
+format is compiled from .java source code and can support plural
+forms (provided it is accessed through an appropriate API, see below).
+
+
+To convert a PO file to a .properties file, the msgcat
+program can be used with the option --properties-output. To convert
+a .properties file back to a PO file, the msgcat program
+can be used with the option --properties-input. All the tools
+that manipulate PO files can work with .properties files as well,
+if given the --properties-input and/or --properties-output
+option.
+
+
+To convert a PO file to a ResourceBundle class, the msgfmt program
+can be used with the option --java or --java2. To convert a
+ResourceBundle back to a PO file, the msgunfmt program can be used
+with the option --java.
+
+
+Two different programmatic APIs can be used to access ResourceBundles.
+Note that both APIs work with all kinds of ResourceBundles, whether
+GNU gettext generated classes, or other .class or .properties
+files.
+
+
java.util.ResourceBundle API.
+
+In particular, its getString function returns a string translation.
+Note that a missing translation yields a MissingResourceException.
+
+This has the advantage of being the standard API. And it does not require
+any additional libraries, only the msgcat generated .properties
+files or the msgfmt generated .class files. But it cannot do
+plural handling, even if the resource was generated by msgfmt from
+a PO file with plural handling.
ngettext function for plural
handling.
-
+
To use this API, one needs the libintl.jar file which is part of
the GNU gettext package and distributed under the LGPL.
+Three examples, using the second API, are available in the `examples´
+directory: hello-java, hello-java-awt, hello-java-swing.
+
+
+An example is available in the `examples´ directory: hello-gawk.
+
+
uses sysutils;format "%1:d %0:d"
-
+The Pascal compiler has special support for the ResourceString data
+type. It generates a .rst file. This is then converted to a
+.pot file by use of xgettext or rstconv. At runtime,
+a .mo file corresponding to translations of this .pot file
+can be loaded using the TranslateResourceStrings function in the
+gettext unit.
+
+
+An example is available in the `examples´ directory: hello-pascal.
+
+
cpp
+
+"abc"
+
+_("abc")
+
+wxLocale::GetString, wxGetTranslation
+
+wxLocale::AddCatalog
+
+wxLocale::AddCatalogLookupPathPrefix
+
+wxLocale::Init, wxSetLocale
+
+#include <wx/intl.h>
+
+include/wx/intl.h and src/common/intl.cpp
+
+xgettext
+
+ycp
+
+"abc"
+
+_("abc")
+
+_() with 1 or 3 arguments
+
+textdomain statement
+
+xgettext
+
+sformat "%2 %1"
+
+
+An example is available in the `examples´ directory: hello-ycp.
+
+
tcl
+
+"abc"
+
+[_ "abc"]
+
+::msgcat::mc
+
+::msgcat::mcload instead
+
+package require msgcat
+proc _ {s} {return [::msgcat::mc $s]}
+
+xgettext -k_
+
+format "%2\$d %1\$d"
+
+
+Two examples are available in the `examples´ directory:
+hello-tcl, hello-tcl-tk.
+
+
+Before marking strings as internationalizable, substitutions of variables
+into the string need to be converted to format applications. For
+example, "file $filename not found" becomes
+[format "file %s not found" $filename].
+Only after this is done, can the strings be marked and extracted.
+After marking, this example becomes
+[format [_ "file %s not found"] $filename] or
+[msgcat::mc "file %s not found" $filename]. Note that the
+msgcat::mc function implicitly calls format when more than one
+argument is given.
+
+
pl, PL, pm, cgi
+
+"abc"
+
+'abc'
+
+qq (abc)
+
+q (abc)
+
+qr /abc/
+
+qx (/bin/date)
+
+/pattern match/
+
+?pattern match?
+
+s/substitution/operators/
+
+$tied_hash{"message"}
+
+$tied_hash_reference->{"message"}
+
+__ (double underscore)
+
+gettext, dgettext, dcgettext, ngettext,
+dngettext, dcngettext
+
+textdomain function
+
+bindtextdomain function
+
+bind_textdomain_codeset function
+
+setlocale (LC_ALL, "");
+
+use POSIX;
+use Locale::TextDomain; (included in the package libintl-perl
+which is available on the Comprehensive Perl Archive Network CPAN,
+http://www.cpan.org/).
+
+xgettext -k__ -k\$__ -k%__ -k__x -k__n:1,2 -k__nx:1,2 -k__xn:1,2 -kN__ -k
+
+printf "%2\$d %1\$d", ... (requires Perl 5.8.0 or newer)
+__expand("[new] replaces [old]", old => $oldvalue, new => $newvalue)
+
+libintl-perl package is platform independent but is not
+part of the Perl core. The programmer is responsible for
+providing a dummy implementation of the required functions if the
+package is not installed on the target system.
+
+libintl-perl, available on CPAN
+(http://www.cpan.org/).
+
+
+An example is available in the `examples´ directory: hello-perl.
+
+
+The xgettext parser backend for Perl differs significantly from
+the parser backends for other programming languages, just as Perl
+itself differs significantly from other programming languages. The
+Perl parser backend offers many more string marking facilities than
+the other backends but it also has some Perl specific limitations, the
+worst probably being its imperfectness.
+
+
+It is often heard that only Perl can parse Perl. This is not true. +Perl cannot be parsed at all, it can only be executed. +Perl has various built-in ambiguities that can only be resolved at runtime. + +
++The following example may illustrate one common problem: + +
+ ++print gettext "Hello World!"; ++ +
+Although this example looks like a bullet-proof case of a function +invocation, it is not: + +
+ ++open gettext, ">testfile" or die; +print gettext "Hello world!" ++ +
+In this context, the string gettext looks more like a
+file handle. But not necessarily:
+
+
+use Locale::Messages qw (:libintl_h); +open gettext ">testfile" or die; +print gettext "Hello world!"; ++ +
+Now, the file is probably syntactically incorrect, provided that the module
+Locale::Messages found first in the Perl include path exports a
+function gettext. But what if the module
+Locale::Messages really looks like this?
+
+
+use vars qw (*gettext); + +1; ++ +
+In this case, the string gettext will be interpreted as a file
+handle again, and the above example will create a file `testfile´
+and write the string "Hello world!" into it. Even advanced
+control flow analysis will not really help:
+
+
+if (0.5 < rand) {
+ eval "use Sane";
+} else {
+ eval "use InSane";
+}
+print gettext "Hello world!";
+
+
+
+If the module Sane exports a function gettext that does
+what we expect, and the module InSane opens a file for writing
+and associates the handle gettext with this output
+stream, we are clueless again about what will happen at runtime. It is
+completely unpredictable. The truth is that Perl has so many ways to
+fill its symbol table at runtime that it is impossible to interpret a
+particular piece of code without executing it.
+
+
+Of course, xgettext will not execute your Perl sources while
+scanning for translatable strings, but rather use heuristics in order
+to guess what you meant.
+
+
+Another problem is the ambiguity of the slash and the question mark. +Their interpretation depends on the context: + +
+ ++# A pattern match. +print "OK\n" if /foobar/; + +# A division. +print 1 / 2; + +# Another pattern match. +print "OK\n" if ?foobar?; + +# Conditional. +print $x ? "foo" : "bar"; ++ +
+The slash may either act as the division operator or introduce a
+pattern match, whereas the question mark may act as the ternary
+conditional operator or as a pattern match, too. Other programming
+languages like awk present similar problems, but the consequences of a
+misinterpretation are particularly nasty with Perl sources. In awk
+for instance, a statement can never exceed one line and the parser
+can recover from a parsing error at the next newline and interpret
+the rest of the input stream correctly. Perl is different, as a
+pattern match is terminated by the next appearance of the delimiter
+(the slash or the question mark) in the input stream, regardless of
+the semantic context. If a slash is really a division sign but
+mis-interpreted as a pattern match, the rest of the input file is most
+probably parsed incorrectly.
+
+
+If you find that xgettext fails to extract strings from
+portions of your sources, you should therefore look out for slashes
+and/or question marks preceding these sections. You may have come
+across a bug in xgettext's Perl parser (and of course you
+should report that bug). In the meantime you should consider to
+reformulate your code in a manner less challenging to xgettext.
+
+
+Unless you instruct xgettext otherwise by invoking it with one
+of the options --keyword or -k, it will recognize the
+following keywords in your Perl sources:
+
+
gettext
+
+dgettext
+
+dcgettext
+
+ngettext:1,2
+
+The first (singular) and the second (plural) argument will be
+extracted.
+
+dngettext:1,2
+
+The first (singular) and the second (plural) argument will be
+extracted.
+
+dcngettext:1,2
+
+The first (singular) and the second (plural) argument will be
+extracted.
+
+gettext_noop
+
+%gettext
+
+The keys of lookups into the hash %gettext will be extracted.
+
+$gettext
+
+The keys of lookups into the hash reference $gettext will be extracted.
+
+
+Translating messages at runtime is normally performed by looking up the
+original string in the translation database and returning the
+translated version. The "natural" Perl implementation is a hash
+lookup, and, of course, xgettext supports such practice.
+
+
+print __"Hello world!";
+print $__{"Hello world!"};
+print $__->{"Hello world!"};
+print $$__{"Hello world!"};
+
+
+
+The above four lines all do the same thing. The Perl module
+Locale::TextDomain exports by default a hash %__ that
+is tied to the function __(). It also exports a reference
+$__ to %__.
+
+
+If an argument to the xgettext option --keyword,
+resp. -k starts with a percent sign, the rest of the keyword is
+interpreted as the name of a hash. If it starts with a dollar
+sign, the rest of the keyword is interpreted as a reference to a
+hash.
+
+
+Note that you can omit the quotation marks (single or double) around +the hash key (almost) whenever Perl itself allows it: + +
+ +
+print $gettext{Error};
+
+
+
+The exact rule is: You can omit the surrounding quotes, when the hash
+key is a valid C (!) identifier, i. e. when it starts with an
+underscore or an ASCII letter and is followed by an arbitrary number
+of underscores, ASCII letters or digits. Other Unicode characters
+are not allowed, regardless of the use utf8 pragma.
+
+
+Perl offers a plethora of different string constructs. Those that can
+be used either as arguments to functions or inside braces for hash
+lookups are generally supported by xgettext.
+
+
+print gettext "Hello World!"; ++ +
+print gettext 'Hello World!'; ++ +
+print gettext qq |Hello World!|; +print gettext qq <E-mail: <guido\@imperia.net>>; ++ +The operator
qq is fully supported. You can use arbitrary
+delimiters, including the four bracketing delimiters (round, angle,
+square, curly) that nest.
+
++print gettext q |Hello World!|; +print gettext q <E-mail: <guido@imperia.net>>; ++ +The operator
q is fully supported. You can use arbitrary
+delimiters, including the four bracketing delimiters (round, angle,
+square, curly) that nest.
+
++print gettext qx ;LANGUAGE=C /bin/date; +print gettext qx [/usr/bin/ls | grep '^[A-Z]*']; ++ +The operator
qx is fully supported. You can use arbitrary
+delimiters, including the four bracketing delimiters (round, angle,
+square, curly) that nest.
+
+The example is actually a useless use of gettext. It will
+invoke the gettext function on the output of the command
+specified with the qx operator. The feature was included
+in order to make the interface consistent (the parser will extract
+all strings and quote-like expressions).
+
++print gettext <<'EOF'; +program not found in $PATH +EOF + +print ngettext <<EOF, <<"EOF"; +one file deleted +EOF +several files deleted +EOF ++ +Here-documents are recognized. If the delimiter is enclosed in single +quotes, the string is not interpolated. If it is enclosed in double +quotes or has no quotes at all, the string is interpolated. + +Delimiters that start with a digit are not supported! + +
+Perl is capable of interpolating variables into strings. This offers +some nice features in localized programs but can also lead to +problems. + +
++A common error is a construct like the following: + +
+ ++print gettext "This is the program $0!\n"; ++ +
+Perl will interpolate at runtime the value of the variable $0
+into the argument of the gettext() function. Hence, this
+argument is not a string constant but a variable argument ($0
+is a global variable that holds the name of the Perl script being
+executed). The interpolation is performed by Perl before the string
+argument is passed to gettext() and will therefore depend on
+the name of the script which can only be determined at runtime.
+Consequently, it is almost impossible that a translation can be looked
+up at runtime (except if, by accident, the interpolated string is found
+in the message catalog).
+
+
+The xgettext program will therefore terminate parsing with a fatal
+error if it encounters a variable inside of an extracted string. In
+general, this will happen for all kinds of string interpolations that
+cannot be safely performed at compile time. If you absolutely know
+what you are doing, you can always circumvent this behavior:
+
+
+my $know_what_i_am_doing = "This is program $0!\n"; +print gettext $know_what_i_am_doing; ++ +
+Since the parser only recognizes strings and quote-like expressions, +but not variables or other terms, the above construct will be +accepted. You will have to find another way, however, to let your +original string make it into your message catalog. + +
+
+If invoked with the option --extract-all, resp. -a,
+variable interpolation will be accepted. Rationale: You will
+generally use this option in order to prepare your sources for
+internationalization.
+
+
+Please see the manual page `man perlop´ for details of strings and +quote-like expressions that are subject to interpolation and those +that are not. Safe interpolations (that will not lead to a fatal +error) are: + +
+ +\t (tab, HT, TAB), \n
+
+(newline, NL), \r (return, CR), \f (form feed, FF),
+\b (backspace, BS), \a (alarm, bell, BEL), and \e
+(escape, ESC).
+
+\033
+
+use utf8 pragma.
+
+\x1b
+
+\x{263a}
+
+use utf8 pragma.
+
+\c[ (CTRL-[)
+
+\N{LATIN CAPITAL LETTER C WITH CEDILLA}
+
+use utf8 pragma.
++The following escapes are considered partially safe: + +
+ +\l lowercase next char
+
+\u uppercase next char
+
+\L lowercase till \E
+
+\U uppercase till \E
+
+\E end case modification
+
+\Q quote non-word characters till \E
+
+
+These escapes are only considered safe if the string consists of
+ASCII characters only. Translation of characters outside the range
+defined by ASCII is locale-dependent and can actually only be performed
+at runtime; xgettext doesn't do these locale-dependent translations
+at extraction time.
+
+
+Except for the modifier \Q, these translations, albeit valid,
+are generally useless and only obfuscate your sources. If a
+translation can be safely performed at compile time you can just as
+well write what you mean.
+
+
+Perl is often used to generate sources for other programming languages +or arbitrary file formats. Web applications that output HTML code +make a prominent example for such usage. + +
++You will often come across situations where you want to intersperse +code written in the target (programming) language with translatable +messages, like in the following HTML example: + +
+ +
+print gettext <<EOF;
+<h1>My Homepage</h1>
+<script language="JavaScript"><!--
+for (i = 0; i < 100; ++i) {
+ alert ("Thank you so much for visiting my homepage!");
+}
+//--></script>
+EOF
+
+
++The parser will extract the entire here document, and it will appear +entirely in the resulting PO file, including the JavaScript snippet +embedded in the HTML code. If you exaggerate with constructs like +the above, you will run the risk that the translators of your package +will look out for a less challenging project. You should consider an +alternative expression here: + +
-
+print <<EOF;
+<h1>$gettext{"My Homepage"}</h1>
+<script language="JavaScript"><!--
+for (i = 0; i < 100; ++i) {
+ alert ("$gettext{'Thank you so much for visiting my homepage!'}");
+}
+//--></script>
+EOF
+
-The Pascal compiler has special support for the ResourceString data
-type. It generates a .rst file. This is then converted to a
-.pot file by use of xgettext or rstconv. At runtime,
-a .mo file corresponding to translations of this .pot file
-can be loaded using the TranslateResourceStrings function in the
-gettext unit.
+Only the translatable portions of the code will be extracted here, and
+the resulting PO file will begrudgingly improve in terms of readability.
+
+
+You can interpolate hash lookups in all strings or quote-like +expressions that are subject to interpolation (see the manual page +`man perlop´ for details). Double interpolation is invalid, however:
+
+# TRANSLATORS: Replace "the earth" with the name of your planet.
+print gettext qq{Welcome to $gettext->{"the earth"}};
+
-
-
+The qq-quoted string is recognized as an argument to xgettext in
+the first place, and checked for invalid variable interpolation. The
+dollar sign of hash-dereferencing will therefore terminate the parser
+with an "invalid interpolation" error.
+It is valid to interpolate hash lookups in regular expressions: -
cpp
+
+if ($var =~ /$gettext{"the earth"}/) {
+ print gettext "Match!\n";
+}
+s/$gettext{"U. S. A."}/$gettext{"U. S. A."} $gettext{"(dial +0)"}/g;
+
-"abc"
-_("abc")
-wxLocale::GetString, wxGetTranslation
+wxLocale::AddCatalog
+
+
+In Perl, parentheses around function arguments are mostly optional.
+xgettext will always assume that all
+recognized keywords (except for hashs and hash references) are names
+of properly prototyped functions, and will (hopefully) only require
+parentheses where Perl itself requires them. All constructs in the
+following example are therefore ok to use:
-
wxLocale::AddCatalogLookupPathPrefix
+
-wxLocale::Init, wxSetLocale
+
+print gettext ("Hello World!\n");
+print gettext "Hello World!\n";
+print dgettext ($package => "Hello World!\n");
+print dgettext $package, "Hello World!\n";
+
+# The "fat comma" => turns the left-hand side argument into a
+# single-quoted string!
+print dgettext smellovision => "Hello World!\n";
+
+# The following assignment only works with prototyped functions.
+# Otherwise, the functions will act as "greedy" list operators and
+# eat up all following arguments.
+my $anonymous_hash = {
+ planet => gettext "earth",
+ cakes => ngettext "one cake", "several cakes", $n,
+ still => $works,
+};
+# The same without fat comma:
+my $other_hash = {
+ 'planet', gettext "earth",
+ 'cakes', ngettext "one cake", "several cakes", $n,
+ 'still', $works,
+};
+
+# Parentheses are only significant for the first argument.
+print dngettext 'package', ("one cake", "several cakes", $n), $discarded;
+
+
+
+
+#include <wx/intl.h>
+
+
+The necessity of long messages can often lead to a cumbersome or
+unreadable coding style. Perl has several options that may prevent
+you from writing unreadable code, and
+xgettext does its best to do likewise. This is where the dot
+operator (the string concatenation operator) may come in handy:
-
include/wx/intl.h and src/common/intl.cpp
+
-xgettext
+
+print gettext ("This is a very long"
+ . " message that is still"
+ . " readable, because"
+ . " it is split into"
+ . " multiple lines.\n");
+
-
+Perl is smart enough to concatenate these constant string fragments
+into one long string at compile time, and so is
+xgettext. You will only find one long message in the resulting
+POT file.
-
+Note that the future Perl 6 will probably use the underscore
+(`_´) as the string concatenation operator, and the dot
+(`.´) for dereferencing. This new syntax is not yet supported by
+xgettext.
-
+If embedded newline characters are not an issue, or even desired, you +may also insert newline characters inside quoted strings wherever you +feel like it: +
+
+print gettext ("<em>In HTML output
+embedded newlines are generally no
+problem, since adjacent whitespace
+is always rendered into a single
+space character.</em>");
+
-- - +You may also consider to use here documents:
-+print gettext <<EOF; +<em>In HTML output +embedded newlines are generally no +problem, since adjacent whitespace +is always rendered into a single +space character.</em> +EOF +-
ycp
++Please do not forget, that the line breaks are real, i. e. they +translate into newline characters that will consequently show up in +the resulting POT file. -
"abc"
+
-_("abc")
-_() with 1 or 3 arguments
+textdomain statement
+
+
+The foregoing sections should have proven that
+xgettext is quite smart in extracting translatable strings from
+Perl sources. Yet, some more or less exotic constructs that could be
+expected to work, actually do not work.
-
+One of the more relevant limitations can be found in the +implementation of variable interpolation inside quoted strings. Only +simple hash lookups can be used there: -
+print <<EOF;
+$gettext{"The dot operator"
+ . " does not work"
+ . "here!"}
+Likewise, you cannot @{[ gettext ("interpolate function calls") ]}
+inside quoted strings or quote-like expressions.
+EOF
+
-
+This is valid Perl code and will actually trigger invocations of the
+gettext function at runtime. Yet, the Perl parser in
+xgettext will fail to recognize the strings. A less obvious
+example can be found in the interpolation of regular expressions:
-
xgettext
+
-sformat "%2 %1"
+
+s/<!--START_OF_WEEK-->/gettext ("Sunday")/e;
+
-
+The modifier e will cause the substitution to be interpreted as
+an evaluable statement. Consequently, at runtime the function
+gettext() is called, but again, the parser fails to extract the
+string "Sunday". Use a temporary variable as a simple workaround if
+you really happen to need this feature:
-
+my $sunday = gettext "Sunday"; +s/<!--START_OF_WEEK-->/$sunday/; ++ +
+Hash slices would also be handy but are not recognized: + +
+
+my @weekdays = @gettext{'Sunday', 'Monday', 'Tuesday', 'Wednesday',
+ 'Thursday', 'Friday', 'Saturday'};
+# Or even:
+@weekdays = @gettext{qw (Sunday Monday Tuesday Wednesday Thursday
+ Friday Saturday) };
+
-
-
-
+This is perfectly valid usage of the tied hash %gettext but the
+strings are not recognized and therefore will not be extracted.
+Another caveat of the current version is its rudimentary support for +non-ASCII characters in identifiers. You may encounter serious +problems if you use identifiers with characters outside the range of +'A'-'Z', 'a'-'z', '0'-'9' and the underscore '_'. -
+Maybe some of these missing features will be implemented in future +versions, but since you can always make do without them at minimal effort, +these todos have very low priority. -
tcl
+
++A nasty problem are brace format strings that already contain braces +as part of the normal text, for example the usage strings typically +encountered in programs: -
"abc"
+
-[_ "abc"]
+
+die "usage: $0 {OPTIONS} FILENAME...\n";
+
-::msgcat::mc
++If you want to internationalize this code with Perl brace format strings, +you will run into a problem: -
::msgcat::mcload instead
+
+die __x ("usage: {program} {OPTIONS} FILENAME...\n", program => $0);
+
-
+Whereas `{program}´ is a placeholder, `{OPTIONS}´
+is not and should probably be translated. Yet, there is no way to teach
+the Perl parser in xgettext to recognize the first one, and leave
+the other one alone.
-
package require msgcat
-proc _ {s} {return [::msgcat::mc $s]}
+
+
+There are two possible work-arounds for this problem. If you are
+sure that your program will run under Perl 5.8.0 or newer (these
+Perl versions handle positional parameters in printf()) or
+if you are sure that the translator will not have to reorder the arguments
+in her translation -- for example if you have only one brace placeholder
+in your string, or if it describes a syntax, like in this one --, you can
+mark the string as no-perl-brace-format and use printf():
-
xgettext -k_
+
+# xgettext: no-perl-brace-format
+die sprintf ("usage: %s {OPTIONS} FILENAME...\n", $0);
+
-format "%2\$d %1\$d"
++If you want to use the more portable Perl brace format, you will have to do +put placeholders in place of the literal braces: -
+die __x ("usage: {program} {[}OPTIONS{]} FILENAME...\n",
+ program => $0, '[' => '{', ']' => '}');
+
-Before marking strings as internationalizable, substitutions of variables
-into the string need to be converted to format applications. For
-example, "file $filename not found" becomes
-[format "file %s not found" $filename].
-Only after this is done, can the strings be marked and extracted.
-After marking, this example becomes
-[format [_ "file %s not found"] $filename] or
-[msgcat::mc "file %s not found" $filename]. Note that the
-msgcat::mc function implicitly calls format when more than one
-argument is given.
+Perl brace format strings know no escaping mechanism. No matter how this
+escaping mechanism looked like, it would either give the programmer a
+hard time, make translating Perl brace format strings heavy-going, or
+result in a performance penalty at runtime, when the format directives
+get executed. Most of the time you will happily get along with
+printf() for this special case.
pl, PL
+php, php3, php4
"abc"
+"abc", 'abc'
_("abc")
gettext, dgettext, dcgettext
+gettext, dgettext, dcgettext; starting with PHP 4.2.0
+also ngettext, dngettext, dcngettext
setlocale (LC_ALL, "");
+Programmer must call setlocale (LC_ALL, "")
use POSIX;
-use Locale::gettext;
+---
xgettext
printf "%2\$d %1\$d"
+An example is available in the `examples´ directory: hello-php.
+
+
php, php3, php4
+pike
"abc", 'abc'
+"abc"
_("abc")
+---
setlocale (LC_ALL, "")
+setlocale function
import Locale.Gettext;
xgettext
+---
printf "%2\$d %1\$d"
+---
pike
+c, h.
_("abc")
gettext, dgettext, dcgettext
+gettext, dgettext, dcgettext, ngettext,
+dngettext, dcngettext
setlocale function
+Programmer must call setlocale (LC_ALL, "")
import Locale.Gettext;
+#include "intl.h"
xgettext -k_
Here is a list of other data formats which can be internationalized @@ -1677,7 +3210,7 @@ using GNU gettext. -
glade
+glade, glade2
xgettext, libglade-xgettext
+xgettext, libglade-xgettext, xml-i18n-extract, intltool-extract
diff --git a/gettext-tools/doc/gettext_14.html b/gettext-tools/doc/gettext_14.html index 342e46841..3a6aed764 100644 --- a/gettext-tools/doc/gettext_14.html +++ b/gettext-tools/doc/gettext_14.html @@ -1,7 +1,7 @@
+ from gettext.texi on 30 November 2003 -->-
We would like to conclude this GNU gettext manual by presenting
@@ -22,9 +22,9 @@ about Native Language Support matters.
-
gettextgettext
@@ -55,6 +55,9 @@ from Patrick and Richard, of course, but also from Mitchum DSouza
MacKenzie, François Pinard, and Paul Eggert, all pushing and
pulling in various directions, not always compatible, to the extent
that after a couple of test releases, glocale was torn apart.
+In particular, Paul Eggert -- always keeping an eye on developments
+in Solaris -- advocated the use of the gettext API over
+glocale's catgets-based API.
@@ -121,10 +124,10 @@ manipulating PO files.
-diff --git a/gettext-tools/doc/gettext_15.html b/gettext-tools/doc/gettext_15.html index 158ef4558..1defaef10 100644 --- a/gettext-tools/doc/gettext_15.html +++ b/gettext-tools/doc/gettext_15.html @@ -1,7 +1,7 @@
+ from gettext.texi on 30 November 2003 -->-
@@ -39,6 +39,9 @@ Afrikaans.
-
@@ -149,7 +149,7 @@ Congo (Rep.). Switzerland.
-
Jump to: a - +e +- g - m @@ -26,37 +28,41 @@ Jump to:
-
Jump to: @@ -18,491 +18,542 @@ Jump to:
xgettext option
-msgattrib option
-msgcat option
-msgcomm option
-msgconv option
-msgen option
-msgfilter option
-msggrep option
-msgmerge option
-msguniq option
-xgettext option
-msgfmt option
-msgmerge option
-xgettext option
-msgfmt option
-msgfmt option
-msgfmt option
-msgfmt option
-msgfmt option
-msgfmt option
-msgattrib option
-msgattrib option
-msggrep option
-msgmerge option
-gettextize option
-xgettext option
-xgettext option
-xgettext option
-msgattrib option
-msgcat option
-msgcmp option
-msgcomm option
-msgconv option
-msgen option
-msgexec option
-msgfilter option
-msgfmt option
-msggrep option
-msgmerge option
-msguniq option
-xgettext option
-msggrep option
-autopoint option
-gettextize option
-xgettext option
-msgfilter option
-msggrep option
-xgettext option
-msgfilter option
-msggrep option
-msgcat option
-msgcomm option
-xgettext option
-msggrep option
-autopoint option
-gettextize option
-msgattrib option
-msgcat option
-msgcomm option
-msgconv option
-msgen option
-msgfilter option
-msggrep option
-msgmerge option
-msgunfmt option
-msguniq option
-xgettext option
-xgettext option
-xgettext option
-msgattrib option
-autopoint option
-gettextize option
-msgattrib option
-msgcat option
-msgcmp option
-msgcomm option
-msgconv option
-msgen option
-msgexec option
-msgfilter option
-msgfmt option
-msggrep option
-msginit option
-msgmerge option
-msgunfmt option
-msguniq option
-xgettext option
-msggrep option
-msgattrib option
-msgattrib option
-msgcat option
-msgcomm option
-msgconv option
-msgen option
-msgfilter option
-msggrep option
-msgmerge option
-msgunfmt option
-msguniq option
-xgettext option
-msgexec option
-msgfilter option
-msginit option
-gettextize option
-msgfmt option
-msgunfmt option
-msgfmt option
-xgettext option
-msgfilter option
-xgettext option
-xgettext option
-msgcat option
-msgcomm option
-msgfmt option, --locale, msgfmt option
-msginit option
-msgunfmt option, --locale, msgunfmt option
-msggrep option
-msgcat option
-msgcomm option
-msggrep option
-xgettext option
-msggrep option
-xgettext option
-xgettext option
-msgcmp option
-msgmerge option
-gettextize option
-msgattrib option
-msgmerge option
-msgfmt option
-msgattrib option
-msgcat option
-msgcomm option
-msgconv option
-msgen option
-msgfilter option
-msggrep option
-msgmerge option
-msguniq option
-xgettext option
-msgattrib option
-msginit option
-msgattrib option
-msgcat option
-msgcomm option
-msgconv option
-msgen option
-msgfilter option
-msggrep option
-msginit option
-msgmerge option
-msgunfmt option
-msguniq option
-xgettext option
-msgattrib option
-msgcomm option
-xgettext option
-msgattrib option
-msgattrib option
-msgattrib option
-xgettext option
-xgettext option
-msgattrib option
-msgcat option
-msgcomm option
-msgconv option
-msgen option
-msgfilter option
-msgfmt option
-msggrep option
-msginit option
-msgmerge option
-msgunfmt option
-msguniq option
-msgattrib option
-msgcat option
-msgcmp option
-msgcomm option
-msgconv option
-msgen option
-msgexec option
-msgfilter option
-msgfmt option
-msggrep option
-msginit option
-msgmerge option
-msguniq option
-msgattrib option
-msgcat option
-msgcomm option
-msgconv option
-msgen option
-msgfilter option
-msggrep option
-msginit option
-msgmerge option
-msgunfmt option
-msguniq option
-xgettext option
-msgfilter option
-msgmerge option
-msggrep option
-msguniq option
-msgfmt option
-msgunfmt option
-msgattrib option
-msgattrib option
-msgfilter option
-msgmerge option
-msgattrib option
-msgcat option
-msgcomm option
-msgconv option
-msgen option
-msgfilter option
-msggrep option
-msgmerge option
-msguniq option
-xgettext option
-msgattrib option
-msgcat option
-msgcomm option
-msgconv option
-msgen option
-msgfilter option
-msggrep option
-msgmerge option
-msgunfmt option
-msguniq option
-xgettext option
-msgfmt option
-msgattrib option
-msgcat option
-msgcomm option
-msgconv option
-msgen option
-msgfilter option
-msgfmt option
-msggrep option
-msgmerge option
-msgunfmt option
-msguniq option
-xgettext option
-msgmerge option
-msgfmt option
-msgunfmt option
-msgcat option
-msgconv option
-msguniq option
-msgattrib option
-xgettext option
-msgcat option
-msgcomm option
-msguniq option
-msgattrib option
-msgmerge option
-msgcat option
-msguniq option
-msgfmt option
-msgfmt option
-msgmerge option
-msgunfmt option
-autopoint option
-gettextize option
-msgattrib option
-msgcat option
-msgcmp option
-msgcomm option
-msgconv option
-msgen option
-msgexec option
-msgfilter option
-msgfmt option
-msggrep option
-msginit option
-msgmerge option
-msgunfmt option
-msguniq option
-xgettext option
-msgattrib option
-msgcat option
-msgcomm option
-msgconv option
-msgen option
-msgfilter option
-msggrep option
-msginit option
-msgmerge option
-msgunfmt option
-msguniq option
-xgettext option
-msgcat option
-msgcomm option
-msgcat option
-msgcomm option
-msgfmt option
-xgettext option
-gettextize option
-msgfmt option
-msgfmt option
-msggrep option
-msgmerge option
-xgettext option
-xgettext option
-autopoint option
-gettextize option
-msgattrib option
-msgcat option
-msgcmp option
-msgcomm option
-msgconv option
-msgen option
-msgexec option
-msgfilter option
-msgfmt option, -d, msgfmt option
-msgfmt option
-msggrep option
-msgmerge option
-msgunfmt option
-msguniq option
-msguniq option
-xgettext option
-xgettext option
-msgfilter option
-msggrep option
-msggrep option
-autopoint option
-gettextize option
-msgattrib option
-msgcat option
-msgcat option
-msgcomm option
-msgcomm option
-msgconv option
-msgen option
-msgfilter option
-msgfilter option
-msgfmt option
-msggrep option
-msggrep option
-msgmerge option
-msguniq option
-xgettext option
-xgettext option
-msgattrib option
-msgcat option
-msgcmp option
-msgcomm option
-msgconv option
-msgen option
-msgexec option
-msgfilter option
-msgfmt option
-msggrep option
-msginit option
-msgmerge option
-msgunfmt option
-msguniq option
-xgettext option
-msgattrib option
-msgcat option
-msgcomm option
-msgconv option
-msgen option
-msgexec option
-msgfilter option
-msggrep option
-msginit option
-msgmerge option
-msgunfmt option
-msguniq option
-xgettext option
-msgfmt option
-msgunfmt option
-xgettext option
-msggrep option
-xgettext option
-msgfmt option, -l, msgfmt option
-msginit option
-msgunfmt option, -l, msgunfmt option
-xgettext option
-msgcmp option
-msggrep option
-msgmerge option
-xgettext option
-xgettext option
-msgattrib option
-msgcat option
-msgcomm option
-msgfilter option
-msggrep option
-msgmerge option
-msguniq option
-xgettext option
-msgattrib option
-msgcat option
-msgcomm option
-msgconv option
-msgen option
-msgfilter option
-msgfmt option
-msggrep option
-msginit option
-msgmerge option
-msgunfmt option
-msguniq option
-xgettext option
-msgattrib option
-msgattrib option
-msgcat option
-msgcat option
-msgcmp option
-msgcomm option
-msgcomm option
-msgconv option
-msgconv option
-msgen option
-msgen option
-msgexec option
-msgfilter option
-msgfilter option
-msgfmt option
-msggrep option
-msggrep option
-msginit option
-msginit option
-msgmerge option
-msgmerge option
-msgunfmt option
-msguniq option
-msguniq option
-xgettext option
-msgmerge option
-msgfmt option
-msgunfmt option
-msgattrib option
-msgcat option
-msgcomm option
-msgconv option
-msgen option
-msgfilter option
-msgmerge option
-msgunfmt option
-msguniq option
-xgettext option
-msgcat option
-msgconv option
-msggrep option
-msguniq option
-xgettext option
-msgcat option
-msgcomm option
-msgmerge option
-msguniq option
-msgattrib option
-msgcat option
-msgcmp option
-msgcomm option
-msgconv option
-msgen option
-msgexec option
-msgfilter option
-msgfmt option
-msgfmt option
-msggrep option
-msginit option
-msgmerge option
-msgmerge option
-msgunfmt option
-msgunfmt option
-msguniq option
-xgettext option
-msgattrib option
-msgcat option
-msgcomm option
-msgconv option
-msgen option
-msgfilter option
-msggrep option
-msginit option
-msgmerge option
-msgunfmt option
-msguniq option
-xgettext option
-xgettext option
+xgettext option
+msgattrib option
+msgcat option
+msgcomm option
+msgconv option
+msgen option
+msgfilter option
+msggrep option
+msgmerge option
+msguniq option
+xgettext option
+msgfmt option
+msgmerge option
+xgettext option
+msgfmt option
+msgfmt option
+msgfmt option
+msgfmt option
+msgfmt option
+msgfmt option
+msgattrib option
+msgattrib option
+msggrep option
+msgmerge option
+gettextize option
+xgettext option
+xgettext option
+xgettext option
+msgattrib option
+msgcat option
+msgcmp option
+msgcomm option
+msgconv option
+msgen option
+msgexec option
+msgfilter option
+msgfmt option
+msggrep option
+msgmerge option
+msguniq option
+xgettext option
+gettext option
+msggrep option
+ngettext option
+autopoint option
+gettextize option
+xgettext option
+msgfilter option
+msggrep option
+xgettext option
+msgfilter option
+msggrep option
+msgcat option
+msgcomm option
+xgettext option
+msggrep option
+xgettext option
+autopoint option
+gettextize option
+msgattrib option
+msgcat option
+msgcomm option
+msgconv option
+msgen option
+msgfilter option
+msggrep option
+msgmerge option
+msgunfmt option
+msguniq option
+xgettext option
+xgettext option
+xgettext option
+msgattrib option
+autopoint option
+envsubst option
+gettext option
+gettextize option
+msgattrib option
+msgcat option
+msgcmp option
+msgcomm option
+msgconv option
+msgen option
+msgexec option
+msgfilter option
+msgfmt option
+msggrep option
+msginit option
+msgmerge option
+msgunfmt option
+msguniq option
+ngettext option
+xgettext option
+msggrep option
+msgattrib option
+msgattrib option
+msgcat option
+msgcomm option
+msgconv option
+msgen option
+msgfilter option
+msggrep option
+msgmerge option
+msgunfmt option
+msguniq option
+xgettext option
+msgexec option
+msgfilter option
+msginit option
+gettextize option
+msgfmt option
+msgunfmt option
+msgfmt option
+xgettext option
+msgfilter option
+xgettext option
+xgettext option
+msgcat option
+msgcomm option
+msgfmt option, --locale, msgfmt option
+msginit option
+msgunfmt option, --locale, msgunfmt option
+msggrep option
+msgcat option
+msgcomm option
+msggrep option
+xgettext option
+msggrep option
+xgettext option
+xgettext option
+msgcmp option
+msgmerge option
+gettextize option
+msgattrib option
+msgmerge option
+msgfmt option
+msgattrib option
+msgcat option
+msgcomm option
+msgconv option
+msgen option
+msgfilter option
+msggrep option
+msgmerge option
+msguniq option
+xgettext option
+msgattrib option
+msginit option
+msgattrib option
+msgcat option
+msgcomm option
+msgconv option
+msgen option
+msgfilter option
+msggrep option
+msginit option
+msgmerge option
+msgunfmt option
+msguniq option
+xgettext option
+msgattrib option
+msgcomm option
+xgettext option
+msgattrib option
+msgattrib option
+msgattrib option
+xgettext option
+xgettext option
+msgattrib option
+msgcat option
+msgcomm option
+msgconv option
+msgen option
+msgfilter option
+msgfmt option
+msggrep option
+msginit option
+msgmerge option
+msgunfmt option
+msguniq option
+msgattrib option
+msgcat option
+msgcmp option
+msgcomm option
+msgconv option
+msgen option
+msgexec option
+msgfilter option
+msgfmt option
+msggrep option
+msginit option
+msgmerge option
+msguniq option
+msgattrib option
+msgcat option
+msgcomm option
+msgconv option
+msgen option
+msgfilter option
+msggrep option
+msginit option
+msgmerge option
+msgunfmt option
+msguniq option
+xgettext option
+msgfmt option
+xgettext option
+msgfilter option
+msgmerge option
+msggrep option
+msguniq option
+msgfmt option
+msgunfmt option
+msgattrib option
+msgattrib option
+msgfilter option
+msgmerge option
+msgattrib option
+msgcat option
+msgcomm option
+msgconv option
+msgen option
+msgfilter option
+msggrep option
+msgmerge option
+msguniq option
+xgettext option
+msgattrib option
+msgcat option
+msgcomm option
+msgconv option
+msgen option
+msgfilter option
+msggrep option
+msgmerge option
+msgunfmt option
+msguniq option
+xgettext option
+msgfmt option
+msgattrib option
+msgcat option
+msgcomm option
+msgconv option
+msgen option
+msgfilter option
+msgfmt option
+msggrep option
+msgmerge option
+msgunfmt option
+msguniq option
+xgettext option
+msgattrib option
+msgcat option
+msgcmp option
+msgcomm option
+msgen option
+msgexec option
+msgfilter option
+msgfmt option
+msggrep option
+msginit option
+msgmerge option
+msgonv option
+msguniq option
+msgattrib option
+msgcat option
+msgcomm option
+msgconv option
+msgen option
+msgfilter option
+msggrep option
+msginit option
+msgmerge option
+msgunfmt option
+msguniq option
+xgettext option
+msgmerge option
+msgfmt option
+msgunfmt option
+msgcat option
+msgconv option
+msguniq option
+msgattrib option
+xgettext option
+msgcat option
+msgcomm option
+msguniq option
+msgattrib option
+msgmerge option
+msgcat option
+msguniq option
+msgfmt option
+envsubst option
+msgfmt option
+msgmerge option
+msgunfmt option
+autopoint option
+envsubst option
+gettext option
+gettextize option
+msgattrib option
+msgcat option
+msgcmp option
+msgcomm option
+msgconv option
+msgen option
+msgexec option
+msgfilter option
+msgfmt option
+msggrep option
+msginit option
+msgmerge option
+msgunfmt option
+msguniq option
+ngettext option
+xgettext option
+msgattrib option
+msgcat option
+msgcomm option
+msgconv option
+msgen option
+msgfilter option
+msggrep option
+msginit option
+msgmerge option
+msgunfmt option
+msguniq option
+xgettext option
+msgcat option
+msgcomm option
+msgcat option
+msgcomm option
+msgfmt option
+xgettext option
+gettextize option
+msgfmt option
+msgfmt option
+msggrep option
+msgmerge option
+xgettext option
+xgettext option
+autopoint option
+gettext option
+gettextize option
+msgattrib option
+msgcat option
+msgcmp option
+msgcomm option
+msgconv option
+msgen option
+msgexec option
+msgfilter option
+msgfmt option, -d, msgfmt option
+msgfmt option
+msggrep option
+msgmerge option
+msgunfmt option
+msguniq option
+msguniq option
+ngettext option
+xgettext option
+xgettext option
+gettext option
+gettext option
+msgfilter option
+msggrep option
+msggrep option
+ngettext option
+ngettext option
+autopoint option
+gettextize option
+msgattrib option
+msgcat option
+msgcat option
+msgcomm option
+msgcomm option
+msgconv option
+msgen option
+msgfilter option
+msgfilter option
+msgfmt option
+msggrep option
+msggrep option
+msgmerge option
+msguniq option
+xgettext option
+xgettext option
+envsubst option
+gettext option
+msgattrib option
+msgcat option
+msgcmp option
+msgcomm option
+msgconv option
+msgen option
+msgexec option
+msgfilter option
+msgfmt option
+msggrep option
+msginit option
+msgmerge option
+msgunfmt option
+msguniq option
+ngettext option
+xgettext option
+msgattrib option
+msgcat option
+msgcomm option
+msgconv option
+msgen option
+msgexec option
+msgfilter option
+msggrep option
+msginit option
+msgmerge option
+msgunfmt option
+msguniq option
+xgettext option
+msgfmt option
+msgunfmt option
+xgettext option
+msggrep option
+xgettext option
+msgfmt option, -l, msgfmt option
+msginit option
+msgunfmt option, -l, msgunfmt option
+xgettext option
+msgcmp option
+msggrep option
+msgmerge option
+xgettext option
+xgettext option
+gettext option
+msgattrib option
+msgcat option
+msgcomm option
+msgfilter option
+msggrep option
+msgmerge option
+msguniq option
+xgettext option
+msgattrib option
+msgcat option
+msgcomm option
+msgconv option
+msgen option
+msgfilter option
+msgfmt option
+msggrep option
+msginit option
+msgmerge option
+msgunfmt option
+msguniq option
+xgettext option
+msgattrib option
+msgattrib option
+msgcat option
+msgcat option
+msgcmp option
+msgcomm option
+msgcomm option
+msgconv option
+msgconv option
+msgen option
+msgen option
+msgexec option
+msgfilter option
+msgfilter option
+msgfmt option
+msggrep option
+msggrep option
+msginit option
+msginit option
+msgmerge option
+msgmerge option
+msgunfmt option
+msguniq option
+msguniq option
+xgettext option
+msgmerge option
+msgfmt option
+msgunfmt option
+msgattrib option
+msgcat option
+msgcomm option
+msgconv option
+msgen option
+msgfilter option
+msgmerge option
+msgunfmt option
+msguniq option
+xgettext option
+msgcat option
+msgconv option
+msggrep option
+msguniq option
+xgettext option
+msgcat option
+msgcomm option
+msgmerge option
+msguniq option
+envsubst option
+envsubst option
+gettext option
+msgattrib option
+msgcat option
+msgcmp option
+msgcomm option
+msgconv option
+msgen option
+msgexec option
+msgfilter option
+msgfmt option
+msgfmt option
+msggrep option
+msginit option
+msgmerge option
+msgmerge option
+msgunfmt option
+msgunfmt option
+msguniq option
+ngettext option
+xgettext option
+msgattrib option
+msgcat option
+msgcomm option
+msgconv option
+msgen option
+msgfilter option
+msggrep option
+msginit option
+msgmerge option
+msgunfmt option
+msguniq option
+xgettext option
+xgettext option
-
Jump to: @@ -24,30 +24,30 @@ Jump to:
c-format flag is given for a string the msgfmt8.1 Invoking the msgfmt Program, section 3.5 Special Comments preceding Keywords and section 13.3.1 C Format Strings.
-python-format
+objc-format
no-python-format
+no-objc-format
lisp-format
+sh-format
no-lisp-format
+no-sh-format
elisp-format
+python-format
no-elisp-format
+no-python-format
librep-format
+lisp-format
no-librep-format
+no-lisp-format
smalltalk-format
+elisp-format
no-smalltalk-format
+no-elisp-format
java-format
+librep-format
no-java-format
+no-librep-format
awk-format
+smalltalk-format
no-awk-format
+no-smalltalk-format
object-pascal-format
+java-format
no-object-pascal-format
+no-java-format
ycp-format
+awk-format
no-ycp-format
+no-awk-format
tcl-format
+object-pascal-format
no-tcl-format
+no-object-pascal-format
php-format
+ycp-format
no-php-format
+no-ycp-format
tcl-format
+no-tcl-format
+perl-format
+no-perl-format
+perl-brace-format
+no-perl-brace-format
+php-format
+no-php-format
+gcc-internal-format
+no-gcc-internal-format
+qt-format
+no-qt-format
+- - + + A different kind of entries is used for translations which involve plural forms. @@ -333,7 +381,7 @@ msgstr[1] "s'han trobat %d errors fatals"
- + It happens that some lines, usually whitespace or comments, follow the very last entry of a PO file. Such lines are not part of any entry, and PO mode is unable to take action on those lines. By using the @@ -383,7 +431,7 @@ other character, we just did it this way because it is neater.
- + One should carefully distinguish between end of lines marked as `\n´ inside quotes, which are part of the represented string, and end of lines in the PO file itself, outside string quotes, @@ -391,7 +439,7 @@ which have no incidence on the represented string.
-
+
Outside strings, white lines and comments may be used freely.
Comments start at the beginning of a line with `#´ and extend
until the end of the PO file line. Comments written by translators
@@ -407,8 +455,8 @@ file is given to msgmerge.
-
-
+
+
After setting up Emacs with something similar to the lines in
section 2.1 Completing GNU gettext Installation, PO mode is activated for a window when Emacs finds a
PO file in that window. This puts the window read-only and establishes a
@@ -440,47 +488,47 @@ in special ways.
po-undo).
po-quit).
po-confirm-and-quit).
po-other-window).
po-help).
po-statistics).
po-validate).
-
-
+
+
The command _ (po-undo) interfaces to the Emacs
undo facility. See section `Undoing Changes' in The Emacs Editor. Each time U is typed, modifications which the translator
did to the PO file are undone a little more. For the purpose of
@@ -492,10 +540,10 @@ can undo the edition work quite parsimoniously.
-
-
-
-
+
+
+
+
The commands Q (po-quit) and q
(po-confirm-and-quit) are used when the translator is done with the
PO file. The former is a bit less verbose than the latter. If the file
@@ -508,8 +556,8 @@ of an Emacs PO file buffer. Merely killing it through the usual command
-
-
+
+
The command 0 (po-other-window) is another, softer way,
to leave PO mode, temporarily. It just moves the cursor to some other
Emacs window, and pops one if necessary. For example, if the translator
@@ -523,9 +571,9 @@ PO mode is then recovered.
-
-
-
+
+
+
The command h (po-help) displays a summary of all available PO
mode commands. The translator should then type any character to resume
normal PO mode operations. The command ? has the same effect
@@ -533,8 +581,8 @@ as h.
-
-
+
+
The command = (po-statistics) computes the total number of
entries in the PO file, the ordinal of the current entry (counted from
1), the number of untranslated entries, the number of obsolete entries,
@@ -542,8 +590,8 @@ and displays all these numbers.
-
-
+
+
The command V (po-validate) launches msgfmt in
checking and verbose
mode over the current PO file. This command first offers to save the
@@ -554,7 +602,7 @@ as well as all individual entries.
-
+
The program msgfmt runs asynchronously with Emacs, so the
translator regains control immediately while her PO file is being studied.
Error output is collected in the Emacs `*compilation*´ buffer,
@@ -570,7 +618,7 @@ any PO mode action which would help correcting the error.
- + The cursor in a PO file window is almost always part of an entry. The only exceptions are the special case when the cursor is after the last entry in the file, or when the PO file is @@ -581,7 +629,7 @@ the PO file, this also selects on which entry commands operate.
- + Some PO mode commands alter the position of the cursor in a specialized way. A few of those special purpose positioning are described here, the others are described in following sections (for a complete list try @@ -592,51 +640,51 @@ the others are described in following sections (for a complete list try
po-current-entry).
po-next-entry).
po-previous-entry).
po-first-entry).
po-last-entry).
po-push-location).
po-pop-location).
po-exchange-location).
- - + + Any Emacs command able to reposition the cursor may be used to select the current entry in PO mode, including commands which move by characters, lines, paragraphs, screens or pages, and search @@ -665,10 +713,10 @@ how others should do translation.
-
-
-
-
+
+
+
+
The commands n (po-next-entry) and p
(po-previous-entry) move the cursor the entry following,
or preceding, the current one. If n is given while the
@@ -677,10 +725,10 @@ is given while the cursor is on the first entry, no move is done.
-
-
-
-
+
+
+
+
The commands < (po-first-entry) and >
(po-last-entry) move the cursor to the first entry, or last
entry, of the PO file. When the cursor is located past the last
@@ -703,10 +751,10 @@ register for getting back, or else, use the location ring.
-
-
-
-
+
+
+
+
PO mode offers another approach, by which cursor locations may be saved
onto a special stack. The command m (po-push-location)
merely adds the location of current entry to the stack, pushing
@@ -726,8 +774,8 @@ ought to use m immediately after r.
-
-
+
+
The command x (po-exchange-location) simultaneously
repositions the cursor to the entry associated with the top element of
the stack of saved locations, and replaces that top element with the
@@ -742,7 +790,7 @@ merely use x for making the switch.
@@ -776,12 +824,12 @@ command is available:
- + Having such an explicit normalizing command allows for importing PO files from other sources, but also eases the evolution of the current convention, evolution driven mostly by aesthetic concerns, as of now. @@ -826,7 +874,7 @@ their PO files in nice ways.
- + Right now, in PO mode, strings are single line or multi-line. A string goes multi-line if and only if it has embedded newlines, that is, if it matches `[^\n]\n+[^\n]´. So, we would have: diff --git a/gettext-tools/doc/gettext_20.html b/gettext-tools/doc/gettext_20.html index 264b9befa..c11b46ad9 100644 --- a/gettext-tools/doc/gettext_20.html +++ b/gettext-tools/doc/gettext_20.html @@ -1,7 +1,7 @@
+ from gettext.texi on 30 November 2003 -->-
Jump to: @@ -46,28 +46,28 @@ Jump to:
etags, using for marking strings
-etags, using for marking strings
+-
Jump to: @@ -18,10 +18,10 @@ Jump to:
-
Jump to: @@ -68,357 +68,382 @@ Jump to:
_, a macro to mark strings for translation
-_nl_msg_cat_cntr
+_, a macro to mark strings for translation
+_nl_msg_cat_cntr
xgettext
-gettext
-autopoint program, usage
-xgettext
+gettext
+autopoint program, usage
+msgmerge program
-msgmerge program
+msgexec output
-catclose, a catgets function
-catgets, X/Open specification
-catgets, a catgets function
-catopen, a catgets function
+msgexec output
+catclose, a catgets function
+catgets, X/Open specification
+catgets, a catgets function
+catopen, a catgets function
msgfmt
-gettext
-msgfmt
+gettext
+envsubst program, usage
+eval_gettext function, usage
+eval_ngettext function, usage
gettext files
+gettext files
gettext installation
-gettext interface
-gettext, a programmer's view
-gettext vs catgets
-gettextize program, usage
-gettext interface
+gettext program, usage
+gettext, a programmer's view
+gettext vs catgets
+gettextize program, usage
+gettext
+gettext
gettext
-catgets
+catgets
inttypes.h
-inttypes.h
+msgfmt program
-msgunfmt program
-msgfmt program
+msgunfmt program
+libiconv library
-libintl for Java
-libintl library
-librep Lisp
-libiconv library
+libintl for Java
+libintl library
+librep Lisp
+locale program
+locale program
gettext
-msgattrib program, usage
-msgcat program, usage
-msgcmp program, usage
-msgcomm program, usage
-msgconv program, usage
-msgen program, usage
-msgexec program, usage
-msgfilter filter and catalog encoding
-msgfilter program, usage
-msgfmt program, usage
-msggrep program, usage
-msginit program, usage
-msgmerge program, usage
-msgunfmt program, usage
-msguniq program, usage
-gettext
+msgattrib program, usage
+msgcat program, usage
+msgcmp program, usage
+msgcomm program, usage
+msgconv program, usage
+msgen program, usage
+msgexec program, usage
+msgfilter filter and catalog encoding
+msgfilter program, usage
+msgfmt program, usage
+msggrep program, usage
+msginit program, usage
+msgmerge program, usage
+msgunfmt program, usage
+msguniq program, usage
+N_, a convenience macro
+N_, a convenience macro
ngettext program, usage
gettext functions
-xgettext
+gettext functions
+xgettext
gettext
gettext
-gettext
+sed
-catgets interface
-sed
+catgets interface
+msgfmt program
+gettext at build time
-gettext at run time
-gettext at build time
+gettext at run time
+msgcat output
-msgmerge output
-msgunfmt output
-xgettext
-msgcat
-msgmerge program
-xgettext
+msgcat output
+msgmerge output
+msgunfmt output
+xgettext
+msgcat
+msgmerge program
+xgettext
msgfmt program
-msgunfmt program
+msgfmt program
+msgunfmt program
gettext usage
gettext
+gettext
msgmerge
+msgmerge
wxWindows library
+wxWindows library
xargs, and output from msgexec
-xgettext program, usage
-xmodmap program, and typing quotation marks
+xargs, and output from msgexec
+xgettext program, usage
+xmodmap program, and typing quotation marks
+#include <libintl.h> ++ +
+Similarly, each C module containing printf()/fprintf()/...
+calls with a format string that could be a translated C string (even if
+the C string comes from a different C module) should contain the line:
+
+
#include <libintl.h> @@ -51,7 +62,7 @@ sections of this chapter.3.1 Triggering
gettextOperations- + The initialization of locale data should be done with more or less the same code in every program, as demonstrated below: @@ -78,8 +89,8 @@ or
hellosources for more information.- - + + The use of
LC_ALLmight not be appropriate for you.LC_ALLincludes all locale categories and especiallyLC_CTYPE. This later category is responsible for determining @@ -120,13 +131,13 @@ code above by a sequence ofsetlocalelines
-
-
-
-
-
-
-
+
+
+
+
+
+
+
On all POSIX conformant systems the locale categories LC_CTYPE,
LC_MESSAGES, LC_COLLATE, LC_MONETARY,
LC_NUMERIC, and LC_TIME are available. On some systems
@@ -157,7 +168,7 @@ is not multithread-safe.
- + Before strings can be marked for translations, they sometimes need to be adjusted. Usually preparing a string for translation is done right before marking it, during the marking phase which is described in the @@ -189,7 +200,7 @@ Let's look at some examples of these guidelines.
- + Translatable strings should be in good English style. If slang language with abbreviations and shortcuts is used, often translators will not understand the message and will produce very inappropriate translations. @@ -218,13 +229,13 @@ of the objects"?
- + In both cases, adding more words to the message will help both the translator and the English speaking user.
- + Translatable strings should be entire sentences. It is often not possible to translate single verbs or adjectives in a substitutable way. @@ -252,6 +263,17 @@ also be able to find the appropriate grammatical construction. The French translator for example translates "write protected" like "protected against writing". +
++Entire sentences are also important because in many languages, the +declination of some word in a sentence depends on the gender or the +number (singular/plural) of another part of the sentence. There are +usually more interdependencies between words than in English. The +consequence is that asking a translator to translate two half-sentences +and then combining these two half-sentences through dumb string concatenation +will not work, for many languages, even though it would work for English. +That's why translators need to handle entire sentences. +
Often sentences don't fit into a single line. If a sentence is output @@ -299,7 +321,7 @@ combined by xgettext, so the translator has to handle them once only.)
- + Translatable strings should be limited to one paragraph; don't let a single message be longer than ten lines. The reason is that when the translatable string changes, the translator is faced with the task of @@ -310,7 +332,7 @@ the entire message.
- + Many GNU programs have a `--help´ output that extends over several screen pages. It is a courtesy towards the translators to split such a message into several ones of five to ten lines each. While doing that, @@ -321,8 +343,8 @@ looking for.
- - + + Hardcoded string concatenation is sometimes used to construct English strings: @@ -349,7 +371,7 @@ sprintf (s, "Replace %s with %s?", object1, object2);
-
+
A similar case is compile time concatenation of strings. The ISO C 99
include file <inttypes.h> contains a macro PRId64 that
can be used as a formatting directive for outputting an `int64_t´
@@ -403,7 +425,7 @@ regardless whether in decimal, octal or hexadecimal.
- + All this applies to other programming languages as well. For example, in Java, string contenation is very frequently used, because it is a compiler built-in operator. Like in C, in Java, you would change @@ -429,7 +451,7 @@ System.out.println(
@@ -480,7 +502,7 @@ sources for those trying to keep them within 79 or 80 columns.
- + Many packages use `_´ (a simple underline) as a keyword, and write `_("Translatable string")´ instead of `gettext ("Translatable string")´. Further, the coding rule, from GNU standards, @@ -516,7 +538,7 @@ an example of string not requiring translation!
@@ -533,7 +555,7 @@ translation in some language, for the package being internationalized.
- + The set of program sources, targetted by the PO mode commands describe here, should have an Emacs tags table constructed for your project, prior to using these PO file commands. This is easy to do. In any @@ -555,7 +577,7 @@ format Emacs can understand.
-
+
For packages following the GNU coding standards, there is
a make goal tags or TAGS which constructs the tag files in
all directories and for all files containing source code.
@@ -575,18 +597,18 @@ fill in while you mark strings as translatable in your program sources.
po-tags-search).
po-mark-translatable).
po-select-mark-and-mark).
@@ -594,7 +616,7 @@ keywords (po-select-mark-and-mark).
-
+
The , (po-tags-search) command searches for the next
occurrence of a string which looks like a possible candidate for
translation, and displays the program source in another Emacs window,
@@ -646,8 +668,8 @@ first tags file, this reinitialization might be considered spurious.
-
-
+
+
The M-, (po-mark-translatable) command will mark the
recently found string with the `_´ keyword. The M-.
(po-select-mark-and-mark) command will request that you type
@@ -708,7 +730,7 @@ prefer `_´, as this one is already built in the M-,3.5 Special Comments preceding Keywords
-
+
In C programs strings are often used within calls of functions from the
printf family. The special thing about these format strings is
that they can contain format specifiers introduced with %. Assume
@@ -776,8 +798,8 @@ only a heuristic. In the `.po´ file the entry is marked using th
-
-
+
+
The careful reader now might say that this again can cause problems.
The heuristic might guess it wrong. This is true and therefore
xgettext knows about a special kind of comment which lets
@@ -823,7 +845,7 @@ used for solving this problem.
-
+
The attentive reader might now point out that it is not always possible
to mark translatable string with gettext or something like this.
Consider the following case:
diff --git a/gettext-tools/doc/gettext_4.html b/gettext-tools/doc/gettext_4.html
index 93f44f4a9..97d75e099 100644
--- a/gettext-tools/doc/gettext_4.html
+++ b/gettext-tools/doc/gettext_4.html
@@ -1,7 +1,7 @@
@@ -35,8 +35,8 @@ was fuzzy, and the suffix `.pot´ wasn't in use at that time.)
xgettext Programxgettext [option] [inputfile] ... @@ -61,8 +61,8 @@ Input files.
- + If the output file is `-´ or `/dev/stdout´, the output is written to standard output. @@ -131,21 +131,21 @@ is written to standard output.
C, C++, ObjectiveC, PO, Python,
Lisp, EmacsLisp, librep, Smalltalk, Java,
-JavaProperties, awk, YCP, Tcl, PHP,
-RST, Glade.
+JavaProperties, awk, YCP, Tcl, Perl,
+PHP, GCC-source, NXStringTable, RST, Glade.
--language=C++.
@@ -163,7 +163,7 @@ extension.
xgettext looks
for strings in the first argument of each call to the function or macro
id. If keywordspec is of the form
@@ -242,25 +245,83 @@ for strings in the first argument of each call to the function or macro
strings in the argnum1st argument and in the argnum2nd argument
of the call, and treats them as singular/plural variants for a message
with plural handling.
-
+gettext, dgettext:2,
dcgettext:2, ngettext:1,2, dngettext:2,3,
dcngettext:2,3, and gettext_noop.
+--flag=function:arg:lang-format
+is that in language lang, the specified function expects as
+argth argument a format string. (For those of you familiar with
+GCC function attributes, --flag=function:arg:c-format is
+roughly equivalent to the declaration
+`__attribute__ ((__format__ (__printf__, arg, ...)))´ attached
+to function in a C source file.)
+For example, if you use the `error´ function from GNU libc, you can
+specify its behaviour through --flag=error:3:c-format. The effect of
+this specification is that xgettext will mark as format strings all
+gettext invocations that occur as argth argument of
+function.
+This is useful when such strings contain no format string directives:
+together with the checks done by `msgfmt -c´ it will ensure that
+translators cannot accidentally use format string directives that would
+lead to a crash at runtime.
+--flag=function:arg:pass-lang-format
+is that in language lang, if the function call occurs in a
+position that must yield a format string, then its argth argument
+must yield a format string of the same type as well. (If you know GCC
+function attributes, the --flag=function:arg:pass-c-format
+option is roughly equivalent to the declaration
+`__attribute__ ((__format_arg__ (arg)))´ attached to function
+in a C source file.)
+For example, if you use the `_´ shortcut for the gettext function,
+you should use --flag=_:1:pass-c-format. The effect of this
+specification is that xgettext will propagate a format string
+requirement for a _("string") call to its first argument, the literal
+"string", and thus mark it as a format string.
+This is useful when such strings contain no format string directives:
+together with the checks done by `msgfmt -c´ it will ensure that
+translators cannot accidentally use format string directives that would
+lead to a crash at runtime.
c-format and possible-c-format to show who was
responsible for marking a message as a format string. The latter form is
used if the xgettext program decided, the format form is used if
@@ -285,57 +346,63 @@ adjacent strings, and escaped end of lines for continued strings.
.properties syntax. Note
that this file format doesn't support plural forms and silently drops
obsolete messages.
+.strings syntax.
+Note that this file format doesn't support plural forms.
+
.gmo files. With --omit-header,
two invocations of xgettext on the same files with the same
@@ -371,7 +438,7 @@ options at different times are guaranteed to produce the same results.
xgettext was first used in the GNU project.
@@ -47,16 +47,16 @@ the header entry of this file.
msginit Programmsginit [option]
-
-
+
+
The msginit program creates a new PO file, initializing the meta
information with values from the user's environment.
@@ -71,8 +71,8 @@ information with values from the user's environment.
.properties
syntax, not in PO file syntax.
+.strings syntax, not in PO file syntax.
+
@@ -131,15 +137,15 @@ syntax, not in PO file syntax.
.properties syntax. Note
that this file format doesn't support plural forms and silently drops
obsolete messages.
+.strings syntax.
+Note that this file format doesn't support plural forms.
+
@@ -269,7 +281,7 @@ Before starting a translation, it is a good idea to get in touch with your translation team, not only to make sure you don't do duplicated work, but also to coordinate difficult linguistic issues. - + In the Free Translation Project, each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, http://www.iro.umontreal.ca/contrib/po/HTML/, @@ -277,14 +289,14 @@ in the "National teams" area.
msgmerge and msgfmt programs, as well as for users whose
locale's character encoding differs from yours (see section 10.2.4 How to specify the output character set gettext uses).
-
+
You get the character encoding of your locale by running the shell command
`locale charmap´. If the result is `C´ or `ANSI_X3.4-1968´,
which is equivalent to `ASCII´ (= `US-ASCII´), it means that your
@@ -292,7 +304,7 @@ locale is not correctly configured. In this case, ask your translation
team which charset to use. `ASCII´ is not usable for any language
except Latin.
-
+
Because the PO files must be portable to operating systems with less advanced
internationalization facilities, the character encodings that can be used
are limited to those supported by both GNU libc and GNU
@@ -309,24 +321,24 @@ are limited to those supported by both GNU libc and GNU
BIG5, BIG5-HKSCS, GBK, GB18030, SHIFT_JIS,
JOHAB, TIS-620, VISCII, GEORGIAN-PS, UTF-8.
-
+
In the GNU system, the following encodings are frequently used for the
corresponding languages.
-
+
ISO-8859-1 for
- Afrikaans, Albanian, Basque, Breton, Catalan, Cornish, Danish, Dutch,
- English, Estonian, Faroese, Finnish, French, Galician, German,
- Greenlandic, Icelandic, Indonesian, Irish, Italian, Malay, Manx,
- Norwegian, Occitan, Portuguese, Spanish, Swedish, Tagalog, Uzbek,
- Walloon,
+Afrikaans, Albanian, Basque, Breton, Catalan, Cornish, Danish, Dutch,
+English, Estonian, Faroese, Finnish, French, Galician, German,
+Greenlandic, Icelandic, Indonesian, Irish, Italian, Malay, Manx,
+Norwegian, Occitan, Portuguese, Spanish, Swedish, Tagalog, Uzbek,
+Walloon,
ISO-8859-2 for
- Bosnian, Croatian, Czech, Hungarian, Polish, Romanian, Serbian, Slovak,
- Slovenian,
+Bosnian, Croatian, Czech, Hungarian, Polish, Romanian, Serbian, Slovak,
+Slovenian,
ISO-8859-3 for Maltese,
ISO-8859-5 for Macedonian, Serbian,
@@ -345,8 +357,8 @@ corresponding languages.
ISO-8859-15 for
- Basque, Catalan, Dutch, English, Finnish, French, Galician, German, Irish,
- Italian, Portuguese, Spanish, Swedish, Walloon,
+Basque, Catalan, Dutch, English, Finnish, French, Galician, German, Irish,
+Italian, Portuguese, Spanish, Swedish, Walloon,
KOI8-R for Russian,
KOI8-U for Ukrainian,
@@ -357,10 +369,10 @@ corresponding languages.
GB2312, GBK, GB18030
- for simplified writing of Chinese,
+for simplified writing of Chinese,
BIG5, BIG5-HKSCS
- for traditional writing of Chinese,
+for traditional writing of Chinese,
EUC-JP for Japanese,
EUC-KR for Korean,
@@ -373,8 +385,8 @@ corresponding languages.
xmodmap program. The X11 names of the quote
characters are "leftsinglequotemark", "rightsinglequotemark",
diff --git a/gettext-tools/doc/gettext_6.html b/gettext-tools/doc/gettext_6.html
index 425db4407..a249fd3b0 100644
--- a/gettext-tools/doc/gettext_6.html
+++ b/gettext-tools/doc/gettext_6.html
@@ -1,7 +1,7 @@
+ from gettext.texi on 30 November 2003 -->
msgmerge Programmsgmerge [option] def.po ref.pot @@ -55,8 +55,8 @@ References to the new sources.
- + The results are written to standard output if no output file is specified or if it is `-´. @@ -122,19 +122,19 @@ The result is written back to def.po.
-
+
The version control method may be selected via the
@@ -357,7 +369,7 @@ Other entry types will be excluded; translation will not occur for them.
-
+
Some commands are more specifically related to translated entry processing.
-
-
-
-
+
+
+
+
The commands t (
-
+
Translated entries usually result from the translator having edited in
a translation for them, section 6.6 Modifying Translations. However, if the
variable
-
-
+
+
Each PO file entry may have a set of attributes, which are
qualities given a name and explicitly associated with the translation,
using a special system comment. One of these attributes
@@ -428,7 +440,7 @@ might mark some entries as being fuzzy.
-
+
Also, the translator may decide herself to mark an entry as fuzzy
for her own convenience, when she wants to remember that the entry
has to be later revisited. So, some commands are more specifically
@@ -439,26 +451,26 @@ related to fuzzy entry processing.
-
-
-
-
+
+
+
+
The commands z (
-
-
-
+
+
+
The command TAB (
-
-
+
+
The translator may also use the DEL command
(
@@ -528,7 +540,7 @@ are easily recognizable by the fact they end with `msgstr ""´
-
+
The work of the translator might be (quite naively) seen as the process
of seeking for an untranslated entry, editing a translation for
it, and repeating these actions until no untranslated entries remain.
@@ -540,26 +552,26 @@ processing.
-
-
-
-
+
+
+
+
The commands u (
-
-
+
+
An entry can be turned back into an untranslated entry by
merely emptying its translation, using the command k
(
@@ -610,7 +622,7 @@ after the fact.
-
+
Moreover, some commands are more specifically related to obsolete
entry processing.
@@ -619,27 +631,27 @@ entry processing.
-
-
-
-
+
+
+
+
The commands o (
-
-
-
-
+
+
+
+
However, it is possible to comment out an active entry, so making
it obsolete. GNU
@@ -715,40 +727,40 @@ using the following commands for modifying the translations.
-
-
+
+
The command RET (
-
-
-
+
+
+
The command LFD (
-
+
It is possible to arrange so, whenever editing an untranslated
entry, the LFD command be automatically executed. If you set
-
+
In fact, whether it is best to start a translation with an empty
string, or rather with a copy of the original string, is a matter of
taste or habit. Sometimes, the source language and the
@@ -794,11 +806,11 @@ if this requires some extra editing work to get rid of the original.
-
-
-
-
-
+
+
+
+
+
The command k (
-
-
+
+
The command y (
-
+
To better illustrate the operation of killing and yanking, let's
use an actual example, taken from a common situation. When the
programmer slightly modifies some string right in the program, his
@@ -905,8 +917,8 @@ See section `Keyboard Macros' in The Emacs Editor.
@@ -935,24 +947,24 @@ so the general indications given for those apply here. See section
+
Interactively edit the translator comments (--backup option
or through the VERSION_CONTROL environment variable. Here are the
values:
@@ -184,16 +184,16 @@ The backup suffix is `~´, unless set with --suffix
.properties
syntax, not in PO file syntax.
+.strings syntax, not in PO file syntax.
+
@@ -223,30 +229,30 @@ syntax, not in PO file syntax.
.properties syntax. Note
that this file format doesn't support plural forms and silently drops
obsolete messages.
+.strings syntax.
+Note that this file format doesn't support plural forms.
+
6.2 Translated Entries
po-next-translated-entry).
po-previous-translated-entry).
po-next-translated-entry) and T
(po-previous-translated-entry) move forwards or backwards, chasing
for an translated entry. If none is found, the search is extended and
@@ -387,7 +399,7 @@ wraps around in the PO file buffer.
po-auto-fuzzy-on-edit is not nil, the entry having
@@ -400,12 +412,12 @@ See section 6.3 Fuzzy Entries.
6.3 Fuzzy Entries
po-next-fuzzy-entry).
po-previous-fuzzy-entry).
po-unfuzzy).
po-next-fuzzy-entry) and Z
(po-previous-fuzzy-entry) move forwards or backwards, chasing for
a fuzzy entry. If none is found, the search is extended and wraps
@@ -466,9 +478,9 @@ around in the PO file buffer.
po-unfuzzy) removes the fuzzy
attribute associated with an entry, usually leaving it translated.
Further, if the variable po-auto-select-on-unfuzzy has not
@@ -490,8 +502,8 @@ to chase another entry, leaving the entry fuzzy.
po-fade-out-entry) over any translated entry to mark it as being
fuzzy, when she wants to easily leave a trace she wants to later return
@@ -508,7 +520,7 @@ still exists.
6.4 Untranslated Entries
po-next-untranslated-entry).
po-previous-untransted-entry).
po-kill-msgstr).
po-next-untranslated-entry) and U
(po-previous-untransted-entry) move forwards or backwards,
chasing for an untranslated entry. If none is found, the search is
@@ -567,8 +579,8 @@ extended and wraps around in the PO file buffer.
po-kill-msgstr). See section 6.6 Modifying Translations.
@@ -584,7 +596,7 @@ if some untranslated string still exists.
6.5 Obsolete Entries
po-next-obsolete-entry).
po-previous-obsolete-entry).
po-fade-out-entry).
po-next-obsolete-entry) and O
(po-previous-obsolete-entry) move forwards or backwards,
chasing for an obsolete entry. If none is found, the search is
@@ -655,10 +667,10 @@ introducing useless msgid values.
gettext utilities will later react to the
disappearance of a translation by using the untranslated string.
@@ -688,8 +700,8 @@ merely tries to provide handy tools for helping her to do so.
6.6 Modifying Translations
po-edit-msgstr).
po-msgid-to-msgstr).
po-kill-msgstr).
po-kill-ring-save-msgstr).
po-yank-msgstr).
po-edit-msgstr) opens a new Emacs
window meant to edit in a new translation, or to modify an already existing
translation. The new window contains a copy of the translation taken from
@@ -761,9 +773,9 @@ for more information.
po-msgid-to-msgstr) initializes, or
reinitializes the translation with the original string. This command is
normally used when the translator wants to redo a fresh translation of
@@ -771,7 +783,7 @@ the original string, disregarding any previous work.
po-auto-edit-with-msgid to t, the translation gets
@@ -780,7 +792,7 @@ The default value for po-auto-edit-with-msgid is nil.
po-kill-msgstr) merely empties the
translation string, so turning the entry into an untranslated
one. But while doing so, its previous contents is put apart in
@@ -830,8 +842,8 @@ entries, the translation is also uncommented prior to saving.
po-yank-msgstr) completely replaces the
translation of the current entry by a string taken from the kill ring.
Following Emacs terminology, we then say that the replacement
@@ -865,7 +877,7 @@ yanking commands themselves.
6.7 Modifying Comments
po-edit-comment).
po-kill-comment).
po-kill-ring-save-comment).
po-yank-comment).
@@ -968,8 +980,8 @@ See section 6.6 Modifying Translations.
-
-
+
+
The command # (po-edit-comment) opens a new Emacs window
containing a copy of the translator comments on the current PO file entry.
If there are no such comments, PO mode understands that the translator wants
@@ -983,18 +995,18 @@ See section 6.8 Details of Sub Edition, for
-
+
Functions found on po-subedit-mode-hook, if any, are executed after
the string has been inserted in the edit buffer.
-
-
-
-
-
-
+
+
+
+
+
+
The command K (po-kill-comment) gets rid of all
translator comments, while saving those comments on the kill ring.
The command W (po-kill-ring-save-comment) takes
@@ -1035,7 +1047,7 @@ regular Emacs commands C-y (yank) and M-y
@@ -1048,25 +1060,25 @@ of Emacs, which are described below.
po-subedit-exit).
po-subedit-abort).
po-subedit-cycle-auxiliary).
- - - + + + The window's contents represents a translation for a given message, or a translator comment. The translator may modify this window to her heart's content. Once this is done, the command C-c C-c @@ -1076,8 +1088,8 @@ sight or if buffers were switched.
- - + + If the translator becomes unsatisfied with her translation or comment, to the extent she prefers keeping what was existent prior to the RET or # command, she may use the command C-c C-k @@ -1088,8 +1100,8 @@ whole effect of last edition.
-
-
+
+
The command C-c C-a (po-subedit-cycle-auxiliary)
allows for glancing through translations
already achieved in other languages, directly while editing the current
@@ -1123,7 +1135,7 @@ in the editing window, as ending with two < in a row.
- + When a translation (or a comment) is being edited, the translator may move the cursor back into the PO file buffer and freely move to other entries, browsing at will. If, with an edition pending, the translator wanders in the @@ -1136,7 +1148,7 @@ the translator should better be comfortable at handling many Emacs windows!
- + Pending subedits may be completed or aborted in any order, regardless of how or when they were started. When many subedits are pending and the translator asks for quitting the PO file (with the q command), subedits @@ -1147,9 +1159,9 @@ are automatically resumed one at a time, so she may decide for each of them.
@@ -1186,7 +1198,7 @@ overall organization, than to the program code itself.
- + The following commands are meant to help the translator at getting program source context for a PO file entry. @@ -1195,35 +1207,35 @@ program source context for a PO file entry.
po-cycle-source-reference).
po-select-source-reference).
po-consider-source-path).
po-ignore-source-path).
-
-
-
-
+
+
+
+
The commands s (po-cycle-source-reference) and M-s
(po-select-source-reference) both open another window displaying
some source program file, and already positioned in such a way that
@@ -1268,10 +1280,10 @@ available for a single string to translate.
- - - - + + + + Program source files are usually found relative to where the PO file stands. As a special provision, when this fails, the file is also looked for, but relative to the directory immediately above it. @@ -1291,7 +1303,7 @@ one of the directories she does not want anymore on the search path.
@@ -1304,8 +1316,8 @@ at once, for translators preferring to work in this way.
- - + + An auxiliary PO file is an existing PO file meant for the same package the translator is working on, but targeted to a different mother tongue language. Commands exist for declaring and handling auxiliary @@ -1320,41 +1332,41 @@ Here are the auxiliary file commands available in PO mode.
po-cycle-auxiliary).
po-select-auxiliary).
po-consider-as-auxiliary).
po-ignore-as-auxiliary).
-
-
-
-
+
+
+
+
Command A (po-consider-as-auxiliary) adds the current
PO file to the list of auxiliary files, while command M-A
(po-ignore-as-auxiliary just removes it.
-
-
+
+
The command a (po-cycle-auxiliary) seeks all auxiliary PO
files, round-robin, searching for a translated entry in some other language
having an msgid field identical as the one for the current entry.
@@ -1366,8 +1378,8 @@ so repeating a will eventually yield back the original PO file.
-
-
+
+
The command C-c C-a (po-select-auxiliary) asks the translator
for her choice of a particular auxiliary file, with completion, and
then switches to that selected PO file. The command also checks if
@@ -1387,7 +1399,7 @@ their msgid entries written by the same GNU gettext to
- + However, PO files initially created by PO mode itself, while marking strings in source files, are normalised differently. So are PO files resulting of the the `M-x normalize´ command. Until these @@ -1399,11 +1411,11 @@ fully resolved, the translator should stay aware of normalisation issues.
- + A compendium is a special PO file containing a set of translations recurring in many different packages. The translator can use gettext tools to build a new compendium, to add entries to her @@ -1416,8 +1428,8 @@ already translated entries, from translations kept in the compendium.
@@ -1432,8 +1444,8 @@ files and extracting a message subset from a PO file.
-
-
+
+
To concatenate several valid PO files into one compendium file you can
use `msgcomm´ or `msgcat´ (the latter preferred):
@@ -1514,7 +1526,7 @@ files or postprocess the result using `msgattrib --translated --no-fuzzy&a
@@ -1545,7 +1557,7 @@ or to update an already existing translation.
@@ -1562,7 +1574,7 @@ msgmerge --compendium compendium.po -o file.po /dev/null file.pot
diff --git a/gettext-tools/doc/gettext_7.html b/gettext-tools/doc/gettext_7.html
index afdaabf57..a21b49cdd 100644
--- a/gettext-tools/doc/gettext_7.html
+++ b/gettext-tools/doc/gettext_7.html
@@ -1,7 +1,7 @@
@@ -22,7 +22,7 @@ complete set of tools for this purpose.
-
+
When merging two packages into a single package, the resulting POT file
will be the concatenation of the two packages' POT files. Thus the
maintainer must concatenate the two existing package translations into
@@ -32,7 +32,7 @@ possible conflicts that arose during the merge.
-
+
When a translator takes over the translation job from another translator,
but she uses a different character encoding in her locale, she will
convert the catalog to her character encoding. This is best done through
@@ -48,8 +48,8 @@ that source file and use `msgmerge´.
-
-
+
+
When a translator wants to adjust some translation catalog for a special
dialect or orthography -- for example, German as written in Switzerland
versus German as written in Germany -- she needs to apply some text
@@ -66,14 +66,14 @@ that's why it's better to use the original POT file if available.
-
+
When a translator wants to check her translations, for example according
to orthography rules or using a non-interactive spell checker, she can do
so using the `msgexec´ program.
-
+
When third party tools create PO or POT files, sometimes duplicates cannot
be avoided. But the GNU
-
+
`msgattrib´ can be used to select and extract only the fuzzy
or untranslated messages of a translation catalog.
@@ -113,16 +113,16 @@ write other specialized programs that process PO files.
-
-
+
+
The
-
+
The results are written to standard output if no output file is specified
or if it is `-´.
@@ -201,8 +201,8 @@ or if it is `-´.
-
+
The
-
+
The
-
+
The 6.11.1.2 Extract a Message Subset from a PO File
6.11.2.1 Initialize a New Translation File
6.11.2.2 Update an Existing Translation File
7 Manipulating PO Files
gettext tools give an error when they
encounter duplicate msgids in the same file and in the same domain.
@@ -91,7 +91,7 @@ completely translated.
7.1 Invoking the
msgcat Program
msgcat [option] [inputfile]...
msgcat program concatenates and merges the specified PO files.
It finds messages which are common to two or more of the specified PO files.
By using the --more-than option, greater commonality may be requested
@@ -148,8 +148,8 @@ Input files.
.properties
syntax, not in PO file syntax.
+.strings syntax, not in PO file syntax.
+
@@ -253,45 +259,45 @@ syntax, not in PO file syntax.
.properties syntax. Note
that this file format doesn't support plural forms and silently drops
obsolete messages.
+.strings syntax.
+Note that this file format doesn't support plural forms.
+
7.2 Invoking the
msgconv Program
msgconv [option] [inputfile]
msgconv program converts a translation catalog to a different
character encoding.
@@ -399,8 +411,8 @@ Input PO file.
.properties
syntax, not in PO file syntax.
+.strings syntax, not in PO file syntax.
+
@@ -477,30 +495,30 @@ syntax, not in PO file syntax.
.properties syntax. Note
that this file format doesn't support plural forms and silently drops
obsolete messages.
+.strings syntax.
+Note that this file format doesn't support plural forms.
+
7.3 Invoking the
msggrep Program
msggrep [option] [inputfile]
msggrep program extracts all messages of a translation catalog
that match a given pattern or belong to some given source files.
@@ -607,8 +631,8 @@ Input PO file.
.properties
syntax, not in PO file syntax.
+.strings syntax, not in PO file syntax.
+
@@ -796,27 +826,27 @@ syntax, not in PO file syntax.
.properties syntax. Note
that this file format doesn't support plural forms and silently drops
obsolete messages.
+.strings syntax.
+Note that this file format doesn't support plural forms.
+
7.4 Invoking the
msgfilter Program
msgfilter [option] filter [filter-option]
msgfilter program applies a filter to all translations of a
translation catalog.
@@ -913,16 +949,16 @@ translation catalog.
-
+
Note: It is your responsibility to ensure that the filter can cope
with input encoded in the translation catalog's encoding. If the
filter wants input in a particular encoding, you can in a first step
@@ -978,7 +1014,7 @@ locale, by using the LC_ALL environment variable.
- + Note: Most translations in a translation catalog don't end with a newline character. For this reason, it is important that the filter recognizes its last input line even if it ends without a newline, and that @@ -998,16 +1034,16 @@ does not have this limitation.
.properties
syntax, not in PO file syntax.
+.strings syntax, not in PO file syntax.
+
@@ -1048,34 +1090,34 @@ syntax, not in PO file syntax.
.properties syntax. Note
that this file format doesn't support plural forms and silently drops
obsolete messages.
+.strings syntax.
+Note that this file format doesn't support plural forms.
+
msguniq Programmsguniq [option] [inputfile]
-
-
+
+
The msguniq program unifies duplicate translations in a translation
catalog. It finds duplicate translations of the same message ID. Such
duplicates are invalid input for other programs like msgfmt,
@@ -1191,8 +1239,8 @@ Input PO file.
.properties
syntax, not in PO file syntax.
+.strings syntax, not in PO file syntax.
+
@@ -1275,45 +1329,45 @@ syntax, not in PO file syntax.
.properties syntax. Note
that this file format doesn't support plural forms and silently drops
obsolete messages.
+.strings syntax.
+Note that this file format doesn't support plural forms.
+
msgcomm Programmsgcomm [option] [inputfile]...
-
+
The msgcomm program finds messages which are common to two or more
of the specified PO files.
By using the --more-than option, greater commonality may be requested
@@ -1427,8 +1487,8 @@ Input files.
.properties
syntax, not in PO file syntax.
+.strings syntax, not in PO file syntax.
+
@@ -1529,33 +1595,33 @@ syntax, not in PO file syntax.
.properties syntax. Note
that this file format doesn't support plural forms and silently drops
obsolete messages.
+.strings syntax.
+Note that this file format doesn't support plural forms.
+
msgcmp Programmsgcmp [option] def.po ref.pot
-
+
The msgcmp program compares two Uniforum style .po files to check that
both contain the same set of msgid strings. The def.po file is an
existing PO file with the translations. The ref.pot file is the last
@@ -1676,8 +1748,8 @@ References to the sources.
.properties
syntax, not in PO file syntax.
+.strings syntax, not in PO file syntax.
+
@@ -1726,16 +1804,16 @@ syntax, not in PO file syntax.
msgattrib Programmsgattrib [option] [inputfile]
-
-
+
+
The msgattrib program filters the messages of a translation catalog
according to their attributes, and manipulates the attributes.
@@ -1773,8 +1851,8 @@ Input PO file.
- + Attributes are modified after the message selection/removal has been performed. If the `--only-file´ or `--ignore-file´ option is specified, the attribute modification is applied only to those messages @@ -1861,45 +1939,45 @@ that are listed in the only-file and not listed in the
.properties
syntax, not in PO file syntax.
+.strings syntax, not in PO file syntax.
+
@@ -1930,33 +2014,33 @@ syntax, not in PO file syntax.
.properties syntax. Note
that this file format doesn't support plural forms and silently drops
obsolete messages.
+.strings syntax.
+Note that this file format doesn't support plural forms.
+
msgen Programmsgen [option] inputfile
-
+
The msgen program creates an English translation catalog. The
input file is the last created English PO file, or a PO Template file
(generally created by xgettext). Untranslated entries are assigned a
@@ -2071,8 +2161,8 @@ Input PO or POT file.
.properties
syntax, not in PO file syntax.
+.strings syntax, not in PO file syntax.
+
@@ -2129,30 +2225,30 @@ syntax, not in PO file syntax.
.properties syntax. Note
that this file format doesn't support plural forms and silently drops
obsolete messages.
+.strings syntax.
+Note that this file format doesn't support plural forms.
+
msgexec Programmsgexec [option] command [command-option]
-
+
The msgexec program applies a command to all translations of a
translation catalog.
The command can be any program that reads a translation from standard
@@ -2250,15 +2352,15 @@ across all invocations.
- + A special builtin command called `0´ outputs the translation, followed by a null byte. The output of `msgexec 0´ is suitable as input for `xargs -0´.
-
-
+
+
During each command invocation, the environment variable
MSGEXEC_MSGID is bound to the message's msgid, and the environment
variable MSGEXEC_LOCATION is bound to the location in the PO file
@@ -2266,7 +2368,7 @@ of the message.
-
+
Note: It is your responsibility to ensure that the command can cope
with input encoded in the translation catalog's encoding. If the
command wants input in a particular encoding, you can in a first step
@@ -2288,16 +2390,16 @@ locale, by using the LC_ALL environment variable.
.properties
syntax, not in PO file syntax.
+.strings syntax, not in PO file syntax.
+
@@ -2335,16 +2443,16 @@ syntax, not in PO file syntax.
po_file_read function reads a PO file into memory. The file name
is given as argument. The return value is a handle to the PO file's contents,
valid until po_file_free is called on it. In case of error, the return
@@ -2408,7 +2516,7 @@ value is NULL, and errno is set.
po_file_free function frees a PO file's contents from memory,
including all messages that are only implicitly accessible through iterators.
po_file_domains function returns the domains for which the given
PO file has messages. The return value is a NULL terminated array
which is valid as long as the file handle is valid. For PO files which
@@ -2429,7 +2537,7 @@ namely the default domain "messages".
po_message_iterator returns an iterator that will produce the
messages of file that belong to the given domain. If domain
is NULL, the default domain is used instead. To list the messages,
@@ -2440,7 +2548,7 @@ use the function po_next_message repeatedly.
po_message_iterator_free function frees an iterator previously
allocated through the po_message_iterator function.
po_message_iterator function.
po_next_message function returns the next message from
iterator and advances the iterator. It returns NULL when the
iterator has reached the end of its message list.
@@ -2464,7 +2572,7 @@ that the results are valid as long as the file handle is valid.
po_message_msgid function returns the msgid (untranslated
English string) of a message. This is guaranteed to be non-NULL.
NULL.
po_message_msgid_plural function returns the msgid_plural
(untranslated English plural string) of a message with plurals, or NULL
for a message without plural.
@@ -2483,7 +2591,7 @@ for a message without plural.
po_message_msgstr function returns the msgstr (translation)
of a message. For an untranslated message, the return value is an empty
string.
@@ -2493,7 +2601,7 @@ string.
po_message_msgstr_plural function returns the
msgstr[index] of a message with plurals, or NULL when
the index is out of range or for a message without plural.
diff --git a/gettext-tools/doc/gettext_8.html b/gettext-tools/doc/gettext_8.html
index bc084b3d5..1ad79b416 100644
--- a/gettext-tools/doc/gettext_8.html
+++ b/gettext-tools/doc/gettext_8.html
@@ -1,7 +1,7 @@
+ from gettext.texi on 30 November 2003 -->
msgfmt Programmsgfmt [option] filename.po ...
-
+
The msgfmt programs generates a binary message catalog from a textual
translation description.
@@ -42,8 +42,8 @@ translation description.
ResourceBundle class.
.properties
syntax, not in PO file syntax.
+.strings syntax, not in PO file syntax.
+
--check-format, --check-header,
--check-domain.
msgmerge is called the next time.
--output-file
option
@@ -252,18 +264,18 @@ option
msgunfmt Programmsgunfmt [option] [file]...
-
+
The msgunfmt program converts a binary message catalog to a
Uniforum style .po file.
@@ -374,15 +386,15 @@ Uniforum style .po file.
ResourceBundle class.
CLASSPATH
- `--locale=locale´
-
-
-
+
+
Specify the locale name, either a language specification of the form ll
or a combined language and country specification of the form ll_CC.
- `-d directory´
-
-
+
Specify the base directory of `.msg´ message catalogs.
.properties syntax. Note
that this file format doesn't support plural forms and silently drops
obsolete messages.
+.strings syntax.
+Note that this file format doesn't support plural forms.
+
@@ -592,7 +610,7 @@ which appears below.
- + The first two words serve the identification of the file. The magic number will always signal GNU MO files. The number is stored in the byte order of the generating machine, so the magic number really is @@ -640,7 +658,7 @@ translated tables, making the system information very easy to find.
- + The size S of the hash table can be zero. In this case, the hash table itself is not contained in the MO file. Some people might prefer this because a precomputed hashing table takes disk space, and @@ -661,7 +679,7 @@ machines, a correct alignment will speed things up.
- + Plural forms are stored by letting the plural of the original string follow the singular of the original string, separated through a NUL byte. The length which appears in the string descriptor diff --git a/gettext-tools/doc/gettext_9.html b/gettext-tools/doc/gettext_9.html index 8704decad..f0281f52e 100644 --- a/gettext-tools/doc/gettext_9.html +++ b/gettext-tools/doc/gettext_9.html @@ -1,7 +1,7 @@
+ from gettext.texi on 30 November 2003 -->@@ -77,8 +77,8 @@ Translation Project sites, and also on most GNU archive sites.
@@ -97,7 +97,7 @@ produces programs totally unable to translate messages.
- + Internationalized packages have usually many `ll.po´ files. Unless translations are disabled, all those available are installed together @@ -111,13 +111,13 @@ codes, stating which languages are allowed.
-
+
We consider here those packages using GNU gettext internally,
and for which the installers did not disable translation at
configure time. Then, users only have to set the LANG
diff --git a/gettext-tools/doc/gettext_foot.html b/gettext-tools/doc/gettext_foot.html
index 3ec86030a..e10eb254c 100644
--- a/gettext-tools/doc/gettext_foot.html
+++ b/gettext-tools/doc/gettext_foot.html
@@ -1,14 +1,14 @@
Additions are welcome. Send appropriate information to bug-glibc-manual@gnu.org.
-This document was generated on 22 May 2003 using the +This document was generated on 30 November 2003 using the texi2html translator version 1.52a.
diff --git a/gettext-tools/doc/gettext_toc.html b/gettext-tools/doc/gettext_toc.html index b18026b7a..e7610a71f 100644 --- a/gettext-tools/doc/gettext_toc.html +++ b/gettext-tools/doc/gettext_toc.html @@ -1,14 +1,14 @@ + from gettext.texi on 30 November 2003 -->gettext.sh
+gettext program
+ngettext program
+envsubst program
+eval_gettext function
+eval_ngettext function
+-This document was generated on 22 May 2003 using the +This document was generated on 30 November 2003 using the texi2html translator version 1.52a.
diff --git a/gettext-tools/doc/iso-3166.texi b/gettext-tools/doc/iso-3166.texi index 0b7698b31..c2bdabcef 100644 --- a/gettext-tools/doc/iso-3166.texi +++ b/gettext-tools/doc/iso-3166.texi @@ -81,7 +81,7 @@ Congo (Rep.). @item CH Switzerland. @item CI -Cote d'Ivoire. +C@^{o}te d'Ivoire. @item CK Cook Islands. @item CL @@ -94,6 +94,8 @@ China. Colombia. @item CR Costa Rica. +@item CS +Serbia and Montenegro. @item CU Cuba. @item CV @@ -403,7 +405,7 @@ Syria. @item SZ Swaziland. @item TC -Turks and Caicos Is. +Turks and Caicos Islands. @item TD Chad. @item TF @@ -416,14 +418,14 @@ Thailand. Tajikistan. @item TK Tokelau. +@item TL +Timor-Leste. @item TM Turkmenistan. @item TN Tunisia. @item TO Tonga. -@item TP -East Timor. @item TR Turkey. @item TT @@ -468,8 +470,6 @@ Samoa (Western). Yemen. @item YT Mayotte. -@item YU -Yugoslavia. @item ZA South Africa. @item ZM diff --git a/gettext-tools/doc/iso-639.texi b/gettext-tools/doc/iso-639.texi index b007b4adb..bc121cca9 100644 --- a/gettext-tools/doc/iso-639.texi +++ b/gettext-tools/doc/iso-639.texi @@ -8,6 +8,8 @@ Avestan. Afrikaans. @item am Amharic. +@item an +Aragonese. @item ar Arabic. @item as @@ -102,6 +104,8 @@ Hindi. Hiri Motu. @item hr Croatian. +@item ht +Haitian; Haitian Creole. @item hu Hungarian. @item hy @@ -114,6 +118,8 @@ Interlingua. Indonesian (formerly in). @item ie Interlingue. +@item ii +Sichuan Yi. @item ik Inupiak. @item io @@ -158,6 +164,8 @@ Kirghiz. Latin. @item lb Letzeburgesch. +@item li +Limburgish; Limburger; Limburgan. @item ln Lingala. @item lo diff --git a/gettext-tools/doc/version.texi b/gettext-tools/doc/version.texi index 2e5a0e3f3..84fd88de5 100644 --- a/gettext-tools/doc/version.texi +++ b/gettext-tools/doc/version.texi @@ -1,4 +1,4 @@ -@set UPDATED 5 May 2003 -@set UPDATED-MONTH May 2003 -@set EDITION 0.12.1 -@set VERSION 0.12.1 +@set UPDATED 26 November 2003 +@set UPDATED-MONTH November 2003 +@set EDITION 0.13 +@set VERSION 0.13