other/2857: i18n, translations does not work

Zack Weinberg zackw@Stanford.EDU
Thu May 24 10:26:00 GMT 2001


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

From: "Zack Weinberg" <zackw@Stanford.EDU>
To: Dennis Bjorklund <db@zigo.dhs.org>
Cc: "Joseph S. Myers" <jsm28@cam.ac.uk>, Mark Mitchell <mark@codesourcery.com>,
   Philipp Thomas <pthomas@suse.de>, Gabriel.Dos-Reis@cmla.ens-cachan.fr,
   gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: other/2857: i18n, translations does not work
Date: Thu, 24 May 2001 10:16:20 -0700

 On Thu, May 24, 2001 at 06:22:09PM +0200, Dennis Bjorklund wrote:
 > I found some more strings that are in the .po file that does not show up
 > translated:
 > 
 > $ gcc-3.0 --target-help
 > 
 > Speciella flaggor f?r m?larkitektur:
 >   -m96bit-long-double       sizeof(long double) is 12.
 >   -m128bit-long-double      sizeof(long double) is 16.
 > <...>
 
 Patch follows.  The changes to display_help won't do any good until
 someone goes and puts N_() around all the strings in the various
 arrays, but that's a mechanical change which would make this patch
 much longer, so I'm not doing it now.
 
 -- 
 zw    This notion of the domain specificity of information is, patently, of
       no use to anybody.  I mention it simply to get it out of the way.
       	-- Jerry Fodor, _The Mind Doesn't Work That Way_
 
 	* toplev.c (display_help, display_target_options): Run option
 	descriptions through gettext.
 
 ===================================================================
 Index: toplev.c
 --- toplev.c	2001/05/19 17:55:48	1.420.2.22
 +++ toplev.c	2001/05/24 17:13:42
 @@ -3828,7 +3828,7 @@ display_help ()
  
        if (description != NULL && * description != 0)
  	printf ("  -f%-21s %s\n",
 -		f_options[i].string, description);
 +		f_options[i].string, _(description));
      }
  
    printf (_("  -O[number]              Set optimisation level to [number]\n"));
 @@ -3842,7 +3842,7 @@ display_help ()
  	printf ("  --param %s=<value>%.*s%s\n",
  		compiler_params[i].option,
  		length > 0 ? length : 1, "                     ",
 -		description);
 +		_(description));
      }
    printf (_("  -pedantic               Issue warnings needed by strict compliance to ISO C\n"));
    printf (_("  -pedantic-errors        Like -pedantic except that errors are produced\n"));
 @@ -3855,7 +3855,7 @@ display_help ()
  
        if (description != NULL && * description != 0)
  	printf ("  -W%-21s %s\n",
 -		W_options[i].string, description);
 +		W_options[i].string, _(description));
      }
  
    printf (_("  -Wunused                Enable unused warnings\n"));
 @@ -3877,7 +3877,7 @@ display_help ()
      {
        if (debug_args[i].description != NULL)
  	printf ("  -g%-21s %s\n",
 -		debug_args[i].arg, debug_args[i].description);
 +		debug_args[i].arg, _(debug_args[i].description));
      }
  
    printf (_("  -aux-info <file>        Emit declaration info into <file>.X\n"));
 @@ -3932,7 +3932,7 @@ display_help ()
  	      lang = description;
  	    }
  	  else
 -	    printf ("  %-23.23s %s\n", option, description);
 +	    printf ("  %-23.23s %s\n", option, _(description));
  	}
      }
  
 @@ -3975,7 +3975,7 @@ display_target_options ()
  		printf (_("  -m%-23.23s [undocumented]\n"), option);
  	    }
  	  else if (* description != 0)
 -	    doc += printf ("  -m%-23.23s %s\n", option, description);
 +	    doc += printf ("  -m%-23.23s %s\n", option, _(description));
  	}
  
  #ifdef TARGET_OPTIONS
 @@ -3994,7 +3994,7 @@ display_target_options ()
  		printf (_("  -m%-23.23s [undocumented]\n"), option);
  	    }
  	  else if (* description != 0)
 -	    doc += printf ("  -m%-23.23s %s\n", option, description);
 +	    doc += printf ("  -m%-23.23s %s\n", option, _(description));
  	}
  #endif
        if (undoc)



More information about the Gcc-prs mailing list