{"thread":{"id":"60911","subject":"[PATCH] diff: mark some diff parameters as placeholders","startedAt":"2024-02-14T05:31:45Z","lastAt":"2024-02-14T17:33:09Z","messageCount":5,"participants":["Jiang Xin","Jean-Noël Avila","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"488610","messageId":"1e33662683b43e93889b4b3493a0edc2e3483920.1707888478.git.zhiyou.jx@alibaba-inc.com","threadId":"60911","inReplyTo":null,"subject":"[PATCH] diff: mark some diff parameters as placeholders","fromName":"Jiang Xin","fromEmail":"worldhello.net@gmail.com","sentAt":"2024-02-14T05:31:40Z","receivedAt":"2024-02-14T05:31:45Z","isPatch":true,"sender":{"key":"worldhello.net@gmail.com","avatar":"https://avatars.githubusercontent.com/u/183860?v=4"},"body":"From: Jiang Xin <zhiyou.jx@alibaba-inc.com>\n\nSome l10n translators translated the parameters \"files\", \"param1\" and\n\"param2\" in the following message:\n\n    \"synonym for --dirstat=files,param1,param2...\"\n\nTranslating \"param1\" and \"param2\" is OK, but changing the parameter\n\"files\" is wrong. The parameters that are not meant to be used verbatim\nshould be marked as placeholders, but the verbatim parameter not marked\nas a placeholder should be left as is.\n\nThis change is a complement for commit 51e846e673 (doc: enforce\nplaceholders in documentation, 2023-12-25).\n\nSigned-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>\n---\n diff.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/diff.c b/diff.c\nindex ccfa1fca0d..c256ef103e 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -5599,7 +5599,7 @@ struct option *add_diff_options(const struct option *opts,\n \t\t\t       PARSE_OPT_NONEG | PARSE_OPT_NOARG,\n \t\t\t       diff_opt_dirstat),\n \t\tOPT_CALLBACK_F(0, \"dirstat-by-file\", options, N_(\"<param1,param2>...\"),\n-\t\t\t       N_(\"synonym for --dirstat=files,param1,param2...\"),\n+\t\t\t       N_(\"synonym for --dirstat=files,<param1>,<param2>...\"),\n \t\t\t       PARSE_OPT_NONEG | PARSE_OPT_OPTARG,\n \t\t\t       diff_opt_dirstat),\n \t\tOPT_BIT_F(0, \"check\", &options->output_format,\n-- \n2.44.0.rc0\n\n"},{"id":"488614","messageId":"6e33b2b2-f0b1-46ba-bbd8-3ae4c87d35ba@free.fr","threadId":"60911","inReplyTo":"1e33662683b43e93889b4b3493a0edc2e3483920.1707888478.git.zhiyou.jx@alibaba-inc.com","subject":"Re: [PATCH] diff: mark some diff parameters as placeholders","fromName":"Jean-Noël Avila","fromEmail":"jn.avila@free.fr","sentAt":"2024-02-14T07:36:35Z","receivedAt":"2024-02-14T07:37:01Z","isPatch":true,"sender":{"key":"jn.avila@free.fr","avatar":"https://avatars.githubusercontent.com/u/156172?v=4"},"body":"Hello,\n\nSome parameter placeholder slipped through...\n\nLe 14/02/2024 à 06:31, Jiang Xin a écrit :\n> From: Jiang Xin <zhiyou.jx@alibaba-inc.com>\n> \n> Some l10n translators translated the parameters \"files\", \"param1\" and\n> \"param2\" in the following message:\n> \n>      \"synonym for --dirstat=files,param1,param2...\"\n> \n> Translating \"param1\" and \"param2\" is OK, but changing the parameter\n> \"files\" is wrong. The parameters that are not meant to be used verbatim\n> should be marked as placeholders, but the verbatim parameter not marked\n> as a placeholder should be left as is.\n> \n> This change is a complement for commit 51e846e673 (doc: enforce\n> placeholders in documentation, 2023-12-25).\n> \n> Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>\n> ---\n>   diff.c | 2 +-\n>   1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/diff.c b/diff.c\n> index ccfa1fca0d..c256ef103e 100644\n> --- a/diff.c\n> +++ b/diff.c\n> @@ -5599,7 +5599,7 @@ struct option *add_diff_options(const struct option *opts,\n>   \t\t\t       PARSE_OPT_NONEG | PARSE_OPT_NOARG,\n>   \t\t\t       diff_opt_dirstat),\n>   \t\tOPT_CALLBACK_F(0, \"dirstat-by-file\", options, N_(\"<param1,param2>...\"),\n\nThis line also needs changes:\nN_(\"<param1>,<param2>...\")\n\n> -\t\t\t       N_(\"synonym for --dirstat=files,param1,param2...\"),\n> +\t\t\t       N_(\"synonym for --dirstat=files,<param1>,<param2>...\"),\n>   \t\t\t       PARSE_OPT_NONEG | PARSE_OPT_OPTARG,\n>   \t\t\t       diff_opt_dirstat),\n>   \t\tOPT_BIT_F(0, \"check\", &options->output_format,\n\nThanks\n\nJN\n"},{"id":"488629","messageId":"cover.1707900029.git.worldhello.net@gmail.com","threadId":"60911","inReplyTo":"6e33b2b2-f0b1-46ba-bbd8-3ae4c87d35ba@free.fr","subject":"[PATCH v2 0/1] diff: mark param1 and param2 as placeholders","fromName":"Jiang Xin","fromEmail":"worldhello.net@gmail.com","sentAt":"2024-02-14T08:46:40Z","receivedAt":"2024-02-14T08:46:50Z","isPatch":true,"sender":{"key":"worldhello.net@gmail.com","avatar":"https://avatars.githubusercontent.com/u/183860?v=4"},"body":"Some l10n translators translated the parameters \"files\", \"param1\" and\n\"param2\" in the following message:\n\n    \"synonym for --dirstat=files,param1,param2...\"\n\nTranslating \"param1\" and \"param2\" is OK, but changing the parameter\n\"files\" is wrong. The parameters that are not meant to be used verbatim\nshould be marked as placeholders, but the verbatim parameter not marked\nas a placeholder should be left as is.\n\nThis change is a complement for commit 51e846e673 (doc: enforce\nplaceholders in documentation, 2023-12-25).\n\nWith the help of Jean-Noël,some parameter combinations in one\nplaceholder (e.g. \"<param1,param2>...\") are splited into seperate\nplaceholders.\n\n# range-diff v1...v2\n\n1:  c65bca7f6f ! 1:  3a82f72f33 diff: mark param1 and param2 as placeholders\n    @@ Commit message\n         This change is a complement for commit 51e846e673 (doc: enforce\n         placeholders in documentation, 2023-12-25).\n     \n    +    With the help of Jean-Noël,some parameter combinations in one\n    +    placeholder (e.g. \"<param1,param2>...\") are splited into seperate\n    +    placeholders.\n    +\n    +    Helped-by: Jean-Noël Avila <jn.avila@free.fr>\n         Signed-off-by: Jiang Xin <worldhello.net@gmail.com>\n     \n      ## diff.c ##\n     @@ diff.c: struct option *add_diff_options(const struct option *opts,\n    + \t\tOPT_BITOP(0, \"shortstat\", &options->output_format,\n    + \t\t\t  N_(\"output only the last line of --stat\"),\n    + \t\t\t  DIFF_FORMAT_SHORTSTAT, DIFF_FORMAT_NO_OUTPUT),\n    +-\t\tOPT_CALLBACK_F('X', \"dirstat\", options, N_(\"<param1,param2>...\"),\n    ++\t\tOPT_CALLBACK_F('X', \"dirstat\", options, N_(\"<param1>,<param2>...\"),\n    + \t\t\t       N_(\"output the distribution of relative amount of changes for each sub-directory\"),\n    + \t\t\t       PARSE_OPT_NONEG | PARSE_OPT_OPTARG,\n    + \t\t\t       diff_opt_dirstat),\n    +@@ diff.c: struct option *add_diff_options(const struct option *opts,\n    + \t\t\t       N_(\"synonym for --dirstat=cumulative\"),\n      \t\t\t       PARSE_OPT_NONEG | PARSE_OPT_NOARG,\n      \t\t\t       diff_opt_dirstat),\n    - \t\tOPT_CALLBACK_F(0, \"dirstat-by-file\", options, N_(\"<param1,param2>...\"),\n    +-\t\tOPT_CALLBACK_F(0, \"dirstat-by-file\", options, N_(\"<param1,param2>...\"),\n     -\t\t\t       N_(\"synonym for --dirstat=files,param1,param2...\"),\n    ++\t\tOPT_CALLBACK_F(0, \"dirstat-by-file\", options, N_(\"<param1>,<param2>...\"),\n     +\t\t\t       N_(\"synonym for --dirstat=files,<param1>,<param2>...\"),\n      \t\t\t       PARSE_OPT_NONEG | PARSE_OPT_OPTARG,\n      \t\t\t       diff_opt_dirstat),\n---\nJiang Xin (1):\n  diff: mark param1 and param2 as placeholders\n\n diff.c | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\n-- \n2.44.0.rc0\n\n"},{"id":"488630","messageId":"3a82f72f33663f162aa41cb20c0fb3b6786971c9.1707900029.git.worldhello.net@gmail.com","threadId":"60911","inReplyTo":"cover.1707900029.git.worldhello.net@gmail.com","subject":"[PATCH v2 1/1] diff: mark param1 and param2 as placeholders","fromName":"Jiang Xin","fromEmail":"worldhello.net@gmail.com","sentAt":"2024-02-14T08:46:41Z","receivedAt":"2024-02-14T08:46:51Z","isPatch":true,"sender":{"key":"worldhello.net@gmail.com","avatar":"https://avatars.githubusercontent.com/u/183860?v=4"},"body":"Some l10n translators translated the parameters \"files\", \"param1\" and\n\"param2\" in the following message:\n\n    \"synonym for --dirstat=files,param1,param2...\"\n\nTranslating \"param1\" and \"param2\" is OK, but changing the parameter\n\"files\" is wrong. The parameters that are not meant to be used verbatim\nshould be marked as placeholders, but the verbatim parameter not marked\nas a placeholder should be left as is.\n\nThis change is a complement for commit 51e846e673 (doc: enforce\nplaceholders in documentation, 2023-12-25).\n\nWith the help of Jean-Noël,some parameter combinations in one\nplaceholder (e.g. \"<param1,param2>...\") are splited into seperate\nplaceholders.\n\nHelped-by: Jean-Noël Avila <jn.avila@free.fr>\nSigned-off-by: Jiang Xin <worldhello.net@gmail.com>\n---\n diff.c | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/diff.c b/diff.c\nindex ccfa1fca0d..e50def4538 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -5590,7 +5590,7 @@ struct option *add_diff_options(const struct option *opts,\n \t\tOPT_BITOP(0, \"shortstat\", &options->output_format,\n \t\t\t  N_(\"output only the last line of --stat\"),\n \t\t\t  DIFF_FORMAT_SHORTSTAT, DIFF_FORMAT_NO_OUTPUT),\n-\t\tOPT_CALLBACK_F('X', \"dirstat\", options, N_(\"<param1,param2>...\"),\n+\t\tOPT_CALLBACK_F('X', \"dirstat\", options, N_(\"<param1>,<param2>...\"),\n \t\t\t       N_(\"output the distribution of relative amount of changes for each sub-directory\"),\n \t\t\t       PARSE_OPT_NONEG | PARSE_OPT_OPTARG,\n \t\t\t       diff_opt_dirstat),\n@@ -5598,8 +5598,8 @@ struct option *add_diff_options(const struct option *opts,\n \t\t\t       N_(\"synonym for --dirstat=cumulative\"),\n \t\t\t       PARSE_OPT_NONEG | PARSE_OPT_NOARG,\n \t\t\t       diff_opt_dirstat),\n-\t\tOPT_CALLBACK_F(0, \"dirstat-by-file\", options, N_(\"<param1,param2>...\"),\n-\t\t\t       N_(\"synonym for --dirstat=files,param1,param2...\"),\n+\t\tOPT_CALLBACK_F(0, \"dirstat-by-file\", options, N_(\"<param1>,<param2>...\"),\n+\t\t\t       N_(\"synonym for --dirstat=files,<param1>,<param2>...\"),\n \t\t\t       PARSE_OPT_NONEG | PARSE_OPT_OPTARG,\n \t\t\t       diff_opt_dirstat),\n \t\tOPT_BIT_F(0, \"check\", &options->output_format,\n-- \n2.44.0.rc0\n\n"},{"id":"488657","messageId":"xmqq5xyrvtm8.fsf@gitster.g","threadId":"60911","inReplyTo":"3a82f72f33663f162aa41cb20c0fb3b6786971c9.1707900029.git.worldhello.net@gmail.com","subject":"Re: [PATCH v2 1/1] diff: mark param1 and param2 as placeholders","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-02-14T17:33:03Z","receivedAt":"2024-02-14T17:33:09Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jiang Xin <worldhello.net@gmail.com> writes:\n\n> Some l10n translators translated the parameters \"files\", \"param1\" and\n> \"param2\" in the following message:\n>\n>     \"synonym for --dirstat=files,param1,param2...\"\n>\n> Translating \"param1\" and \"param2\" is OK, but changing the parameter\n> \"files\" is wrong. The parameters that are not meant to be used verbatim\n> should be marked as placeholders, but the verbatim parameter not marked\n> as a placeholder should be left as is.\n>\n> This change is a complement for commit 51e846e673 (doc: enforce\n> placeholders in documentation, 2023-12-25).\n>\n> With the help of Jean-Noël,some parameter combinations in one\n> placeholder (e.g. \"<param1,param2>...\") are splited into seperate\n> placeholders.\n>\n> Helped-by: Jean-Noël Avila <jn.avila@free.fr>\n> Signed-off-by: Jiang Xin <worldhello.net@gmail.com>\n> ---\n>  diff.c | 6 +++---\n>  1 file changed, 3 insertions(+), 3 deletions(-)\n\nMakes sense, thanks both.  This is from 2019 so it is not all that\nurgent, but it still is a good change.\n\nIt is a bit unfortunate that we need to mark what *can* be\ntranslated, not the other way around.  Because of that, something\nlike ...\n\n>  \t\t\t       N_(\"synonym for --dirstat=cumulative\"),\n\n... has no marking, but that does not mean that any part of\n\"--dirstat=cumulative\" is up for translation, while \"synonym for\"\ndefinitely is to be translated.\n\n> +\t\tOPT_CALLBACK_F(0, \"dirstat-by-file\", options, N_(\"<param1>,<param2>...\"),\n> +\t\t\t       N_(\"synonym for --dirstat=files,<param1>,<param2>...\"),\n"}]}