From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Erik Faye-Lund <kusmabite@gmail.com>,
Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: Bikeshedding advice on the ab/i18n-scripts series
Date: Mon, 16 May 2011 23:13:09 +0200 [thread overview]
Message-ID: <BANLkTimuA6-jLAUAMuhVf6FfJ2eNp8ROZw@mail.gmail.com> (raw)
In-Reply-To: <7v62pal5v7.fsf@alter.siamese.dyndns.org>
On Mon, May 16, 2011 at 22:58, Junio C Hamano <gitster@pobox.com> wrote:
> Junio C Hamano <gitster@pobox.com> 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.
next prev parent reply other threads:[~2011-05-16 21:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-16 16:03 Bikeshedding advice on the ab/i18n-scripts series Ævar Arnfjörð Bjarmason
2011-05-16 16:26 ` Jonathan Nieder
2011-05-16 20:45 ` Junio C Hamano
2011-05-16 20:53 ` Ævar Arnfjörð Bjarmason
2011-05-16 20:58 ` Junio C Hamano
2011-05-16 21:13 ` Ævar Arnfjörð Bjarmason [this message]
2011-05-16 21:26 ` Jonathan Nieder
2011-05-16 21:32 ` Ævar Arnfjörð Bjarmason
2011-05-16 21:40 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BANLkTimuA6-jLAUAMuhVf6FfJ2eNp8ROZw@mail.gmail.com \
--to=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=kusmabite@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).