# [PATCH] i18n: proposed command missing leading dash

11 messages from 2014-02-28 to 2014-03-11. Participants: Sandy Carter, Jonathan Nieder, Junio C Hamano, Jiang Xin, Duy Nguyen.
Thread: https://gitlist.dev/t/36003

## Sandy Carter, 2014-02-28 20:52

Subject: [PATCH] i18n: proposed command missing leading dash
Message-ID: <1393620766-17582-1-git-send-email-sandy.carter@savoirfairelinux.com>
URL: https://gitlist.dev/e/1393620766-17582-1-git-send-email-sandy.carter%40savoirfairelinux.com

```
Add missing leading dash to proposed commands in french output when
using the command:
git branch --set-upstream remotename/branchname

Signed-off-by: Sandy Carter <sandy.carter@savoirfairelinux.com>
---
 po/fr.po | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/po/fr.po b/po/fr.po
index e10263f..7b44229 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -3266,7 +3266,7 @@ msgstr "    git branch -d %s\n"
 #: builtin/branch.c:1027
 #, c-format
 msgid "    git branch --set-upstream-to %s\n"
-msgstr "    git branch -set-upstream-to %s\n"
+msgstr "    git branch --set-upstream-to %s\n"
 
 #: builtin/bundle.c:47
 #, c-format
-- 
1.9.0

```

## Jonathan Nieder, 2014-02-28 21:41

Subject: Re: [PATCH] i18n: proposed command missing leading dash
Message-ID: <20140228214140.GP7855@google.com>
URL: https://gitlist.dev/e/20140228214140.GP7855%40google.com
In-Reply-To: <1393620766-17582-1-git-send-email-sandy.carter@savoirfairelinux.com>

```
Hi,

Sandy Carter wrote:

> Add missing leading dash to proposed commands in french output when
> using the command:

Thanks!

[...]
> --- a/po/fr.po
> +++ b/po/fr.po
> @@ -3266,7 +3266,7 @@ msgstr "    git branch -d %s\n"
>  #: builtin/branch.c:1027
>  #, c-format
>  msgid "    git branch --set-upstream-to %s\n"
> -msgstr "    git branch -set-upstream-to %s\n"
> +msgstr "    git branch --set-upstream-to %s\n"

To make life saner for translators, this should be either
untranslatable or a single multi-line string, I suspect:

diff --git i/builtin/branch.c w/builtin/branch.c
index b4d7716..972040c 100644
--- i/builtin/branch.c
+++ w/builtin/branch.c
@@ -1022,11 +1022,13 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
 		 */
 		if (argc == 1 && track == BRANCH_TRACK_OVERRIDE &&
 		    !branch_existed && remote_tracking) {
-			fprintf(stderr, _("\nIf you wanted to make '%s' track '%s', do this:\n\n"), head, branch->name);
-			fprintf(stderr, _("    git branch -d %s\n"), branch->name);
-			fprintf(stderr, _("    git branch --set-upstream-to %s\n"), branch->name);
+			fprintf(stderr, "\n");
+			fprintf(stderr, _("If you wanted to make '%s' track '%s', do this:\n\n"
+					  "    git branch -d %s\n"
+					  "    git branch --set-upstream-to %s"),
+					head, branch->name, branch->name, branch->name);
+			fprintf(stderr, "\n");
 		}
-
 	} else
 		usage_with_options(builtin_branch_usage, options);
 
What do you think?

Jonathan

```

## Junio C Hamano, 2014-02-28 23:31

Subject: Re: [PATCH] i18n: proposed command missing leading dash
Message-ID: <xmqq38j2u84r.fsf@gitster.dls.corp.google.com>
URL: https://gitlist.dev/e/xmqq38j2u84r.fsf%40gitster.dls.corp.google.com
In-Reply-To: <20140228214140.GP7855@google.com>

