From 4636f651234b3fe950246cd1aa2c8b0a5955ea6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Sat, 27 Feb 2016 13:41:54 +0700 Subject: builtin/checkout.c: mark strings for translation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- builtin/checkout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.3 From 39ad4f39cc502c2a9c355d6b1eb62f30fca3d2c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Sat, 27 Feb 2016 13:41:55 +0700 Subject: builtin/clone.c: mark strings for translation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- builtin/clone.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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")); } } -- cgit v1.2.3 From 1823c619e9fa9d7826b4cfc58bf05815cf88eaed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Sat, 27 Feb 2016 13:42:04 +0700 Subject: ref-filter.c: mark strings for translation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- ref-filter.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) 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; } -- cgit v1.2.3 From 13ad56f848976adc32fd190b4ab03f00360d40e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Sat, 27 Feb 2016 13:42:10 +0700 Subject: trailer.c: mark strings for translation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- trailer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- cgit v1.2.3