Re: [pacman-dev] [PATCH 00/11] Streamline syntax of contrib scripts
On Thu, 2016-09-29 at 09:56 -0400, Dave Reisner wrote: > On Thu, Sep 29, 2016 at 03:30:30PM +0200, Gordian Edenhofer wrote: > > > > On Thu, 2016-09-29 at 09:04 -0400, Dave Reisner wrote: > > > > > > On Thu, Sep 29, 2016 at 12:23:00PM +0200, Gordian Edenhofer > > > wrote: > > > > > > > > > > > > Reorganize scripts in contrib to fit the syntax and style of > > > > makepkg. > > > > Unify multiple different approaches to e.g. write a usage > > > > function, > > > > handle > > > > options and differences in naming schemas for options. > > > > > > Again, you're still putting flag names in the translatable > > > strings. > > > This > > > will only ever end badly. > > > > It has worked great for makepkg, see the git repo for dozens of > > examples [1]. > > > > [1] https://git.archlinux.org/pacman.git/tree/scripts/makepkg.sh.in > > #n11 > > 66 > > Has it worked great? > > - id.po contains --noprapare instead of --noprepare > - da.po contains --finer instead of --finger > - sv.po contains --inout instead of --input > > Repeating this mistake of allowing flags to be translated is purely > cargo-cult nonsense. Please don't do it. Ok, I will resubmit a new version with non-translatable flags. signature.asc Description: This is a digitally signed message part
Re: [pacman-dev] [PATCH 00/11] Streamline syntax of contrib scripts
On Thu, Sep 29, 2016 at 03:30:30PM +0200, Gordian Edenhofer wrote: > On Thu, 2016-09-29 at 09:04 -0400, Dave Reisner wrote: > > On Thu, Sep 29, 2016 at 12:23:00PM +0200, Gordian Edenhofer wrote: > > > > > > Reorganize scripts in contrib to fit the syntax and style of > > > makepkg. > > > Unify multiple different approaches to e.g. write a usage function, > > > handle > > > options and differences in naming schemas for options. > > > > Again, you're still putting flag names in the translatable strings. > > This > > will only ever end badly. > > It has worked great for makepkg, see the git repo for dozens of > examples [1]. > > [1] https://git.archlinux.org/pacman.git/tree/scripts/makepkg.sh.in#n11 > 66 Has it worked great? - id.po contains --noprapare instead of --noprepare - da.po contains --finer instead of --finger - sv.po contains --inout instead of --input Repeating this mistake of allowing flags to be translated is purely cargo-cult nonsense. Please don't do it.
Re: [pacman-dev] [PATCH 00/11] Streamline syntax of contrib scripts
On Thu, 2016-09-29 at 09:04 -0400, Dave Reisner wrote: > On Thu, Sep 29, 2016 at 12:23:00PM +0200, Gordian Edenhofer wrote: > > > > Reorganize scripts in contrib to fit the syntax and style of > > makepkg. > > Unify multiple different approaches to e.g. write a usage function, > > handle > > options and differences in naming schemas for options. > > Again, you're still putting flag names in the translatable strings. > This > will only ever end badly. It has worked great for makepkg, see the git repo for dozens of examples [1]. [1] https://git.archlinux.org/pacman.git/tree/scripts/makepkg.sh.in#n11 66 signature.asc Description: This is a digitally signed message part
Re: [pacman-dev] [PATCH 00/11] Streamline syntax of contrib scripts
On Thu, Sep 29, 2016 at 12:23:00PM +0200, Gordian Edenhofer wrote: > Reorganize scripts in contrib to fit the syntax and style of makepkg. > Unify multiple different approaches to e.g. write a usage function, handle > options and differences in naming schemas for options. Again, you're still putting flag names in the translatable strings. This will only ever end badly. > Gordian Edenhofer (11): > checkupdates: streamline usage function > paccache: streamline usage function > pacdiff: streamline usage function > pacdiff: proper option handling > pacdiff: streamline option syntax with makepkg > paclist: streamline usage function > paclog-pkglist: streamline usage function > pacscripts: streamline usage function > updpkgsums: streamline usage function > rankmirrors: streamline usage function > rankmirrors: proper option handling > > contrib/checkupdates.sh.in | 9 +-- > contrib/paccache.sh.in | 61 ++-- > contrib/pacdiff.sh.in| 76 +++-- > contrib/paclist.sh.in| 10 ++-- > contrib/paclog-pkglist.sh.in | 12 ++-- > contrib/pacscripts.sh.in | 18 +++--- > contrib/rankmirrors.sh.in| 132 > +-- > contrib/updpkgsums.sh.in | 21 --- > 8 files changed, 179 insertions(+), 160 deletions(-) > > -- > 2.10.0
Re: [pacman-dev] [PATCH 00/11] Streamline syntax of contrib scripts
On Thu, 2016-09-29 at 21:39 +1000, Allan McRae wrote: > On 29/09/16 21:25, Gordian Edenhofer wrote: > > > > On Thu, 2016-09-29 at 20:40 +1000, Dave Reisner wrote: > > > > > > On Sep 29, 2016 06:23, "Gordian Edenhofer" > > il.c > > > om> > > > wrote: > > > > > > Reorganize scripts in contrib to fit the syntax and style of > > > makepkg. > > > Unify multiple different approaches to e.g. write a usage > > > function, > > > handle > > > options and differences in naming schemas for options. > > > > > > > > > None of your changes which add gettext support are useful in > > > their > > > current > > > form as you do not export TEXTDOMAIN or TEXTDOMAINDIR. > > > > Thanks for the hint! I forgot about that. > > Btw. paclist [1] already defined it. > > > > [1] https://git.archlinux.org/pacman.git/tree/contrib/paclist.sh.in > > #n23 > > > > It only works for paclist because it uses translations already > provided > by pacman. This will not work for anything else because strings from > the contrib files are not added to the pacman translation. > > A new translation domain for contrib needs set-up if this is to work. Thanks for the explanation. To be honest I don't know how to setup a translation domain since I haven't read any documentation about this matter yet. I would appreciate if anybody could help me with this. Until then I will resumbit this patch as RFC once more and order commits according to whether they touch usage. An alternative approach would be to strip all gettext invocations and simply not make contrib script translatable. signature.asc Description: This is a digitally signed message part
Re: [pacman-dev] [PATCH 00/11] Streamline syntax of contrib scripts
On 29/09/16 21:25, Gordian Edenhofer wrote: > On Thu, 2016-09-29 at 20:40 +1000, Dave Reisner wrote: >> On Sep 29, 2016 06:23, "Gordian Edenhofer" > om> >> wrote: >> >> Reorganize scripts in contrib to fit the syntax and style of makepkg. >> Unify multiple different approaches to e.g. write a usage function, >> handle >> options and differences in naming schemas for options. >> >> >> None of your changes which add gettext support are useful in their >> current >> form as you do not export TEXTDOMAIN or TEXTDOMAINDIR. > > Thanks for the hint! I forgot about that. > Btw. paclist [1] already defined it. > > [1] https://git.archlinux.org/pacman.git/tree/contrib/paclist.sh.in#n23 > It only works for paclist because it uses translations already provided by pacman. This will not work for anything else because strings from the contrib files are not added to the pacman translation. A new translation domain for contrib needs set-up if this is to work. A
Re: [pacman-dev] [PATCH 00/11] Streamline syntax of contrib scripts
On Thu, 2016-09-29 at 20:40 +1000, Dave Reisner wrote: > On Sep 29, 2016 06:23, "Gordian Edenhofer" om> > wrote: > > Reorganize scripts in contrib to fit the syntax and style of makepkg. > Unify multiple different approaches to e.g. write a usage function, > handle > options and differences in naming schemas for options. > > > None of your changes which add gettext support are useful in their > current > form as you do not export TEXTDOMAIN or TEXTDOMAINDIR. Thanks for the hint! I forgot about that. Btw. paclist [1] already defined it. [1] https://git.archlinux.org/pacman.git/tree/contrib/paclist.sh.in#n23 signature.asc Description: This is a digitally signed message part
Re: [pacman-dev] [PATCH 00/11] Streamline syntax of contrib scripts
On Sep 29, 2016 06:23, "Gordian Edenhofer" wrote: Reorganize scripts in contrib to fit the syntax and style of makepkg. Unify multiple different approaches to e.g. write a usage function, handle options and differences in naming schemas for options. None of your changes which add gettext support are useful in their current form as you do not export TEXTDOMAIN or TEXTDOMAINDIR. Gordian Edenhofer (11): checkupdates: streamline usage function paccache: streamline usage function pacdiff: streamline usage function pacdiff: proper option handling pacdiff: streamline option syntax with makepkg paclist: streamline usage function paclog-pkglist: streamline usage function pacscripts: streamline usage function updpkgsums: streamline usage function rankmirrors: streamline usage function rankmirrors: proper option handling contrib/checkupdates.sh.in | 9 +-- contrib/paccache.sh.in | 61 ++-- contrib/pacdiff.sh.in| 76 +++-- contrib/paclist.sh.in| 10 ++-- contrib/paclog-pkglist.sh.in | 12 ++-- contrib/pacscripts.sh.in | 18 +++--- contrib/rankmirrors.sh.in| 132 +- - contrib/updpkgsums.sh.in | 21 --- 8 files changed, 179 insertions(+), 160 deletions(-) -- 2.10.0
[pacman-dev] [PATCH 00/11] Streamline syntax of contrib scripts
Reorganize scripts in contrib to fit the syntax and style of makepkg. Unify multiple different approaches to e.g. write a usage function, handle options and differences in naming schemas for options. Gordian Edenhofer (11): checkupdates: streamline usage function paccache: streamline usage function pacdiff: streamline usage function pacdiff: proper option handling pacdiff: streamline option syntax with makepkg paclist: streamline usage function paclog-pkglist: streamline usage function pacscripts: streamline usage function updpkgsums: streamline usage function rankmirrors: streamline usage function rankmirrors: proper option handling contrib/checkupdates.sh.in | 9 +-- contrib/paccache.sh.in | 61 ++-- contrib/pacdiff.sh.in| 76 +++-- contrib/paclist.sh.in| 10 ++-- contrib/paclog-pkglist.sh.in | 12 ++-- contrib/pacscripts.sh.in | 18 +++--- contrib/rankmirrors.sh.in| 132 +-- contrib/updpkgsums.sh.in | 21 --- 8 files changed, 179 insertions(+), 160 deletions(-) -- 2.10.0