git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / Atom feed
* [L10N] Kickoff for Git 2.23.0 round #1
@ 2019-07-30  3:35 Jiang Xin
  2019-08-03 10:18 ` [RFC] l10n: fix some typos for v2.23.0 Jean-Noël Avila
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Jiang Xin @ 2019-07-30  3:35 UTC (permalink / raw)
  To: Git List, Alexander Shopov, Jordi Mas, Matthias Rüster,
	Jimmy Angelakos, Christopher Díaz, Jean-Noël Avila,
	Alessandro Menti, Gwan-gyeong Mun, Vasco Almeida,
	Dimitriy Ryazantcev, Peter Krefting,
	Trần Ngọc Quân, Jiang Xin

Hi,

Git v2.23.0-rc0 has been released, and it's time to start new round of git
l10n. This time there are 130 updated messages need to be translated since
last update:

    l10n: git.pot: v2.23.0 round 1 (130 new, 35 removed)
    
    Generate po/git.pot from v2.23.0-rc0 for git v2.23.0 l10n round 1.
    
    Signed-off-by: Jiang Xin <worldhello.net@gmail.com>

You can get it from the usual place:

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

As how to update your XX.po and help to translate Git, please see
"Updating a XX.po file" and other sections in "po/README" file.

--
Jiang Xin

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [RFC] l10n: fix some typos for v2.23.0
  2019-07-30  3:35 [L10N] Kickoff for Git 2.23.0 round #1 Jiang Xin
@ 2019-08-03 10:18 ` Jean-Noël Avila
  2019-08-03 13:50   ` Jiang Xin
  2019-08-03 19:59 ` [PATCH v2] l10n: reformat some localized strings " Jean-Noël Avila
  2019-08-06 17:19 ` [PATCH v3] " Jean-Noël Avila
  2 siblings, 1 reply; 13+ messages in thread
From: Jean-Noël Avila @ 2019-08-03 10:18 UTC (permalink / raw)
  To: git; +Cc: Jean-Noël Avila, Jiang Xin

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
---
 builtin/checkout.c | 2 +-
 builtin/fetch.c    | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/builtin/checkout.c b/builtin/checkout.c
index 91f8509f85..75efc37bc7 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -1769,7 +1769,7 @@ int cmd_restore(int argc, const char **argv, const char *prefix)
 	struct option *options;
 	struct option restore_options[] = {
 		OPT_STRING('s', "source", &opts.from_treeish, "<tree-ish>",
-			   N_("where the checkout from")),
+			   N_("where to checkout from")),
 		OPT_BOOL('S', "staged", &opts.checkout_index,
 			   N_("restore the index")),
 		OPT_BOOL('W', "worktree", &opts.checkout_worktree,
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 53ce99d2bb..3422e6bdf7 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -1005,12 +1005,12 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
 
 	if (advice_fetch_show_forced_updates) {
 		if (!fetch_show_forced_updates) {
-			warning(_("Fetch normally indicates which branches had a forced update, but that check has been disabled."));
-			warning(_("To re-enable, use '--show-forced-updates' flag or run 'git config fetch.showForcedUpdates true'."));
+			warning(_("Fetch normally indicates which branches had a forced update, but that check has been disabled."
+				"To re-enable, use '--show-forced-updates' flag or run 'git config fetch.showForcedUpdates true'."));
 		} else if (forced_updates_ms > FORCED_UPDATES_DELAY_WARNING_IN_MS) {
-			warning(_("It took %.2f seconds to check forced updates. You can use '--no-show-forced-updates'\n"),
+			warning(_("It took %.2f seconds to check forced updates. You can use '--no-show-forced-updates'\n"
+				"or run 'git config fetch.showForcedUpdates false' to avoid this check.\n"),
 				forced_updates_ms / 1000.0);
-			warning(_("or run 'git config fetch.showForcedUpdates false' to avoid this check.\n"));
 		}
 	}
 
-- 
2.22.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFC] l10n: fix some typos for v2.23.0
  2019-08-03 10:18 ` [RFC] l10n: fix some typos for v2.23.0 Jean-Noël Avila
