Skip to contentSkip to conversation

merge-recursive: separate message for common ancestors

PATCH In review Ralf Thielow 3 participants 7 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 merge-recursive: separate message for common ancestors

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.

---
 merge-recursive.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
merge-recursive.c +4 -1
index 8903a73..39b2e16 100644
@@ -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);
 	}
Signature · 1 line
1.7.12.rc1
#1 lore raw
Quoted 7 lines · Ralf Thielow

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.

---

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.

Quoted 19 lines
 merge-recursive.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
merge-recursive.c +4 -1
index 8903a73..39b2e16 100644
@@ -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);
 	}
#2 lore raw

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)).

Quoted 41 lines · Junio C Hamano
Quoted 7 lines · Ralf Thielow

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.

---

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.

Quoted 19 lines
 merge-recursive.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
merge-recursive.c +4 -1
index 8903a73..39b2e16 100644
@@ -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);
      }
#3 lore raw
Quoted 3 lines · Ralf Thielow

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.

Quoted 43 lines · Junio C Hamano
Quoted 41 lines
Quoted 7 lines · Ralf Thielow

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.

---

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.

Quoted 19 lines
 merge-recursive.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
merge-recursive.c +4 -1
index 8903a73..39b2e16 100644
@@ -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);
      }
#4 lore raw

2012/8/6 Junio C Hamano <[email protected]>:

Quoted 8 lines
Quoted 3 lines · Ralf Thielow

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(-)
Signature · 1 line
Jiang Xin
#5 lore raw

2012/8/6 Jiang Xin <[email protected]>:

Quoted 6 lines

2012/8/6 Junio C Hamano <[email protected]>:

Quoted 2 lines

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).

Fetch this update from the usual place:

    $ git fetch git://github.com/git-l10n/git-po master
Signature · 1 line
Jiang Xin
#6 lore raw

PATCH 1/1 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).

---
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(-)
po/de.po +3 -3
index 2f56f3f..2739bc0 100644
@@ -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"
Signature · 1 line
1.7.12.rc1