This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH v2a,v2b 0/2][BZ #13853] Don't use Bash-only $"msgid" quoting


This is an update of patch 2/2 from my previously proposed patchset.
(Patch 1/2 of that set can be applied at any time as-is, pending

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"

I've reviewed the changes multiple times and tested many of the strings,
but do let me know if I've made any more obvious mistakes. :)

P. J. McDermott

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]