@ 2019-08-03 13:50   ` Jiang Xin
  0 siblings, 0 replies; 13+ messages in thread
From: Jiang Xin @ 2019-08-03 13:50 UTC (permalink / raw)
  To: Jean-Noël Avila; +Cc: Git List

Jean-Noël Avila <jn.avila@free.fr> 于2019年8月3日周六 下午6:18写道:
>
> Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
> ---
>  builtin/checkout.c | 2 +-
>  builtin/fetch.c    | 8 ++++----
>  2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/builtin/checkout.c b/builtin/checkout.c
> index 91f8509f85..75efc37bc7 100644
> --- a/builtin/checkout.c
> +++ b/builtin/checkout.c
> @@ -1769,7 +1769,7 @@ int cmd_restore(int argc, const char **argv, const char *prefix)
>         struct option *options;
>         struct option restore_options[] = {
>                 OPT_STRING('s', "source", &opts.from_treeish, "<tree-ish>",
> -                          N_("where the checkout from")),
> +                          N_("where to checkout from")),

I'm not sure, which is better? or "where the checkout is from"

> diff --git a/builtin/fetch.c b/builtin/fetch.c
> index 53ce99d2bb..3422e6bdf7 100644
> --- a/builtin/fetch.c
> +++ b/builtin/fetch.c
> @@ -1005,12 +1005,12 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
>
>         if (advice_fetch_show_forced_updates) {
>                 if (!fetch_show_forced_updates) {
> -                       warning(_("Fetch normally indicates which branches had a forced update, but that check has been disabled."));
> -                       warning(_("To re-enable, use '--show-forced-updates' flag or run 'git config fetch.showForcedUpdates true'."));
> +                       warning(_("Fetch normally indicates which branches had a forced update, but that check has been disabled."
> +                               "To re-enable, use '--show-forced-updates' flag or run 'git config fetch.showForcedUpdates true'."));

It is a very long line, you should add line breaks and format the message, like:

+                       warning(_("Fetch normally indicates which branches "
+                                       "had a forced update, but that\n"
+                                       "check has been disabled. To
re-enable, "
+                                       "use '--show-forced-updates'\n"
+                                       "flag or run 'git config "
+                                       "fetch.showForcedUpdates true'."));

>                 } else if (forced_updates_ms > FORCED_UPDATES_DELAY_WARNING_IN_MS) {
> -                       warning(_("It took %.2f seconds to check forced updates. You can use '--no-show-forced-updates'\n"),
> +                       warning(_("It took %.2f seconds to check forced updates. You can use '--no-show-forced-updates'\n"
> +                               "or run 'git config fetch.showForcedUpdates false' to avoid this check.\n"),

Try to make a better format, like:

+                       warning(_("It took %.2f seconds to check
forced updates. "
+                                       "You can use\n"
+                                       "'--no-show-forced-updates' or run "
+                                       "'git config fetch.showForcedUpdates\n"
+                                       "false' to avoid this check.\n"),

>                                 forced_updates_ms / 1000.0);

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2] l10n: reformat some localized strings for v2.23.0
  2019-07-30  3:35 [L10N] Kickoff for Git 2.23.0 round #1 Jiang Xin
  2019-08-03 10:18 ` [RFC] l10n: fix some typos for v2.23.0 Jean-Noël Avila
