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

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

 



On Mon, May 16, 2011 at 22:58, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Junio C Hamano <gitster@xxxxxxxxx> writes:
>
>> Ahh, perhaps I was the one who said something stupid like:
>>
>> Â Â Â echo >&2 "$(cmd)"
>>
>> should be equivalent to
>>
>> Â Â Â cmd >&2
>>
>> which is not the case when output from cmd does not end with a single LF
>> (i.e. either an incomplete line, or with trailing blank lines).
>>
>> Sorry, if that is what you are trying to address, please let me take that
>> back.
>
> Having said that, depending on how the strings are distributed, I have a
> feeling that we might be better off having two variants:
>
> Â Â Â Âsay >&2 "<message string>"
> Â Â Â Âgettext >&2 "<message string>"
>
> The former would be
>
> Â Â Â Âsay () {
> Â Â Â Â Â Â Â Âgettext >&2 "$1"; echo
> Â Â Â Â}
>
> and minority of callers (they may be an empty set) that care about
> trailing blank lines they output can include their own terminating LFs in
> the message to be translated and call gettext directly, letting it output
> the translation without stripping trailing LFs they (or their translation)
> produce.

That would require us to start extracting strings from all "say"
functions. The reason we have only "gettext" and "eval_gettext" is so
xgettext can extract them.

I'd like to keep that simplicity. Let's not go and wrap these
functions for trivial aesthetics at the cost of complexity.
--
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]