1998-08-02 08:46:43 +02:00
|
|
|
Notes on GCC's Native Language Support
|
|
|
|
|
|
|
|
By and large, only diagnostic messages have been internationalized.
|
|
|
|
Some work remains in other areas; for example, GCC does not yet allow
|
|
|
|
non-ASCII letters in identifiers.
|
|
|
|
|
2000-08-28 01:53:54 +02:00
|
|
|
Not all of GCC's diagnostic messages have been internationalized. Programs
|
2002-09-18 07:07:02 +02:00
|
|
|
like `genattr' (in fact all gen* programs) are not internationalized, as
|
|
|
|
their users are GCC maintainers who typically need to be able to read
|
|
|
|
English anyway; internationalizing them would thus entail needless work for
|
|
|
|
the human translators. Messages used for debugging, such as used in dumped
|
|
|
|
tables, should also not be translated.
|
1998-08-02 08:46:43 +02:00
|
|
|
|
|
|
|
The GCC library should not contain any messages that need
|
2000-08-28 01:53:54 +02:00
|
|
|
internationalization, because it operates below the internationalization
|
|
|
|
library.
|
1998-08-02 08:46:43 +02:00
|
|
|
|
|
|
|
Unlike some other GNU programs, the GCC sources contain few instances
|
|
|
|
of explicit translation calls like _("string"). Instead, the
|
|
|
|
diagnostic printing routines automatically translate their arguments.
|
|
|
|
For example, GCC source code should not contain calls like `error
|
|
|
|
(_("unterminated comment"))'; it should contain calls like `error
|
|
|
|
("unterminated comment")' instead, as it is the `error' function's
|
|
|
|
responsibility to translate the message before the user sees it.
|
|
|
|
|
|
|
|
By convention, any function parameter in the GCC sources whose name
|
|
|
|
ends in `msgid' is expected to be a message requiring translation.
|
|
|
|
For example, the `error' function's first parameter is named `msgid'.
|
|
|
|
GCC's exgettext script uses this convention to determine which
|
|
|
|
function parameter strings need to be translated. The exgettext
|
|
|
|
script also assumes that any occurrence of `%eMSGID}' on a source
|
|
|
|
line, where MSGID does not contain `%' or `}', corresponds to a
|
|
|
|
message MSGID that requires translation; this is needed to identify
|
|
|
|
diagnostics in GCC spec strings.
|
|
|
|
|
2001-04-23 00:33:45 +02:00
|
|
|
If you modify source files, you'll need at least version 0.10.37 of the
|
2000-11-07 18:45:31 +01:00
|
|
|
GNU gettext package to propagate the modifications to the translation
|
|
|
|
tables.
|
2000-08-28 01:53:54 +02:00
|
|
|
|
2000-11-07 18:45:31 +01:00
|
|
|
After having built and installed these gettext tools, you have to
|
|
|
|
configure GCC with --enable-maintainer-mode to get the master catalog
|
|
|
|
rebuilt.
|