{"thread":{"id":"57713","subject":"[PATCH] i18n: fix some badly formatted i18n strings","startedAt":"2022-04-11T19:23:38Z","lastAt":"2022-04-12T10:01:24Z","messageCount":4,"participants":["Jean-Noël Avila via GitGitGadget","Junio C Hamano","Ævar Arnfjörð Bjarmason","Jean-Noël Avila"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"453427","messageId":"pull.1212.git.1649705011178.gitgitgadget@gmail.com","threadId":"57713","inReplyTo":null,"subject":"[PATCH] i18n: fix some badly formatted i18n strings","fromName":"Jean-Noël Avila via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2022-04-11T19:23:30Z","receivedAt":"2022-04-11T19:23:38Z","isPatch":true,"sender":{"key":"jn.avila@free.fr","avatar":"https://avatars.githubusercontent.com/u/156172?v=4"},"body":"From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>\n\nString in submodule--helper is not correctly formatting\nplaceholders. The string in git-send-email is partial.\n\nSigned-off-by: Jean-Noël Avila <jn.avila@free.fr>\n---\n    V2.36 i18n fixes\n    \n    While translating the latest version of the messages, I encountered a\n    few errors of formatting or management.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1212%2Fjnavila%2Fv2.36_i18n_fixes-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1212/jnavila/v2.36_i18n_fixes-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/1212\n\n builtin/submodule--helper.c | 2 +-\n git-send-email.perl         | 7 +++----\n 2 files changed, 4 insertions(+), 5 deletions(-)\n\ndiff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c\nindex 0b8b226c8ff..2c87ef9364f 100644\n--- a/builtin/submodule--helper.c\n+++ b/builtin/submodule--helper.c\n@@ -3082,7 +3082,7 @@ static int module_create_branch(int argc, const char **argv, const char *prefix)\n \t\tOPT_END()\n \t};\n \tconst char *const usage[] = {\n-\t\tN_(\"git submodule--helper create-branch [-f|--force] [--create-reflog] [-q|--quiet] [-t|--track] [-n|--dry-run] <name> <start_oid> <start_name>\"),\n+\t\tN_(\"git submodule--helper create-branch [-f|--force] [--create-reflog] [-q|--quiet] [-t|--track] [-n|--dry-run] <name> <start-oid> <start-name>\"),\n \t\tNULL\n \t};\n \ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex a98460bdb96..5861e99a6eb 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -2096,10 +2096,9 @@ sub validate_patch {\n \t\t\tchdir($cwd_save) or die(\"chdir: $!\");\n \t\t}\n \t\tif ($hook_error) {\n-\t\t\t$hook_error = sprintf(__(\"fatal: %s: rejected by %s hook\\n\" .\n-\t\t\t\t\t\t $hook_error . \"\\n\" .\n-\t\t\t\t\t\t \"warning: no patches were sent\\n\"),\n-\t\t\t\t\t      $fn, $hook_name);\n+\t\t\t$hook_error = sprintf(\n+\t\t\t    __(\"fatal: %s: rejected by %s hook\\n%s\\nwarning: no patches were sent\\n\"),\n+\t\t\t    $fn, $hook_name, $hook_error);\n \t\t\tdie $hook_error;\n \t\t}\n \t}\n\nbase-commit: ab1f2765f78e75ee51dface57e1071b3b7f42b09\n-- \ngitgitgadget\n"},{"id":"453431","messageId":"xmqqwnfvfhlf.fsf@gitster.g","threadId":"57713","inReplyTo":"pull.1212.git.1649705011178.gitgitgadget@gmail.com","subject":"Re: [PATCH] i18n: fix some badly formatted i18n strings","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-04-11T21:14:20Z","receivedAt":"2022-04-11T21:14:31Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Jean-Noël Avila via GitGitGadget\"  <gitgitgadget@gmail.com> writes:\n\n> From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>\n>\n> String in submodule--helper is not correctly formatting\n> placeholders. The string in git-send-email is partial.\n>\n> Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>\n> ---\n>     V2.36 i18n fixes\n>     \n>     While translating the latest version of the messages, I encountered a\n>     few errors of formatting or management.\n\nThanks.  Will queue directly on top of 'master'.\n"},{"id":"453440","messageId":"220412.86y20ahgpu.gmgdl@evledraar.gmail.com","threadId":"57713","inReplyTo":"pull.1212.git.1649705011178.gitgitgadget@gmail.com","subject":"Re: [PATCH] i18n: fix some badly formatted i18n strings","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-04-12T07:59:59Z","receivedAt":"2022-04-12T10:01:17Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Mon, Apr 11 2022, Jean-Noël Avila via GitGitGadget wrote:\n\n> From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>\n>\n> String in submodule--helper is not correctly formatting\n> placeholders. The string in git-send-email is partial.\n>\n> Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>\n> ---\n>     V2.36 i18n fixes\n>     \n>     While translating the latest version of the messages, I encountered a\n>     few errors of formatting or management.\n>\n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1212%2Fjnavila%2Fv2.36_i18n_fixes-v1\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1212/jnavila/v2.36_i18n_fixes-v1\n> Pull-Request: https://github.com/gitgitgadget/git/pull/1212\n>\n>  builtin/submodule--helper.c | 2 +-\n>  git-send-email.perl         | 7 +++----\n>  2 files changed, 4 insertions(+), 5 deletions(-)\n>\n> diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c\n> index 0b8b226c8ff..2c87ef9364f 100644\n> --- a/builtin/submodule--helper.c\n> +++ b/builtin/submodule--helper.c\n> @@ -3082,7 +3082,7 @@ static int module_create_branch(int argc, const char **argv, const char *prefix)\n>  \t\tOPT_END()\n>  \t};\n>  \tconst char *const usage[] = {\n> -\t\tN_(\"git submodule--helper create-branch [-f|--force] [--create-reflog] [-q|--quiet] [-t|--track] [-n|--dry-run] <name> <start_oid> <start_name>\"),\n> +\t\tN_(\"git submodule--helper create-branch [-f|--force] [--create-reflog] [-q|--quiet] [-t|--track] [-n|--dry-run] <name> <start-oid> <start-name>\"),\n\nOkey, so s/_/-/g here.\n\n>  \t\tNULL\n>  \t};\n>  \n> diff --git a/git-send-email.perl b/git-send-email.perl\n> index a98460bdb96..5861e99a6eb 100755\n> --- a/git-send-email.perl\n> +++ b/git-send-email.perl\n> @@ -2096,10 +2096,9 @@ sub validate_patch {\n>  \t\t\tchdir($cwd_save) or die(\"chdir: $!\");\n>  \t\t}\n>  \t\tif ($hook_error) {\n> -\t\t\t$hook_error = sprintf(__(\"fatal: %s: rejected by %s hook\\n\" .\n> -\t\t\t\t\t\t $hook_error . \"\\n\" .\n> -\t\t\t\t\t\t \"warning: no patches were sent\\n\"),\n> -\t\t\t\t\t      $fn, $hook_name);\n> +\t\t\t$hook_error = sprintf(\n> +\t\t\t    __(\"fatal: %s: rejected by %s hook\\n%s\\nwarning: no patches were sent\\n\"),\n> +\t\t\t    $fn, $hook_name, $hook_error);\n\nIsn't this much narrower change going to do the same thing?:\n\t\n\tdiff --git a/git-send-email.perl b/git-send-email.perl\n\tindex a98460bdb96..5adb7593ce3 100755\n\t--- a/git-send-email.perl\n\t+++ b/git-send-email.perl\n\t@@ -2097,9 +2097,9 @@ sub validate_patch {\n\t \t\t}\n\t \t\tif ($hook_error) {\n\t \t\t\t$hook_error = sprintf(__(\"fatal: %s: rejected by %s hook\\n\" .\n\t-\t\t\t\t\t\t $hook_error . \"\\n\" .\n\t+\t\t\t\t\t\t \"%s\\n\" .\n\t \t\t\t\t\t\t \"warning: no patches were sent\\n\"),\n\t-\t\t\t\t\t      $fn, $hook_name);\n\t+\t\t\t\t\t      $fn, $hook_name, $hook_error);\n\t \t\t\tdie $hook_error;\n\t \t\t}\n\t \t}\n"},{"id":"453442","messageId":"44b46614-9e3d-3f6e-5e65-e1d246ce78c3@free.fr","threadId":"57713","inReplyTo":"220412.86y20ahgpu.gmgdl@evledraar.gmail.com","subject":"Re: [PATCH] i18n: fix some badly formatted i18n strings","fromName":"Jean-Noël Avila","fromEmail":"jn.avila@free.fr","sentAt":"2022-04-12T09:03:09Z","receivedAt":"2022-04-12T10:01:24Z","isPatch":true,"sender":{"key":"jn.avila@free.fr","avatar":"https://avatars.githubusercontent.com/u/156172?v=4"},"body":"Le 12/04/2022 à 09:59, Ævar Arnfjörð Bjarmason a écrit :\n> \n> On Mon, Apr 11 2022, Jean-Noël Avila via GitGitGadget wrote:\n> \n>> From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>\n>>\n>> String in submodule--helper is not correctly formatting\n>> placeholders. The string in git-send-email is partial.\n>>\n>> Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>\n>> ---\n>>      V2.36 i18n fixes\n>>      \n>>      While translating the latest version of the messages, I encountered a\n>>      few errors of formatting or management.\n>>\n>> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1212%2Fjnavila%2Fv2.36_i18n_fixes-v1\n>> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1212/jnavila/v2.36_i18n_fixes-v1\n>> Pull-Request: https://github.com/gitgitgadget/git/pull/1212\n>>\n>>   builtin/submodule--helper.c | 2 +-\n>>   git-send-email.perl         | 7 +++----\n>>   2 files changed, 4 insertions(+), 5 deletions(-)\n>>\n>> diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c\n>> index 0b8b226c8ff..2c87ef9364f 100644\n>> --- a/builtin/submodule--helper.c\n>> +++ b/builtin/submodule--helper.c\n>> @@ -3082,7 +3082,7 @@ static int module_create_branch(int argc, const char **argv, const char *prefix)\n>>   \t\tOPT_END()\n>>   \t};\n>>   \tconst char *const usage[] = {\n>> -\t\tN_(\"git submodule--helper create-branch [-f|--force] [--create-reflog] [-q|--quiet] [-t|--track] [-n|--dry-run] <name> <start_oid> <start_name>\"),\n>> +\t\tN_(\"git submodule--helper create-branch [-f|--force] [--create-reflog] [-q|--quiet] [-t|--track] [-n|--dry-run] <name> <start-oid> <start-name>\"),\n> \n> Okey, so s/_/-/g here.\n> \n>>   \t\tNULL\n>>   \t};\n>>   \n>> diff --git a/git-send-email.perl b/git-send-email.perl\n>> index a98460bdb96..5861e99a6eb 100755\n>> --- a/git-send-email.perl\n>> +++ b/git-send-email.perl\n>> @@ -2096,10 +2096,9 @@ sub validate_patch {\n>>   \t\t\tchdir($cwd_save) or die(\"chdir: $!\");\n>>   \t\t}\n>>   \t\tif ($hook_error) {\n>> -\t\t\t$hook_error = sprintf(__(\"fatal: %s: rejected by %s hook\\n\" .\n>> -\t\t\t\t\t\t $hook_error . \"\\n\" .\n>> -\t\t\t\t\t\t \"warning: no patches were sent\\n\"),\n>> -\t\t\t\t\t      $fn, $hook_name);\n>> +\t\t\t$hook_error = sprintf(\n>> +\t\t\t    __(\"fatal: %s: rejected by %s hook\\n%s\\nwarning: no patches were sent\\n\"),\n>> +\t\t\t    $fn, $hook_name, $hook_error);\n> \n> Isn't this much narrower change going to do the same thing?:\n> \t\n> \tdiff --git a/git-send-email.perl b/git-send-email.perl\n> \tindex a98460bdb96..5adb7593ce3 100755\n> \t--- a/git-send-email.perl\n> \t+++ b/git-send-email.perl\n> \t@@ -2097,9 +2097,9 @@ sub validate_patch {\n> \t \t\t}\n> \t \t\tif ($hook_error) {\n> \t \t\t\t$hook_error = sprintf(__(\"fatal: %s: rejected by %s hook\\n\" .\n> \t-\t\t\t\t\t\t $hook_error . \"\\n\" .\n> \t+\t\t\t\t\t\t \"%s\\n\" .\n> \t \t\t\t\t\t\t \"warning: no patches were sent\\n\"),\n> \t-\t\t\t\t\t      $fn, $hook_name);\n> \t+\t\t\t\t\t      $fn, $hook_name, $hook_error);\n> \t \t\t\tdie $hook_error;\n> \t \t\t}\n> \t \t}\n\nI wasn't sure that msgmerge would correctly handle this, but it seems \nso. So, yes, your version is much less invasive. Mine has an additional \nproperty of repelling developpers from trying to concatenate strings.\n"}]}