```
Jonathan Nieder <jrnieder@gmail.com> writes:

> To make life saner for translators, this should be either
> untranslatable or a single multi-line string, I suspect:
>
> diff --git i/builtin/branch.c w/builtin/branch.c
> index b4d7716..972040c 100644
> --- i/builtin/branch.c
> +++ w/builtin/branch.c
> @@ -1022,11 +1022,13 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
>  		 */
>  		if (argc == 1 && track == BRANCH_TRACK_OVERRIDE &&
>  		    !branch_existed && remote_tracking) {
> -			fprintf(stderr, _("\nIf you wanted to make '%s' track '%s', do this:\n\n"), head, branch->name);
> -			fprintf(stderr, _("    git branch -d %s\n"), branch->name);
> -			fprintf(stderr, _("    git branch --set-upstream-to %s\n"), branch->name);
> +			fprintf(stderr, "\n");
> +			fprintf(stderr, _("If you wanted to make '%s' track '%s', do this:\n\n"
> +					  "    git branch -d %s\n"
> +					  "    git branch --set-upstream-to %s"),
> +					head, branch->name, branch->name, branch->name);
> +			fprintf(stderr, "\n");
>  		}
> -
>  	} else
>  		usage_with_options(builtin_branch_usage, options);
>  
> What do you think?

Yes, I think it is sensible to make sure that the command examples
are not corrupted by the _() process.

```

## Sandy Carter, 2014-03-01 00:36

Subject: Re: [PATCH] i18n: proposed command missing leading dash
Message-ID: <1960754503.587182.1393634176189.JavaMail.root@mail>
URL: https://gitlist.dev/e/1960754503.587182.1393634176189.JavaMail.root%40mail
In-Reply-To: <xmqq38j2u84r.fsf@gitster.dls.corp.google.com>

```
Should I also update the relevant git.pot and *.po sections?

----- Original Message -----
From: "Junio C Hamano" <gitster@pobox.com>
To: "Jonathan Nieder" <jrnieder@gmail.com>
Cc: "Sandy Carter" <sandy.carter@savoirfairelinux.com>, git@vger.kernel.org, "jn avila" <jn.avila@free.fr>, "Carlos Martín Nieto" <cmn@elego.de>
Sent: Friday, February 28, 2014 6:31:32 PM
Subject: Re: [PATCH] i18n: proposed command missing leading dash

Jonathan Nieder <jrnieder@gmail.com> writes:

> To make life saner for translators, this should be either
> untranslatable or a single multi-line string, I suspect:
>
> diff --git i/builtin/branch.c w/builtin/branch.c
> index b4d7716..972040c 100644
> --- i/builtin/branch.c
> +++ w/builtin/branch.c
> @@ -1022,11 +1022,13 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
>  		 */
>  		if (argc == 1 && track == BRANCH_TRACK_OVERRIDE &&
>  		    !branch_existed && remote_tracking) {
> -			fprintf(stderr, _("\nIf you wanted to make '%s' track '%s', do this:\n\n"), head, branch->name);
> -			fprintf(stderr, _("    git branch -d %s\n"), branch->name);
> -			fprintf(stderr, _("    git branch --set-upstream-to %s\n"), branch->name);
> +			fprintf(stderr, "\n");
> +			fprintf(stderr, _("If you wanted to make '%s' track '%s', do this:\n\n"
> +					  "    git branch -d %s\n"
> +					  "    git branch --set-upstream-to %s"),
> +					head, branch->name, branch->name, branch->name);
> +			fprintf(stderr, "\n");
>  		}
> -
>  	} else
>  		usage_with_options(builtin_branch_usage, options);
>  
> What do you think?

Yes, I think it is sensible to make sure that the command examples
are not corrupted by the _() process.

```

## Sandy Carter, 2014-03-03 14:55

Subject: [PATCH v2 1/2] i18n: proposed command missing leading dash
Message-ID: <1393858554-4392-1-git-send-email-sandy.carter@savoirfairelinux.com>
URL: https://gitlist.dev/e/1393858554-4392-1-git-send-email-sandy.carter%40savoirfairelinux.com
In-Reply-To: <1393620766-17582-1-git-send-email-sandy.carter@savoirfairelinux.com>

