Re: [PATCH v4 23/73] gettextize: git-checkout "HEAD is now at" message
Ævar Arnfjörð Bjarmason wrote:
Show 8 quoted lines
> --- a/builtin/checkout.c
> +++ b/builtin/checkout.c
> @@ -571,7 +571,7 @@ static void update_refs_for_switch(struct checkout_opts *opts,
> if (!opts->quiet) {
> if (old->path && advice_detached_head)
> detach_advice(old->path, new->name);
> - describe_detached_head("HEAD is now at", new->commit);
> + describe_detached_head(_("HEAD is now at"), new->commit);It might make sense to squash patches 22 and 23 with the following.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
builtin/checkout.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/builtin/checkout.c b/builtin/checkout.c
index fb93d63..dca0935 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -305,7 +305,14 @@ static void describe_detached_head(const char *msg, struct commit *commit)
struct pretty_print_context ctx = {0};
parse_commit(commit);
pretty_print_commit(CMIT_FMT_ONELINE, commit, &sb, &ctx);
- fprintf(stderr, "%s %s... %s\n", msg,
+
+ /*
+ * TRANSLATORS: The first '%s' is either "Previous HEAD position was"
+ * or "HEAD is now at". The second '%s' is an abbreviated hexadecimal
+ * commit id for HEAD and the third '%s' is the first line of its
+ * commit message.
+ */
+ fprintf(stderr, _("%s %s... %s\n"), msg,
find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV), sb.buf);
strbuf_release(&sb);
}
--
1.7.4.1