git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH 08/22] convert.c: mark strings for translation
Date: Sat, 27 Feb 2016 13:41:59 +0700	[thread overview]
Message-ID: <1456555333-5853-9-git-send-email-pclouds@gmail.com> (raw)
In-Reply-To: <1456555333-5853-1-git-send-email-pclouds@gmail.com>

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

diff --git a/convert.c b/convert.c
index f524b8d..59d03b0 100644
--- a/convert.c
+++ b/convert.c
@@ -199,9 +199,11 @@ static void check_safe_crlf(const char *path, enum crlf_action crlf_action,
 		 */
 		if (stats->crlf) {
 			if (checksafe == SAFE_CRLF_WARN)
-				warning("CRLF will be replaced by LF in %s.\nThe file will have its original line endings in your working directory.", path);
+				warning(_("CRLF will be replaced by LF in %s.\n"
+					  "The file will have its original line "
+					  "endings in your working directory."), path);
 			else /* i.e. SAFE_CRLF_FAIL */
-				die("CRLF would be replaced by LF in %s.", path);
+				die(_("CRLF would be replaced by LF in %s."), path);
 		}
 	} else if (output_eol(crlf_action) == EOL_CRLF) {
 		/*
@@ -210,9 +212,11 @@ static void check_safe_crlf(const char *path, enum crlf_action crlf_action,
 		 */
 		if (stats->lonelf) {
 			if (checksafe == SAFE_CRLF_WARN)
-				warning("LF will be replaced by CRLF in %s.\nThe file will have its original line endings in your working directory.", path);
+				warning(_("LF will be replaced by CRLF in %s.\n"
+					  "The file will have its original line "
+					  "endings in your working directory."), path);
 			else /* i.e. SAFE_CRLF_FAIL */
-				die("LF would be replaced by CRLF in %s", path);
+				die(_("LF would be replaced by CRLF in %s"), path);
 		}
 	}
 }
@@ -397,7 +401,7 @@ static int filter_buffer_or_fd(int in, int out, void *data)
 	child_process.out = out;
 
 	if (start_command(&child_process))
-		return error("cannot fork to run external filter %s", params->cmd);
+		return error(_("cannot fork to run external filter %s"), params->cmd);
 
 	sigchain_push(SIGPIPE, SIG_IGN);
 
@@ -415,13 +419,13 @@ static int filter_buffer_or_fd(int in, int out, void *data)
 	if (close(child_process.in))
 		write_err = 1;
 	if (write_err)
-		error("cannot feed the input to external filter %s", params->cmd);
+		error(_("cannot feed the input to external filter %s"), params->cmd);
 
 	sigchain_pop(SIGPIPE);
 
 	status = finish_command(&child_process);
 	if (status)
-		error("external filter %s failed %d", params->cmd, status);
+		error(_("external filter %s failed %d"), params->cmd, status);
 
 	strbuf_release(&cmd);
 	return (write_err || status);
