* [PATCH] diff: mark some diff parameters as placeholders
@ 2024-02-14 5:31 Jiang Xin
2024-02-14 7:36 ` Jean-Noël Avila
0 siblings, 1 reply; 5+ messages in thread
From: Jiang Xin @ 2024-02-14 5:31 UTC (permalink / raw)
To: Git List, Junio C Hamano, Jean-Noël Avila
Cc: Jiang Xin, Alexander Shopov, Jordi Mas, Ralf Thielow,
Jimmy Angelakos, Christopher Díaz, Bagas Sanjaya,
Alessandro Menti, Gwan-gyeong Mun, Arusekk, Daniel Santos,
Dimitriy Ryazantcev, Peter Krefting, Emir SARI, Arkadii Yakovets,
Trần Ngọc Quân, Teng Long, Yi-Jyun Pan
From: Jiang Xin <zhiyou.jx@alibaba-inc.com>
Some l10n translators translated the parameters "files", "param1" and
"param2" in the following message:
"synonym for --dirstat=files,param1,param2..."
Translating "param1" and "param2" is OK, but changing the parameter
"files" is wrong. The parameters that are not meant to be used verbatim
should be marked as placeholders, but the verbatim parameter not marked
as a placeholder should be left as is.
This change is a complement for commit 51e846e673 (doc: enforce
placeholders in documentation, 2023-12-25).
Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
---
diff.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/diff.c b/diff.c
index ccfa1fca0d..c256ef103e 100644
--- a/diff.c
+++ b/diff.c
@@ -5599,7 +5599,7 @@ struct option *add_diff_options(const struct option *opts,
PARSE_OPT_NONEG | PARSE_OPT_NOARG,
diff_opt_dirstat),
OPT_CALLBACK_F(0, "dirstat-by-file", options, N_("<param1,param2>..."),
- N_("synonym for --dirstat=files,param1,param2..."),
+ N_("synonym for --dirstat=files,<param1>,<param2>..."),
PARSE_OPT_NONEG | PARSE_OPT_OPTARG,
diff_opt_dirstat),
OPT_BIT_F(0, "check", &options->output_format,
--
2.44.0.rc0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] diff: mark some diff parameters as placeholders
2024-02-14 5:31 [PATCH] diff: mark some diff parameters as placeholders Jiang Xin
@ 2024-02-14 7:36 ` Jean-Noël Avila
2024-02-14 8:46 ` [PATCH v2 0/1] diff: mark param1 and param2 " Jiang Xin
0 siblings, 1 reply; 5+ messages in thread
From: Jean-Noël Avila @ 2024-02-14 7:36 UTC (permalink / raw)
To: Jiang Xin, Git List, Junio C Hamano
Cc: Jiang Xin, Alexander Shopov, Jordi Mas, Ralf Thielow,
Jimmy Angelakos, Christopher Díaz, Bagas Sanjaya,
Alessandro Menti, Gwan-gyeong Mun, Arusekk, Daniel Santos,
Dimitriy Ryazantcev, Peter Krefting, Emir SARI, Arkadii Yakovets,
Trần Ngọc Quân, Teng Long, Yi-Jyun Pan
Hello,
Some parameter placeholder slipped through...
Le 14/02/2024 à 06:31, Jiang Xin a écrit :
> From: Jiang Xin <zhiyou.jx@alibaba-inc.com>
>
> Some l10n translators translated the parameters "files", "param1" and
> "param2" in the following message:
>
> "synonym for --dirstat=files,param1,param2..."
>
> Translating "param1" and "param2" is OK, but changing the parameter
> "files" is wrong. The parameters that are not meant to be used verbatim
> should be marked as placeholders, but the verbatim parameter not marked
> as a placeholder should be left as is.
>
> This change is a complement for commit 51e846e673 (doc: enforce
> placeholders in documentation, 2023-12-25).
>
> Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
> ---
> diff.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/diff.c b/diff.c
> index ccfa1fca0d..c256ef103e 100644
> --- a/diff.c
> +++ b/diff.c
> @@ -5599,7 +5599,7 @@ struct option *add_diff_options(const struct option *opts,
> PARSE_OPT_NONEG | PARSE_OPT_NOARG,
> diff_opt_dirstat),
> OPT_CALLBACK_F(0, "dirstat-by-file", options, N_("<param1,param2>..."),
This line also needs changes:
N_("<param1>,<param2>...")
> - N_("synonym for --dirstat=files,param1,param2..."),
> + N_("synonym for --dirstat=files,<param1>,<param2>..."),
> PARSE_OPT_NONEG | PARSE_OPT_OPTARG,
> diff_opt_dirstat),
> OPT_BIT_F(0, "check", &options->output_format,
Thanks
JN
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 0/1] diff: mark param1 and param2 as placeholders
2024-02-14 7:36 ` Jean-Noël Avila
@ 2024-02-14 8:46 ` Jiang Xin
2024-02-14 8:46 ` [PATCH v2 1/1] " Jiang Xin
0 siblings, 1 reply; 5+ messages in thread
From: Jiang Xin @ 2024-02-14 8:46 UTC (permalink / raw)
To: Git List, Junio C Hamano, Jean-Noël Avila; +Cc: Jiang Xin
Some l10n translators translated the parameters "files", "param1" and
"param2" in the following message:
"synonym for --dirstat=files,param1,param2..."
Translating "param1" and "param2" is OK, but changing the parameter
"files" is wrong. The parameters that are not meant to be used verbatim
should be marked as placeholders, but the verbatim parameter not marked
as a placeholder should be left as is.
This change is a complement for commit 51e846e673 (doc: enforce
placeholders in documentation, 2023-12-25).
With the help of Jean-Noël,some parameter combinations in one
placeholder (e.g. "<param1,param2>...") are splited into seperate
placeholders.
# range-diff v1...v2
1: c65bca7f6f ! 1: 3a82f72f33 diff: mark param1 and param2 as placeholders
@@ Commit message
This change is a complement for commit 51e846e673 (doc: enforce
placeholders in documentation, 2023-12-25).
+ With the help of Jean-Noël,some parameter combinations in one
+ placeholder (e.g. "<param1,param2>...") are splited into seperate
+ placeholders.
+
+ Helped-by: Jean-Noël Avila <jn.avila@free.fr>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
## diff.c ##
@@ diff.c: struct option *add_diff_options(const struct option *opts,
+ OPT_BITOP(0, "shortstat", &options->output_format,
+ N_("output only the last line of --stat"),
+ DIFF_FORMAT_SHORTSTAT, DIFF_FORMAT_NO_OUTPUT),
+- OPT_CALLBACK_F('X', "dirstat", options, N_("<param1,param2>..."),
++ OPT_CALLBACK_F('X', "dirstat", options, N_("<param1>,<param2>..."),
+ N_("output the distribution of relative amount of changes for each sub-directory"),
+ PARSE_OPT_NONEG | PARSE_OPT_OPTARG,
+ diff_opt_dirstat),
+@@ diff.c: struct option *add_diff_options(const struct option *opts,
+ N_("synonym for --dirstat=cumulative"),
PARSE_OPT_NONEG | PARSE_OPT_NOARG,
diff_opt_dirstat),
- OPT_CALLBACK_F(0, "dirstat-by-file", options, N_("<param1,param2>..."),
+- OPT_CALLBACK_F(0, "dirstat-by-file", options, N_("<param1,param2>..."),
- N_("synonym for --dirstat=files,param1,param2..."),
++ OPT_CALLBACK_F(0, "dirstat-by-file", options, N_("<param1>,<param2>..."),
+ N_("synonym for --dirstat=files,<param1>,<param2>..."),
PARSE_OPT_NONEG | PARSE_OPT_OPTARG,
diff_opt_dirstat),
---
Jiang Xin (1):
diff: mark param1 and param2 as placeholders
diff.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
2.44.0.rc0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/1] diff: mark param1 and param2 as placeholders
2024-02-14 8:46 ` [PATCH v2 0/1] diff: mark param1 and param2 " Jiang Xin
@ 2024-02-14 8:46 ` Jiang Xin
2024-02-14 17:33 ` Junio C Hamano
0 siblings, 1 reply; 5+ messages in thread
From: Jiang Xin @ 2024-02-14 8:46 UTC (permalink / raw)
To: Git List, Junio C Hamano, Jean-Noël Avila; +Cc: Jiang Xin
Some l10n translators translated the parameters "files", "param1" and
"param2" in the following message:
"synonym for --dirstat=files,param1,param2..."
Translating "param1" and "param2" is OK, but changing the parameter
"files" is wrong. The parameters that are not meant to be used verbatim
should be marked as placeholders, but the verbatim parameter not marked
as a placeholder should be left as is.
This change is a complement for commit 51e846e673 (doc: enforce
placeholders in documentation, 2023-12-25).
With the help of Jean-Noël,some parameter combinations in one
placeholder (e.g. "<param1,param2>...") are splited into seperate
placeholders.
Helped-by: Jean-Noël Avila <jn.avila@free.fr>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
---
diff.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/diff.c b/diff.c
index ccfa1fca0d..e50def4538 100644
--- a/diff.c
+++ b/diff.c
@@ -5590,7 +5590,7 @@ struct option *add_diff_options(const struct option *opts,
OPT_BITOP(0, "shortstat", &options->output_format,
N_("output only the last line of --stat"),
DIFF_FORMAT_SHORTSTAT, DIFF_FORMAT_NO_OUTPUT),
- OPT_CALLBACK_F('X', "dirstat", options, N_("<param1,param2>..."),
+ OPT_CALLBACK_F('X', "dirstat", options, N_("<param1>,<param2>..."),
N_("output the distribution of relative amount of changes for each sub-directory"),
PARSE_OPT_NONEG | PARSE_OPT_OPTARG,
diff_opt_dirstat),
@@ -5598,8 +5598,8 @@ struct option *add_diff_options(const struct option *opts,
N_("synonym for --dirstat=cumulative"),
PARSE_OPT_NONEG | PARSE_OPT_NOARG,
diff_opt_dirstat),
- OPT_CALLBACK_F(0, "dirstat-by-file", options, N_("<param1,param2>..."),
- N_("synonym for --dirstat=files,param1,param2..."),
+ OPT_CALLBACK_F(0, "dirstat-by-file", options, N_("<param1>,<param2>..."),
+ N_("synonym for --dirstat=files,<param1>,<param2>..."),
PARSE_OPT_NONEG | PARSE_OPT_OPTARG,
diff_opt_dirstat),
OPT_BIT_F(0, "check", &options->output_format,
--
2.44.0.rc0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/1] diff: mark param1 and param2 as placeholders
2024-02-14 8:46 ` [PATCH v2 1/1] " Jiang Xin
@ 2024-02-14 17:33 ` Junio C Hamano
0 siblings, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2024-02-14 17:33 UTC (permalink / raw)
To: Jiang Xin; +Cc: Git List, Jean-Noël Avila
Jiang Xin <worldhello.net@gmail.com> writes:
> Some l10n translators translated the parameters "files", "param1" and
> "param2" in the following message:
>
> "synonym for --dirstat=files,param1,param2..."
>
> Translating "param1" and "param2" is OK, but changing the parameter
> "files" is wrong. The parameters that are not meant to be used verbatim
> should be marked as placeholders, but the verbatim parameter not marked
> as a placeholder should be left as is.
>
> This change is a complement for commit 51e846e673 (doc: enforce
> placeholders in documentation, 2023-12-25).
>
> With the help of Jean-Noël,some parameter combinations in one
> placeholder (e.g. "<param1,param2>...") are splited into seperate
> placeholders.
>
> Helped-by: Jean-Noël Avila <jn.avila@free.fr>
> Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
> ---
> diff.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Makes sense, thanks both. This is from 2019 so it is not all that
urgent, but it still is a good change.
It is a bit unfortunate that we need to mark what *can* be
translated, not the other way around. Because of that, something
like ...
> N_("synonym for --dirstat=cumulative"),
... has no marking, but that does not mean that any part of
"--dirstat=cumulative" is up for translation, while "synonym for"
definitely is to be translated.
> + OPT_CALLBACK_F(0, "dirstat-by-file", options, N_("<param1>,<param2>..."),
> + N_("synonym for --dirstat=files,<param1>,<param2>..."),
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-02-14 17:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-14 5:31 [PATCH] diff: mark some diff parameters as placeholders Jiang Xin
2024-02-14 7:36 ` Jean-Noël Avila
2024-02-14 8:46 ` [PATCH v2 0/1] diff: mark param1 and param2 " Jiang Xin
2024-02-14 8:46 ` [PATCH v2 1/1] " Jiang Xin
2024-02-14 17:33 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).