public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/36161] gfc_error formats are not marked gcc-internal-format in po file
Date: Fri, 18 Dec 2009 09:56:00 -0000	[thread overview]
Message-ID: <20091218095610.22107.qmail@sourceware.org> (raw)
In-Reply-To: <bug-36161-10888@http.gcc.gnu.org/bugzilla/>



------- 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


  parent reply	other threads:[~2009-12-18  9:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-06 19:41 [Bug fortran/36161] New: " goeran at uddeborg dot se
2008-05-19 19:48 ` [Bug fortran/36161] " kargl at gcc dot gnu dot org
2008-05-19 20:16 ` goeran at uddeborg dot se
2009-01-03 23:58 ` dfranke at gcc dot gnu dot org
2009-03-28 16:39 ` fxcoudert at gcc dot gnu dot org
2009-03-28 18:27 ` goeran at uddeborg dot se
2009-03-29 16:53 ` goeran at uddeborg dot se
2009-03-29 16:55 ` bruno at clisp dot org
2009-03-29 17:00 ` joseph at codesourcery dot com
2009-12-07 18:40 ` dfranke at gcc dot gnu dot org
2009-12-17 20:54 ` pault at gcc dot gnu dot org
2009-12-17 23:07 ` dfranke at gcc dot gnu dot org
2009-12-18  9:56 ` burnus at gcc dot gnu dot org [this message]
2009-12-18 18:27 ` dfranke at gcc dot gnu dot org
2009-12-19 11:39 ` dfranke at gcc dot gnu dot org
2010-01-04  7:46 ` burnus at gcc dot gnu dot org
2010-01-04 21:01 ` burnus at gcc dot gnu dot org
2010-01-04 21:13 ` burnus at gcc dot gnu dot org
2010-01-11 17:27 ` goeran at uddeborg dot se
2010-01-11 20:21 ` burnus at gcc dot gnu dot org
2010-01-11 21:02 ` goeran at uddeborg dot se

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091218095610.22107.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).