@ 2019-08-03 19:59 ` Jean-Noël Avila
  2019-08-03 23:45   ` Jeff King
  2019-08-06 17:19 ` [PATCH v3] " Jean-Noël Avila
  2 siblings, 1 reply; 13+ messages in thread
From: Jean-Noël Avila @ 2019-08-03 19:59 UTC (permalink / raw)
  To: git; +Cc: Jean-Noël Avila, Jiang Xin

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
---
 builtin/checkout.c |  2 +-
 builtin/fetch.c    | 15 +++++++++++----
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/builtin/checkout.c b/builtin/checkout.c
index 91f8509f85..08e19ed1ed 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -1769,7 +1769,7 @@ int cmd_restore(int argc, const char **argv, const char *prefix)
 	struct option *options;
 	struct option restore_options[] = {
 		OPT_STRING('s', "source", &opts.from_treeish, "<tree-ish>",
-			   N_("where the checkout from")),
+			   N_("where the checkout is from")),
 		OPT_BOOL('S', "staged", &opts.checkout_index,
 			   N_("restore the index")),
 		OPT_BOOL('W', "worktree", &opts.checkout_worktree,
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 53ce99d2bb..0e8760e5d4 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -850,6 +850,15 @@ static int iterate_ref_map(void *cb_data, struct object_id *oid)
 	return 0;
 }
 
+static char warn_show_forced_updates[] =
+N_("Fetch normally indicates which branches had a forced update, but that\n"
+   "check has been disabled. To re-enable, use '--show-forced-updates' flag\n"
+   "or run 'git config fetch.showForcedUpdates true'.");
+static char warn_time_show_forced_updates[] =
+N_("It took %.2f seconds to check forced updates. You can use\n"
+   "'--no-show-forced-updates or run 'git config fetch.showForcedUpdates false'\n"
+   " to avoid this check.\n");
+
 static int store_updated_refs(const char *raw_url, const char *remote_name,
 			      int connectivity_checked, struct ref *ref_map)
 {
@@ -1005,12 +1014,10 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
 
 	if (advice_fetch_show_forced_updates) {
 		if (!fetch_show_forced_updates) {
-			warning(_("Fetch normally indicates which branches had a forced update, but that check has been disabled."));
-			warning(_("To re-enable, use '--show-forced-updates' flag or run 'git config fetch.showForcedUpdates true'."));
+                  warning(_(warn_show_forced_updates));
 		} else if (forced_updates_ms > FORCED_UPDATES_DELAY_WARNING_IN_MS) {
-			warning(_("It took %.2f seconds to check forced updates. You can use '--no-show-forced-updates'\n"),
+			warning(_(warn_time_show_forced_updates),
 				forced_updates_ms / 1000.0);
-			warning(_("or run 'git config fetch.showForcedUpdates false' to avoid this check.\n"));
 		}
 	}
 
-- 
2.22.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] l10n: reformat some localized strings for v2.23.0
  2019-08-03 19:59 ` [PATCH v2] l10n: reformat some localized strings " Jean-Noël Avila
