OSDN Git Service

* doc/install.texi (xtensa-*-elf): New target.
[pf3gnuchains/gcc-fork.git] / gcc / ABOUT-GCC-NLS
1 Notes on GCC's Native Language Support
2
3 By and large, only diagnostic messages have been internationalized.
4 Some work remains in other areas; for example, GCC does not yet allow
5 non-ASCII letters in identifiers.
6
7 Not all of GCC's diagnostic messages have been internationalized. Programs
8 like `enquire' and `genattr' (in fact all gen* programs) are not
9 internationalized, as their users are GCC maintainers who typically need
10 to be able to read English anyway; internationalizing them would thus
11 entail needless work for the human translators. Messages used for
12 debugging, such as used in dumped tables, should also not be translated.
13
14 The GCC library should not contain any messages that need
15 internationalization, because it operates below the internationalization
16 library.
17
18 Currently, the only language translation supplied is en_UK (British
19 English).
20
21 Unlike some other GNU programs, the GCC sources contain few instances
22 of explicit translation calls like _("string").  Instead, the
23 diagnostic printing routines automatically translate their arguments.
24 For example, GCC source code should not contain calls like `error
25 (_("unterminated comment"))'; it should contain calls like `error
26 ("unterminated comment")' instead, as it is the `error' function's
27 responsibility to translate the message before the user sees it.
28
29 By convention, any function parameter in the GCC sources whose name
30 ends in `msgid' is expected to be a message requiring translation.
31 For example, the `error' function's first parameter is named `msgid'.
32 GCC's exgettext script uses this convention to determine which
33 function parameter strings need to be translated.  The exgettext
34 script also assumes that any occurrence of `%eMSGID}' on a source
35 line, where MSGID does not contain `%' or `}', corresponds to a
36 message MSGID that requires translation; this is needed to identify
37 diagnostics in GCC spec strings.
38
39 If you modify source files, you'll need at least version 0.10.37 of the
40 GNU gettext package to propagate the modifications to the translation
41 tables.
42
43 After having built and installed these gettext tools, you have to
44 configure GCC with --enable-maintainer-mode to get the master catalog
45 rebuilt.