From: Ævar Arnfjörð Bjarmason Date: Thu, 2 Sep 2010 17:29:01 +0000 (+0000) Subject: gettextize: git-fetch formatting messages X-Git-Tag: ko-pu~10^2~109 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1180063e779db19ce59acf1779069619d6b7bd17;p=git.git gettextize: git-fetch formatting messages Translate some of the formatting messages that appear on git-fetch showing how branches/tags etc. were updated. Signed-off-by: Ævar Arnfjörð Bjarmason --- diff --git a/builtin/fetch.c b/builtin/fetch.c index c0f477949..fa5094c08 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -230,7 +230,7 @@ static int update_local_ref(struct ref *ref, if (!hashcmp(ref->old_sha1, ref->new_sha1)) { if (verbosity > 0) sprintf(display, "= %-*s %-*s -> %s", TRANSPORT_SUMMARY_WIDTH, - "[up to date]", REFCOL_WIDTH, remote, + _("[up to date]"), REFCOL_WIDTH, remote, pretty_ref); return 0; } @@ -243,8 +243,8 @@ static int update_local_ref(struct ref *ref, * If this is the head, and it's not okay to update * the head, and the old value of the head isn't empty... */ - sprintf(display, "! %-*s %-*s -> %s (can't fetch in current branch)", - TRANSPORT_SUMMARY_WIDTH, "[rejected]", REFCOL_WIDTH, remote, + sprintf(display, _("! %-*s %-*s -> %s (can't fetch in current branch)"), + TRANSPORT_SUMMARY_WIDTH, _("[rejected]"), REFCOL_WIDTH, remote, pretty_ref); return 1; } @@ -254,8 +254,8 @@ static int update_local_ref(struct ref *ref, int r; r = s_update_ref("updating tag", ref, 0); sprintf(display, "%c %-*s %-*s -> %s%s", r ? '!' : '-', - TRANSPORT_SUMMARY_WIDTH, "[tag update]", REFCOL_WIDTH, remote, - pretty_ref, r ? " (unable to update local ref)" : ""); + TRANSPORT_SUMMARY_WIDTH, _("[tag update]"), REFCOL_WIDTH, remote, + pretty_ref, r ? _(" (unable to update local ref)") : ""); return r; } @@ -403,7 +403,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name, REFCOL_WIDTH, *what ? what : "HEAD"); if (*note) { if (verbosity >= 0 && !shown_url) { - fprintf(stderr, "From %.*s\n", + fprintf(stderr, _("From %.*s\n"), url_len, url); shown_url = 1; } @@ -512,16 +512,16 @@ static int prune_refs(struct transport *transport, struct ref *ref_map) int result = 0; struct ref *ref, *stale_refs = get_stale_heads(transport->remote, ref_map); const char *dangling_msg = dry_run - ? " (%s will become dangling)\n" - : " (%s has become dangling)\n"; + ? _(" (%s will become dangling)\n") + : _(" (%s has become dangling)\n"); for (ref = stale_refs; ref; ref = ref->next) { if (!dry_run) result |= delete_ref(ref->name, NULL, 0); if (verbosity >= 0) { fprintf(stderr, " x %-*s %-*s -> %s\n", - TRANSPORT_SUMMARY_WIDTH, "[deleted]", - REFCOL_WIDTH, "(none)", prettify_refname(ref->name)); + TRANSPORT_SUMMARY_WIDTH, _("[deleted]"), + REFCOL_WIDTH, _("(none)"), prettify_refname(ref->name)); warn_dangling_symref(stderr, dangling_msg, ref->name); } }