bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 10/11] quote consistently and make tests pass with new quotin


From: Paul Eggert
Subject: Re: [PATCH 10/11] quote consistently and make tests pass with new quoting from gnulib
Date: Sat, 28 Jan 2012 13:50:56 -0800
User-agent: Mozilla/5.0 (X11; Linux i686; rv:9.0) Gecko/20111229 Thunderbird/9.0

On 01/28/2012 05:06 AM, Akim Demaille wrote:

> I don't think it goes against the GCS, at least in the spirit:

I agree.

>>   if (getenv ("BISON_C_QUOTING_STYLE"))
>>     bison_quoting_style = shell_quoting_style;

Wouldn't it be better if we didn't have yet another
environment variable to worry about?

> - locale_quoting_style does not seem to obey to
>   QA_ELIDE_OUTER_QUOTES.  Is this on purpose?

No, it's just that nobody has asked for that feature.

> - Is there a consensus among gnulibers on single quotes vs.
>   double quotes in error messages?

Bruno's suggestion, which I think is a good one, is to use
single quotes when quoting code and other text that should
not be translated, and to use double quotes when quoting
natural-language text that should be translated.  Usually
this means single quotes, but not always.

>> -    error (EXIT_FAILURE, get_errno (), _("cannot open file '%s'"), name);
>> +    error (EXIT_FAILURE, get_errno (), _("cannot open file %s"), quote 
>> (name));

For that _particular_ diagnostic I'd prefer

   _("%s: cannot open"), quotearg_colon (name)

That way, the message is shorter and less quotier and easier to translate
(the translators don't have to worry about quote marks at all, yay!)
and the most important thing (the file name) comes first.  This is the
old Unix tradition, and in this particular case the traditional way
seems better.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]