@ 2019-08-03 23:45   ` Jeff King
  2019-08-04 11:01     ` Jean-Noël AVILA
  2019-08-05 18:49     ` Junio C Hamano
  0 siblings, 2 replies; 13+ messages in thread
From: Jeff King @ 2019-08-03 23:45 UTC (permalink / raw)
  To: Jean-Noël Avila; +Cc: git, Jiang Xin

On Sat, Aug 03, 2019 at 09:59:07PM +0200, Jean-Noël Avila wrote:

> Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
> ---
>  builtin/checkout.c |  2 +-
>  builtin/fetch.c    | 15 +++++++++++----
>  2 files changed, 12 insertions(+), 5 deletions(-)
> 
> diff --git a/builtin/checkout.c b/builtin/checkout.c
> index 91f8509f85..08e19ed1ed 100644
> --- a/builtin/checkout.c
> +++ b/builtin/checkout.c
> @@ -1769,7 +1769,7 @@ int cmd_restore(int argc, const char **argv, const char *prefix)
>  	struct option *options;
>  	struct option restore_options[] = {
>  		OPT_STRING('s', "source", &opts.from_treeish, "<tree-ish>",
> -			   N_("where the checkout from")),
> +			   N_("where the checkout is from")),

I think your original "where to checkout from" is better.

As a native speaker, "where the checkout is from" implies that checkout
is a noun that is being described. But I think we want checkout to be a
verb (because we are talking about the operation), and the option tells
Git how to do that operation.

(I agree the original "where the checkout from" is nonsense).

> diff --git a/builtin/fetch.c b/builtin/fetch.c
> index 53ce99d2bb..0e8760e5d4 100644
> --- a/builtin/fetch.c
> +++ b/builtin/fetch.c
> @@ -850,6 +850,15 @@ static int iterate_ref_map(void *cb_data, struct object_id *oid)
>  	return 0;
>  }
>  
> +static char warn_show_forced_updates[] =
> +N_("Fetch normally indicates which branches had a forced update, but that\n"
> +   "check has been disabled. To re-enable, use '--show-forced-updates' flag\n"
> +   "or run 'git config fetch.showForcedUpdates true'.");

This one isn't a typo fix, right? It's just putting the two warning()
calls into a single message. I can see how this would be useful for
translators, but note that the output will be different. The original
would be something like:

  warning: Fetch normally indicates...
  warning: To re-enable...

where now we'd get:

  warning: Fetch normally indicates...
  check has been disabled...
  or run 'git config...

which might be a bit harder to read because the wrapped lines lose the
prefix. For advise() we nicely pick out the newlines and prefix each
line individually, but warning(), error(), etc, don't do that. Maybe
they should.

That's too big for this late in the -rc cycle, I think. In the meantime,
I'm not sure which (the original or your patch) is the least-bad
solution. :)

This change (if I am right that there's no actual typo fix) should
perhaps be in a separate patch from the earlier hunk, though.

-Peff

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] l10n: reformat some localized strings for v2.23.0
  2019-08-03 23:45   ` Jeff King
@ 2019-08-04 11:01     ` Jean-Noël AVILA
  2019-08-05  4:21       ` Jeff King
  2019-08-05 18:49     ` Junio C Hamano
  1 sibling, 1 reply; 13+ messages in thread
From: Jean-Noël AVILA @ 2019-08-04 11:01 UTC (permalink / raw)
  To: Jeff King; +Cc: git, Jiang Xin

On Sunday, 4 August 2019 01:45:22 CEST Jeff King wrote:
> On Sat, Aug 03, 2019 at 09:59:07PM +0200, Jean-Noël Avila wrote:
> 

> > -			   N_("where the checkout from")),
> > +			   N_("where the checkout is from")),
> 
> I think your original "where to checkout from" is better.
> 
> As a native speaker, "where the checkout is from" implies that checkout
> is a noun that is being described. But I think we want checkout to be a
> verb (because we are talking about the operation), and the option tells
> Git how to do that operation.
> 
> (I agree the original "where the checkout from" is nonsense).
> 


Oh. OK.

> > diff --git a/builtin/fetch.c b/builtin/fetch.c
> > index 53ce99d2bb..0e8760e5d4 100644
> > --- a/builtin/fetch.c
> > +++ b/builtin/fetch.c
> > @@ -850,6 +850,15 @@ static int iterate_ref_map(void *cb_data, struct object_id *oid)
> >  	return 0;
> >  }
> >  
> > +static char warn_show_forced_updates[] =
> > +N_("Fetch normally indicates which branches had a forced update, but that\n"
> > +   "check has been disabled. To re-enable, use '--show-forced-updates' flag\n"
> > +   "or run 'git config fetch.showForcedUpdates true'.");
> 
> This one isn't a typo fix, right? It's just putting the two warning()
> calls into a single message. I can see how this would be useful for
> translators, but note that the output will be different. The original
> would be something like:
> 
>   warning: Fetch normally indicates...
>   warning: To re-enable...
> 
> where now we'd get:
> 
>   warning: Fetch normally indicates...
>   check has been disabled...
>   or run 'git config...
> 
> which might be a bit harder to read because the wrapped lines lose the
> prefix. For advise() we nicely pick out the newlines and prefix each
> line individually, but warning(), error(), etc, don't do that. Maybe
> they should.
> 
> That's too big for this late in the -rc cycle, I think. In the meantime,
> I'm not sure which (the original or your patch) is the least-bad
> solution. :)
> 
> This change (if I am right that there's no actual typo fix) should
> perhaps be in a separate patch from the earlier hunk, though.
> 
> -Peff
> 

This one is not about typos.

My original fix was more concerning the second sequence, where the sentence is broken in the middle, simply for better rendering but this does not make sense either, because the lines are too long anyway.

I guess that in most languages, a sentence can be broken into two propositions by a coordinating conjunction, but it may not match the English structure.

Is it so important that the lines of warning all start with a "warning:" prefix?

JN



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] l10n: reformat some localized strings for v2.23.0
  2019-08-04 11:01     ` Jean-Noël AVILA
