X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2FABOUT-GCC-NLS;h=8107d583e0775c258eede3b9f5776dccf3172196;hb=26991c0d206a7ca1c6559d7217773ba51ea62805;hp=e6e15271c6a5ca1c3e5174a092459a264693db8a;hpb=d44980fa5456681af6c29b493e5f8e3c67e61539;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/ABOUT-GCC-NLS b/gcc/ABOUT-GCC-NLS index e6e15271c6a..8107d583e07 100644 --- a/gcc/ABOUT-GCC-NLS +++ b/gcc/ABOUT-GCC-NLS @@ -5,19 +5,16 @@ 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 `enquire' and `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. +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. -Currently, the only language translation supplied is en_UK (British -English). - 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. @@ -28,15 +25,22 @@ 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'. +If the parameter name ends with `gmsgid', it is assumed to be a GCC +diagnostics format string requiring translation, if it ends with +`cmsgid', it is assumed to be a format string for `printf' family +of functions, requiring a translation. +For example, the `error' function's first parameter is named `gmsgid'. 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. +The `G_(GMSGID)' macro defined in intl.h can be used to mark GCC diagnostics +format strings as requiring translation, but other than that it is a +no-op at runtime. -If you modify source files, you'll need at least version 0.10.37 of the +If you modify source files, you'll need at least version 0.14.15 of the GNU gettext package to propagate the modifications to the translation tables.