```
Add missing leading dash to proposed commands in french output when
using the command:
    git branch --set-upstream remotename/branchname
and when upstream is gone

Signed-off-by: Sandy Carter <sandy.carter@savoirfairelinux.com>
---
 po/fr.po | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/po/fr.po b/po/fr.po
index e10263f..0b9d59e 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -1075,7 +1075,7 @@ msgstr "Votre branche est basée sur '%s', mais la branche amont a disparu.\n"
 
 #: remote.c:1875
 msgid "  (use \"git branch --unset-upstream\" to fixup)\n"
-msgstr "  (utilisez \"git branch -unset-upstream\" pour corriger)\n"
+msgstr "  (utilisez \"git branch --unset-upstream\" pour corriger)\n"
 
 #: remote.c:1878
 #, c-format
@@ -3266,7 +3266,7 @@ msgstr "    git branch -d %s\n"
 #: builtin/branch.c:1027
 #, c-format
 msgid "    git branch --set-upstream-to %s\n"
-msgstr "    git branch -set-upstream-to %s\n"
+msgstr "    git branch --set-upstream-to %s\n"
 
 #: builtin/bundle.c:47
 #, c-format
-- 
1.9.0

```

## Sandy Carter, 2014-03-03 14:55

Subject: [PATCH v2 2/2] i18n: assure command not corrupted by _() process
Message-ID: <1393858554-4392-2-git-send-email-sandy.carter@savoirfairelinux.com>
URL: https://gitlist.dev/e/1393858554-4392-2-git-send-email-sandy.carter%40savoirfairelinux.com
In-Reply-To: <1393858554-4392-1-git-send-email-sandy.carter@savoirfairelinux.com>

```
Separate message from command examples to avoid translation issues
such as a dash being omitted in a translation.

Signed-off-by: Sandy Carter <sandy.carter@savoirfairelinux.com>
---
 builtin/branch.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/builtin/branch.c b/builtin/branch.c
index b4d7716..b304da8 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -1022,11 +1022,13 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
 		 */
 		if (argc == 1 && track == BRANCH_TRACK_OVERRIDE &&
 		    !branch_existed && remote_tracking) {
-			fprintf(stderr, _("\nIf you wanted to make '%s' track '%s', do this:\n\n"), head, branch->name);
-			fprintf(stderr, _("    git branch -d %s\n"), branch->name);
-			fprintf(stderr, _("    git branch --set-upstream-to %s\n"), branch->name);
+			fprintf(stderr, "\n");
+			fprintf(stderr, _("If you wanted to make '%s' track '%s', do this:"), head, branch->name);
+			fprintf(stderr, "\n\n");
+			fprintf(stderr, "    git branch -d %s\n", branch->name);
+			fprintf(stderr, "    git branch --set-upstream-to %s\n", branch->name);
+			fprintf(stderr, "\n");
 		}
-
 	} else
 		usage_with_options(builtin_branch_usage, options);
 
-- 
1.9.0

```

## Junio C Hamano, 2014-03-04 18:40

Subject: Re: [PATCH v2 1/2] i18n: proposed command missing leading dash
Message-ID: <xmqqa9d5lsdb.fsf@gitster.dls.corp.google.com>
URL: https://gitlist.dev/e/xmqqa9d5lsdb.fsf%40gitster.dls.corp.google.com
In-Reply-To: <1393858554-4392-1-git-send-email-sandy.carter@savoirfairelinux.com>

