[pacman-dev] [PATCH 01/11] checkupdates: streamline usage function
Allan McRae
allan at archlinux.org
Thu Sep 29 10:41:40 UTC 2016
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.
>
Worse than that... contrib is not set up as translatable at all. I
missed that when reviewing the bacman patches.
Allan
More information about the pacman-dev
mailing list