{"thread":{"id":"51552","subject":"[L10N] Kickoff for Git 2.23.0 round #1","startedAt":"2019-07-30T03:35:32Z","lastAt":"2019-08-06T19:45:40Z","messageCount":13,"participants":["Jiang Xin","Jean-Noël Avila","Jeff King","Jean-Noël AVILA","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"379568","messageId":"20190730033512.7226-1-worldhello.net@gmail.com","threadId":"51552","inReplyTo":null,"subject":"[L10N] Kickoff for Git 2.23.0 round #1","fromName":"Jiang Xin","fromEmail":"worldhello.net@gmail.com","sentAt":"2019-07-30T03:35:12Z","receivedAt":"2019-07-30T03:35:32Z","isPatch":false,"sender":{"key":"worldhello.net@gmail.com","avatar":"https://avatars.githubusercontent.com/u/183860?v=4"},"body":"Hi,\n\nGit v2.23.0-rc0 has been released, and it's time to start new round of git\nl10n. This time there are 130 updated messages need to be translated since\nlast update:\n\n    l10n: git.pot: v2.23.0 round 1 (130 new, 35 removed)\n    \n    Generate po/git.pot from v2.23.0-rc0 for git v2.23.0 l10n round 1.\n    \n    Signed-off-by: Jiang Xin <worldhello.net@gmail.com>\n\nYou can get it from the usual place:\n\n    https://github.com/git-l10n/git-po/\n\nAs how to update your XX.po and help to translate Git, please see\n\"Updating a XX.po file\" and other sections in \"po/README\" file.\n\n--\nJiang Xin\n"},{"id":"379878","messageId":"20190803101832.30307-1-jn.avila@free.fr","threadId":"51552","inReplyTo":"20190730033512.7226-1-worldhello.net@gmail.com","subject":"[RFC] l10n: fix some typos for v2.23.0","fromName":"Jean-Noël Avila","fromEmail":"jn.avila@free.fr","sentAt":"2019-08-03T10:18:32Z","receivedAt":"2019-08-03T10:19:02Z","isPatch":false,"sender":{"key":"jn.avila@free.fr","avatar":"https://avatars.githubusercontent.com/u/156172?v=4"},"body":"Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>\n---\n builtin/checkout.c | 2 +-\n builtin/fetch.c    | 8 ++++----\n 2 files changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/builtin/checkout.c b/builtin/checkout.c\nindex 91f8509f85..75efc37bc7 100644\n--- a/builtin/checkout.c\n+++ b/builtin/checkout.c\n@@ -1769,7 +1769,7 @@ int cmd_restore(int argc, const char **argv, const char *prefix)\n \tstruct option *options;\n \tstruct option restore_options[] = {\n \t\tOPT_STRING('s', \"source\", &opts.from_treeish, \"<tree-ish>\",\n-\t\t\t   N_(\"where the checkout from\")),\n+\t\t\t   N_(\"where to checkout from\")),\n \t\tOPT_BOOL('S', \"staged\", &opts.checkout_index,\n \t\t\t   N_(\"restore the index\")),\n \t\tOPT_BOOL('W', \"worktree\", &opts.checkout_worktree,\ndiff --git a/builtin/fetch.c b/builtin/fetch.c\nindex 53ce99d2bb..3422e6bdf7 100644\n--- a/builtin/fetch.c\n+++ b/builtin/fetch.c\n@@ -1005,12 +1005,12 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,\n \n \tif (advice_fetch_show_forced_updates) {\n \t\tif (!fetch_show_forced_updates) {\n-\t\t\twarning(_(\"Fetch normally indicates which branches had a forced update, but that check has been disabled.\"));\n-\t\t\twarning(_(\"To re-enable, use '--show-forced-updates' flag or run 'git config fetch.showForcedUpdates true'.\"));\n+\t\t\twarning(_(\"Fetch normally indicates which branches had a forced update, but that check has been disabled.\"\n+\t\t\t\t\"To re-enable, use '--show-forced-updates' flag or run 'git config fetch.showForcedUpdates true'.\"));\n \t\t} else if (forced_updates_ms > FORCED_UPDATES_DELAY_WARNING_IN_MS) {\n-\t\t\twarning(_(\"It took %.2f seconds to check forced updates. You can use '--no-show-forced-updates'\\n\"),\n+\t\t\twarning(_(\"It took %.2f seconds to check forced updates. You can use '--no-show-forced-updates'\\n\"\n+\t\t\t\t\"or run 'git config fetch.showForcedUpdates false' to avoid this check.\\n\"),\n \t\t\t\tforced_updates_ms / 1000.0);\n-\t\t\twarning(_(\"or run 'git config fetch.showForcedUpdates false' to avoid this check.\\n\"));\n \t\t}\n \t}\n \n-- \n2.22.0\n\n"},{"id":"379879","messageId":"CANYiYbEjnQS=3Rb4YsLFJLPJQOSk+rZwoHQj_=2A=NhdGEKczw@mail.gmail.com","threadId":"51552","inReplyTo":"20190803101832.30307-1-jn.avila@free.fr","subject":"Re: [RFC] l10n: fix some typos for v2.23.0","fromName":"Jiang Xin","fromEmail":"worldhello.net@gmail.com","sentAt":"2019-08-03T13:50:09Z","receivedAt":"2019-08-03T13:50:30Z","isPatch":false,"sender":{"key":"worldhello.net@gmail.com","avatar":"https://avatars.githubusercontent.com/u/183860?v=4"},"body":"Jean-Noël Avila <jn.avila@free.fr> 于2019年8月3日周六 下午6:18写道：\n>\n> Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>\n> ---\n>  builtin/checkout.c | 2 +-\n>  builtin/fetch.c    | 8 ++++----\n>  2 files changed, 5 insertions(+), 5 deletions(-)\n>\n> diff --git a/builtin/checkout.c b/builtin/checkout.c\n> index 91f8509f85..75efc37bc7 100644\n> --- a/builtin/checkout.c\n> +++ b/builtin/checkout.c\n> @@ -1769,7 +1769,7 @@ int cmd_restore(int argc, const char **argv, const char *prefix)\n>         struct option *options;\n>         struct option restore_options[] = {\n>                 OPT_STRING('s', \"source\", &opts.from_treeish, \"<tree-ish>\",\n> -                          N_(\"where the checkout from\")),\n> +                          N_(\"where to checkout from\")),\n\nI'm not sure, which is better? or \"where the checkout is from\"\n\n> diff --git a/builtin/fetch.c b/builtin/fetch.c\n> index 53ce99d2bb..3422e6bdf7 100644\n> --- a/builtin/fetch.c\n> +++ b/builtin/fetch.c\n> @@ -1005,12 +1005,12 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,\n>\n>         if (advice_fetch_show_forced_updates) {\n>                 if (!fetch_show_forced_updates) {\n> -                       warning(_(\"Fetch normally indicates which branches had a forced update, but that check has been disabled.\"));\n> -                       warning(_(\"To re-enable, use '--show-forced-updates' flag or run 'git config fetch.showForcedUpdates true'.\"));\n> +                       warning(_(\"Fetch normally indicates which branches had a forced update, but that check has been disabled.\"\n> +                               \"To re-enable, use '--show-forced-updates' flag or run 'git config fetch.showForcedUpdates true'.\"));\n\nIt is a very long line, you should add line breaks and format the message, like:\n\n+                       warning(_(\"Fetch normally indicates which branches \"\n+                                       \"had a forced update, but that\\n\"\n+                                       \"check has been disabled. To\nre-enable, \"\n+                                       \"use '--show-forced-updates'\\n\"\n+                                       \"flag or run 'git config \"\n+                                       \"fetch.showForcedUpdates true'.\"));\n\n>                 } else if (forced_updates_ms > FORCED_UPDATES_DELAY_WARNING_IN_MS) {\n> -                       warning(_(\"It took %.2f seconds to check forced updates. You can use '--no-show-forced-updates'\\n\"),\n> +                       warning(_(\"It took %.2f seconds to check forced updates. You can use '--no-show-forced-updates'\\n\"\n> +                               \"or run 'git config fetch.showForcedUpdates false' to avoid this check.\\n\"),\n\nTry to make a better format, like:\n\n+                       warning(_(\"It took %.2f seconds to check\nforced updates. \"\n+                                       \"You can use\\n\"\n+                                       \"'--no-show-forced-updates' or run \"\n+                                       \"'git config fetch.showForcedUpdates\\n\"\n+                                       \"false' to avoid this check.\\n\"),\n\n>                                 forced_updates_ms / 1000.0);\n"},{"id":"379885","messageId":"20190803195907.3124-1-jn.avila@free.fr","threadId":"51552","inReplyTo":"20190730033512.7226-1-worldhello.net@gmail.com","subject":"[PATCH v2] l10n: reformat some localized strings for v2.23.0","fromName":"Jean-Noël Avila","fromEmail":"jn.avila@free.fr","sentAt":"2019-08-03T19:59:07Z","receivedAt":"2019-08-03T19:59:18Z","isPatch":true,"sender":{"key":"jn.avila@free.fr","avatar":"https://avatars.githubusercontent.com/u/156172?v=4"},"body":"Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>\n---\n builtin/checkout.c |  2 +-\n builtin/fetch.c    | 15 +++++++++++----\n 2 files changed, 12 insertions(+), 5 deletions(-)\n\ndiff --git a/builtin/checkout.c b/builtin/checkout.c\nindex 91f8509f85..08e19ed1ed 100644\n--- a/builtin/checkout.c\n+++ b/builtin/checkout.c\n@@ -1769,7 +1769,7 @@ int cmd_restore(int argc, const char **argv, const char *prefix)\n \tstruct option *options;\n \tstruct option restore_options[] = {\n \t\tOPT_STRING('s', \"source\", &opts.from_treeish, \"<tree-ish>\",\n-\t\t\t   N_(\"where the checkout from\")),\n+\t\t\t   N_(\"where the checkout is from\")),\n \t\tOPT_BOOL('S', \"staged\", &opts.checkout_index,\n \t\t\t   N_(\"restore the index\")),\n \t\tOPT_BOOL('W', \"worktree\", &opts.checkout_worktree,\ndiff --git a/builtin/fetch.c b/builtin/fetch.c\nindex 53ce99d2bb..0e8760e5d4 100644\n--- a/builtin/fetch.c\n+++ b/builtin/fetch.c\n@@ -850,6 +850,15 @@ static int iterate_ref_map(void *cb_data, struct object_id *oid)\n \treturn 0;\n }\n \n+static char warn_show_forced_updates[] =\n+N_(\"Fetch normally indicates which branches had a forced update, but that\\n\"\n+   \"check has been disabled. To re-enable, use '--show-forced-updates' flag\\n\"\n+   \"or run 'git config fetch.showForcedUpdates true'.\");\n+static char warn_time_show_forced_updates[] =\n+N_(\"It took %.2f seconds to check forced updates. You can use\\n\"\n+   \"'--no-show-forced-updates or run 'git config fetch.showForcedUpdates false'\\n\"\n+   \" to avoid this check.\\n\");\n+\n static int store_updated_refs(const char *raw_url, const char *remote_name,\n \t\t\t      int connectivity_checked, struct ref *ref_map)\n {\n@@ -1005,12 +1014,10 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,\n \n \tif (advice_fetch_show_forced_updates) {\n \t\tif (!fetch_show_forced_updates) {\n-\t\t\twarning(_(\"Fetch normally indicates which branches had a forced update, but that check has been disabled.\"));\n-\t\t\twarning(_(\"To re-enable, use '--show-forced-updates' flag or run 'git config fetch.showForcedUpdates true'.\"));\n+                  warning(_(warn_show_forced_updates));\n \t\t} else if (forced_updates_ms > FORCED_UPDATES_DELAY_WARNING_IN_MS) {\n-\t\t\twarning(_(\"It took %.2f seconds to check forced updates. You can use '--no-show-forced-updates'\\n\"),\n+\t\t\twarning(_(warn_time_show_forced_updates),\n \t\t\t\tforced_updates_ms / 1000.0);\n-\t\t\twarning(_(\"or run 'git config fetch.showForcedUpdates false' to avoid this check.\\n\"));\n \t\t}\n \t}\n \n-- \n2.22.0\n\n"},{"id":"379895","messageId":"20190803234522.GA5417@sigill.intra.peff.net","threadId":"51552","inReplyTo":"20190803195907.3124-1-jn.avila@free.fr","subject":"Re: [PATCH v2] l10n: reformat some localized strings for v2.23.0","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-08-03T23:45:22Z","receivedAt":"2019-08-03T23:45:24Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Aug 03, 2019 at 09:59:07PM +0200, Jean-Noël Avila wrote:\n\n> Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>\n> ---\n>  builtin/checkout.c |  2 +-\n>  builtin/fetch.c    | 15 +++++++++++----\n>  2 files changed, 12 insertions(+), 5 deletions(-)\n> \n> diff --git a/builtin/checkout.c b/builtin/checkout.c\n> index 91f8509f85..08e19ed1ed 100644\n> --- a/builtin/checkout.c\n> +++ b/builtin/checkout.c\n> @@ -1769,7 +1769,7 @@ int cmd_restore(int argc, const char **argv, const char *prefix)\n>  \tstruct option *options;\n>  \tstruct option restore_options[] = {\n>  \t\tOPT_STRING('s', \"source\", &opts.from_treeish, \"<tree-ish>\",\n> -\t\t\t   N_(\"where the checkout from\")),\n> +\t\t\t   N_(\"where the checkout is from\")),\n\nI think your original \"where to checkout from\" is better.\n\nAs a native speaker, \"where the checkout is from\" implies that checkout\nis a noun that is being described. But I think we want checkout to be a\nverb (because we are talking about the operation), and the option tells\nGit how to do that operation.\n\n(I agree the original \"where the checkout from\" is nonsense).\n\n> diff --git a/builtin/fetch.c b/builtin/fetch.c\n> index 53ce99d2bb..0e8760e5d4 100644\n> --- a/builtin/fetch.c\n> +++ b/builtin/fetch.c\n> @@ -850,6 +850,15 @@ static int iterate_ref_map(void *cb_data, struct object_id *oid)\n>  \treturn 0;\n>  }\n>  \n> +static char warn_show_forced_updates[] =\n> +N_(\"Fetch normally indicates which branches had a forced update, but that\\n\"\n> +   \"check has been disabled. To re-enable, use '--show-forced-updates' flag\\n\"\n> +   \"or run 'git config fetch.showForcedUpdates true'.\");\n\nThis one isn't a typo fix, right? It's just putting the two warning()\ncalls into a single message. I can see how this would be useful for\ntranslators, but note that the output will be different. The original\nwould be something like:\n\n  warning: Fetch normally indicates...\n  warning: To re-enable...\n\nwhere now we'd get:\n\n  warning: Fetch normally indicates...\n  check has been disabled...\n  or run 'git config...\n\nwhich might be a bit harder to read because the wrapped lines lose the\nprefix. For advise() we nicely pick out the newlines and prefix each\nline individually, but warning(), error(), etc, don't do that. Maybe\nthey should.\n\nThat's too big for this late in the -rc cycle, I think. In the meantime,\nI'm not sure which (the original or your patch) is the least-bad\nsolution. :)\n\nThis change (if I am right that there's no actual typo fix) should\nperhaps be in a separate patch from the earlier hunk, though.\n\n-Peff\n"},{"id":"379911","messageId":"5200616.dDItsc6b64@cayenne","threadId":"51552","inReplyTo":"20190803234522.GA5417@sigill.intra.peff.net","subject":"Re: [PATCH v2] l10n: reformat some localized strings for v2.23.0","fromName":"Jean-Noël AVILA","fromEmail":"jn.avila@free.fr","sentAt":"2019-08-04T11:01:51Z","receivedAt":"2019-08-04T11:01:58Z","isPatch":true,"sender":{"key":"jn.avila@free.fr","avatar":"https://avatars.githubusercontent.com/u/156172?v=4"},"body":"On Sunday, 4 August 2019 01:45:22 CEST Jeff King wrote:\n> On Sat, Aug 03, 2019 at 09:59:07PM +0200, Jean-Noël Avila wrote:\n> \n\n> > -\t\t\t   N_(\"where the checkout from\")),\n> > +\t\t\t   N_(\"where the checkout is from\")),\n> \n> I think your original \"where to checkout from\" is better.\n> \n> As a native speaker, \"where the checkout is from\" implies that checkout\n> is a noun that is being described. But I think we want checkout to be a\n> verb (because we are talking about the operation), and the option tells\n> Git how to do that operation.\n> \n> (I agree the original \"where the checkout from\" is nonsense).\n> \n\n\nOh. OK.\n\n> > diff --git a/builtin/fetch.c b/builtin/fetch.c\n> > index 53ce99d2bb..0e8760e5d4 100644\n> > --- a/builtin/fetch.c\n> > +++ b/builtin/fetch.c\n> > @@ -850,6 +850,15 @@ static int iterate_ref_map(void *cb_data, struct object_id *oid)\n> >  \treturn 0;\n> >  }\n> >  \n> > +static char warn_show_forced_updates[] =\n> > +N_(\"Fetch normally indicates which branches had a forced update, but that\\n\"\n> > +   \"check has been disabled. To re-enable, use '--show-forced-updates' flag\\n\"\n> > +   \"or run 'git config fetch.showForcedUpdates true'.\");\n> \n> This one isn't a typo fix, right? It's just putting the two warning()\n> calls into a single message. I can see how this would be useful for\n> translators, but note that the output will be different. The original\n> would be something like:\n> \n>   warning: Fetch normally indicates...\n>   warning: To re-enable...\n> \n> where now we'd get:\n> \n>   warning: Fetch normally indicates...\n>   check has been disabled...\n>   or run 'git config...\n> \n> which might be a bit harder to read because the wrapped lines lose the\n> prefix. For advise() we nicely pick out the newlines and prefix each\n> line individually, but warning(), error(), etc, don't do that. Maybe\n> they should.\n> \n> That's too big for this late in the -rc cycle, I think. In the meantime,\n> I'm not sure which (the original or your patch) is the least-bad\n> solution. :)\n> \n> This change (if I am right that there's no actual typo fix) should\n> perhaps be in a separate patch from the earlier hunk, though.\n> \n> -Peff\n> \n\nThis one is not about typos.\n\nMy 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.\n\nI 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.\n\nIs it so important that the lines of warning all start with a \"warning:\" prefix?\n\nJN\n\n\n"},{"id":"379926","messageId":"20190805042104.GA30941@sigill.intra.peff.net","threadId":"51552","inReplyTo":"5200616.dDItsc6b64@cayenne","subject":"Re: [PATCH v2] l10n: reformat some localized strings for v2.23.0","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-08-05T04:21:04Z","receivedAt":"2019-08-05T04:21:07Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Aug 04, 2019 at 01:01:51PM +0200, Jean-Noël AVILA wrote:\n\n> This one is not about typos.\n> \n> My original fix was more concerning the second sequence, where the\n> sentence is broken in the middle, simply for better rendering but this\n> does not make sense either, because the lines are too long anyway.\n\nAh, yeah, the sentence broken over the line is pretty bad for\ntranslation. And I agree the lines are overly long.\n\n> Is it so important that the lines of warning all start with a\n> \"warning:\" prefix?\n\nFor some definition of \"so\". ;) As I said, I think your patch may be the\nlesser of two evils, and we should take it until warning() learns to\nhandle lines breaks better.\n\n-Peff\n"},{"id":"379948","messageId":"xmqqv9vbmoqd.fsf@gitster-ct.c.googlers.com","threadId":"51552","inReplyTo":"20190803234522.GA5417@sigill.intra.peff.net","subject":"Re: [PATCH v2] l10n: reformat some localized strings for v2.23.0","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-08-05T18:49:46Z","receivedAt":"2019-08-05T18:49:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n>>  \t\tOPT_STRING('s', \"source\", &opts.from_treeish, \"<tree-ish>\",\n>> -\t\t\t   N_(\"where the checkout from\")),\n>> +\t\t\t   N_(\"where the checkout is from\")),\n>\n> I think your original \"where to checkout from\" is better.\n\nWould we even want to do s/where/which tree-ish/?\n\n> translators, but note that the output will be different. The original\n> would be something like:\n>\n>   warning: Fetch normally indicates...\n>   warning: To re-enable...\n>\n> where now we'd get:\n>\n>   warning: Fetch normally indicates...\n>   check has been disabled...\n>   or run 'git config...\n>\n> which might be a bit harder to read because the wrapped lines lose the\n> prefix. For advise() we nicely pick out the newlines and prefix each\n> line individually, but warning(), error(), etc, don't do that. Maybe\n> they should.\n\nYeah, I'd be surprised that nobody thought of doing that, so perhaps\nsomebody tried and failed with a possible fallout.  I do not offhand\nsee any downside of teaching them to do the prefixing.\n\nFor existing multi-line warnings that uses a single call to\nwarning(), I think the preparer of the message manually indents the\nsecond and subsequent line by a run of SPs to match the screen width\nof \"warning:\" prefix (and expect translators to do the same with\ntheir language), and we need to get rid of that kind of \"hack\" when\nwe insert a middle layer between *_builtin() and vreportf() to do\nthe line chomping to produce output similar to advise() code.\n\n> That's too big for this late in the -rc cycle, I think.\n\nAgreed.\nThanks.\n"},{"id":"379957","messageId":"20190805211517.GA359@sigill.intra.peff.net","threadId":"51552","inReplyTo":"xmqqv9vbmoqd.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH v2] l10n: reformat some localized strings for v2.23.0","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-08-05T21:15:18Z","receivedAt":"2019-08-05T21:15:22Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Aug 05, 2019 at 11:49:46AM -0700, Junio C Hamano wrote:\n\n> Jeff King <peff@peff.net> writes:\n> \n> >>  \t\tOPT_STRING('s', \"source\", &opts.from_treeish, \"<tree-ish>\",\n> >> -\t\t\t   N_(\"where the checkout from\")),\n> >> +\t\t\t   N_(\"where the checkout is from\")),\n> >\n> > I think your original \"where to checkout from\" is better.\n> \n> Would we even want to do s/where/which tree-ish/?\n\nYeah, I think that is even better.\n\n> > prefix. For advise() we nicely pick out the newlines and prefix each\n> > line individually, but warning(), error(), etc, don't do that. Maybe\n> > they should.\n> \n> Yeah, I'd be surprised that nobody thought of doing that, so perhaps\n> somebody tried and failed with a possible fallout.  I do not offhand\n> see any downside of teaching them to do the prefixing.\n\nI know we've discussed it before, but a quick search of the archive only\ncame up with instances of me suggesting we should do it. ;)\n\nBesides the obvious fallout you mentioned where callers might need to\ndrop their own custom indenting, it's possible people might be less\nhappy for output like:\n\n  warning: a thing happened to these paths:\n          foo\n\t  bar\n\nwhere people might prefer not having a prefix on the subsequent lines,\nbecause it makes it easier to cut-and-paste.\n\nAnyway, that is all out of scope for this patch.\n\n-Peff\n"},{"id":"380017","messageId":"20190806171952.15588-1-jn.avila@free.fr","threadId":"51552","inReplyTo":"20190730033512.7226-1-worldhello.net@gmail.com","subject":"[PATCH v3] l10n: reformat some localized strings for v2.23.0","fromName":"Jean-Noël Avila","fromEmail":"jn.avila@free.fr","sentAt":"2019-08-06T17:19:52Z","receivedAt":"2019-08-06T17:20:04Z","isPatch":true,"sender":{"key":"jn.avila@free.fr","avatar":"https://avatars.githubusercontent.com/u/156172?v=4"},"body":"Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>\n---\n builtin/checkout.c |  2 +-\n builtin/fetch.c    | 15 +++++++++++----\n 2 files changed, 12 insertions(+), 5 deletions(-)\n\ndiff --git a/builtin/checkout.c b/builtin/checkout.c\nindex 91f8509f85..6123f732a2 100644\n--- a/builtin/checkout.c\n+++ b/builtin/checkout.c\n@@ -1769,7 +1769,7 @@ int cmd_restore(int argc, const char **argv, const char *prefix)\n \tstruct option *options;\n \tstruct option restore_options[] = {\n \t\tOPT_STRING('s', \"source\", &opts.from_treeish, \"<tree-ish>\",\n-\t\t\t   N_(\"where the checkout from\")),\n+\t\t\t   N_(\"which tree-ish to checkout from\")),\n \t\tOPT_BOOL('S', \"staged\", &opts.checkout_index,\n \t\t\t   N_(\"restore the index\")),\n \t\tOPT_BOOL('W', \"worktree\", &opts.checkout_worktree,\ndiff --git a/builtin/fetch.c b/builtin/fetch.c\nindex 53ce99d2bb..c8bf4c651b 100644\n--- a/builtin/fetch.c\n+++ b/builtin/fetch.c\n@@ -850,6 +850,15 @@ static int iterate_ref_map(void *cb_data, struct object_id *oid)\n \treturn 0;\n }\n \n+static char warn_show_forced_updates[] =\n+N_(\"Fetch normally indicates which branches had a forced update,\\n\"\n+   \"but that check has been disabled. To re-enable, use '--show-forced-updates'\\n\"\n+   \"flag or run 'git config fetch.showForcedUpdates true'.\");\n+static char warn_time_show_forced_updates[] =\n+N_(\"It took %.2f seconds to check forced updates. You can use\\n\"\n+   \"'--no-show-forced-updates' or run 'git config fetch.showForcedUpdates false'\\n\"\n+   \" to avoid this check.\\n\");\n+\n static int store_updated_refs(const char *raw_url, const char *remote_name,\n \t\t\t      int connectivity_checked, struct ref *ref_map)\n {\n@@ -1005,12 +1014,10 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,\n \n \tif (advice_fetch_show_forced_updates) {\n \t\tif (!fetch_show_forced_updates) {\n-\t\t\twarning(_(\"Fetch normally indicates which branches had a forced update, but that check has been disabled.\"));\n-\t\t\twarning(_(\"To re-enable, use '--show-forced-updates' flag or run 'git config fetch.showForcedUpdates true'.\"));\n+                  warning(_(warn_show_forced_updates));\n \t\t} else if (forced_updates_ms > FORCED_UPDATES_DELAY_WARNING_IN_MS) {\n-\t\t\twarning(_(\"It took %.2f seconds to check forced updates. You can use '--no-show-forced-updates'\\n\"),\n+\t\t\twarning(_(warn_time_show_forced_updates),\n \t\t\t\tforced_updates_ms / 1000.0);\n-\t\t\twarning(_(\"or run 'git config fetch.showForcedUpdates false' to avoid this check.\\n\"));\n \t\t}\n \t}\n \n-- \n2.22.0\n\n"},{"id":"380031","messageId":"xmqqo912ji1k.fsf@gitster-ct.c.googlers.com","threadId":"51552","inReplyTo":"20190806171952.15588-1-jn.avila@free.fr","subject":"Re: [PATCH v3] l10n: reformat some localized strings for v2.23.0","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-08-06T17:54:47Z","receivedAt":"2019-08-06T17:54:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jean-Noël Avila <jn.avila@free.fr> writes:\n\n> Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>\n> ---\n>  builtin/checkout.c |  2 +-\n>  builtin/fetch.c    | 15 +++++++++++----\n>  2 files changed, 12 insertions(+), 5 deletions(-)\n\nThanks.  Folks, does this look sensible (it does to me)?\n\n> diff --git a/builtin/checkout.c b/builtin/checkout.c\n> index 91f8509f85..6123f732a2 100644\n> --- a/builtin/checkout.c\n> +++ b/builtin/checkout.c\n> @@ -1769,7 +1769,7 @@ int cmd_restore(int argc, const char **argv, const char *prefix)\n>  \tstruct option *options;\n>  \tstruct option restore_options[] = {\n>  \t\tOPT_STRING('s', \"source\", &opts.from_treeish, \"<tree-ish>\",\n> -\t\t\t   N_(\"where the checkout from\")),\n> +\t\t\t   N_(\"which tree-ish to checkout from\")),\n>  \t\tOPT_BOOL('S', \"staged\", &opts.checkout_index,\n>  \t\t\t   N_(\"restore the index\")),\n>  \t\tOPT_BOOL('W', \"worktree\", &opts.checkout_worktree,\n> diff --git a/builtin/fetch.c b/builtin/fetch.c\n> index 53ce99d2bb..c8bf4c651b 100644\n> --- a/builtin/fetch.c\n> +++ b/builtin/fetch.c\n> @@ -850,6 +850,15 @@ static int iterate_ref_map(void *cb_data, struct object_id *oid)\n>  \treturn 0;\n>  }\n>  \n> +static char warn_show_forced_updates[] =\n> +N_(\"Fetch normally indicates which branches had a forced update,\\n\"\n> +   \"but that check has been disabled. To re-enable, use '--show-forced-updates'\\n\"\n> +   \"flag or run 'git config fetch.showForcedUpdates true'.\");\n> +static char warn_time_show_forced_updates[] =\n> +N_(\"It took %.2f seconds to check forced updates. You can use\\n\"\n> +   \"'--no-show-forced-updates' or run 'git config fetch.showForcedUpdates false'\\n\"\n> +   \" to avoid this check.\\n\");\n> +\n>  static int store_updated_refs(const char *raw_url, const char *remote_name,\n>  \t\t\t      int connectivity_checked, struct ref *ref_map)\n>  {\n> @@ -1005,12 +1014,10 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,\n>  \n>  \tif (advice_fetch_show_forced_updates) {\n>  \t\tif (!fetch_show_forced_updates) {\n> -\t\t\twarning(_(\"Fetch normally indicates which branches had a forced update, but that check has been disabled.\"));\n> -\t\t\twarning(_(\"To re-enable, use '--show-forced-updates' flag or run 'git config fetch.showForcedUpdates true'.\"));\n> +                  warning(_(warn_show_forced_updates));\n>  \t\t} else if (forced_updates_ms > FORCED_UPDATES_DELAY_WARNING_IN_MS) {\n> -\t\t\twarning(_(\"It took %.2f seconds to check forced updates. You can use '--no-show-forced-updates'\\n\"),\n> +\t\t\twarning(_(warn_time_show_forced_updates),\n>  \t\t\t\tforced_updates_ms / 1000.0);\n> -\t\t\twarning(_(\"or run 'git config fetch.showForcedUpdates false' to avoid this check.\\n\"));\n>  \t\t}\n>  \t}\n"},{"id":"380033","messageId":"20190806181044.GA7005@sigill.intra.peff.net","threadId":"51552","inReplyTo":"xmqqo912ji1k.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH v3] l10n: reformat some localized strings for v2.23.0","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-08-06T18:10:44Z","receivedAt":"2019-08-06T18:10:47Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Aug 06, 2019 at 10:54:47AM -0700, Junio C Hamano wrote:\n\n> Jean-Noël Avila <jn.avila@free.fr> writes:\n> \n> > Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>\n> > ---\n> >  builtin/checkout.c |  2 +-\n> >  builtin/fetch.c    | 15 +++++++++++----\n> >  2 files changed, 12 insertions(+), 5 deletions(-)\n> \n> Thanks.  Folks, does this look sensible (it does to me)?\n\nYes, modulo a funny indent in the final hunk (git-am will complain about\nit).\n\nI think we can take this as-is, but I did notice one thing when I\nactually looked carefully at the surrounding code...\n\n> >  \tif (advice_fetch_show_forced_updates) {\n> >  \t\tif (!fetch_show_forced_updates) {\n> > -\t\t\twarning(_(\"Fetch normally indicates which branches had a forced update, but that check has been disabled.\"));\n> > -\t\t\twarning(_(\"To re-enable, use '--show-forced-updates' flag or run 'git config fetch.showForcedUpdates true'.\"));\n> > +                  warning(_(warn_show_forced_updates));\n\nThis is controlled by advice.fetchShowForcedUpdates. Should these\nwarning() calls actually be advise()? In which case everything I said\nabout newlines and prefixes would then just work out, because advise()\ndoes prefix each line independently. I'm happy to punt on that until\npost-release, though, in the name of calming things down rather than\nstirring them up. :)\n\n-Peff\n"},{"id":"380041","messageId":"xmqq7e7qjcx2.fsf@gitster-ct.c.googlers.com","threadId":"51552","inReplyTo":"xmqqo912ji1k.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH v3] l10n: reformat some localized strings for v2.23.0","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-08-06T19:45:29Z","receivedAt":"2019-08-06T19:45:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n>> +static char warn_show_forced_updates[] =\n>> +N_(\"Fetch normally indicates which branches had a forced update,\\n\"\n>> +   \"but that check has been disabled. To re-enable, use '--show-forced-updates'\\n\"\n>> +   \"flag or run 'git config fetch.showForcedUpdates true'.\");\n>> ...\n>> +                  warning(_(warn_show_forced_updates));\n\nThis unfortunately triggers a false positive format-security\nviolation.   Turning it into \"static const char var[]\" would\nsquelch it, which I did for today's integration.\n\n"}]}