{"thread":{"id":"50661","subject":"[PATCH 0/1] remote-curl: mark all error messages for translation","startedAt":"2019-03-05T23:20:43Z","lastAt":"2019-03-06T10:05:34Z","messageCount":5,"participants":["Johannes Schindelin via GitGitGadget","Junio C Hamano","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":1},"messages":[{"id":"370763","messageId":"pull.157.git.gitgitgadget@gmail.com","threadId":"50661","inReplyTo":null,"subject":"[PATCH 0/1] remote-curl: mark all error messages for translation","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-03-05T23:20:39Z","receivedAt":"2019-03-05T23:20:43Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"As suggested by Jeff King in a nearby thread.\n\nJohannes Schindelin (1):\n  remote-curl: mark all error messages for translation\n\n remote-curl.c | 50 +++++++++++++++++++++++++-------------------------\n 1 file changed, 25 insertions(+), 25 deletions(-)\n\n\nbase-commit: c1284b21f2436de24c9559fcc5f4badb04f47773\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-157%2Fdscho%2Fl10n-remote-curl-diag-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-157/dscho/l10n-remote-curl-diag-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/157\n-- \ngitgitgadget\n"},{"id":"370764","messageId":"018feb32054f47896e159564feb4c88bd7757010.1551828039.git.gitgitgadget@gmail.com","threadId":"50661","inReplyTo":"pull.157.git.gitgitgadget@gmail.com","subject":"[PATCH 1/1] remote-curl: mark all error messages for translation","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-03-05T23:20:40Z","receivedAt":"2019-03-05T23:20:46Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nSuggested by Jeff King.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n remote-curl.c | 50 +++++++++++++++++++++++++-------------------------\n 1 file changed, 25 insertions(+), 25 deletions(-)\n\ndiff --git a/remote-curl.c b/remote-curl.c\nindex 6be3cb5918..06f091d862 100644\n--- a/remote-curl.c\n+++ b/remote-curl.c\n@@ -154,7 +154,7 @@ static int set_option(const char *name, const char *value)\n \t\telse {\n \t\t\tstruct strbuf unquoted = STRBUF_INIT;\n \t\t\tif (unquote_c_style(&unquoted, value, NULL) < 0)\n-\t\t\t\tdie(\"invalid quoting in push-option value\");\n+\t\t\t\tdie(_(\"invalid quoting in push-option value: '%s'\"), value);\n \t\t\tstring_list_append_nodup(&options.push_options,\n \t\t\t\t\t\t strbuf_detach(&unquoted, NULL));\n \t\t}\n@@ -250,7 +250,7 @@ static struct ref *parse_info_refs(struct discovery *heads)\n \t\t\tmid = &data[i];\n \t\tif (data[i] == '\\n') {\n \t\t\tif (mid - start != 40)\n-\t\t\t\tdie(\"%sinfo/refs not valid: is this a git repository?\",\n+\t\t\t\tdie(_(\"%sinfo/refs not valid: is this a git repository?\"),\n \t\t\t\t    transport_anonymize_url(url.buf));\n \t\t\tdata[i] = 0;\n \t\t\tref_name = mid + 1;\n@@ -389,15 +389,15 @@ static struct discovery *discover_refs(const char *service, int for_push)\n \t\tbreak;\n \tcase HTTP_MISSING_TARGET:\n \t\tshow_http_message(&type, &charset, &buffer);\n-\t\tdie(\"repository '%s' not found\",\n+\t\tdie(_(\"repository '%s' not found\"),\n \t\t    transport_anonymize_url(url.buf));\n \tcase HTTP_NOAUTH:\n \t\tshow_http_message(&type, &charset, &buffer);\n-\t\tdie(\"Authentication failed for '%s'\",\n+\t\tdie(_(\"Authentication failed for '%s'\"),\n \t\t    transport_anonymize_url(url.buf));\n \tdefault:\n \t\tshow_http_message(&type, &charset, &buffer);\n-\t\tdie(\"unable to access '%s': %s\",\n+\t\tdie(_(\"unable to access '%s': %s\"),\n \t\t    transport_anonymize_url(url.buf), curl_errorstr);\n \t}\n \n@@ -424,12 +424,12 @@ static struct discovery *discover_refs(const char *service, int for_push)\n \t\t */\n \t\tline = packet_read_line_buf(&last->buf, &last->len, NULL);\n \t\tif (!line)\n-\t\t\tdie(\"invalid server response; expected service, got flush packet\");\n+\t\t\tdie(_(\"invalid server response; expected service, got flush packet\"));\n \n \t\tstrbuf_reset(&exp);\n \t\tstrbuf_addf(&exp, \"# service=%s\", service);\n \t\tif (strcmp(line, exp.buf))\n-\t\t\tdie(\"invalid server response; got '%s'\", line);\n+\t\t\tdie(_(\"invalid server response; got '%s'\"), line);\n \t\tstrbuf_release(&exp);\n \n \t\t/* The header can include additional metadata lines, up\n@@ -544,7 +544,7 @@ static curlioerr rpc_ioctl(CURL *handle, int cmd, void *clientp)\n \t\t\trpc->pos = 0;\n \t\t\treturn CURLIOE_OK;\n \t\t}\n-\t\terror(\"unable to rewind rpc post data - try increasing http.postBuffer\");\n+\t\terror(_(\"unable to rewind rpc post data - try increasing http.postBuffer\"));\n \t\treturn CURLIOE_FAILRESTART;\n \n \tdefault:\n@@ -588,7 +588,7 @@ static int run_slot(struct active_request_slot *slot,\n \t\t\t\tstrbuf_addstr(&msg, curl_errorstr);\n \t\t\t}\n \t\t}\n-\t\terror(\"RPC failed; %s\", msg.buf);\n+\t\terror(_(\"RPC failed; %s\"), msg.buf);\n \t\tstrbuf_release(&msg);\n \t}\n \n@@ -626,7 +626,7 @@ static int probe_rpc(struct rpc_state *rpc, struct slot_results *results)\n \n static curl_off_t xcurl_off_t(ssize_t len) {\n \tif (len > maximum_signed_value_of_type(curl_off_t))\n-\t\tdie(\"cannot handle pushes this big\");\n+\t\tdie(_(\"cannot handle pushes this big\"));\n \treturn (curl_off_t) len;\n }\n \n@@ -738,11 +738,11 @@ static int post_rpc(struct rpc_state *rpc)\n \n \t\tret = git_deflate(&stream, Z_FINISH);\n \t\tif (ret != Z_STREAM_END)\n-\t\t\tdie(\"cannot deflate request; zlib deflate error %d\", ret);\n+\t\t\tdie(_(\"cannot deflate request; zlib deflate error %d\"), ret);\n \n \t\tret = git_deflate_end_gently(&stream);\n \t\tif (ret != Z_OK)\n-\t\t\tdie(\"cannot deflate request; zlib end error %d\", ret);\n+\t\t\tdie(_(\"cannot deflate request; zlib end error %d\"), ret);\n \n \t\tgzip_size = stream.total_out;\n \n@@ -871,7 +871,7 @@ static int fetch_dumb(int nr_heads, struct ref **to_fetch)\n \n \tALLOC_ARRAY(targets, nr_heads);\n \tif (options.depth || options.deepen_since)\n-\t\tdie(\"dumb http transport does not support shallow capabilities\");\n+\t\tdie(_(\"dumb http transport does not support shallow capabilities\"));\n \tfor (i = 0; i < nr_heads; i++)\n \t\ttargets[i] = xstrdup(oid_to_hex(&to_fetch[i]->old_oid));\n \n@@ -885,7 +885,7 @@ static int fetch_dumb(int nr_heads, struct ref **to_fetch)\n \t\tfree(targets[i]);\n \tfree(targets);\n \n-\treturn ret ? error(\"fetch failed.\") : 0;\n+\treturn ret ? error(_(\"fetch failed.\")) : 0;\n }\n \n static int fetch_git(struct discovery *heads,\n@@ -932,7 +932,7 @@ static int fetch_git(struct discovery *heads,\n \tfor (i = 0; i < nr_heads; i++) {\n \t\tstruct ref *ref = to_fetch[i];\n \t\tif (!*ref->name)\n-\t\t\tdie(\"cannot fetch by sha1 over smart http\");\n+\t\t\tdie(_(\"cannot fetch by sha1 over smart http\"));\n \t\tpacket_buf_write(&preamble, \"%s %s\\n\",\n \t\t\t\t oid_to_hex(&ref->old_oid), ref->name);\n \t}\n@@ -977,13 +977,13 @@ static void parse_fetch(struct strbuf *buf)\n \t\t\tstruct object_id old_oid;\n \n \t\t\tif (get_oid_hex(p, &old_oid))\n-\t\t\t\tdie(\"protocol error: expected sha/ref, got %s'\", p);\n+\t\t\t\tdie(_(\"protocol error: expected sha/ref, got %s'\"), p);\n \t\t\tif (p[GIT_SHA1_HEXSZ] == ' ')\n \t\t\t\tname = p + GIT_SHA1_HEXSZ + 1;\n \t\t\telse if (!p[GIT_SHA1_HEXSZ])\n \t\t\t\tname = \"\";\n \t\t\telse\n-\t\t\t\tdie(\"protocol error: expected sha/ref, got %s'\", p);\n+\t\t\t\tdie(_(\"protocol error: expected sha/ref, got %s'\"), p);\n \n \t\t\tref = alloc_ref(name);\n \t\t\toidcpy(&ref->old_oid, &old_oid);\n@@ -995,7 +995,7 @@ static void parse_fetch(struct strbuf *buf)\n \t\t\tto_fetch[nr_heads++] = ref;\n \t\t}\n \t\telse\n-\t\t\tdie(\"http transport does not support %s\", buf->buf);\n+\t\t\tdie(_(\"http transport does not support %s\"), buf->buf);\n \n \t\tstrbuf_reset(buf);\n \t\tif (strbuf_getline_lf(buf, stdin) == EOF)\n@@ -1031,7 +1031,7 @@ static int push_dav(int nr_spec, char **specs)\n \t\targv_array_push(&child.args, specs[i]);\n \n \tif (run_command(&child))\n-\t\tdie(\"git-http-push failed\");\n+\t\tdie(_(\"git-http-push failed\"));\n \treturn 0;\n }\n \n@@ -1110,7 +1110,7 @@ static void parse_push(struct strbuf *buf)\n \t\t\tspecs[nr_spec++] = xstrdup(buf->buf + 5);\n \t\t}\n \t\telse\n-\t\t\tdie(\"http transport does not support %s\", buf->buf);\n+\t\t\tdie(_(\"http transport does not support %s\"), buf->buf);\n \n \t\tstrbuf_reset(buf);\n \t\tif (strbuf_getline_lf(buf, stdin) == EOF)\n@@ -1220,7 +1220,7 @@ static size_t proxy_in(char *buffer, size_t eltsize,\n \t\tstrbuf_reset(&p->request_buffer);\n \t\tswitch (packet_reader_read(&p->reader)) {\n \t\tcase PACKET_READ_EOF:\n-\t\t\tdie(\"unexpected EOF when reading from parent process\");\n+\t\t\tdie(_(\"unexpected EOF when reading from parent process\"));\n \t\tcase PACKET_READ_NORMAL:\n \t\t\tpacket_buf_write_len(&p->request_buffer, p->reader.line,\n \t\t\t\t\t     p->reader.pktlen);\n@@ -1336,7 +1336,7 @@ int cmd_main(int argc, const char **argv)\n \n \tsetup_git_directory_gently(&nongit);\n \tif (argc < 2) {\n-\t\terror(\"remote-curl: usage: git remote-curl <remote> [<url>]\");\n+\t\terror(_(\"remote-curl: usage: git remote-curl <remote> [<url>]\"));\n \t\treturn 1;\n \t}\n \n@@ -1361,14 +1361,14 @@ int cmd_main(int argc, const char **argv)\n \n \t\tif (strbuf_getline_lf(&buf, stdin) == EOF) {\n \t\t\tif (ferror(stdin))\n-\t\t\t\terror(\"remote-curl: error reading command stream from git\");\n+\t\t\t\terror(_(\"remote-curl: error reading command stream from git\"));\n \t\t\treturn 1;\n \t\t}\n \t\tif (buf.len == 0)\n \t\t\tbreak;\n \t\tif (starts_with(buf.buf, \"fetch \")) {\n \t\t\tif (nongit)\n-\t\t\t\tdie(\"remote-curl: fetch attempted without a local repo\");\n+\t\t\t\tdie(_(\"remote-curl: fetch attempted without a local repo\"));\n \t\t\tparse_fetch(&buf);\n \n \t\t} else if (!strcmp(buf.buf, \"list\") || starts_with(buf.buf, \"list \")) {\n@@ -1408,7 +1408,7 @@ int cmd_main(int argc, const char **argv)\n \t\t\tif (!stateless_connect(arg))\n \t\t\t\tbreak;\n \t\t} else {\n-\t\t\terror(\"remote-curl: unknown command '%s' from git\", buf.buf);\n+\t\t\terror(_(\"remote-curl: unknown command '%s' from git\"), buf.buf);\n \t\t\treturn 1;\n \t\t}\n \t\tstrbuf_reset(&buf);\n-- \ngitgitgadget\n"},{"id":"370769","messageId":"xmqqtvggsx6c.fsf@gitster-ct.c.googlers.com","threadId":"50661","inReplyTo":"pull.157.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 0/1] remote-curl: mark all error messages for translation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-03-05T23:45:15Z","receivedAt":"2019-03-05T23:45:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\nwrites:\n\n> As suggested by Jeff King in a nearby thread.\n>\n> Johannes Schindelin (1):\n>   remote-curl: mark all error messages for translation\n\nDoes this come on top or below the anonymize patch, or it does not\nmatter which goes first?\n\n>\n>  remote-curl.c | 50 +++++++++++++++++++++++++-------------------------\n>  1 file changed, 25 insertions(+), 25 deletions(-)\n>\n>\n> base-commit: c1284b21f2436de24c9559fcc5f4badb04f47773\n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-157%2Fdscho%2Fl10n-remote-curl-diag-v1\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-157/dscho/l10n-remote-curl-diag-v1\n> Pull-Request: https://github.com/gitgitgadget/git/pull/157\n"},{"id":"370771","messageId":"xmqqmum8sx0h.fsf@gitster-ct.c.googlers.com","threadId":"50661","inReplyTo":"xmqqtvggsx6c.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH 0/1] remote-curl: mark all error messages for translation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-03-05T23:48:46Z","receivedAt":"2019-03-05T23:48:50Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> \"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\n> writes:\n>\n>> As suggested by Jeff King in a nearby thread.\n>>\n>> Johannes Schindelin (1):\n>>   remote-curl: mark all error messages for translation\n>\n> Does this come on top or below the anonymize patch, or it does not\n> matter which goes first?\n\nOK, will pile on top of the anonymization thing.\n\nThanks.\n\n>\n>>\n>>  remote-curl.c | 50 +++++++++++++++++++++++++-------------------------\n>>  1 file changed, 25 insertions(+), 25 deletions(-)\n>>\n>>\n>> base-commit: c1284b21f2436de24c9559fcc5f4badb04f47773\n>> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-157%2Fdscho%2Fl10n-remote-curl-diag-v1\n>> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-157/dscho/l10n-remote-curl-diag-v1\n>> Pull-Request: https://github.com/gitgitgadget/git/pull/157\n"},{"id":"370798","messageId":"nycvar.QRO.7.76.6.1903061102260.41@tvgsbejvaqbjf.bet","threadId":"50661","inReplyTo":"xmqqmum8sx0h.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH 0/1] remote-curl: mark all error messages for translation","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-03-06T10:05:25Z","receivedAt":"2019-03-06T10:05:34Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Wed, 6 Mar 2019, Junio C Hamano wrote:\n\n> Junio C Hamano <gitster@pobox.com> writes:\n> \n> > \"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\n> > writes:\n> >\n> >> As suggested by Jeff King in a nearby thread.\n> >>\n> >> Johannes Schindelin (1):\n> >>   remote-curl: mark all error messages for translation\n> >\n> > Does this come on top or below the anonymize patch, or it does not\n> > matter which goes first?\n> \n> OK, will pile on top of the anonymization thing.\n\nSorry, yes, it is on top of the anonymization thing. I was assuming by\nmistake that GitGitGadget would display in the footer on which branch the\nPR is based, but it only has the commit hash of the \"based-on\" commit.\n\nBTW I was expecting the merge conflicts you ran into, that's why I kept\nthis patch separate from the anonymization thing.\n\nCiao,\nDscho\n\n> \n> Thanks.\n> \n> >\n> >>\n> >>  remote-curl.c | 50 +++++++++++++++++++++++++-------------------------\n> >>  1 file changed, 25 insertions(+), 25 deletions(-)\n> >>\n> >>\n> >> base-commit: c1284b21f2436de24c9559fcc5f4badb04f47773\n> >> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-157%2Fdscho%2Fl10n-remote-curl-diag-v1\n> >> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-157/dscho/l10n-remote-curl-diag-v1\n> >> Pull-Request: https://github.com/gitgitgadget/git/pull/157\n> \n"}]}