OSDN Git Service

* config/arm/arm.h (ARM_EABI_CTORS_SECTION_OP): Do not define if a
[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 `genattr' (in fact all gen* programs) are not internationalized, as
9 their users are GCC maintainers who typically need to be able to read
10 English anyway; internationalizing them would thus entail needless work for
11 the human translators. Messages used for debugging, such as used in dumped
12 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 Unlike some other GNU programs, the GCC sources contain few instances
19 of explicit translation calls like _("string").  Instead, the
20 diagnostic printing routines automatically translate their arguments.
21 For example, GCC source code should not contain calls like `error
22 (_("unterminated comment"))'; it should contain calls like `error
23 ("unterminated comment")' instead, as it is the `error' function's
24 responsibility to translate the message before the user sees it.
25
26 By convention, any function parameter in the GCC sources whose name
27 ends in `msgid' is expected to be a message requiring translation.
28 For example, the `error' function's first parameter is named `msgid'.
29 GCC's exgettext script uses this convention to determine which
30 function parameter strings need to be translated.  The exgettext
31 script also assumes that any occurrence of `%eMSGID}' on a source
32 line, where MSGID does not contain `%' or `}', corresponds to a
33 message MSGID that requires translation; this is needed to identify
34 diagnostics in GCC spec strings.
35
36 If you modify source files, you'll need at least version 0.10.37 of the
37 GNU gettext package to propagate the modifications to the translation
38 tables.
39
40 After having built and installed these gettext tools, you have to
41 configure GCC with --enable-maintainer-mode to get the master catalog
42 rebuilt.