Kickoff for Git 2.23.0 round #1
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 <[email protected]>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
RFC 1/1 l10n: fix some typos for v2.23.0
--- builtin/checkout.c | 2 +- builtin/fetch.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-)
builtin/checkout.c +1 -1
@@ -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,
builtin/fetch.c +4 -4
@@ -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" )); } }
Signature · 1 line
2.22.0
Re: [RFC] l10n: fix some typos for v2.23.0
Quoted 12 lines · Jean-Noël Avila <[email protected]> 于2019年8月3日周六 下午6:18写道:
Signed-off-by Jean-Noël Avila <[email protected]>--- builtin/checkout.c | 2 +- builtin/fetch.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-)builtin/checkout.c +0
-0
builtin/checkout.c int cmd_restore(int argc, const char **argv, const char *prefix) · line 1772
Quoted 5 lines
builtin/checkout.c +1
-1@@ -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"
builtin/fetch.c static int store_updated_refs(const char *raw_url, const char *remote_name, · line 1009
Quoted 12 lines
builtin/fetch.c +2
-2@@ -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'."));
builtin/fetch.c static int store_updated_refs(const char *raw_url, const char *remote_name, · line 1012
Quoted 4 lines
builtin/fetch.c +2
-1}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"),
Quoted 1 line
builtin/fetch.c +0
-0forced_updates_ms / 1000.0);
PATCH v2 1/1 l10n: reformat some localized strings for v2.23.0
In reply to Jiang Xin--- builtin/checkout.c | 2 +- builtin/fetch.c | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-)
builtin/checkout.c +1 -1
@@ -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,
builtin/fetch.c +11 -4
@@ -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" )); } }
Signature · 1 line
2.22.0
Re: [PATCH v2] l10n: reformat some localized strings for v2.23.0
Quoted 11 lines · Jean-Noël Avila
Signed-off-by Jean-Noël Avila <[email protected]>--- builtin/checkout.c | 2 +- builtin/fetch.c | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-)builtin/checkout.c +0
-0
builtin/checkout.c int cmd_restore(int argc, const char **argv, const char *prefix) · line 1772
Quoted 5 lines
builtin/checkout.c +1
-1@@ -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).
builtin/fetch.c static int iterate_ref_map(void *cb_data, struct object_id *oid) · line 856
Quoted 12 lines
builtin/fetch.c +4
-0@@ -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
Re: [PATCH v2] l10n: reformat some localized strings for v2.23.0
Quoted 8 lines · On Sunday, 4 August 2019 01:45:22 CEST Jeff King wrote:
builtin/checkout.c int cmd_restore(int argc, const char **argv, const char *prefix) · line 1772
Quoted 2 lines · Jean-Noël Avila
builtin/checkout.c +1
-1- N_("where the checkout from")), + N_("where the checkout is from")),I think your original "where to checkout from" is better.
Quoted 7 lines
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.
Quoted 32 lines
builtin/fetch.c static int iterate_ref_map(void *cb_data, struct object_id *oid) · line 856
Quoted 12 lines
builtin/fetch.c +4
-0@@ -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, butwarning(),error(), etc, don't do that. Maybe they should.
Quoted 9 lines
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
Re: [PATCH v2] l10n: reformat some localized strings for v2.23.0
Quoted 5 lines · Jean-Noël AVILA
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.
Quoted 2 lines
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
Re: [PATCH v2] l10n: reformat some localized strings for v2.23.0
In reply to Jeff KingQuoted 5 lines · Jeff King
builtin/checkout.c int cmd_restore(int argc, const char **argv, const char *prefix) · line 1772
Quoted 3 lines
builtin/checkout.c +1
-1OPT_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/?
Quoted 8 lines
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:
Quoted 8 lines
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, butwarning(),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.
Quoted 1 line
That's too big for this late in the -rc cycle, I think.
Agreed.
Thanks.
Re: [PATCH v2] l10n: reformat some localized strings for v2.23.0
Quoted 9 lines · Junio C Hamano
Quoted 5 lines · Jeff King
builtin/checkout.c int cmd_restore(int argc, const char **argv, const char *prefix) · line 1772
Quoted 3 lines
builtin/checkout.c +1
-1OPT_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.
Quoted 7 lines
Quoted 3 lines
prefix. For
advise()we nicely pick out the newlines and prefix each line individually, butwarning(),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
PATCH v3 1/1 l10n: reformat some localized strings for v2.23.0
In reply to Jiang Xin--- builtin/checkout.c | 2 +- builtin/fetch.c | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-)
builtin/checkout.c +1 -1
@@ -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,
builtin/fetch.c +11 -4
@@ -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" )); } }
Signature · 1 line
2.22.0
Re: [PATCH v3] l10n: reformat some localized strings for v2.23.0
Quoted 5 lines · Jean-Noël Avila
Signed-off-by Jean-Noël Avila <[email protected]>--- 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)?
Quoted 47 lines
builtin/checkout.c +1
-1@@ -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,builtin/fetch.c +11
-4@@ -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" )); } }
Re: [PATCH v3] l10n: reformat some localized strings for v2.23.0
Quoted 9 lines · Junio C Hamano
Quoted 5 lines · Jean-Noël Avila
Signed-off-by Jean-Noël Avila <[email protected]>--- 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...
Quoted 5 lines
builtin/fetch.c static int store_updated_refs(const char *raw_url, const char *remote_name, · line 1017
Quoted 5 lines
builtin/fetch.c +1
-2if (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
Re: [PATCH v3] l10n: reformat some localized strings for v2.23.0
In reply to Junio C HamanoQuoted 6 lines · Junio C Hamano
builtin/fetch.c static int iterate_ref_map(void *cb_data, struct object_id *oid)
Quoted 6 lines
builtin/fetch.c +5
-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'." ); +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.