All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH 05/25] gettextize: git-fetch basic messages
Date: Thu,  2 Sep 2010 19:40:26 +0000	[thread overview]
Message-ID: <1283456446-22577-6-git-send-email-avarab@gmail.com> (raw)
In-Reply-To: <1283373845-2022-1-git-send-email-avarab@gmail.com>

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 builtin/fetch.c |   46 +++++++++++++++++++++++-----------------------
 1 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/builtin/fetch.c b/builtin/fetch.c
index c218657..4c90fc5 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -178,7 +178,7 @@ static struct ref *get_ref_map(struct transport *transport,
 		} else {
 			ref_map = get_remote_ref(remote_refs, "HEAD");
 			if (!ref_map)
-				die("Couldn't find remote ref HEAD");
+				die(_("Couldn't find remote ref HEAD"));
 			ref_map->merge = 1;
 			tail = &ref_map->next;
 		}
@@ -231,7 +231,7 @@ static int update_local_ref(struct ref *ref,
 	*display = 0;
 	type = sha1_object_info(ref->new_sha1, NULL);
 	if (type < 0)
-		die("object %s not found", sha1_to_hex(ref->new_sha1));
+		die(_("object %s not found"), sha1_to_hex(ref->new_sha1));
 
 	if (!hashcmp(ref->old_sha1, ref->new_sha1)) {
 		if (verbosity > 0)
@@ -331,7 +331,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
 
 	fp = fopen(filename, "a");
 	if (!fp)
-		return error("cannot open %s: %s\n", filename, strerror(errno));
+		return error(_("cannot open %s: %s\n"), filename, strerror(errno));
 
 	if (raw_url)
 		url = transport_anonymize_url(raw_url);
@@ -420,9 +420,9 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
 	free(url);
 	fclose(fp);
 	if (rc & STORE_REF_ERROR_DF_CONFLICT)
-		error("some local refs could not be updated; try running\n"
+		error(_("some local refs could not be updated; try running\n"
 		      " 'git remote prune %s' to remove any old, conflicting "
-		      "branches", remote_name);
+		      "branches"), remote_name);
 	return rc;
 }
 
@@ -470,7 +470,7 @@ static int quickfetch(struct ref *ref_map)
 
 	err = start_command(&revlist);
 	if (err) {
-		error("could not run rev-list");
+		error(_("could not run rev-list"));
 		return err;
 	}
 
@@ -484,14 +484,14 @@ static int quickfetch(struct ref *ref_map)
 		if (write_in_full(revlist.in, sha1_to_hex(ref->old_sha1), 40) < 0 ||
 		    write_str_in_full(revlist.in, "\n") < 0) {
 			if (errno != EPIPE && errno != EINVAL)
-				error("failed write to rev-list: %s", strerror(errno));
+				error(_("failed write to rev-list: %s"), strerror(errno));
 			err = -1;
 			break;
 		}
 	}
 
 	if (close(revlist.in)) {
-		error("failed to close rev-list's stdin: %s", strerror(errno));
+		error(_("failed to close rev-list's stdin: %s"), strerror(errno));
 		err = -1;
 	}
 
@@ -644,8 +644,8 @@ static void check_not_current_branch(struct ref *ref_map)
 	for (; ref_map; ref_map = ref_map->next)
 		if (ref_map->peer_ref && !strcmp(current_branch->refname,
 					ref_map->peer_ref->name))
-			die("Refusing to fetch into current branch %s "
-			    "of non-bare repository", current_branch->refname);
+			die(_("Refusing to fetch into current branch %s "
+			    "of non-bare repository"), current_branch->refname);
 }
 
 static int truncate_fetch_head(void)
@@ -654,7 +654,7 @@ static int truncate_fetch_head(void)
 	FILE *fp = fopen(filename, "w");
 
 	if (!fp)
-		return error("cannot open %s: %s\n", filename, strerror(errno));
+		return error(_("cannot open %s: %s\n"), filename, strerror(errno));
 	fclose(fp);
 	return 0;
 }
@@ -678,7 +678,7 @@ static int do_fetch(struct transport *transport,
 	}
 
 	if (!transport->get_refs_list || !transport->fetch)
