i18n: git-push basic messages
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ævar Arnfjörð Bjarmason committed
Feb 22, 2011 at 23:42 UTC
8352d29e00a307698a3438ce4c094827c6f5dcaf
1 file changed
+19
-19
builtin/push.c
+19
-19
@@ -40,7 +40,7 @@ static void set_refspecs(const char **refs, int nr)
40
char *tag;
41
int len;
42
if (nr <= ++i)
43
- die("tag shorthand without <tag>");
43
+ die(_("tag shorthand without <tag>"));
44
len = strlen(refs[i]) + 11;
45
if (deleterefs) {
46
tag = xmalloc(len+1);
@@ -59,7 +59,7 @@ static void set_refspecs(const char **refs, int nr)
59
strcat(delref, ref);
60
ref = delref;
61
} else if (deleterefs)
62
- die("--delete only accepts plain target ref names");
62
+ die(_("--delete only accepts plain target ref names"));
63
add_refspec(ref);
64
}
65
}
@@ -69,13 +69,13 @@ static void setup_push_tracking(void)
69
struct strbuf refspec = STRBUF_INIT;
70
struct branch *branch = branch_get(NULL);
71
if (!branch)
72
- die("You are not currently on a branch.");
72
+ die(_("You are not currently on a branch."));
73
if (!branch->merge_nr || !branch->merge)
74
- die("The current branch %s is not tracking anything.",
74
+ die(_("The current branch %s is not tracking anything."),
75
branch->name);
76
if (branch->merge_nr != 1)
77
- die("The current branch %s is tracking multiple branches, "
78
- "refusing to push.", branch->name);
77
+ die(_("The current branch %s is tracking multiple branches, "
78
+ "refusing to push."), branch->name);
79
strbuf_addf(&refspec, "%s:%s", branch->name, branch->merge[0]->src);
80
add_refspec(refspec.buf);
81
}
@@ -97,8 +97,8 @@ static void setup_default_push_refspecs(void)
97
break;
98
99
case PUSH_DEFAULT_NOTHING:
100
- die("You didn't specify any refspecs to push, and "
101
- "push.default is \"nothing\".");
100
+ die(_("You didn't specify any refspecs to push, and "
101
+ "push.default is \"nothing\"."));
102
break;
103
}
104
}
@@ -117,11 +117,11 @@ static int push_with_options(struct transport *transport, int flags)
117
transport_set_option(transport, TRANS_OPT_THIN, "yes");
118
119
if (verbosity > 0)
120
- fprintf(stderr, "Pushing to %s\n", transport->url);
120
+ fprintf(stderr, _("Pushing to %s\n"), transport->url);
121
err = transport_push(transport, refspec_nr, refspec, flags,
122
&nonfastforward);
123
if (err != 0)
124
- error("failed to push some refs to '%s'", transport->url);
124
+ error(_("failed to push some refs to '%s'"), transport->url);
125
126
err |= transport_disconnect(transport);
127
@@ -146,8 +146,8 @@ static int do_push(const char *repo, int flags)
146
147
if (!remote) {
148
if (repo)
149
- die("bad repository '%s'", repo);
150
- die("No destination configured to push to.");
149
+ die(_("bad repository '%s'"), repo);
150
+ die(_("No destination configured to push to."));
151
}
152
153
if (remote->mirror)
@@ -155,19 +155,19 @@ static int do_push(const char *repo, int flags)
155
156
if ((flags & TRANSPORT_PUSH_ALL) && refspec) {
157
if (!strcmp(*refspec, "refs/tags/*"))
158
- return error("--all and --tags are incompatible");
159
- return error("--all can't be combined with refspecs");
158
+ return error(_("--all and --tags are incompatible"));
159
+ return error(_("--all can't be combined with refspecs"));
160
}
161
162
if ((flags & TRANSPORT_PUSH_MIRROR) && refspec) {
163
if (!strcmp(*refspec, "refs/tags/*"))
164
- return error("--mirror and --tags are incompatible");
165
- return error("--mirror can't be combined with refspecs");
164
+ return error(_("--mirror and --tags are incompatible"));
165
+ return error(_("--mirror can't be combined with refspecs"));
166
}
167
168
if ((flags & (TRANSPORT_PUSH_ALL|TRANSPORT_PUSH_MIRROR)) ==
169
(TRANSPORT_PUSH_ALL|TRANSPORT_PUSH_MIRROR)) {
170
- return error("--all and --mirror are incompatible");
170
+ return error(_("--all and --mirror are incompatible"));
171
}
172
173
if (!refspec && !(flags & TRANSPORT_PUSH_ALL)) {
@@ -232,9 +232,9 @@ int cmd_push(int argc, const char **argv, const char *prefix)
232
argc = parse_options(argc, argv, prefix, options, push_usage, 0);
233
234
if (deleterefs && (tags || (flags & (TRANSPORT_PUSH_ALL | TRANSPORT_PUSH_MIRROR))))
235
- die("--delete is incompatible with --all, --mirror and --tags");
235
+ die(_("--delete is incompatible with --all, --mirror and --tags"));
236
if (deleterefs && argc < 2)
237
- die("--delete doesn't make sense without any refs");
237
+ die(_("--delete doesn't make sense without any refs"));
238
239
if (tags)
240
add_refspec("refs/tags/*");