Skip to contentSkip to conversation

unpack-trees: fix English grammar in do-this-before-that messages

PATCH Superseded Alex Henrie 4 participants 5 messages Jun 24, 2016

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 unpack-trees: fix English grammar in do-this-before-that messages

---
 unpack-trees.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
unpack-trees.c +9 -9
index 6bc9512..11c37fb 100644
@@ -62,17 +62,17 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
 	if (!strcmp(cmd, "checkout"))
 		msg = advice_commit_before_merge
 		      ? _("Your local changes to the following files would be overwritten by checkout:\n%%s"
-			  "Please commit your changes or stash them before you can switch branches.")
+			  "Please commit your changes or stash them before you switch branches.")
 		      : _("Your local changes to the following files would be overwritten by checkout:\n%%s");
 	else if (!strcmp(cmd, "merge"))
 		msg = advice_commit_before_merge
 		      ? _("Your local changes to the following files would be overwritten by merge:\n%%s"
-			  "Please commit your changes or stash them before you can merge.")
+			  "Please commit your changes or stash them before you merge.")
 		      : _("Your local changes to the following files would be overwritten by merge:\n%%s");
 	else
 		msg = advice_commit_before_merge
 		      ? _("Your local changes to the following files would be overwritten by %s:\n%%s"
-			  "Please commit your changes or stash them before you can %s.")
+			  "Please commit your changes or stash them before you %s.")
 		      : _("Your local changes to the following files would be overwritten by %s:\n%%s");
 	msgs[ERROR_WOULD_OVERWRITE] = msgs[ERROR_NOT_UPTODATE_FILE] =
 		xstrfmt(msg, cmd, cmd);
@@ -83,34 +83,34 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
 	if (!strcmp(cmd, "checkout"))
 		msg = advice_commit_before_merge
 		      ? _("The following untracked working tree files would be removed by checkout:\n%%s"
-			  "Please move or remove them before you can switch branches.")
+			  "Please move or remove them before you switch branches.")
 		      : _("The following untracked working tree files would be removed by checkout:\n%%s");
 	else if (!strcmp(cmd, "merge"))
 		msg = advice_commit_before_merge
 		      ? _("The following untracked working tree files would be removed by merge:\n%%s"
-			  "Please move or remove them before you can merge.")
+			  "Please move or remove them before you merge.")
 		      : _("The following untracked working tree files would be removed by merge:\n%%s");
 	else
 		msg = advice_commit_before_merge
 		      ? _("The following untracked working tree files would be removed by %s:\n%%s"
-			  "Please move or remove them before you can %s.")
+			  "Please move or remove them before you %s.")
 		      : _("The following untracked working tree files would be removed by %s:\n%%s");
 	msgs[ERROR_WOULD_LOSE_UNTRACKED_REMOVED] = xstrfmt(msg, cmd, cmd);
 
 	if (!strcmp(cmd, "checkout"))
 		msg = advice_commit_before_merge
 		      ? _("The following untracked working tree files would be overwritten by checkout:\n%%s"
-			  "Please move or remove them before you can switch branches.")
+			  "Please move or remove them before you switch branches.")
 		      : _("The following untracked working tree files would be overwritten by checkout:\n%%s");
 	else if (!strcmp(cmd, "merge"))
 		msg = advice_commit_before_merge
 		      ? _("The following untracked working tree files would be overwritten by merge:\n%%s"
-			  "Please move or remove them before you can merge.")
+			  "Please move or remove them before you merge.")
 		      : _("The following untracked working tree files would be overwritten by merge:\n%%s");
 	else
 		msg = advice_commit_before_merge
 		      ? _("The following untracked working tree files would be overwritten by %s:\n%%s"
-			  "Please move or remove them before you can %s.")
+			  "Please move or remove them before you %s.")
 		      : _("The following untracked working tree files would be overwritten by %s:\n%%s");
 	msgs[ERROR_WOULD_LOSE_UNTRACKED_OVERWRITTEN] = xstrfmt(msg, cmd, cmd);
 
Signature · 1 line
2.9.0
#1 lore raw
Quoted 10 lines · Alex Henrie
---
 unpack-trees.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
unpack-trees.c +0 -0
index 6bc9512..11c37fb 100644

unpack-trees.c void setup_unpack_trees_porcelain(struct unpack_trees_options *opts, · line 65

Quoted 5 lines
unpack-trees.c +1 -1
@@ -62,17 +62,17 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
 	if (!strcmp(cmd, "checkout"))
 		msg = advice_commit_before_merge
 		      ? _("Your local changes to the following files would be overwritten by checkout:\n%%s"
-			  "Please commit your changes or stash them before you can switch branches.")
+			  "Please commit your changes or stash them before you switch branches.")

I'm not a native speaker, but I think both versions are correct.

I'm OK with the change, though. Dropping something useless is usually a good thing :-).

Signature · 2 lines
Matthieu Moy
http://www-verimag.imag.fr/~moy/
#2 lore raw
In reply to Alex Henrie

Às 05:31 de 24-06-2016, Alex Henrie escreveu:

Quoted 10 lines
---
 unpack-trees.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
unpack-trees.c +0 -0
index 6bc9512..11c37fb 100644

unpack-trees.c void setup_unpack_trees_porcelain(struct unpack_trees_options *opts, · line 66

Quoted 6 lines
unpack-trees.c +1 -1
@@ -62,17 +62,17 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
 	if (!strcmp(cmd, "checkout"))
 		msg = advice_commit_before_merge
 		      ? _("Your local changes to the following files would be overwritten by checkout:\n%%s"
-			  "Please commit your changes or stash them before you can switch branches.")
+			  "Please commit your changes or stash them before you switch branches.")
 		      : _("Your local changes to the following files would be overwritten by checkout:\n%%s");

The only downside I can tell about this is translator are going to have to update those strings on their translations, but that is a normal thing to do on an active project like Git.

I'm not a native speak either, but I think I have translated that as if the sentences were like this patch introduces. I agree with this change.

#3 lore raw
Quoted 3 lines · Vasco Almeida

The only downside I can tell about this is translator are going to have to update those strings on their translations, but that is a normal thing to do on an active project like Git.

A larger issue is this fails to update tests that check these messages.

#4 lore raw

Citando Junio C Hamano <[email protected]>:

Quoted 8 lines
Quoted 3 lines · Vasco Almeida

The only downside I can tell about this is translator are going to have to update those strings on their translations, but that is a normal thing to do on an active project like Git.

A larger issue is this fails to update tests that check these messages.

Yes, I forget about tests :-). Alex Henrie, or someone else, should update the tests to reflect this change if it is to go forward.