This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fortran/5558: Error in POT file


The following reply was made to PR fortran/5558; it has been noted by GNATS.

From: martin@v.loewis.de (Martin v. Loewis)
To: Zack Weinberg <zack@codesourcery.com>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: fortran/5558: Error in POT file
Date: 01 Feb 2002 10:20:43 +0100

 Zack Weinberg <zack@codesourcery.com> writes:
 
 > > I did not say they aren't substitution escapes, I said they are not
 > > meant for printf. Being substitution escapes is irrelevant for
 > > gettext.
 > 
 > However, they need to not get taken out just as much as printf escapes
 > do.
 
 That might well be, so there was a bug in this French
 translation. This bug is not the issue of this bug report, though.
 Michel Robitaille will mark all questionable messages as fuzzy, for
 later consideration. We should solve this problem now, before more
 translators run into the problem.
 
 > > Please consider integrating my proposed changes.
 > 
 > I tried them.  They don't do anything at all.  The generated .pot file
 > is identical with and without.
 
 What xgettext version are you using? With xgettext 0.10.40, on Linux,
 using the patch
 
 Index: lex.c
 ===================================================================
 RCS file: /cvs/gcc/egcs/gcc/f/lex.c,v
 retrieving revision 1.31
 diff -u -r1.31 lex.c
 --- lex.c	2002/01/02 23:18:57	1.31
 +++ lex.c	2002/02/01 08:34:18
 @@ -424,6 +424,7 @@
  		   && ((1 << (TYPE_PRECISION (integer_type_node) - (count - 1) * 4))
  		       <= (int) firstdig)))
  	{
 +	  /* xgettext:no-c-format */
  	  ffebad_start_msg_lex ("Hex escape at %0 out of range",
  				FFEBAD_severityPEDANTIC);
  	  ffelex_bad_here_ (0, line, column);
 @@ -457,6 +458,7 @@
        && TYPE_PRECISION (char_type_node) < HOST_BITS_PER_INT
        && code >= (1 << TYPE_PRECISION (char_type_node)))
      {
 +      /* xgettext:no-c-format */
        ffebad_start_msg_lex ("Escape sequence at %0 out of range for character",
  			    FFEBAD_severityFATAL);
        ffelex_bad_here_ (0, line, column);
 
 I get a template containing
 
 #: f/lex.c:428
 #, no-c-format
 msgid "Hex escape at %0 out of range"
 msgstr ""
 
 #: f/lex.c:462
 #, no-c-format
 msgid "Escape sequence at %0 out of range for character"
 msgstr ""
 
 Notice how c-format has been replaced with no-c-format.
 
 > I was not aware that this was the case - and the Turkish translator
 > had a similar problem, reported that removing the c-format marker
 > solved it, and has had no trouble uploading.
 
 In those cases (e.g. config/m88k/m88k.c:3063), msgfmt accepts the
 translation even with c-format (%C is taken as the wchar_t
 format). Therefore, the translator did not need to remove the c-format
 markers, and the robot accepted the translation since msgfmt found no
 errors even after putting them back in.
 
 Regards,
 Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]