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: Akim Demaille
Subject: Re: [PATCH 10/11] quote consistently and make tests pass with new quoting from gnulib
Date: Thu, 26 Jan 2012 22:04:30 +0100

Now that we have these nice UTF-8 quotes where quotearg is used,
we have inconsistency in the set of messages.  For instance:

address@hidden ~/src/bison-2.5 $ git grep "'%s'" src
src/files.c:    error (EXIT_FAILURE, get_errno (), _("cannot open file '%s'"), 
name);
src/getargs.c:      msg = _("invalid language '%s'");
src/getargs.c:        error (0, 0, _("missing operand after '%s'"), argv[argc - 
1]);
src/getargs.c:        error (0, 0, _("extra operand '%s'"), argv[optind + 1]);
src/muscle-tab.c:      complain_at (variable_loc, _("%%define variable '%s' 
redefined"),
src/muscle-tab.c:    fatal(_("undefined %%define variable '%s' passed to"
src/muscle-tab.c:    fatal(_("undefined %%define variable '%s' passed to"
src/muscle-tab.c:                      _("invalid value for %%define Boolean 
variable '%s'"),
src/muscle-tab.c:    fatal(_("undefined %%define variable '%s' passed to 
muscle_percent_define_flag_if"),
src/muscle-tab.c:                          _("invalid value for %%define 
variable '%s': '%s'"),
src/muscle-tab.c:                complain_at (loc, _("accepted value: '%s'"), 
*values);
src/muscle-tab.c:        fatal(_("undefined %%define variable '%s' passed to"
src/reader.c:                   _("result type clash on merge function '%s': 
<%s> != <%s>"),
src/scan-code.l:                             _("$$ for the midrule at $%d of 
'%s'"
src/scan-code.l:                complain_at (dollar_loc, _("$$ of '%s' has no 
declared type"),
src/scan-code.l:            complain_at (dollar_loc, _("$%s of '%s' has no 
declared type"),
src/scan-gram.l:  unexpected_end (start, N_("missing '%s' at end of file"), 
token_end);
src/scan-gram.l:  unexpected_end (start, N_("missing '%s' at end of line"), 
token_end);
src/symtab.c:    warn_at (loc, _("symbol '%s' used more than once as a literal 
string"),
src/symtab.c:    warn_at (loc, _("symbol '%s' given more than one literal 
string"),

All these guys will not uses these quotes.  Is the recommended
usage now to _not_ use quotes in the message format but to
pass the argument to quotearg?  That's what I would go for, and
unless someone thinks this is not the right idea, I will go for it.

(An alternative would be to have some special additional mark up
in our format-string to denote where to quote, but that requires
more work.  Actually, one could also imagine that gettext do this
for occurrences of '%s' or some more general pattern when the
translation is not available.)




reply via email to

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