git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 1/1] diff: mark param1 and param2 as placeholders

From
Jiang Xin <worldhello.net@gmail.com>
Date
Feb 14, 2024, 08:46 UTC
Message-ID
<3a82f72f33663f162aa41cb20c0fb3b6786971c9.1707900029.git.worldhello.net@gmail.com>
In-Reply-To
<cover.1707900029.git.worldhello.net@gmail.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).

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
Previous: Jiang XinNext: Junio C Hamano
Message 4 of 5 in “diff: mark some diff parameters as placeholders”
  1. diff: mark some diff parameters as placeholdersJiang Xin, Feb 14, 2024
  2. Jean-Noël AvilaFeb 14, 2024
  3. 0/1 diff: mark param1 and param2 as placeholdersJiang Xin, Feb 14, 2024
  4. 1/1 diff: mark param1 and param2 as placeholdersJiang Xin, Feb 14, 2024
  5. Junio C HamanoFeb 14, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.