@ 2019-08-05  4:21       ` Jeff King
  0 siblings, 0 replies; 13+ messages in thread
From: Jeff King @ 2019-08-05  4:21 UTC (permalink / raw)
  To: Jean-Noël AVILA; +Cc: git, Jiang Xin

On Sun, Aug 04, 2019 at 01:01:51PM +0200, Jean-Noël AVILA wrote:

> This one is not about typos.
> 
> My original fix was more concerning the second sequence, where the
> sentence is broken in the middle, simply for better rendering but this
> does not make sense either, because the lines are too long anyway.

Ah, yeah, the sentence broken over the line is pretty bad for
translation. And I agree the lines are overly long.

> Is it so important that the lines of warning all start with a
> "warning:" prefix?

For some definition of "so". ;) As I said, I think your patch may be the
lesser of two evils, and we should take it until warning() learns to
handle lines breaks better.

-Peff

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] l10n: reformat some localized strings for v2.23.0
  2019-08-03 23:45   ` Jeff King
  2019-08-04 11:01     ` Jean-Noël AVILA
@ 2019-08-05 18:49     ` Junio C Hamano
  2019-08-05 21:15       ` Jeff King
  1 sibling, 1 reply; 13+ messages in thread
From: Junio C Hamano @ 2019-08-05 18:49 UTC (permalink / raw)
  To: Jeff King; +Cc: Jean-Noël Avila, git, Jiang Xin

Jeff King <peff@peff.net> writes:

>>  		OPT_STRING('s', "source", &opts.from_treeish, "<tree-ish>",
>> -			   N_("where the checkout from")),
>> +			   N_("where the checkout is from")),
>
> I think your original "where to checkout from" is better.

Would we even want to do s/where/which tree-ish/?

> translators, but note that the output will be different. The original
> would be something like:
>
>   warning: Fetch normally indicates...
>   warning: To re-enable...
>
> where now we'd get:
>
>   warning: Fetch normally indicates...
>   check has been disabled...
>   or run 'git config...
>
> which might be a bit harder to read because the wrapped lines lose the
> prefix. For advise() we nicely pick out the newlines and prefix each
> line individually, but warning(), error(), etc, don't do that. Maybe
> they should.

Yeah, I'd be surprised that nobody thought of doing that, so perhaps
somebody tried and failed with a possible fallout.  I do not offhand
see any downside of teaching them to do the prefixing.

For existing multi-line warnings that uses a single call to
warning(), I think the preparer of the message manually indents the
second and subsequent line by a run of SPs to match the screen width
of "warning:" prefix (and expect translators to do the same with
their language), and we need to get rid of that kind of "hack" when
we insert a middle layer between *_builtin() and vreportf() to do
the line chomping to produce output similar to advise() code.

> That's too big for this late in the -rc cycle, I think.

Agreed.
Thanks.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2] l10n: reformat some localized strings for v2.23.0
  2019-08-05 18:49     ` Junio C Hamano
