# [PATCH] merge-recursive: separate message for common ancestors

7 messages from 2012-08-05 to 2012-08-06. Participants: Ralf Thielow, Junio C Hamano, Jiang Xin.
Thread: https://gitlist.dev/t/31190

## Ralf Thielow, 2012-08-05 17:56

Subject: [PATCH] merge-recursive: separate message for common ancestors
Message-ID: <1344189398-27127-1-git-send-email-ralf.thielow@gmail.com>
URL: https://gitlist.dev/e/1344189398-27127-1-git-send-email-ralf.thielow%40gmail.com

```
The function "merge_recursive" prints the count of common
ancestors as "found %u common ancestor(s):". At least for
better translation, we should use a singular and a plural
form of this message.

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
---
 merge-recursive.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/merge-recursive.c b/merge-recursive.c
index 8903a73..39b2e16 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -1915,7 +1915,10 @@ int merge_recursive(struct merge_options *o,
 	}
 
 	if (show(o, 5)) {
-		output(o, 5, _("found %u common ancestor(s):"), commit_list_count(ca));
+		unsigned cnt = commit_list_count(ca);
+
+		output(o, 5, Q_("found %u common ancestor:",
+				"found %u common ancestors:", cnt), cnt);
 		for (iter = ca; iter; iter = iter->next)
 			output_commit_title(o, iter->item);
 	}
-- 
1.7.12.rc1

```

## Junio C Hamano, 2012-08-05 18:44

Subject: Re: [PATCH] merge-recursive: separate message for common ancestors
Message-ID: <7vehnl41r2.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vehnl41r2.fsf%40alter.siamese.dyndns.org
In-Reply-To: <1344189398-27127-1-git-send-email-ralf.thielow@gmail.com>

```
Ralf Thielow <ralf.thielow@gmail.com> writes:

> The function "merge_recursive" prints the count of common
> ancestors as "found %u common ancestor(s):". At least for
> better translation, we should use a singular and a plural
> form of this message.
>
> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
> ---

Thanks.

In your "At least" above, I am getting an impression that either (1)
you think the updated two-message solution is still not ideal for
some reason, or (2) you think the change not only helps translation,
it also helps something else.  But I cannot quite guess which.  If
it is (1) I am not sure what you are not exactly happy about, if it
is (2) I am not sure what other problem the change helps.

I am a bit puzzled by the log message, but the change makes sense to
me otherwise.

>  merge-recursive.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/merge-recursive.c b/merge-recursive.c
> index 8903a73..39b2e16 100644
> --- a/merge-recursive.c
> +++ b/merge-recursive.c
> @@ -1915,7 +1915,10 @@ int merge_recursive(struct merge_options *o,
>  	}
>  
>  	if (show(o, 5)) {
> -		output(o, 5, _("found %u common ancestor(s):"), commit_list_count(ca));
> +		unsigned cnt = commit_list_count(ca);
> +
> +		output(o, 5, Q_("found %u common ancestor:",
> +				"found %u common ancestors:", cnt), cnt);
>  		for (iter = ca; iter; iter = iter->next)
>  			output_commit_title(o, iter->item);
>  	}

```

## Ralf Thielow, 2012-08-05 18:55

Subject: Re: [PATCH] merge-recursive: separate message for common ancestors
Message-ID: <CAN0XMO+j08fV-5+nNrVQAteB3VStBjqvvjMzRq=6wcbg8OR+xg@mail.gmail.com>
URL: https://gitlist.dev/e/CAN0XMO%2Bj08fV-5%2BnNrVQAteB3VStBjqvvjMzRq%3D6wcbg8OR%2Bxg%40mail.gmail.com
In-Reply-To: <7vehnl41r2.fsf@alter.siamese.dyndns.org>

