git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/1] remote-curl: mark all error messages for translation
@ 2019-03-05 23:20 Johannes Schindelin via GitGitGadget
  2019-03-05 23:20 ` [PATCH 1/1] " Johannes Schindelin via GitGitGadget
  2019-03-05 23:45 ` [PATCH 0/1] " Junio C Hamano
  0 siblings, 2 replies; 5+ messages in thread
From: Johannes Schindelin via GitGitGadget @ 2019-03-05 23:20 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

As suggested by Jeff King in a nearby thread.

Johannes Schindelin (1):
  remote-curl: mark all error messages for translation

 remote-curl.c | 50 +++++++++++++++++++++++++-------------------------
 1 file changed, 25 insertions(+), 25 deletions(-)


base-commit: c1284b21f2436de24c9559fcc5f4badb04f47773
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-157%2Fdscho%2Fl10n-remote-curl-diag-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-157/dscho/l10n-remote-curl-diag-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/157
-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/1] remote-curl: mark all error messages for translation
  2019-03-05 23:20 [PATCH 0/1] remote-curl: mark all error messages for translation Johannes Schindelin via GitGitGadget
@ 2019-03-05 23:20 ` Johannes Schindelin via GitGitGadget
  2019-03-05 23:45 ` [PATCH 0/1] " Junio C Hamano
  1 sibling, 0 replies; 5+ messages in thread
From: Johannes Schindelin via GitGitGadget @ 2019-03-05 23:20 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Johannes Schindelin

From: Johannes Schindelin <johannes.schindelin@gmx.de>

Suggested by Jeff King.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 remote-curl.c | 50 +++++++++++++++++++++++++-------------------------
 1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/remote-curl.c b/remote-curl.c
index 6be3cb5918..06f091d862 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -154,7 +154,7 @@ static int set_option(const char *name, const char *value)
 		else {
 			struct strbuf unquoted = STRBUF_INIT;
 			if (unquote_c_style(&unquoted, value, NULL) < 0)
-				die("invalid quoting in push-option value");
+				die(_("invalid quoting in push-option value: '%s'"), value);
 			string_list_append_nodup(&options.push_options,
 						 strbuf_detach(&unquoted, NULL));
 		}