@ 2019-08-05 21:15       ` Jeff King
  0 siblings, 0 replies; 13+ messages in thread
From: Jeff King @ 2019-08-05 21:15 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Jean-Noël Avila, git, Jiang Xin

On Mon, Aug 05, 2019 at 11:49:46AM -0700, Junio C Hamano wrote:

> Jeff King <peff@peff.net> writes:
> 
> >>  		OPT_STRING('s', "source", &opts.from_treeish, "<tree-ish>",
> >> -			   N_("where the checkout from")),
> >> +			   N_("where the checkout is from")),
> >
> > I think your original "where to checkout from" is better.
> 
> Would we even want to do s/where/which tree-ish/?

Yeah, I think that is even better.

> > prefix. For advise() we nicely pick out the newlines and prefix each
> > line individually, but warning(), error(), etc, don't do that. Maybe
> > they should.
> 
> Yeah, I'd be surprised that nobody thought of doing that, so perhaps
> somebody tried and failed with a possible fallout.  I do not offhand
> see any downside of teaching them to do the prefixing.

I know we've discussed it before, but a quick search of the archive only
came up with instances of me suggesting we should do it. ;)

Besides the obvious fallout you mentioned where callers might need to
drop their own custom indenting, it's possible people might be less
happy for output like:

  warning: a thing happened to these paths:
          foo
	  bar

where people might prefer not having a prefix on the subsequent lines,
because it makes it easier to cut-and-paste.

Anyway, that is all out of scope for this patch.

-Peff

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v3] l10n: reformat some localized strings for v2.23.0
  2019-07-30  3:35 [L10N] Kickoff for Git 2.23.0 round #1 Jiang Xin
  2019-08-03 10:18 ` [RFC] l10n: fix some typos for v2.23.0 Jean-Noël Avila
  2019-08-03 19:59 ` [PATCH v2] l10n: reformat some localized strings " Jean-Noël Avila
@ 2019-08-06 17:19 ` Jean-Noël Avila
  2019-08-06 17:54   ` Junio C Hamano
  2 siblings, 1 reply; 13+ messages in thread
From: Jean-Noël Avila @ 2019-08-06 17:19 UTC (permalink / raw)
  To: git; +Cc: Jean-Noël Avila, Jiang Xin, Jeff King, Junio C Hamano

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
---
 builtin/checkout.c |  2 +-
 builtin/fetch.c    | 15 +++++++++++----
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/builtin/checkout.c b/builtin/checkout.c
index 91f8509f85..6123f732a2 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -1769,7 +1769,7 @@ int cmd_restore(int argc, const char **argv, const char *prefix)
 	struct option *options;
 	struct option restore_options[] = {
 		OPT_STRING('s', "source", &opts.from_treeish, "<tree-ish>",
-			   N_("where the checkout from")),
+			   N_("which tree-ish to checkout from")),
 		OPT_BOOL('S', "staged", &opts.checkout_index,
 			   N_("restore the index")),
 		OPT_BOOL('W', "worktree", &opts.checkout_worktree,
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 53ce99d2bb..c8bf4c651b 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -850,6 +850,15 @@ static int iterate_ref_map(void *cb_data, struct object_id *oid)
 	return 0;
 }
 
+static char warn_show_forced_updates[] =
+N_("Fetch normally indicates which branches had a forced update,\n"
+   "but that check has been disabled. To re-enable, use '--show-forced-updates'\n"
+   "flag or run 'git config fetch.showForcedUpdates true'.");
+static char warn_time_show_forced_updates[] =
+N_("It took %.2f seconds to check forced updates. You can use\n"
+   "'--no-show-forced-updates' or run 'git config fetch.showForcedUpdates false'\n"
+   " to avoid this check.\n");
+
 static int store_updated_refs(const char *raw_url, const char *remote_name,
 			      int connectivity_checked, struct ref *ref_map)
 {
@@ -1005,12 +1014,10 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
 
 	if (advice_fetch_show_forced_updates) {
 		if (!fetch_show_forced_updates) {
-			warning(_("Fetch normally indicates which branches had a forced update, but that check has been disabled."));
-			warning(_("To re-enable, use '--show-forced-updates' flag or run 'git config fetch.showForcedUpdates true'."));
+                  warning(_(warn_show_forced_updates));
 		} else if (forced_updates_ms > FORCED_UPDATES_DELAY_WARNING_IN_MS) {
-			warning(_("It took %.2f seconds to check forced updates. You can use '--no-show-forced-updates'\n"),
+			warning(_(warn_time_show_forced_updates),
 				forced_updates_ms / 1000.0);
-			warning(_("or run 'git config fetch.showForcedUpdates false' to avoid this check.\n"));
 		}
 	}
 
-- 
2.22.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v3] l10n: reformat some localized strings for v2.23.0
  2019-08-06 17:19 ` [PATCH v3] " Jean-Noël Avila
