threads / patch / 42701

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

Subject: [PATCH] unpack-trees: fix English grammar in do-this-before-that messages

## tl;dr

5 messages between Jun 24, 2016 and Jun 24, 2016. Diffs are folded; open one to read it.

replies: 4people: 4as markdown or json

Alex Henrie· Jun 24, 2016, 05:31 UTC · lore
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
---
 unpack-trees.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
Show changes to unpack-trees.c +9 −9
diff --git a/unpack-trees.c b/unpack-trees.c
index 6bc9512..11c37fb 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -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);
 
-- 
2.9.0
Matthieu Moy· Jun 24, 2016, 09:26 UTC · re: Alex Henrie · lore

Re: [PATCH] unpack-trees: fix English grammar in do-this-before-that messages

Alex Henrie <alexhenrie24@gmail.com> writes:
Show 15 quoted lines
> Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
> ---
>  unpack-trees.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/unpack-trees.c b/unpack-trees.c
> index 6bc9512..11c37fb 100644
> --- a/unpack-trees.c
> +++ b/unpack-trees.c
> @@ -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 :-).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Vasco Almeida· Jun 24, 2016, 11:39 UTC · re: Alex Henrie · lore

Re: [PATCH] unpack-trees: fix English grammar in do-this-before-that messages

Às 05:31 de 24-06-2016, Alex Henrie escreveu:
Show 16 quoted lines
> Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
> ---
>  unpack-trees.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/unpack-trees.c b/unpack-trees.c
> index 6bc9512..11c37fb 100644
> --- a/unpack-trees.c
> +++ b/unpack-trees.c
> @@ -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.

Junio C Hamano· Jun 24, 2016, 22:28 UTC · re: Vasco Almeida · lore

Re: [PATCH] unpack-trees: fix English grammar in do-this-before-that messages

Vasco Almeida <vascomalmeida@sapo.pt> writes:
> 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.

Vasco Almeida· Jun 24, 2016, 23:02 UTC · re: Junio C Hamano · lore

Re: [PATCH] unpack-trees: fix English grammar in do-this-before-that messages

Citando Junio C Hamano <gitster@pobox.com>:
Show 8 quoted lines
> Vasco Almeida <vascomalmeida@sapo.pt> writes:
>
>> 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.

← back to recent threads