[PATCH PR translation/39521] Fix specs diagnostics translation

Shujing Zhao pearly.zhao@oracle.com
Tue Jan 12 05:49:00 GMT 2010


On 01/11/2010 11:13 PM, Joseph S. Myers wrote:
>>
>> It is tested on i686-pc-linux-gnu enabled languages c,c++,objc and fortran,
>> run "make gcc.pot" and diff the gcc.pot with the previous one to check the
>> added extracted messages.
>>
>> Ok for trunk?
> 
> This is OK, in that it causes more messages to be extracted without 
> breaking anything.  But it isn't complete.  See the issues I've filed as 
> PR 42689.  Messages are extracted with a trailing newline in some cases, 
> but gcc.c is removing that newline before passing them for translation.  
> In general if you remove those newlines in the sources then you avoid 
> exgettext needing to process them.  (Probably for robustness do both - 
> remove newlines in the sources as unnecessary and so potentially 
> confusing, while making exgettext handle them correctly - i.e. not put 
> the trailing newlines in the messages in gcc.pot.)
> 
> I don't know what you mean by "It is handled specially at exgettext" - as 
> far as I can see, you end up extracting such messages as two lines, and 
> each line gets passed for translation separately.  For sensible 
> translation, there should be a single (possibly long) diagnostic.
> 
Ok, since the diagnostic that is end with "\n" is illegal, I fixed this patch 
again. Most changes of the function spec_error_string at the old patch was to 
handle the the diagnostics that are end with "\n". In fact, they are only the 
lines of "Warning: consider linking with `-static' as system libraries with\n", 
that is also what "specially" means at the my last email :). How about to leave 
that messages not be extracted, so exgettext needn't changed again in the future?
Run "make gcc.pot" and diff the gcc.pot. The only changed is the message 
"Warning: consider linking with `-static' as system libraries with\n" is removed.

Ok for trunk?



-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ChangeLog
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100112/724123dc/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: all.patch
Type: text/x-patch
Size: 2177 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100112/724123dc/attachment.bin>


More information about the Gcc-patches mailing list