```
From: Sandy Carter <sandy.carter@savoirfairelinux.com>
Date: Mon,  3 Mar 2014 09:55:53 -0500

Add missing leading dash to proposed commands in french output when
using the command:
    git branch --set-upstream remotename/branchname
and when upstream is gone

Signed-off-by: Sandy Carter <sandy.carter@savoirfairelinux.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---

 * Forwarding to the i18n coordinator.  I don't do French, but this
   seems trivially correct.

 po/fr.po | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/po/fr.po b/po/fr.po
index e10263f..0b9d59e 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -1075,7 +1075,7 @@ msgstr "Votre branche est basée sur '%s', mais la branche amont a disparu.\n"
 
 #: remote.c:1875
 msgid "  (use \"git branch --unset-upstream\" to fixup)\n"
-msgstr "  (utilisez \"git branch -unset-upstream\" pour corriger)\n"
+msgstr "  (utilisez \"git branch --unset-upstream\" pour corriger)\n"
 
 #: remote.c:1878
 #, c-format
@@ -3266,7 +3266,7 @@ msgstr "    git branch -d %s\n"
 #: builtin/branch.c:1027
 #, c-format
 msgid "    git branch --set-upstream-to %s\n"
-msgstr "    git branch -set-upstream-to %s\n"
+msgstr "    git branch --set-upstream-to %s\n"
 
 #: builtin/bundle.c:47
 #, c-format
-- 
1.9.0

```

## Jiang Xin, 2014-03-05 14:14

Subject: Re: [PATCH v2 1/2] i18n: proposed command missing leading dash
Message-ID: <CANYiYbEZEYwrOh0VZAGiX_sMB3z+6ntv3_UgbLkvsU6FvH07Dg@mail.gmail.com>
URL: https://gitlist.dev/e/CANYiYbEZEYwrOh0VZAGiX_sMB3z%2B6ntv3_UgbLkvsU6FvH07Dg%40mail.gmail.com
In-Reply-To: <xmqqa9d5lsdb.fsf@gitster.dls.corp.google.com>

```
2014-03-05 2:40 GMT+08:00 Junio C Hamano <gitster@pobox.com>:
> From: Sandy Carter <sandy.carter@savoirfairelinux.com>
> Date: Mon,  3 Mar 2014 09:55:53 -0500
>
> Add missing leading dash to proposed commands in french output when
> using the command:
>     git branch --set-upstream remotename/branchname
> and when upstream is gone
>
> Signed-off-by: Sandy Carter <sandy.carter@savoirfairelinux.com>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
>
>  * Forwarding to the i18n coordinator.  I don't do French, but this
>    seems trivially correct.

Applied to maint branch of git://github.com/git-l10n/git-po, and can be
merged to master directly.

-- 
Jiang Xin

```

## Junio C Hamano, 2014-03-05 21:57

Subject: Re: [PATCH v2 1/2] i18n: proposed command missing leading dash
Message-ID: <xmqqbnxkfgw4.fsf@gitster.dls.corp.google.com>
URL: https://gitlist.dev/e/xmqqbnxkfgw4.fsf%40gitster.dls.corp.google.com
In-Reply-To: <CANYiYbEZEYwrOh0VZAGiX_sMB3z+6ntv3_UgbLkvsU6FvH07Dg@mail.gmail.com>

```
Jiang Xin <worldhello.net@gmail.com> writes:

> 2014-03-05 2:40 GMT+08:00 Junio C Hamano <gitster@pobox.com>:
>> From: Sandy Carter <sandy.carter@savoirfairelinux.com>
>> Date: Mon,  3 Mar 2014 09:55:53 -0500
>>
>> Add missing leading dash to proposed commands in french output when
>> using the command:
>>     git branch --set-upstream remotename/branchname
>> and when upstream is gone
>>
>> Signed-off-by: Sandy Carter <sandy.carter@savoirfairelinux.com>
>> Signed-off-by: Junio C Hamano <gitster@pobox.com>
>> ---
>>
>>  * Forwarding to the i18n coordinator.  I don't do French, but this
>>    seems trivially correct.
>
> Applied to maint branch of git://github.com/git-l10n/git-po, and can be
> merged to master directly.

Thanks.

```

## Sandy Carter, 2014-03-10 12:51

Subject: Re: [PATCH v2 2/2] i18n: assure command not corrupted by _() process
Message-ID: <531DB549.5060304@savoirfairelinux.com>
URL: https://gitlist.dev/e/531DB549.5060304%40savoirfairelinux.com
In-Reply-To: <1393858554-4392-2-git-send-email-sandy.carter@savoirfairelinux.com>

