All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: pclouds@gmail.com
Cc: git@vger.kernel.org, Eric Sunshine <sunshine@sunshineco.com>
Subject: [PATCH v2 16/23] pkt-line.c: mark more strings for translation
Date: Sun,  3 Jun 2018 18:34:13 +0200	[thread overview]
Message-ID: <20180603163420.13702-17-pclouds@gmail.com> (raw)
In-Reply-To: <20180603163420.13702-1-pclouds@gmail.com>

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 pkt-line.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/pkt-line.c b/pkt-line.c
index 941e41dfc1..04d10bbd03 100644
--- a/pkt-line.c
+++ b/pkt-line.c
@@ -101,7 +101,7 @@ int packet_flush_gently(int fd)
 {
 	packet_trace("0000", 4, 1);
 	if (write_in_full(fd, "0000", 4) < 0)
-		return error("flush packet write failed");
+		return error(_("flush packet write failed"));
 	return 0;
 }
 
@@ -139,7 +139,7 @@ static void format_packet(struct strbuf *out, const char *fmt, va_list args)
 	n = out->len - orig_len;
 
 	if (n > LARGE_PACKET_MAX)
-		die("protocol error: impossibly long line");
+		die(_("protocol error: impossibly long line"));
 
 	set_packet_header(&out->buf[orig_len], n);
 	packet_trace(out->buf + orig_len + 4, n - 4, 1);
@@ -155,9 +155,9 @@ static int packet_write_fmt_1(int fd, int gently,
 	if (write_in_full(fd, buf.buf, buf.len) < 0) {
 		if (!gently) {
 			check_pipe(errno);
-			die_errno("packet write with format failed");
+			die_errno(_("packet write with format failed"));
 		}
-		return error("packet write with format failed");
+		return error(_("packet write with format failed"));
 	}
 
 	return 0;
@@ -189,21 +189,21 @@ static int packet_write_gently(const int fd_out, const char *buf, size_t size)
 	size_t packet_size;
 
 	if (size > sizeof(packet_write_buffer) - 4)
-		return error("packet write failed - data exceeds max packet size");
+		return error(_("packet write failed - data exceeds max packet size"));
 
 	packet_trace(buf, size, 1);
 	packet_size = size + 4;
 	set_packet_header(packet_write_buffer, packet_size);
 	memcpy(packet_write_buffer + 4, buf, size);
 	if (write_in_full(fd_out, packet_write_buffer, packet_size) < 0)
-		return error("packet write failed");
+		return error(_("packet write failed"));
 	return 0;
 }
 
 void packet_write(int fd_out, const char *buf, size_t size)
 {
 	if (packet_write_gently(fd_out, buf, size))
-		die_errno("packet write failed");
+		die_errno(_("packet write failed"));
 }
 
 void packet_buf_write(struct strbuf *buf, const char *fmt, ...)
@@ -225,7 +225,7 @@ void packet_buf_write_len(struct strbuf *buf, const char *data, size_t len)
 	n = buf->len - orig_len;
 
 	if (n > LARGE_PACKET_MAX)
-		die("protocol error: impossibly long line");
+		die(_("protocol error: impossibly long line"));
 
 	set_packet_header(&buf->buf[orig_len], n);
 	packet_trace(data, len, 1);
@@ -288,7 +288,7 @@ static int get_packet_data(int fd, char **src_buf, size_t *src_size,
 	} else {
 		ret = read_in_full(fd, dst, size);
 		if (ret < 0)
-			die_errno("read error");
+			die_errno(_("read error"));
 	}
 
 	/* And complain if we didn't get enough bytes to satisfy the read. */
@@ -296,7 +296,7 @@ static int get_packet_data(int fd, char **src_buf, size_t *src_size,
 		if (options & PACKET_READ_GENTLE_ON_EOF)
 			return -1;
 
-		die("the remote end hung up unexpectedly");
+		die(_("the remote end hung up unexpectedly"));
 	}
 
 	return ret;
