Subject: Re: [PATCH/RFC v3 2/7] gettext: Add a Gettext interface for shell scripts

From: Johannes Sixt <[email-masked]>
Date: Wed, 02 Jun 2010 08:32:15 +0200

[When you resend the series in such a manner that you collect a Cc list
manually, please do *not* include me. I'm not interested in this series.]

Am 6/2/2010 1:39, schrieb Ævar Arnfjörð Bjarmason:
> +    # Not everyone has echo -n
> +    case $(echo -n) in
> +        \-n)    Xn=   ; Xc='\c' ;;
> +        *)      Xn=-n ; Xc=
> +    esac

Don't use 'echo'; use 'printf %s'.

> +
> +    gettext () {
> +        echo $Xn "$1" $Xc
> +    }
> +
> +    eval_gettext () {
> +        eval_gettext_var="echo $1"
> +        echo $Xn `eval $eval_gettext_var` $Xc
> +    }

-- Hannes