------- Comment #12 from burnus at gcc dot gnu dot org 2009-12-18 09:56 ------- > With the upcoming release of 4.5, I think it would be nice to fix/improve the > translation related bugs now, i.e. this, PR38573 and PR40489. > > As I have no idea how to reproduce/check/whatever this kind of PR, could > somebody be so kind to add a step-by-step description of the commands that > need to be invoked to do so?
No real step-by step introduction, but a) Reading gcc/ABOUT-GCC-NLS b) Modifying gcc/po/exgettext In the latter, one takes care that %e... get properly tagged; see the function "keyword_option" which tags them as c-format / no-c-format / gcc-internal-format. See also http://www.gnu.org/software/hello/manual/gettext/xgettext-Invocation.html and http://www.gnu.org/software/hello/manual/gettext/c_002dformat-Flag.html As blunt solution, one could simply do what as proposed in comment 5: Add the --keyword= lines to gcc/po/exgettext to the invocation of $xgettext. A more advanced solution is to do what has been suggested in comment 6; however, that does not fit the current use of messages in gfortran. What has been done there is described in gcc/ABOUT-GCC-NLS. For instance one calls in gcc: error ("register name not specified for %q+D", decl); The function prototype is: void error (const char *gmsgid, ...) Here, "msgid" triggers the the matching in "exgettext" and "g" indicates that it is not a default C format string but a special one (cf. description in ABOUT-GCC-NLS). Seemingly we already ue "msgid", but not with the proper prefix: gfc_notify_std (int std, const char *nocmsgid, ...) "nocmsgid" is currently translated to "no-c-format" but we want to have gcc-internal-format or gfc-internal-format. The current matches are (gcc/po/exgettext's function keyword_option): if (args ~ /g$/) format="gcc-internal-format" else if (args ~ /noc$/) format="no-c-format" else if (args ~ /c$/) format="c-format" Thus "gmsgid" would be one solution or "gfcmsgid" another with adding a else if (args ~ /gfc$/) format="gfc-internal-format" Thus, fixing error.c and possibly editing gcc/po/exgettext should be enough. -- burnus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2009-12-18 09:56:10 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36161