```
Is there any update on this patch?

Le 2014-03-03 09:55, Sandy Carter a écrit :
> Separate message from command examples to avoid translation issues
> such as a dash being omitted in a translation.
>
> Signed-off-by: Sandy Carter <sandy.carter@savoirfairelinux.com>
> ---
>   builtin/branch.c | 10 ++++++----
>   1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/builtin/branch.c b/builtin/branch.c
> index b4d7716..b304da8 100644
> --- a/builtin/branch.c
> +++ b/builtin/branch.c
> @@ -1022,11 +1022,13 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
>   		 */
>   		if (argc == 1 && track == BRANCH_TRACK_OVERRIDE &&
>   		    !branch_existed && remote_tracking) {
> -			fprintf(stderr, _("\nIf you wanted to make '%s' track '%s', do this:\n\n"), head, branch->name);
> -			fprintf(stderr, _("    git branch -d %s\n"), branch->name);
> -			fprintf(stderr, _("    git branch --set-upstream-to %s\n"), branch->name);
> +			fprintf(stderr, "\n");
> +			fprintf(stderr, _("If you wanted to make '%s' track '%s', do this:"), head, branch->name);
> +			fprintf(stderr, "\n\n");
> +			fprintf(stderr, "    git branch -d %s\n", branch->name);
> +			fprintf(stderr, "    git branch --set-upstream-to %s\n", branch->name);
> +			fprintf(stderr, "\n");
>   		}
> -
>   	} else
>   		usage_with_options(builtin_branch_usage, options);
>
>

```

## Duy Nguyen, 2014-03-11 11:40

Subject: Re: [PATCH v2 2/2] i18n: assure command not corrupted by _() process
Message-ID: <CACsJy8DvuuiKXB4XUACJzhoibL8Hmk-3_GNxh9t1OF412b97vw@mail.gmail.com>
URL: https://gitlist.dev/e/CACsJy8DvuuiKXB4XUACJzhoibL8Hmk-3_GNxh9t1OF412b97vw%40mail.gmail.com
In-Reply-To: <531DB549.5060304@savoirfairelinux.com>

```
On Mon, Mar 10, 2014 at 7:51 PM, Sandy Carter
<sandy.carter@savoirfairelinux.com> wrote:
> Is there any update on this patch?

The patch looks good. Maybe Junio missed it.

>
> Le 2014-03-03 09:55, Sandy Carter a écrit :
>
>> Separate message from command examples to avoid translation issues
>> such as a dash being omitted in a translation.
>>
>> Signed-off-by: Sandy Carter <sandy.carter@savoirfairelinux.com>
>> ---
>>   builtin/branch.c | 10 ++++++----
>>   1 file changed, 6 insertions(+), 4 deletions(-)
>>
>> diff --git a/builtin/branch.c b/builtin/branch.c
>> index b4d7716..b304da8 100644
>> --- a/builtin/branch.c
>> +++ b/builtin/branch.c
>> @@ -1022,11 +1022,13 @@ int cmd_branch(int argc, const char **argv, const
>> char *prefix)
>>                  */
>>                 if (argc == 1 && track == BRANCH_TRACK_OVERRIDE &&
>>                     !branch_existed && remote_tracking) {
>> -                       fprintf(stderr, _("\nIf you wanted to make '%s'
>> track '%s', do this:\n\n"), head, branch->name);
>> -                       fprintf(stderr, _("    git branch -d %s\n"),
>> branch->name);
>> -                       fprintf(stderr, _("    git branch
>> --set-upstream-to %s\n"), branch->name);
>> +                       fprintf(stderr, "\n");
>> +                       fprintf(stderr, _("If you wanted to make '%s'
>> track '%s', do this:"), head, branch->name);
>> +                       fprintf(stderr, "\n\n");
>> +                       fprintf(stderr, "    git branch -d %s\n",
>> branch->name);
>> +                       fprintf(stderr, "    git branch --set-upstream-to
>> %s\n", branch->name);
>> +                       fprintf(stderr, "\n");
>>                 }
>> -
>>         } else
>>                 usage_with_options(builtin_branch_usage, options);
>>
>>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Duy

```