@@ -324,7 +324,7 @@ enum packet_read_status packet_read_with_status(int fd, char **src_buffer,
 	len = packet_length(linelen);
 
 	if (len < 0) {
-		die("protocol error: bad line length character: %.4s", linelen);
+		die(_("protocol error: bad line length character: %.4s"), linelen);
 	} else if (!len) {
 		packet_trace("0000", 4, 0);
 		*pktlen = 0;
@@ -334,12 +334,12 @@ enum packet_read_status packet_read_with_status(int fd, char **src_buffer,
 		*pktlen = 0;
 		return PACKET_READ_DELIM;
 	} else if (len < 4) {
-		die("protocol error: bad line length %d", len);
+		die(_("protocol error: bad line length %d"), len);
 	}
 
 	len -= 4;
 	if ((unsigned)len >= size)
-		die("protocol error: bad line length %d", len);
+		die(_("protocol error: bad line length %d"), len);
 
 	if (get_packet_data(fd, src_buffer, src_len, buffer, len, options) < 0) {
 		*pktlen = -1;
-- 
2.18.0.rc0.333.g22e6ee6cdf


  parent reply	other threads:[~2018-06-03 16:35 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-02  4:32 [PATCH 00/22] Mark more strings for translation Nguyễn Thái Ngọc Duy
2018-06-02  4:32 ` [PATCH 01/22] archive-tar.c: mark " Nguyễn Thái Ngọc Duy
2018-06-02  4:32 ` [PATCH 02/22] archive-zip.c: " Nguyễn Thái Ngọc Duy
2018-06-02  6:17   ` Duy Nguyen
2018-06-03 18:27     ` brian m. carlson
2018-06-02  4:32 ` [PATCH 03/22] builtin/config.c: " Nguyễn Thái Ngọc Duy
2018-06-03  9:01   ` Eric Sunshine
2018-06-03 15:00     ` Duy Nguyen
2018-06-02  4:32 ` [PATCH 04/22] builtin/grep.c: mark strings for translation and no full stops Nguyễn Thái Ngọc Duy
2018-06-02  4:32 ` [PATCH 05/22] builtin/pack-objects.c: mark more strings for translation Nguyễn Thái Ngọc Duy
2018-06-02  4:32 ` [PATCH 06/22] builtin/replace.c: " Nguyễn Thái Ngọc Duy
2018-06-03  8:41   ` Eric Sunshine
2018-06-02  4:32 ` [PATCH 07/22] commit-graph.c: " Nguyễn Thái Ngọc Duy
2018-06-02  4:32 ` [PATCH 08/22] config.c: " Nguyễn Thái Ngọc Duy
2018-06-03  8:51   ` Eric Sunshine
2018-06-02  4:32 ` [PATCH 09/22] connect.c: " Nguyễn Thái Ngọc Duy
2018-06-03  8:55   ` Eric Sunshine
2018-06-02  4:32 ` [PATCH 10/22] convert.c: " Nguyễn Thái Ngọc Duy
2018-06-03  8:46   ` Eric Sunshine
2018-06-02  4:32 ` [PATCH 11/22] dir.c: " Nguyễn Thái Ngọc Duy
2018-06-03  8:47   ` Eric Sunshine
2018-06-02  4:32 ` [PATCH 12/22] environment.c: " Nguyễn Thái Ngọc Duy
2018-06-02  4:32 ` [PATCH 13/22] exec-cmd.c: " Nguyễn Thái Ngọc Duy
2018-06-02  4:32 ` [PATCH 14/22] object.c: " Nguyễn Thái Ngọc Duy
2018-06-02  4:32 ` [PATCH 15/22] pkt-line.c: " Nguyễn Thái Ngọc Duy
2018-06-02  4:32 ` [PATCH 16/22] refs.c: " Nguyễn Thái Ngọc Duy
2018-06-03  8:08   ` Eric Sunshine
2018-06-02  4:32 ` [PATCH 17/22] refspec.c: " Nguyễn Thái Ngọc Duy
2018-06-02  4:32 ` [PATCH 18/22] replace-object.c: " Nguyễn Thái Ngọc Duy
2018-06-02  4:32 ` [PATCH 19/22] sequencer.c: " Nguyễn Thái Ngọc Duy
2018-06-03  8:16   ` Eric Sunshine
2018-06-03 15:14     ` Duy Nguyen
2018-06-03 18:27       ` Eric Sunshine
2018-06-02  4:32 ` [PATCH 20/22] sha1-file.c: " Nguyễn Thái Ngọc Duy
2018-06-03  8:13   ` Eric Sunshine
2018-06-02  4:32 ` [PATCH 21/22] transport.c: " Nguyễn Thái Ngọc Duy
2018-06-03  8:29   ` Eric Sunshine
2018-06-03 15:17     ` Duy Nguyen
2018-06-02  4:32 ` [PATCH 22/22] transport-helper.c: " Nguyễn Thái Ngọc Duy
2018-06-03  8:32   ` Eric Sunshine
2018-06-03 16:33 ` [PATCH v2 00/23] Mark " Nguyễn Thái Ngọc Duy
2018-06-03 16:33   ` [PATCH v2 01/23] Update messages in preparation for i18n Nguyễn Thái Ngọc Duy
2018-06-03 16:33   ` [PATCH v2 02/23] archive-tar.c: mark more strings for translation Nguyễn Thái Ngọc Duy
2018-06-03 16:34   ` [PATCH v2 03/23] archive-zip.c: " Nguyễn Thái Ngọc Duy
2018-06-03 16:34   ` [PATCH v2 04/23] builtin/config.c: " Nguyễn Thái Ngọc Duy
2018-06-03 16:34   ` [PATCH v2 05/23] builtin/grep.c: mark strings for translation and no full stops Nguyễn Thái Ngọc Duy
2018-06-03 16:34   ` [PATCH v2 06/23] builtin/pack-objects.c: mark more strings for translation Nguyễn Thái Ngọc Duy
2018-06-03 16:34   ` [PATCH v2 07/23] builtin/replace.c: " Nguyễn Thái Ngọc Duy
2018-06-03 16:34   ` [PATCH v2 08/23] commit-graph.c: " Nguyễn Thái Ngọc Duy
2018-06-03 16:34   ` [PATCH v2 09/23] config.c: " Nguyễn Thái Ngọc Duy
2018-06-03 16:34   ` [PATCH v2 10/23] connect.c: " Nguyễn Thái Ngọc Duy
2018-06-03 16:34   ` [PATCH v2 11/23] convert.c: " Nguyễn Thái Ngọc Duy
2018-06-03 16:34   ` [PATCH v2 12/23] dir.c: " Nguyễn Thái Ngọc Duy
2018-06-03 16:34   ` [PATCH v2 13/23] environment.c: " Nguyễn Thái Ngọc Duy
2018-06-03 16:34   ` [PATCH v2 14/23] exec-cmd.c: " Nguyễn Thái Ngọc Duy
2018-06-03 16:34   ` [PATCH v2 15/23] object.c: " Nguyễn Thái Ngọc Duy
2018-06-03 16:34   ` Nguyễn Thái Ngọc Duy [this message]
2018-06-03 16:34   ` [PATCH v2 17/23] refs.c: " Nguyễn Thái Ngọc Duy
2018-06-03 16:34   ` [PATCH v2 18/23] refspec.c: " Nguyễn Thái Ngọc Duy
2018-06-03 16:34   ` [PATCH v2 19/23] replace-object.c: " Nguyễn Thái Ngọc Duy
2018-06-03 16:34   ` [PATCH v2 20/23] sequencer.c: " Nguyễn Thái Ngọc Duy
2018-06-03 16:34   ` [PATCH v2 21/23] sha1-file.c: " Nguyễn Thái Ngọc Duy
2018-06-03 16:34   ` [PATCH v2 22/23] transport.c: " Nguyễn Thái Ngọc Duy
2018-06-03 16:34   ` [PATCH v2 23/23] transport-helper.c: " Nguyễn Thái Ngọc Duy
2018-07-18 16:10 [PATCH v2 00/23] Mark " Nguyễn Thái Ngọc Duy
2018-07-18 16:10 ` [PATCH v2 16/23] pkt-line.c: mark more " Nguyễn Thái Ngọc Duy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180603163420.13702-17-pclouds@gmail.com \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.