[pacman-dev] [PATCH 01/11] checkupdates: streamline usage function

Gordian Edenhofer gordian.edenhofer at gmail.com
Thu Sep 29 11:32:10 UTC 2016


On Thu, 2016-09-29 at 20:41 +1000, Allan McRae wrote:
> On 29/09/16 20:37, Dave Reisner wrote:
> > 
> > On Sep 29, 2016 06:23, "Gordian Edenhofer" <gordian.edenhofer at gmail
> > .com>
> > wrote:
> > 
> > Signed-off-by: Gordian Edenhofer <gordian.edenhofer at gmail.com>
> > ---
> >  contrib/checkupdates.sh.in | 9 +++++----
> >  1 file changed, 5 insertions(+), 4 deletions(-)
> > 
> > diff --git a/contrib/checkupdates.sh.in
> > b/contrib/checkupdates.sh.in
> > index ff62891..8c04370 100644
> > --- a/contrib/checkupdates.sh.in
> > +++ b/contrib/checkupdates.sh.in
> > @@ -25,13 +25,14 @@ m4_include(../scripts/library/output_format.sh)
> >  m4_include(../scripts/library/term_colors.sh)
> > 
> >  if (( $# > 0 )); then
> > -       echo "${myname} (pacman) v${myver}"
> > +       printf "%s (pacman) %s\n" "$myname" "$myver"
> >         echo
> > -       echo "Safely print a list of pending updates"
> > +       printf -- "$(gettext "Safely print a list of pending
> > updates")\n"
> >         echo
> > -       echo "Usage: ${myname}"
> > +       printf -- "$(gettext "Usage: %s")\n" "$0"
> > +       echo
> > +       printf -- "$(gettext "Note: Export the "CHECKUPDATES_DB"
> > variable
> > to change the path of the temporary database.")\n"
> > 
> > 
> > This is broken -- double quotes do not nest like this, and they're
> > effectively dropped. I also question the value of adding gettext
> > support to
> > untranslated scripts and including flag/envvar names as part of the
> > translatable strings -- that won't end well as some translator
> > *will* get
> > it wrong.

Right, that envvar does not belong there. Thanks again!
However the quotation thing is done exactly the same in makepkg [1].

> Worse than that...  contrib is not set up as translatable at all.   I
> missed that when reviewing the bacman patches.

Sorry about that! I though gettext was ok, since paclist [2] uses it as
well.

[1] https://git.archlinux.org/pacman.git/tree/scripts/makepkg.sh.in#n11
66
[2] https://git.archlinux.org/pacman.git/tree/contrib/paclist.sh.in#n23
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20160929/1e012bd0/attachment.asc>


More information about the pacman-dev mailing list