```
It would be nicer for translators to have two messages.
In the end it's just a separation for singular and plural as it's
done in diff.c (e.g. Q_(" %d file changed", " %d files changed", files)).

On Sun, Aug 5, 2012 at 8:44 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Ralf Thielow <ralf.thielow@gmail.com> writes:
>
>> The function "merge_recursive" prints the count of common
>> ancestors as "found %u common ancestor(s):". At least for
>> better translation, we should use a singular and a plural
>> form of this message.
>>
>> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
>> ---
>
> Thanks.
>
> In your "At least" above, I am getting an impression that either (1)
> you think the updated two-message solution is still not ideal for
> some reason, or (2) you think the change not only helps translation,
> it also helps something else.  But I cannot quite guess which.  If
> it is (1) I am not sure what you are not exactly happy about, if it
> is (2) I am not sure what other problem the change helps.
>
> I am a bit puzzled by the log message, but the change makes sense to
> me otherwise.
>
>>  merge-recursive.c | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/merge-recursive.c b/merge-recursive.c
>> index 8903a73..39b2e16 100644
>> --- a/merge-recursive.c
>> +++ b/merge-recursive.c
>> @@ -1915,7 +1915,10 @@ int merge_recursive(struct merge_options *o,
>>       }
>>
>>       if (show(o, 5)) {
>> -             output(o, 5, _("found %u common ancestor(s):"), commit_list_count(ca));
>> +             unsigned cnt = commit_list_count(ca);
>> +
>> +             output(o, 5, Q_("found %u common ancestor:",
>> +                             "found %u common ancestors:", cnt), cnt);
>>               for (iter = ca; iter; iter = iter->next)
>>                       output_commit_title(o, iter->item);
>>       }

```

## Junio C Hamano, 2012-08-05 19:32

Subject: Re: [PATCH] merge-recursive: separate message for common ancestors
Message-ID: <7v628x3zjt.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v628x3zjt.fsf%40alter.siamese.dyndns.org
In-Reply-To: <CAN0XMO+j08fV-5+nNrVQAteB3VStBjqvvjMzRq=6wcbg8OR+xg@mail.gmail.com>

```
Ralf Thielow <ralf.thielow@gmail.com> writes:

> It would be nicer for translators to have two messages.
> In the end it's just a separation for singular and plural as it's
> done in diff.c (e.g. Q_(" %d file changed", " %d files changed", files)).

OK, so there was no hidden message behind "At least for better
translation".  Will apply this so 1.7.12 can have it.

Thanks.

>
> On Sun, Aug 5, 2012 at 8:44 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Ralf Thielow <ralf.thielow@gmail.com> writes:
>>
>>> The function "merge_recursive" prints the count of common
>>> ancestors as "found %u common ancestor(s):". At least for
>>> better translation, we should use a singular and a plural
>>> form of this message.
>>>
>>> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
>>> ---
>>
>> Thanks.
>>
>> In your "At least" above, I am getting an impression that either (1)
>> you think the updated two-message solution is still not ideal for
>> some reason, or (2) you think the change not only helps translation,
>> it also helps something else.  But I cannot quite guess which.  If
>> it is (1) I am not sure what you are not exactly happy about, if it
>> is (2) I am not sure what other problem the change helps.
>>
>> I am a bit puzzled by the log message, but the change makes sense to
>> me otherwise.
>>
>>>  merge-recursive.c | 5 ++++-
>>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/merge-recursive.c b/merge-recursive.c
>>> index 8903a73..39b2e16 100644
>>> --- a/merge-recursive.c
>>> +++ b/merge-recursive.c
>>> @@ -1915,7 +1915,10 @@ int merge_recursive(struct merge_options *o,
>>>       }
>>>
>>>       if (show(o, 5)) {
>>> -             output(o, 5, _("found %u common ancestor(s):"), commit_list_count(ca));
>>> +             unsigned cnt = commit_list_count(ca);
>>> +
>>> +             output(o, 5, Q_("found %u common ancestor:",
>>> +                             "found %u common ancestors:", cnt), cnt);
>>>               for (iter = ca; iter; iter = iter->next)
>>>                       output_commit_title(o, iter->item);
>>>       }

```

## Jiang Xin, 2012-08-06 01:34

Subject: Re: [PATCH] merge-recursive: separate message for common ancestors
Message-ID: <CANYiYbFe6LUL+2m-X+Ek8ehFw6D5tvh+FwoGjF_zipcUe_MtMw@mail.gmail.com>
URL: https://gitlist.dev/e/CANYiYbFe6LUL%2B2m-X%2BEk8ehFw6D5tvh%2BFwoGjF_zipcUe_MtMw%40mail.gmail.com
In-Reply-To: <7v628x3zjt.fsf@alter.siamese.dyndns.org>

