This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2a,v2b 0/2][BZ #13853] Don't use Bash-only $"msgid" quoting
- From: "Patrick 'P. J.' McDermott" <pjm at nac dot net>
- To: libc-alpha at sourceware dot org
- Date: Fri, 28 Jun 2013 21:02:56 -0400
- Subject: Re: [PATCH v2a,v2b 0/2][BZ #13853] Don't use Bash-only $"msgid" quoting
- References: <50B30263 dot 1080805 at nac dot net>
- Reply-to: "P. J. McDermott" <pjm at nac dot net>, libc-alpha at sourceware dot org
On 2012-11-26 00:47, P. J. McDermott wrote:
[...]
>
> I'm proposing two alternative solutions this time, each split into two
> patches (as advised by Dmitry V. Levin):
>
> * v2a, as discussed, simply replaces parameter expansions in
> translatable strings with printf conversion specifications and
> replaces $"msgid" quoting with calls to a new _gettext wrapper
> function that calls gettext if installed.
>
> * v2b goes a little further. It uses printf instead of echo for all
> translatable output, adds script and year variables (as in Carlos
> O'Donell's patch in BZ #13853), and replaces printf and $"msgid"
> quoting with a new gettextf function.
>
> I prefer the v2b set, as it removes almost all uses of echo and (in my
> opinion) results in cleaner and more consistent code, e.g.
>
> gettextf >&2 "executable \`%s' not found\n" "$program"
>
> instead of
>
> printf >&2 "$(_gettext "executable \`%s' not found\n")" "$program"
Does anyone have a preference between these patchsets? As noted
previously, I prefer v2b.
--
Patrick "P. J." McDermott
http://www.pehjota.net/
http://www.pehjota.net/contact.html