git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: git@vger.kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Jiang Xin" <worldhello.net@gmail.com>
Subject: Re: [PATCH 1/5] i18n: keep the last \n even when text is poisoned
Date: Thu, 8 Mar 2012 16:01:32 -0600	[thread overview]
Message-ID: <20120308220131.GA10122@burratino> (raw)
In-Reply-To: <1331198198-22409-2-git-send-email-pclouds@gmail.com>

Nguyễn Thái Ngọc Duy wrote:

> --- a/gettext.c
> +++ b/gettext.c
> @@ -24,6 +24,16 @@ int use_gettext_poison(void)
>  		poison_requested = getenv("GIT_GETTEXT_POISON") ? 1 : 0;
>  	return poison_requested;
>  }
> +
> +const char *poison_text(const char *msgid)
> +{
> +	int len = strlen(msgid);
> +	if (len && msgid[len-1] == '\n')
> +		return "# GETTEXT POISON #\n";
> +	else
> +		return "# GETTEXT POISON #";

I realize this was not the motivation behind the above patch, but if
the translation of some message has to end with a newline for git to
function correctly, would we consider that a bug?

I am of two minds on that:

 - on one hand, translators tend to be trustworthy, reasonable folks
 - on the other hand, anything we can do to make the translation
   process less fussy seems like time well spent

The latter wins out for me, so I would prefer not to have this patch
so the test suite can detect important newlines that should be not be
part of the translatable string.

Just my two cents,
Jonathan

  reply	other threads:[~2012-03-08 22:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-08  9:16 [PATCH 0/5] i18n-ize relative dates, git-help and parseopt Nguyễn Thái Ngọc Duy
2012-03-08  9:16 ` [PATCH 1/5] i18n: keep the last \n even when text is poisoned Nguyễn Thái Ngọc Duy
2012-03-08 22:01   ` Jonathan Nieder [this message]
2012-03-09  1:11     ` Nguyen Thai Ngoc Duy
2012-03-09  2:33       ` Nguyen Thai Ngoc Duy
2012-03-09 11:24     ` Ævar Arnfjörð Bjarmason
2012-03-08  9:16 ` [PATCH 2/5] i18n: mark relative dates for translation Nguyễn Thái Ngọc Duy
2012-03-15 18:51   ` Jonathan Nieder
2012-03-15 19:16     ` Johannes Sixt
2012-03-15 19:18       ` Jonathan Nieder
2012-03-16 11:47     ` Nguyen Thai Ngoc Duy
2012-03-08  9:16 ` [PATCH 3/5] i18n: parseopt: lookup help and argument translations when showing usage Nguyễn Thái Ngọc Duy
2012-03-08 22:07   ` Jonathan Nieder
2012-03-08  9:16 ` [PATCH 4/5] i18n: help: mark parseopt strings for translation Nguyễn Thái Ngọc Duy
2012-03-08  9:16 ` [PATCH 5/5] i18n: help: mark " Nguyễn Thái Ngọc Duy

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120308220131.GA10122@burratino \
    --to=jrnieder@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.com \
    --cc=worldhello.net@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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).