@ 2019-08-06 17:54   ` Junio C Hamano
  2019-08-06 18:10     ` Jeff King
  2019-08-06 19:45     ` Junio C Hamano
  0 siblings, 2 replies; 13+ messages in thread
From: Junio C Hamano @ 2019-08-06 17:54 UTC (permalink / raw)
  To: Jean-Noël Avila; +Cc: git, Jiang Xin, Jeff King

Jean-Noël Avila <jn.avila@free.fr> writes:

> Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
> ---
>  builtin/checkout.c |  2 +-
>  builtin/fetch.c    | 15 +++++++++++----
>  2 files changed, 12 insertions(+), 5 deletions(-)

Thanks.  Folks, does this look sensible (it does to me)?

> diff --git a/builtin/checkout.c b/builtin/checkout.c
> index 91f8509f85..6123f732a2 100644
> --- a/builtin/checkout.c
> +++ b/builtin/checkout.c
> @@ -1769,7 +1769,7 @@ int cmd_restore(int argc, const char **argv, const char *prefix)
>  	struct option *options;
>  	struct option restore_options[] = {
>  		OPT_STRING('s', "source", &opts.from_treeish, "<tree-ish>",
> -			   N_("where the checkout from")),
> +			   N_("which tree-ish to checkout from")),
>  		OPT_BOOL('S', "staged", &opts.checkout_index,
>  			   N_("restore the index")),
>  		OPT_BOOL('W', "worktree", &opts.checkout_worktree,
> diff --git a/builtin/fetch.c b/builtin/fetch.c
> index 53ce99d2bb..c8bf4c651b 100644
> --- a/builtin/fetch.c
> +++ b/builtin/fetch.c
> @@ -850,6 +850,15 @@ static int iterate_ref_map(void *cb_data, struct object_id *oid)
>  	return 0;
>  }
>  
> +static char warn_show_forced_updates[] =
> +N_("Fetch normally indicates which branches had a forced update,\n"
> +   "but that check has been disabled. To re-enable, use '--show-forced-updates'\n"
> +   "flag or run 'git config fetch.showForcedUpdates true'.");
> +static char warn_time_show_forced_updates[] =
> +N_("It took %.2f seconds to check forced updates. You can use\n"
> +   "'--no-show-forced-updates' or run 'git config fetch.showForcedUpdates false'\n"
> +   " to avoid this check.\n");
> +
>  static int store_updated_refs(const char *raw_url, const char *remote_name,
>  			      int connectivity_checked, struct ref *ref_map)
>  {
> @@ -1005,12 +1014,10 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
>  
>  	if (advice_fetch_show_forced_updates) {
>  		if (!fetch_show_forced_updates) {
> -			warning(_("Fetch normally indicates which branches had a forced update, but that check has been disabled."));
> -			warning(_("To re-enable, use '--show-forced-updates' flag or run 'git config fetch.showForcedUpdates true'."));
> +                  warning(_(warn_show_forced_updates));
>  		} else if (forced_updates_ms > FORCED_UPDATES_DELAY_WARNING_IN_MS) {
> -			warning(_("It took %.2f seconds to check forced updates. You can use '--no-show-forced-updates'\n"),
> +			warning(_(warn_time_show_forced_updates),
>  				forced_updates_ms / 1000.0);
> -			warning(_("or run 'git config fetch.showForcedUpdates false' to avoid this check.\n"));
>  		}
>  	}

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v3] l10n: reformat some localized strings for v2.23.0
  2019-08-06 17:54   ` Junio C Hamano