```
2012/8/6 Junio C Hamano <gitster@pobox.com>:
> Ralf Thielow <ralf.thielow@gmail.com> writes:
>
>> It would be nicer for translators to have two messages.
>> In the end it's just a separation for singular and plural as it's
>> done in diff.c (e.g. Q_(" %d file changed", " %d files changed", files)).
>
> OK, so there was no hidden message behind "At least for better
> translation".  Will apply this so 1.7.12 can have it.

[resend to the list again, for last mail is rich text format and is
rejected by the list]

So I will not wait for Ralf's update on "de.po", he will catch up with next
round of l10n with this fix. Pull request for this round of l10n:

The following changes since commit 05a20c87abd08441c98dfcca0606bc0f8432ab26:

  Merge git://github.com/git-l10n/git-po (2012-08-01 15:59:08 -0700)

are available in the git repository at:


  git://github.com/git-l10n/git-po master

for you to fetch changes up to 649900bc126edf59aaae49ba025880dc948980f0:

  l10n: zh_CN.po: translate 76 new messages (2012-08-05 07:12:27 +0800)

----------------------------------------------------------------
Jiang Xin (2):
      l10n: Update git.pot (76 new, 4 removed messages)
      l10n: zh_CN.po: translate 76 new messages

Tran Ngoc Quan (1):
      l10n: vi.po update to follow POT in 3b613

 po/git.pot  | 433 +++++++++++++++++++++++++++++---
 po/vi.po    | 464 ++++++++++++++++++++++++++++++----
 po/zh_CN.po | 817 +++++++++++++++++++++++++++++++++---------------------------
 3 files changed, 1265 insertions(+), 449 deletions(-)

-- 
Jiang Xin

```

## Jiang Xin, 2012-08-06 17:04

Subject: Re: [PATCH] merge-recursive: separate message for common ancestors
Message-ID: <CANYiYbE-q82-BmbQ15o8S=0mS2GgURZ1qpX6E1NG80ZNgax_ow@mail.gmail.com>
URL: https://gitlist.dev/e/CANYiYbE-q82-BmbQ15o8S%3D0mS2GgURZ1qpX6E1NG80ZNgax_ow%40mail.gmail.com
In-Reply-To: <CANYiYbFe6LUL+2m-X+Ek8ehFw6D5tvh+FwoGjF_zipcUe_MtMw@mail.gmail.com>

```
2012/8/6 Jiang Xin <worldhello.net@gmail.com>:
> 2012/8/6 Junio C Hamano <gitster@pobox.com>:
>> OK, so there was no hidden message behind "At least for better
>> translation".  Will apply this so 1.7.12 can have it.
>
> So I will not wait for Ralf's update on "de.po", he will catch up with next
> round of l10n with this fix. Pull request for this round of l10n:

Next round (maybe last) of translation for git v1.7.12 begins. This time
only 1 message is updated in commit bb2ba06:

    l10n: Update one message in git.pot

    This update comes from commit v1.7.12-rc1-18-ge0453
    (merge-recursive: separate message for common ancestors).

    Signed-off-by: Jiang Xin <worldhello.net@gmail.com>

Fetch this update from the usual place:

    $ git fetch git://github.com/git-l10n/git-po master

-- 
Jiang Xin

```

## Ralf Thielow, 2012-08-06 17:31

Subject: [PATCH] l10n: de.po: translate one new message
Message-ID: <1344274264-11368-1-git-send-email-ralf.thielow@gmail.com>
URL: https://gitlist.dev/e/1344274264-11368-1-git-send-email-ralf.thielow%40gmail.com
In-Reply-To: <CANYiYbE-q82-BmbQ15o8S=0mS2GgURZ1qpX6E1NG80ZNgax_ow@mail.gmail.com>

```
Translate one new message came from git.pot update
in bb2ba06 (l10n: Update one message in git.pot).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
---
Hi German l10n team,

please review also this small update of German
translation. I'll squash it with the last update
and merge the commit messages together.

Thanks,
Ralf

 po/de.po | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/po/de.po b/po/de.po
index 2f56f3f..2739bc0 100644
--- a/po/de.po
+++ b/po/de.po
@@ -594,11 +594,11 @@ msgid "Merging:"
 msgstr "Zusammenführung:"
 
 #: merge-recursive.c:1920
-#, fuzzy, c-format
+#, c-format
 msgid "found %u common ancestor:"
 msgid_plural "found %u common ancestors:"
-msgstr[0] "%u gemeinsame(n) Vorfahren gefunden"
-msgstr[1] "%u gemeinsame(n) Vorfahren gefunden"
+msgstr[0] "%u gemeinsamen Vorfahren gefunden"
+msgstr[1] "%u gemeinsame Vorfahren gefunden"
 
 #: merge-recursive.c:1957
 msgid "merge returned no commit"
-- 
1.7.12.rc1

```
