URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [ABOUT-GCC-NLS] - Rev 712
Go to most recent revision | Compare with Previous | Blame | View Log
Notes on GCC's Native Language SupportBy and large, only diagnostic messages have been internationalized.Some work remains in other areas; for example, GCC does not yet allownon-ASCII letters in identifiers.Not all of GCC's diagnostic messages have been internationalized. Programslike `genattr' (in fact all gen* programs) are not internationalized, astheir users are GCC maintainers who typically need to be able to readEnglish anyway; internationalizing them would thus entail needless work forthe human translators. Messages used for debugging, such as used in dumpedtables, should also not be translated.The GCC library should not contain any messages that needinternationalization, because it operates below the internationalizationlibrary.Unlike some other GNU programs, the GCC sources contain few instancesof explicit translation calls like _("string"). Instead, thediagnostic 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'sresponsibility to translate the message before the user sees it.By convention, any function parameter in the GCC sources whose nameends in `msgid' is expected to be a message requiring translation.If the parameter name ends with `gmsgid', it is assumed to be a GCCdiagnostics format string requiring translation, if it ends with`cmsgid', it is assumed to be a format string for `printf' familyof functions, requiring a translation.For example, the `error' function's first parameter is named `gmsgid'.GCC's exgettext script uses this convention to determine whichfunction parameter strings need to be translated. The exgettextscript also assumes that any occurrence of `%eMSGID}' on a sourceline, where MSGID does not contain `%' or `}', corresponds to amessage MSGID that requires translation; this is needed to identifydiagnostics in GCC spec strings.The `G_(GMSGID)' macro defined in intl.h can be used to mark GCC diagnosticsformat strings as requiring translation, but other than that it is ano-op at runtime.If you modify source files, you'll need at least version 0.14.15 of theGNU gettext package to propagate the modifications to the translationtables.After having built and installed these gettext tools, you have toconfigure GCC with --enable-maintainer-mode to get the master catalogrebuilt.Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005 Free Software Foundation, Inc.Copying and distribution of this file, with or without modification,are permitted in any medium without royalty provided the copyrightnotice and this notice are preserved.
Go to most recent revision | Compare with Previous | Blame | View Log