@ 2019-08-06 18:10     ` Jeff King
  2019-08-06 19:45     ` Junio C Hamano
  1 sibling, 0 replies; 13+ messages in thread
From: Jeff King @ 2019-08-06 18:10 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Derrick Stolee, Jean-Noël Avila, git, Jiang Xin

On Tue, Aug 06, 2019 at 10:54:47AM -0700, Junio C Hamano wrote:

> Jean-Noël Avila <jn.avila@free.fr> writes:
> 
> > Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
> > ---
> >  builtin/checkout.c |  2 +-
> >  builtin/fetch.c    | 15 +++++++++++----
> >  2 files changed, 12 insertions(+), 5 deletions(-)
> 
> Thanks.  Folks, does this look sensible (it does to me)?

Yes, modulo a funny indent in the final hunk (git-am will complain about
it).

I think we can take this as-is, but I did notice one thing when I
actually looked carefully at the surrounding code...

> >  	if (advice_fetch_show_forced_updates) {
> >  		if (!fetch_show_forced_updates) {
> > -			warning(_("Fetch normally indicates which branches had a forced update, but that check has been disabled."));
> > -			warning(_("To re-enable, use '--show-forced-updates' flag or run 'git config fetch.showForcedUpdates true'."));
> > +                  warning(_(warn_show_forced_updates));

This is controlled by advice.fetchShowForcedUpdates. Should these
warning() calls actually be advise()? In which case everything I said
about newlines and prefixes would then just work out, because advise()
does prefix each line independently. I'm happy to punt on that until
post-release, though, in the name of calming things down rather than
stirring them up. :)

-Peff

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v3] l10n: reformat some localized strings for v2.23.0
  2019-08-06 17:54   ` Junio C Hamano
  2019-08-06 18:10     ` Jeff King
@ 2019-08-06 19:45     ` Junio C Hamano
  1 sibling, 0 replies; 13+ messages in thread
From: Junio C Hamano @ 2019-08-06 19:45 UTC (permalink / raw)
  To: Jean-Noël Avila; +Cc: git, Jiang Xin, Jeff King

Junio C Hamano <gitster@pobox.com> writes:

>> +static char warn_show_forced_updates[] =
>> +N_("Fetch normally indicates which branches had a forced update,\n"
>> +   "but that check has been disabled. To re-enable, use '--show-forced-updates'\n"
>> +   "flag or run 'git config fetch.showForcedUpdates true'.");
>> ...
>> +                  warning(_(warn_show_forced_updates));

This unfortunately triggers a false positive format-security
violation.   Turning it into "static const char var[]" would
squelch it, which I did for today's integration.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-08-06 19:45 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-30  3:35 [L10N] Kickoff for Git 2.23.0 round #1 Jiang Xin
2019-08-03 10:18 ` [RFC] l10n: fix some typos for v2.23.0 Jean-Noël Avila
2019-08-03 13:50   ` Jiang Xin
2019-08-03 19:59 ` [PATCH v2] l10n: reformat some localized strings " Jean-Noël Avila
2019-08-03 23:45   ` Jeff King
2019-08-04 11:01     ` Jean-Noël AVILA
2019-08-05  4:21       ` Jeff King
2019-08-05 18:49     ` Junio C Hamano
2019-08-05 21:15       ` Jeff King
2019-08-06 17:19 ` [PATCH v3] " Jean-Noël Avila
2019-08-06 17:54   ` Junio C Hamano
2019-08-06 18:10     ` Jeff King
2019-08-06 19:45     ` Junio C Hamano

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for the project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git