threads / patch / 31190

patchmerge-recursive: separate message for common ancestors

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

## tl;dr

7 messages between Aug 5, 2012 and Aug 6, 2012. Diffs are folded; open one to read it.

replies: 6people: 3as markdown or json

Ralf Thielow· Aug 5, 2012, 17:56 UTC · lore

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(-)
Show changes to merge-recursive.c +4 −1
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· Aug 5, 2012, 18:44 UTC · re: Ralf Thielow · lore

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

Ralf Thielow <ralf.thielow@gmail.com> writes:
Show 7 quoted lines
> 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.

Show 19 quoted lines
>  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· Aug 5, 2012, 18:55 UTC · re: Junio C Hamano · lore

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

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:
Show 41 quoted lines
> 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· Aug 5, 2012, 19:32 UTC · re: Ralf Thielow · lore

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

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.
Show 43 quoted lines
>
> 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· Aug 6, 2012, 01:34 UTC · re: Junio C Hamano · lore

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

2012/8/6 Junio C Hamano <gitster@pobox.com>:
Show 8 quoted lines
> 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· Aug 6, 2012, 17:04 UTC · re: Jiang Xin · lore

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

2012/8/6 Jiang Xin <worldhello.net@gmail.com>:
Show 6 quoted lines
> 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· Aug 6, 2012, 17:31 UTC · re: Jiang Xin · lore

[PATCH] l10n: de.po: translate one new message

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(-)
Show changes to po/de.po +3 −3
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

← back to recent threads