@@ -462,15 +466,15 @@ static int apply_filter(const char *path, const char *src, size_t len, int fd,
 		return 0;	/* error was already reported */
 
 	if (strbuf_read(&nbuf, async.out, len) < 0) {
-		error("read from external filter %s failed", cmd);
+		error(_("read from external filter %s failed"), cmd);
 		ret = 0;
 	}
 	if (close(async.out)) {
-		error("read from external filter %s failed", cmd);
+		error(_("read from external filter %s failed"), cmd);
 		ret = 0;
 	}
 	if (finish_async(&async)) {
-		error("external filter %s failed", cmd);
+		error(_("external filter %s failed"), cmd);
 		ret = 0;
 	}
 
@@ -868,7 +872,7 @@ int convert_to_git(const char *path, const char *src, size_t len,
 
 	ret |= apply_filter(path, src, len, -1, dst, filter);
 	if (!ret && required)
-		die("%s: clean filter '%s' failed", path, ca.drv->name);
+		die(_("%s: clean filter '%s' failed"), path, ca.drv->name);
 
 	if (ret && dst) {
 		src = dst->buf;
@@ -892,7 +896,7 @@ void convert_to_git_filter_fd(const char *path, int fd, struct strbuf *dst,
 	assert(ca.drv->clean);
 
 	if (!apply_filter(path, NULL, 0, fd, dst, ca.drv->clean))
-		die("%s: clean filter '%s' failed", path, ca.drv->name);
+		die(_("%s: clean filter '%s' failed"), path, ca.drv->name);
 
 	crlf_to_git(path, dst->buf, dst->len, dst, ca.crlf_action, checksafe);
 	ident_to_git(path, dst->buf, dst->len, dst, ca.ident);
@@ -932,7 +936,7 @@ static int convert_to_working_tree_internal(const char *path, const char *src,
 
 	ret_filter = apply_filter(path, src, len, -1, dst, filter);
 	if (!ret_filter && required)
-		die("%s: smudge filter %s failed", path, ca.drv->name);
+		die(_("%s: smudge filter %s failed"), path, ca.drv->name);
 
 	return ret | ret_filter;
 }
-- 
2.8.0.rc0.205.g7ec8cf1

  parent reply	other threads:[~2016-02-27  6:42 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-27  6:41 [PATCH 00/22] Mark more strings for translation Nguyễn Thái Ngọc Duy
2016-02-27  6:41 ` [PATCH 01/22] credential-cache--daemon: enable localized messages Nguyễn Thái Ngọc Duy
2016-02-27  6:41 ` [PATCH 02/22] builtin/blame.c: mark strings for translation Nguyễn Thái Ngọc Duy
2016-02-28 18:57   ` Junio C Hamano
2016-02-29  0:33     ` Duy Nguyen
2016-02-29 18:22       ` Junio C Hamano
2016-02-27  6:41 ` [PATCH 03/22] builtin/checkout.c: " Nguyễn Thái Ngọc Duy
2016-02-28 19:00   ` Junio C Hamano
2016-02-27  6:41 ` [PATCH 04/22] builtin/clone.c: " Nguyễn Thái Ngọc Duy
2016-02-28 19:05   ` Junio C Hamano
2016-02-27  6:41 ` [PATCH 05/22] builtin/config.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:25   ` Junio C Hamano
2016-02-27  6:41 ` [PATCH 06/22] " Nguyễn Thái Ngọc Duy
2016-02-27  6:41 ` [PATCH 07/22] builtin/update-index.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:27   ` Junio C Hamano
2016-02-27  6:41 ` Nguyễn Thái Ngọc Duy [this message]
2016-02-29 18:29   ` [PATCH 08/22] convert.c: " Junio C Hamano
2016-02-27  6:42 ` [PATCH 09/22] credential-cache--daemon.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:30   ` Junio C Hamano
2016-02-27  6:42 ` [PATCH 10/22] http.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:31   ` Junio C Hamano
2016-02-27  6:42 ` [PATCH 11/22] ident.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:34   ` Junio C Hamano
2016-03-01 14:56     ` Jeff King
2016-02-27  6:42 ` [PATCH 12/22] notes.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:36   ` Junio C Hamano
2016-02-27  6:42 ` [PATCH 13/22] ref-filter.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:41   ` Junio C Hamano
2016-02-27  6:42 ` [PATCH 14/22] refs/files-backend.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:43   ` Junio C Hamano
2016-03-01 10:40     ` Duy Nguyen
2016-02-27  6:42 ` [PATCH 15/22] remote-curl.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:50   ` Junio C Hamano
2016-02-27  6:42 ` [PATCH 16/22] run-command.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:52   ` Junio C Hamano
2016-03-01  0:00     ` Stefan Beller
2016-02-27  6:42 ` [PATCH 17/22] sha1_file.c: " Nguyễn Thái Ngọc Duy
2016-02-27  6:42 ` [PATCH 18/22] submodule.c: " Nguyễn Thái Ngọc Duy
2016-02-27  6:42 ` [PATCH 19/22] trailer.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:55   ` Junio C Hamano
2016-02-27  6:42 ` [PATCH 20/22] transport-helper.c: mark strings for translating Nguyễn Thái Ngọc Duy
2016-02-27  6:42 ` [PATCH 21/22] transport.c: " Nguyễn Thái Ngọc Duy
2016-02-27  6:42 ` [PATCH 22/22] wrapper.c: mark strings for translation Nguyễn Thái Ngọc Duy
2016-02-27 17:34 ` [PATCH 00/22] Mark more " Junio C Hamano
2016-02-27 19:00   ` Junio C Hamano
2016-02-28  0:43   ` Duy Nguyen

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=1456555333-5853-9-git-send-email-pclouds@gmail.com \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
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).