git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
May 16, 2011, 20:58 UTC
Message-ID
<7v62pal5v7.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7vboz2l6h1.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 13 quoted lines
> 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.

Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 5 of 9 in “Bikeshedding advice on the ab/i18n-scripts series”
  1. Ævar Arnfjörð BjarmasonMay 16, 2011
  2. Jonathan NiederMay 16, 2011
  3. Junio C HamanoMay 16, 2011
  4. Ævar Arnfjörð BjarmasonMay 16, 2011
  5. Junio C HamanoMay 16, 2011
  6. Ævar Arnfjörð BjarmasonMay 16, 2011
  7. Jonathan NiederMay 16, 2011
  8. Ævar Arnfjörð BjarmasonMay 16, 2011
  9. Junio C HamanoMay 16, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.