-		die("Don't know how to fetch from %s", transport->url);
+		die(_("Don't know how to fetch from %s"), transport->url);
 
 	/* if not appending, truncate FETCH_HEAD */
 	if (!append && !dry_run) {
@@ -732,10 +732,10 @@ static void set_option(const char *name, const char *value)
 {
 	int r = transport_set_option(transport, name, value);
 	if (r < 0)
-		die("Option \"%s\" value \"%s\" is not valid for %s",
+		die(_("Option \"%s\" value \"%s\" is not valid for %s"),
 			name, value, transport->url);
 	if (r > 0)
-		warning("Option \"%s\" is ignored for %s\n",
+		warning(_("Option \"%s\" is ignored for %s\n"),
 			name, transport->url);
 }
 
@@ -824,9 +824,9 @@ static int fetch_multiple(struct string_list *list)
 		argv[argc] = name;
 		argv[argc + 1] = NULL;
 		if (verbosity >= 0)
-			printf("Fetching %s\n", name);
+			printf(_("Fetching %s\n"), name);
 		if (run_command_v_opt(argv, RUN_GIT_CMD)) {
-			error("Could not fetch %s", name);
+			error(_("Could not fetch %s"), name);
 			result = 1;
 		}
 	}
@@ -842,8 +842,8 @@ static int fetch_one(struct remote *remote, int argc, const char **argv)
 	int exit_code;
 
 	if (!remote)
-		die("No remote repository specified.  Please, specify either a URL or a\n"
-		    "remote name from which new revisions should be fetched.");
+		die(_("No remote repository specified.  Please, specify either a URL or a\n"
+		    "remote name from which new revisions should be fetched."));
 
 	transport = transport_get(remote, NULL);
 	transport_set_verbosity(transport, verbosity, progress);
@@ -862,7 +862,7 @@ static int fetch_one(struct remote *remote, int argc, const char **argv)
 				char *ref;
 				i++;
 				if (i >= argc)
-					die("You need to specify a tag name.");
+					die(_("You need to specify a tag name."));
 				ref = xmalloc(strlen(argv[i]) * 2 + 22);
 				strcpy(ref, "refs/tags/");
 				strcat(ref, argv[i]);
@@ -902,9 +902,9 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
 
 	if (all) {
 		if (argc == 1)
-			die("fetch --all does not take a repository argument");
+			die(_("fetch --all does not take a repository argument"));
 		else if (argc > 1)
-			die("fetch --all does not make sense with refspecs");
+			die(_("fetch --all does not make sense with refspecs"));
 		(void) for_each_remote(get_one_remote_for_fetch, &list);
 		result = fetch_multiple(&list);
 	} else if (argc == 0) {
@@ -915,7 +915,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
 		/* All arguments are assumed to be remotes or groups */
 		for (i = 0; i < argc; i++)
 			if (!add_remote_or_group(argv[i], &list))
-				die("No such remote or remote group: %s", argv[i]);
+				die(_("No such remote or remote group: %s"), argv[i]);
 		result = fetch_multiple(&list);
 	} else {
 		/* Single remote or group */
@@ -923,7 +923,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
 		if (list.nr > 1) {
 			/* More than one remote */
 			if (argc > 1)
-				die("Fetching a group and specifying refspecs does not make sense");
+				die(_("Fetching a group and specifying refspecs does not make sense"));
 			result = fetch_multiple(&list);
 		} else {
 			/* Zero or one remotes */
-- 
1.7.2.2.614.g1dc9

  parent reply	other threads:[~2010-09-02 19:41 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-01 20:43 [PATCH 00/13] gettextize the first 4 C mainporcelain common commands Ævar Arnfjörð Bjarmason
2010-09-01 20:43 ` [PATCH 01/13] git-clone: use builtin.h to get gettext.h Ævar Arnfjörð Bjarmason
2010-09-01 20:43 ` [PATCH 02/13] gettextize: git-clone basic messages Ævar Arnfjörð Bjarmason
2010-09-01 20:43 ` [PATCH 03/13] gettextize: git-clone "Cloning into" message Ævar Arnfjörð Bjarmason
2010-09-01 20:43 ` [PATCH 04/13] gettextize: git-add basic messages Ævar Arnfjörð Bjarmason
2010-09-01 20:43 ` [PATCH 05/13] gettextize: git-add refresh_index message Ævar Arnfjörð Bjarmason
2010-09-02  4:21   ` Jonathan Nieder
2010-09-01 20:43 ` [PATCH 06/13] gettextize: git-branch basic messages Ævar Arnfjörð Bjarmason
2010-09-01 20:43 ` [PATCH 07/13] gettextize: git-branch "remote branch '%s' not found" message Ævar Arnfjörð Bjarmason
2010-09-01 20:44 ` [PATCH 08/13] gettextize: git-branch "git branch -v" messages Ævar Arnfjörð Bjarmason
2010-09-01 20:44 ` [PATCH 09/13] gettextize: git-branch "(no branch)" message Ævar Arnfjörð Bjarmason
2010-09-01 20:44 ` [PATCH 10/13] gettextize: git-checkout: our/their version message Ævar Arnfjörð Bjarmason
2010-09-01 20:44 ` [PATCH 11/13] gettextize: git-checkout basic messages Ævar Arnfjörð Bjarmason
2010-09-01 20:44 ` [PATCH 12/13] gettextize: git-checkout describe_detached_head messages Ævar Arnfjörð Bjarmason
2010-09-01 20:44 ` [PATCH 13/13] gettextize: git-checkout "Switched to a .. branch" message Ævar Arnfjörð Bjarmason
2010-09-02 19:40 ` [PATCH 00/25] [CONTINUED] gettextize all C mainporcelain common commands Ævar Arnfjörð Bjarmason
2010-09-02 19:40 ` [PATCH 01/25] gettextize: git-commit basic messages Ævar Arnfjörð Bjarmason
2010-09-02 19:40 ` [PATCH 02/25] gettextize: git-commit formatting messages Ævar Arnfjörð Bjarmason
2010-09-02 19:40 ` [PATCH 03/25] gettextize: git-commit advice messages Ævar Arnfjörð Bjarmason
2010-09-02 19:40 ` [PATCH 04/25] gettextize: git-diff basic messages Ævar Arnfjörð Bjarmason
2010-09-02 19:40 ` Ævar Arnfjörð Bjarmason [this message]
2010-09-02 19:40 ` [PATCH 06/25] gettextize: git-fetch formatting messages Ævar Arnfjörð Bjarmason
2010-09-02 19:59   ` Jonathan Nieder
2010-09-02 20:13     ` Ævar Arnfjörð Bjarmason
2010-09-02 20:28     ` Jeff King
2010-09-02 20:48       ` Ævar Arnfjörð Bjarmason
2010-09-02 19:40 ` [PATCH 07/25] gettextize: git-grep basic messages Ævar Arnfjörð Bjarmason
2010-09-02 19:40 ` [PATCH 08/25] gettextize: git-log " Ævar Arnfjörð Bjarmason
2010-09-02 19:40 ` [PATCH 09/25] gettextize: git-format-patch --cover-letter message Ævar Arnfjörð Bjarmason
2010-09-02 19:40 ` [PATCH 10/25] gettextize: git-merge basic messages Ævar Arnfjörð Bjarmason
2010-09-02 20:09   ` Jonathan Nieder
2010-09-02 20:30     ` Ævar Arnfjörð Bjarmason
2010-09-02 20:37       ` Jonathan Nieder
2010-09-02 20:54         ` Ævar Arnfjörð Bjarmason
2010-09-02 21:13           ` Jonathan Nieder
2010-09-02 22:45             ` Ævar Arnfjörð Bjarmason
2010-09-02 23:04               ` Jonathan Nieder
2010-09-03 12:13                 ` Ævar Arnfjörð Bjarmason
2010-09-03 17:51                   ` Jonathan Nieder
2010-09-03 18:06                     ` Ævar Arnfjörð Bjarmason
2010-09-03 13:01         ` Ævar Arnfjörð Bjarmason
2010-09-02 19:40 ` [PATCH 11/25] gettextize: git-merge "In-index merge" message Ævar Arnfjörð Bjarmason
2010-09-02 19:40 ` [PATCH 12/25] gettextize: git-merge "Merge made by %s." message Ævar Arnfjörð Bjarmason
2010-09-02 19:40 ` [PATCH 13/25] gettextize: git-merge remaining cmd_merge messages Ævar Arnfjörð Bjarmason
2010-09-02 19:40 ` [PATCH 14/25] gettextize: git-mv basic messages Ævar Arnfjörð Bjarmason
2010-09-02 19:40 ` [PATCH 15/25] gettextize: git-mv "bad" messages Ævar Arnfjörð Bjarmason
2010-09-02 19:40 ` [PATCH 16/25] gettextize: git-rm basic messages Ævar Arnfjörð Bjarmason
2010-09-02 19:40 ` [PATCH 17/25] builtin: use builtin.h in git-reset Ævar Arnfjörð Bjarmason
2010-09-02 19:40 ` [PATCH 18/25] gettextize: git-reset basic messages Ævar Arnfjörð Bjarmason
2010-09-02 19:40 ` [PATCH 19/25] gettextize: git-reset reset_type_names messages Ævar Arnfjörð Bjarmason
2010-09-15 11:17   ` Peter Krefting
2010-09-15 15:50     ` Thomas Rast
2010-09-02 19:40 ` [PATCH 20/25] gettextize: git-tag basic messages Ævar Arnfjörð Bjarmason
2010-09-02 19:40 ` [PATCH 21/25] gettextize: git-tag tag_template message Ævar Arnfjörð Bjarmason
2010-09-02 19:40 ` [PATCH 22/25] gettextize: git-push basic messages Ævar Arnfjörð Bjarmason
2010-09-02 19:40 ` [PATCH 23/25] builtin: use builtin.h in git-status Ævar Arnfjörð Bjarmason
2010-09-02 19:40 ` [PATCH 24/25] gettextize: git-status basic messages Ævar Arnfjörð Bjarmason
2010-09-02 20:28   ` Jonathan Nieder
2010-09-02 20:41     ` Ævar Arnfjörð Bjarmason
2010-09-02 20:47       ` Jonathan Nieder
2010-09-02 19:40 ` [PATCH 25/25] gettextize: git-status shortstatus messages Ævar Arnfjörð Bjarmason
2010-09-02 20:25   ` Jonathan Nieder
2010-09-02 20:34     ` Ævar Arnfjörð Bjarmason

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=1283456446-22577-6-git-send-email-avarab@gmail.com \
    --to=avarab@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.
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.