All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] i18n: move the trailing space out of translatable strings
Date: Mon, 09 Dec 2013 11:46:47 -0800	[thread overview]
Message-ID: <xmqqeh5lzu1k.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1386468704-18339-1-git-send-email-pclouds@gmail.com> ("Nguyễn	Thái Ngọc Duy"'s message of "Sun, 8 Dec 2013 09:11:44 +0700")

Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:

> I've got this with Vietnamese translation
>
>     $ git status
>     HEAD được tách rời từorigin/master
>
> One does not need to understand Vietnamese to see that a space is
> missing before "origin/master"...

Not really.  Only if one guesses (or knows) that Vietnamese is among
the languages that use SP to separate words.  There are languages
that do not use inter-word spaces.

Because those languages are in the minority, it would be easier to
unconditionally add SP after translatable string regardless of the
l10n target languages, but I am afraid that it is going in a wrong
direction in the longer term.

>  		clean_print_color(CLEAN_COLOR_PROMPT);
> -		printf(_("Input ignore patterns>> "));
> +		printf("%s ", _("Input ignore patterns>>"));
>  		clean_print_color(CLEAN_COLOR_RESET);

As this space after the prompt may be different from inter-word
space after all, this one may probably be on the borderline.

> @@ -754,7 +754,8 @@ static int ask_each_cmd(void)
>  		/* Ctrl-D should stop removing files */
>  		if (!eof) {
>  			qname = quote_path_relative(item->string, NULL, &buf);
> -			printf(_("remove %s? "), qname);
> +			printf(_("remove %s?"), qname);
> +			putchar(' ');

As is this change.

But it is an example that can be used to illustrate my earlier
point.  The l10n target language may want to have _no_ space between
words, i.e. to turn the above into:

	printf("%sを削除しますか?", qname);
        putchar(' ');

i.e. no space between the object of the verb ("the path being
removed") and the verb ("to remove"), while still wanting to have SP
between the prompt and its answer like everybody else.  And having
SP after "remove" in the gettext key _is_ a good thing, as l10n
people can choose not to have any SP between the verb and its
object.

> diff --git a/builtin/clone.c b/builtin/clone.c
> index 874e0fd..d48ccee 100644
> --- a/builtin/clone.c
> +++ b/builtin/clone.c
> @@ -551,12 +551,12 @@ static void update_remote_refs(const struct ref *refs,
>  
>  	if (check_connectivity) {
>  		if (transport->progress)
> -			fprintf(stderr, _("Checking connectivity... "));
> +			fprintf(stderr, _("Checking connectivity..."));
>  		if (check_everything_connected_with_transport(iterate_ref_map,
>  							      0, &rm, transport))
>  			die(_("remote did not send all necessary objects"));
>  		if (transport->progress)
> -			fprintf(stderr, _("done.\n"));
> +			fprintf(stderr, " %s", _("done.\n"));

But I think that this changes enforces the inter-word SP policy that
could go against convention by specific l10n target languages.

      parent reply	other threads:[~2013-12-09 19:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-08  2:11 [PATCH] i18n: move the trailing space out of translatable strings Nguyễn Thái Ngọc Duy
2013-12-08  2:15 ` Duy Nguyen
2013-12-08  3:56   ` Keshav Kini
2013-12-09 19:46 ` Junio C Hamano [this message]

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=xmqqeh5lzu1k.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=pclouds@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.