@@ -250,7 +250,7 @@ static struct ref *parse_info_refs(struct discovery *heads)
 			mid = &data[i];
 		if (data[i] == '\n') {
 			if (mid - start != 40)
-				die("%sinfo/refs not valid: is this a git repository?",
+				die(_("%sinfo/refs not valid: is this a git repository?"),
 				    transport_anonymize_url(url.buf));
 			data[i] = 0;
 			ref_name = mid + 1;
@@ -389,15 +389,15 @@ static struct discovery *discover_refs(const char *service, int for_push)
 		break;
 	case HTTP_MISSING_TARGET:
 		show_http_message(&type, &charset, &buffer);
-		die("repository '%s' not found",
+		die(_("repository '%s' not found"),
 		    transport_anonymize_url(url.buf));
 	case HTTP_NOAUTH:
 		show_http_message(&type, &charset, &buffer);
-		die("Authentication failed for '%s'",
+		die(_("Authentication failed for '%s'"),
 		    transport_anonymize_url(url.buf));
 	default:
 		show_http_message(&type, &charset, &buffer);
-		die("unable to access '%s': %s",
+		die(_("unable to access '%s': %s"),
 		    transport_anonymize_url(url.buf), curl_errorstr);
 	}
 
@@ -424,12 +424,12 @@ static struct discovery *discover_refs(const char *service, int for_push)
 		 */
 		line = packet_read_line_buf(&last->buf, &last->len, NULL);
 		if (!line)
-			die("invalid server response; expected service, got flush packet");
+			die(_("invalid server response; expected service, got flush packet"));
 
 		strbuf_reset(&exp);
 		strbuf_addf(&exp, "# service=%s", service);
 		if (strcmp(line, exp.buf))
-			die("invalid server response; got '%s'", line);
+			die(_("invalid server response; got '%s'"), line);
 		strbuf_release(&exp);
 
 		/* The header can include additional metadata lines, up
@@ -544,7 +544,7 @@ static curlioerr rpc_ioctl(CURL *handle, int cmd, void *clientp)
 			rpc->pos = 0;
 			return CURLIOE_OK;
 		}
-		error("unable to rewind rpc post data - try increasing http.postBuffer");
+		error(_("unable to rewind rpc post data - try increasing http.postBuffer"));
 		return CURLIOE_FAILRESTART;
 
 	default:
@@ -588,7 +588,7 @@ static int run_slot(struct active_request_slot *slot,
 				strbuf_addstr(&msg, curl_errorstr);
 			}
 		}
-		error("RPC failed; %s", msg.buf);
+		error(_("RPC failed; %s"), msg.buf);
 		strbuf_release(&msg);
 	}
 
@@ -626,7 +626,7 @@ static int probe_rpc(struct rpc_state *rpc, struct slot_results *results)
 
 static curl_off_t xcurl_off_t(ssize_t len) {
 	if (len > maximum_signed_value_of_type(curl_off_t))
-		die("cannot handle pushes this big");
+		die(_("cannot handle pushes this big"));
 	return (curl_off_t) len;
 }
 
@@ -738,11 +738,11 @@ static int post_rpc(struct rpc_state *rpc)
 
 		ret = git_deflate(&stream, Z_FINISH);
 		if (ret != Z_STREAM_END)
-			die("cannot deflate request; zlib deflate error %d", ret);
+			die(_("cannot deflate request; zlib deflate error %d"), ret);
 
 		ret = git_deflate_end_gently(&stream);
 		if (ret != Z_OK)
-			die("cannot deflate request; zlib end error %d", ret);
+			die(_("cannot deflate request; zlib end error %d"), ret);
 
 		gzip_size = stream.total_out;
 
@@ -871,7 +871,7 @@ static int fetch_dumb(int nr_heads, struct ref **to_fetch)
 
 	ALLOC_ARRAY(targets, nr_heads);
 	if (options.depth || options.deepen_since)
-		die("dumb http transport does not support shallow capabilities");
+		die(_("dumb http transport does not support shallow capabilities"));
 	for (i = 0; i < nr_heads; i++)
 		targets[i] = xstrdup(oid_to_hex(&to_fetch[i]->old_oid));
 
@@ -885,7 +885,7 @@ static int fetch_dumb(int nr_heads, struct ref **to_fetch)
 		free(targets[i]);
 	free(targets);
 
-	return ret ? error("fetch failed.") : 0;
+	return ret ? error(_("fetch failed.")) : 0;
 }
 
 static int fetch_git(struct discovery *heads,
@@ -932,7 +932,7 @@ static int fetch_git(struct discovery *heads,
 	for (i = 0; i < nr_heads; i++) {
 		struct ref *ref = to_fetch[i];
 		if (!*ref->name)
-			die("cannot fetch by sha1 over smart http");
+			die(_("cannot fetch by sha1 over smart http"));
 		packet_buf_write(&preamble, "%s %s\n",
 				 oid_to_hex(&ref->old_oid), ref->name);
 	}
@@ -977,13 +977,13 @@ static void parse_fetch(struct strbuf *buf)
 			struct object_id old_oid;
 
 			if (get_oid_hex(p, &old_oid))
-				die("protocol error: expected sha/ref, got %s'", p);
+				die(_("protocol error: expected sha/ref, got %s'"), p);
 			if (p[GIT_SHA1_HEXSZ] == ' ')
 				name = p + GIT_SHA1_HEXSZ + 1;
 			else if (!p[GIT_SHA1_HEXSZ])
 				name = "";
 			else
-				die("protocol error: expected sha/ref, got %s'", p);
+				die(_("protocol error: expected sha/ref, got %s'"), p);
 
 			ref = alloc_ref(name);
 			oidcpy(&ref->old_oid, &old_oid);
@@ -995,7 +995,7 @@ static void parse_fetch(struct strbuf *buf)
 			to_fetch[nr_heads++] = ref;
 		}
 		else
-			die("http transport does not support %s", buf->buf);
+			die(_("http transport does not support %s"), buf->buf);
 
 		strbuf_reset(buf);
 		if (strbuf_getline_lf(buf, stdin) == EOF)
@@ -1031,7 +1031,7 @@ static int push_dav(int nr_spec, char **specs)
 		argv_array_push(&child.args, specs[i]);
 
 	if (run_command(&child))
-		die("git-http-push failed");
+		die(_("git-http-push failed"));
 	return 0;
 }
 
@@ -1110,7 +1110,7 @@ static void parse_push(struct strbuf *buf)
 			specs[nr_spec++] = xstrdup(buf->buf + 5);
 		}
 		else
-			die("http transport does not support %s", buf->buf);
+			die(_("http transport does not support %s"), buf->buf);
 
 		strbuf_reset(buf);
 		if (strbuf_getline_lf(buf, stdin) == EOF)
@@ -1220,7 +1220,7 @@ static size_t proxy_in(char *buffer, size_t eltsize,
 		strbuf_reset(&p->request_buffer);
 		switch (packet_reader_read(&p->reader)) {
 		case PACKET_READ_EOF:
-			die("unexpected EOF when reading from parent process");
+			die(_("unexpected EOF when reading from parent process"));
 		case PACKET_READ_NORMAL:
 			packet_buf_write_len(&p->request_buffer, p->reader.line,
 					     p->reader.pktlen);
@@ -1336,7 +1336,7 @@ int cmd_main(int argc, const char **argv)
 
 	setup_git_directory_gently(&nongit);
 	if (argc < 2) {
-		error("remote-curl: usage: git remote-curl <remote> [<url>]");
+		error(_("remote-curl: usage: git remote-curl <remote> [<url>]"));
 		return 1;
 	}
 
@@ -1361,14 +1361,14 @@ int cmd_main(int argc, const char **argv)
 
 		if (strbuf_getline_lf(&buf, stdin) == EOF) {
 			if (ferror(stdin))
-				error("remote-curl: error reading command stream from git");
+				error(_("remote-curl: error reading command stream from git"));
 			return 1;
 		}
 		if (buf.len == 0)
 			break;
 		if (starts_with(buf.buf, "fetch ")) {
 			if (nongit)
-				die("remote-curl: fetch attempted without a local repo");
+				die(_("remote-curl: fetch attempted without a local repo"));
 			parse_fetch(&buf);
 
 		} else if (!strcmp(buf.buf, "list") || starts_with(buf.buf, "list ")) {
@@ -1408,7 +1408,7 @@ int cmd_main(int argc, const char **argv)
 			if (!stateless_connect(arg))
 				break;
 		} else {
-			error("remote-curl: unknown command '%s' from git", buf.buf);
+			error(_("remote-curl: unknown command '%s' from git"), buf.buf);
 			return 1;
 		}
 		strbuf_reset(&buf);
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/1] remote-curl: mark all error messages for translation
  2019-03-05 23:20 [PATCH 0/1] remote-curl: mark all error messages for translation Johannes Schindelin via GitGitGadget
  2019-03-05 23:20 ` [PATCH 1/1] " Johannes Schindelin via GitGitGadget
@ 2019-03-05 23:45 ` Junio C Hamano
  2019-03-05 23:48   ` Junio C Hamano
  1 sibling, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2019-03-05 23:45 UTC (permalink / raw)
  To: Johannes Schindelin via GitGitGadget; +Cc: git

"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
writes:

> As suggested by Jeff King in a nearby thread.
>
> Johannes Schindelin (1):
>   remote-curl: mark all error messages for translation

Does this come on top or below the anonymize patch, or it does not
matter which goes first?

>
>  remote-curl.c | 50 +++++++++++++++++++++++++-------------------------
>  1 file changed, 25 insertions(+), 25 deletions(-)
>
>
> base-commit: c1284b21f2436de24c9559fcc5f4badb04f47773
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-157%2Fdscho%2Fl10n-remote-curl-diag-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-157/dscho/l10n-remote-curl-diag-v1
> Pull-Request: https://github.com/gitgitgadget/git/pull/157

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/1] remote-curl: mark all error messages for translation
  2019-03-05 23:45 ` [PATCH 0/1] " Junio C Hamano
@ 2019-03-05 23:48   ` Junio C Hamano
  2019-03-06 10:05     ` Johannes Schindelin
  0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2019-03-05 23:48 UTC (permalink / raw)
  To: Johannes Schindelin via GitGitGadget; +Cc: git

Junio C Hamano <gitster@pobox.com> writes:

> "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
> writes:
>
>> As suggested by Jeff King in a nearby thread.
>>
>> Johannes Schindelin (1):
>>   remote-curl: mark all error messages for translation
>
> Does this come on top or below the anonymize patch, or it does not
> matter which goes first?

OK, will pile on top of the anonymization thing.

Thanks.

>
>>
>>  remote-curl.c | 50 +++++++++++++++++++++++++-------------------------
>>  1 file changed, 25 insertions(+), 25 deletions(-)
>>
>>
>> base-commit: c1284b21f2436de24c9559fcc5f4badb04f47773
>> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-157%2Fdscho%2Fl10n-remote-curl-diag-v1
>> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-157/dscho/l10n-remote-curl-diag-v1
>> Pull-Request: https://github.com/gitgitgadget/git/pull/157

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/1] remote-curl: mark all error messages for translation
  2019-03-05 23:48   ` Junio C Hamano
@ 2019-03-06 10:05     ` Johannes Schindelin
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Schindelin @ 2019-03-06 10:05 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Johannes Schindelin via GitGitGadget, git

Hi Junio,

On Wed, 6 Mar 2019, Junio C Hamano wrote:

> Junio C Hamano <gitster@pobox.com> writes:
> 
> > "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
> > writes:
> >
> >> As suggested by Jeff King in a nearby thread.
> >>
> >> Johannes Schindelin (1):
> >>   remote-curl: mark all error messages for translation
> >
> > Does this come on top or below the anonymize patch, or it does not
> > matter which goes first?
> 
> OK, will pile on top of the anonymization thing.

Sorry, yes, it is on top of the anonymization thing. I was assuming by
mistake that GitGitGadget would display in the footer on which branch the
PR is based, but it only has the commit hash of the "based-on" commit.

BTW I was expecting the merge conflicts you ran into, that's why I kept
this patch separate from the anonymization thing.

Ciao,
Dscho

> 
> Thanks.
> 
> >
> >>
> >>  remote-curl.c | 50 +++++++++++++++++++++++++-------------------------
> >>  1 file changed, 25 insertions(+), 25 deletions(-)
> >>
> >>
> >> base-commit: c1284b21f2436de24c9559fcc5f4badb04f47773
> >> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-157%2Fdscho%2Fl10n-remote-curl-diag-v1
> >> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-157/dscho/l10n-remote-curl-diag-v1
> >> Pull-Request: https://github.com/gitgitgadget/git/pull/157
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-03-06 10:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-05 23:20 [PATCH 0/1] remote-curl: mark all error messages for translation Johannes Schindelin via GitGitGadget
2019-03-05 23:20 ` [PATCH 1/1] " Johannes Schindelin via GitGitGadget
2019-03-05 23:45 ` [PATCH 0/1] " Junio C Hamano
2019-03-05 23:48   ` Junio C Hamano
2019-03-06 10:05     ` Johannes Schindelin

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).