bfb530012d
* ABOUT-GCC-NLS: Remove reference to enquire, and out-of-date statement that the only translation is to en_UK. From-SVN: r57267
43 lines
2.0 KiB
Plaintext
43 lines
2.0 KiB
Plaintext
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.
|
|
|
|
Not all of GCC's diagnostic messages have been internationalized. Programs
|
|
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.
|
|
|
|
The GCC library should not contain any messages that need
|
|
internationalization, because it operates below the internationalization
|
|
library.
|
|
|
|
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.
|
|
|
|
If you modify source files, you'll need at least version 0.10.37 of the
|
|
GNU gettext package to propagate the modifications to the translation
|
|
tables.
|
|
|
|
After having built and installed these gettext tools, you have to
|
|
configure GCC with --enable-maintainer-mode to get the master catalog
|
|
rebuilt.
|