Re: Bikeshedding advice on the ab/i18n-scripts series

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ãvar ArnfjÃrà Bjarmason wrote:

> Oh, and for all the convertion of:
>
>     echo >&2 "$(gettext "foobar")"
>
> I've already done:
>
>     (
>         gettext "foobar" &&
>         echo
>     ) >&2

Some day we might want to introduce a gettext_ln function or something
similar.  But that doesn't seem urgent; I wouldn't be appalled by
having to read 'gettext "foobar" && echo' in a block surrounded by
braces (or even a subshell, even though it makes shells waste a
fork()).

As for what to call the envvars, I have no strong preference there,
either.  If you don't care about compatibility with the real gettext.sh
then it should be possible to do the variable munging automatically,
using a loop:

	for var in $(git sh-i18n--envsubst --variables "$fmt")
	do
		eval "sh_i18n_$var"=\$var
		export "sh_i18n_$var"
	done

with an understanding that git sh-i18n--envsubst substitutes in
${sh_i18n_$var} where it sees '$var' in the format string.

But if we do want to use the real envsubst some day then that is not
possible.  I dunno.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]