summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-03-04 13:46:20 -0800
committerJunio C Hamano <gitster@pobox.com>2016-03-04 13:46:20 -0800
commit49a435219730b8a0be22887f9e9c4d94b36d3f1f (patch)
tree5ab915174a48e8fbb0ec9eaa34e9b846eb54a153
parent01942002b3cb88f607a5e97b9fa5d1b104e07af5 (diff)
parent13ad56f848976adc32fd190b4ab03f00360d40e8 (diff)
downloadgit-49a435219730b8a0be22887f9e9c4d94b36d3f1f.tar.gz
Merge branch 'nd/i18n-2.8.0'
* nd/i18n-2.8.0: trailer.c: mark strings for translation ref-filter.c: mark strings for translation builtin/clone.c: mark strings for translation builtin/checkout.c: mark strings for translation
-rw-r--r--builtin/checkout.c2
-rw-r--r--builtin/clone.c10
-rw-r--r--ref-filter.c28
-rw-r--r--trailer.c2
4 files changed, 21 insertions, 21 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index cfa66e25eb..efcbd8f6b5 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -662,7 +662,7 @@ static void update_refs_for_switch(const struct checkout_opts *opts,
}
} else if (new->path) { /* Switch branches. */
if (create_symref("HEAD", new->path, msg.buf) < 0)
- die("unable to update HEAD");
+ die(_("unable to update HEAD"));
if (!opts->quiet) {
if (old->path && !strcmp(new->path, old->path)) {
if (opts->new_branch_force)
diff --git a/builtin/clone.c b/builtin/clone.c
index 9ac6c01442..661639255c 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -236,8 +236,8 @@ static char *guess_dir_name(const char *repo, int is_bundle, int is_bare)
strip_suffix_mem(start, &len, is_bundle ? ".bundle" : ".git");
if (!len || (len == 1 && *start == '/'))
- die("No directory name could be guessed.\n"
- "Please specify a directory on the command line");
+ die(_("No directory name could be guessed.\n"
+ "Please specify a directory on the command line"));
if (is_bare)
dir = xstrfmt("%.*s.git", (int)len, start);
@@ -644,7 +644,7 @@ static void update_remote_refs(const struct ref *refs,
if (create_symref(head_ref.buf,
remote_head_points_at->peer_ref->name,
msg) < 0)
- die("unable to update %s", head_ref.buf);
+ die(_("unable to update %s"), head_ref.buf);
strbuf_release(&head_ref);
}
}
@@ -656,7 +656,7 @@ static void update_head(const struct ref *our, const struct ref *remote,
if (our && skip_prefix(our->name, "refs/heads/", &head)) {
/* Local default branch link */
if (create_symref("HEAD", our->name, NULL) < 0)
- die("unable to update HEAD");
+ die(_("unable to update HEAD"));
if (!option_bare) {
update_ref(msg, "HEAD", our->old_oid.hash, NULL, 0,
UPDATE_REFS_DIE_ON_ERR);
@@ -750,7 +750,7 @@ static void write_config(struct string_list *config)
for (i = 0; i < config->nr; i++) {
if (git_config_parse_parameter(config->items[i].string,
write_one_config, NULL) < 0)
- die("unable to write parameters to config file");
+ die(_("unable to write parameters to config file"));
}
}
diff --git a/ref-filter.c b/ref-filter.c
index bb79d6b9cc..bc551a752c 100644
--- a/ref-filter.c
+++ b/ref-filter.c
@@ -74,14 +74,14 @@ static void remote_ref_atom_parser(struct used_atom *atom, const char *arg)
static void body_atom_parser(struct used_atom *atom, const char *arg)
{
if (arg)
- die("%%(body) does not take arguments");
+ die(_("%%(body) does not take arguments"));
atom->u.contents.option = C_BODY_DEP;
}
static void subject_atom_parser(struct used_atom *atom, const char *arg)
{
if (arg)
- die("%%(subject) does not take arguments");
+ die(_("%%(subject) does not take arguments"));
atom->u.contents.option = C_SUB;
}
@@ -241,7 +241,7 @@ int parse_ref_filter_atom(const char *atom, const char *ep)
if (*sp == '*' && sp < ep)
sp++; /* deref */
if (ep <= sp)
- die("malformed field name: %.*s", (int)(ep-atom), atom);
+ die(_("malformed field name: %.*s"), (int)(ep-atom), atom);
/* Do we have the atom already used elsewhere? */
for (i = 0; i < used_atom_cnt; i++) {
@@ -267,7 +267,7 @@ int parse_ref_filter_atom(const char *atom, const char *ep)
}
if (ARRAY_SIZE(valid_atom) <= i)
- die("unknown field name: %.*s", (int)(ep-atom), atom);
+ die(_("unknown field name: %.*s"), (int)(ep-atom), atom);
/* Add it in, including the deref prefix */
at = used_atom_cnt;
@@ -421,7 +421,7 @@ int verify_ref_format(const char *format)
int at;
if (!ep)
- return error("malformed format string %s", sp);
+ return error(_("malformed format string %s"), sp);
/* sp points at "%(" and ep points at the closing ")" */
at = parse_ref_filter_atom(sp + 2, ep);
cp = ep + 1;
@@ -875,12 +875,12 @@ static const char *strip_ref_components(const char *refname, const char *nr_arg)
const char *start = refname;
if (nr < 1 || *end != '\0')
- die(":strip= requires a positive integer argument");
+ die(_(":strip= requires a positive integer argument"));
while (remaining) {
switch (*start++) {
case '\0':
- die("ref '%s' does not have %ld components to :strip",
+ die(_("ref '%s' does not have %ld components to :strip"),
refname, nr);
case '/':
remaining--;
@@ -1043,7 +1043,7 @@ static void populate_value(struct ref_array_item *ref)
else if (skip_prefix(formatp, "strip=", &arg))
refname = strip_ref_components(refname, arg);
else
- die("unknown %.*s format %s",
+ die(_("unknown %.*s format %s"),
(int)(formatp - name), name, formatp);
}
@@ -1063,10 +1063,10 @@ static void populate_value(struct ref_array_item *ref)
need_obj:
buf = get_obj(ref->objectname, &obj, &size, &eaten);
if (!buf)
- die("missing object %s for %s",
+ die(_("missing object %s for %s"),
sha1_to_hex(ref->objectname), ref->refname);
if (!obj)
- die("parse_object_buffer failed on %s for %s",
+ die(_("parse_object_buffer failed on %s for %s"),
sha1_to_hex(ref->objectname), ref->refname);
grab_values(ref->value, 0, obj, buf, size);
@@ -1094,10 +1094,10 @@ static void populate_value(struct ref_array_item *ref)
*/
buf = get_obj(tagged, &obj, &size, &eaten);
if (!buf)
- die("missing object %s for %s",
+ die(_("missing object %s for %s"),
sha1_to_hex(tagged), ref->refname);
if (!obj)
- die("parse_object_buffer failed on %s for %s",
+ die(_("parse_object_buffer failed on %s for %s"),
sha1_to_hex(tagged), ref->refname);
grab_values(ref->value, 1, obj, buf, size);
if (!eaten)
@@ -1370,12 +1370,12 @@ static int ref_filter_handler(const char *refname, const struct object_id *oid,
unsigned int kind;
if (flag & REF_BAD_NAME) {
- warning("ignoring ref with broken name %s", refname);
+ warning(_("ignoring ref with broken name %s"), refname);
return 0;
}
if (flag & REF_ISBROKEN) {
- warning("ignoring broken ref %s", refname);
+ warning(_("ignoring broken ref %s"), refname);
return 0;
}
diff --git a/trailer.c b/trailer.c
index 94b387b499..8e48a5c990 100644
--- a/trailer.c
+++ b/trailer.c
@@ -234,7 +234,7 @@ static const char *apply_command(const char *command, const char *arg)
cp.use_shell = 1;
if (capture_command(&cp, &buf, 1024)) {
- error("running trailer command '%s' failed", cmd.buf);
+ error(_("running trailer command '%s' failed"), cmd.buf);
strbuf_release(&buf);
result = xstrdup("");
} else {