|
i |
AutoOpts includes its own .pot file for inclusion with your project's .pot files. Additionally, the translatable strings embedded in the AutoOpts generated source are wrapped in _(...) macros so they can be extracted for translation at run time. Long option names are considered "translatable" by AutoOpts meaning a program localized to Spanish, for example, could accept "--ayuda" as the replacement for "--help". This may not be desireable if your program runs from a script or expects configuration data to be in the "C" locale format. To facilitate this, you may defer or prevent option name translations with a "no-xlate" attribute or by invoking any of several "XLAT" macros. The program help/usage text also needs some special treatment. By default, an AutoOpt-ed project will not have a translatable usage text. This is because the usage text is constructed by gathering together words and phrases at run time. This gluing process results in a very stilted or even incomprehensible translation. You may now avoid this by specifying the "full-usage" and "short-usage" attributes in the option definition file.
However you do it, if those character pointers in the structure point to something and if the generated .c file is compiled with ENABLE_NLS defined for the preprocessor in some way, then gettext() (or whatever the _(...) macro maps to) will be called to find the translation for the usage text. Finally, if you wish to make special notations to translators about particular options, you must use an option attribute, "translators" instead of a "/* TRANSLATORS: ... */" comment. That text will be emitted as a comment into the generated .c file. |