@matheusbsbs / matheus-bagliano / commits / 08eaa4be03
Fork 0

i18n: git-checkout "Switched to a .. branch" message

Split up the "Switched to and reset branch" and "Switched to a new branch" messages to make them easier to translate. 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:41 UTC 08eaa4be0332e6f9f8732fbb99272b4bbf3ea3de
1 file changed +8 -6
builtin/checkout.c
+8 -6
@@ -546,16 +546,18 @@ static void update_refs_for_switch(struct checkout_opts *opts,
546 if (new->path) {
547 create_symref("HEAD", new->path, msg.buf);
548 if (!opts->quiet) {
549 - if (old->path && !strcmp(new->path, old->path))
549 + if (old->path && !strcmp(new->path, old->path)) {
550 fprintf(stderr, _("Already on '%s'\n"),
551 new->name);
552 - else if (opts->new_branch)
553 - fprintf(stderr, "Switched to%s branch '%s'\n",
554 - opts->branch_exists ? " and reset" : " a new",
555 - new->name);
556 - else
552 + } else if (opts->new_branch) {
553 + if (opts->branch_exists)
554 + fprintf(stderr, _("Switched to and reset branch '%s'\n"), new->name);
555 + else
556 + fprintf(stderr, _("Switched to a new branch '%s'\n"), new->name);
557 + } else {
558 fprintf(stderr, _("Switched to branch '%s'\n"),
559 new->name);
560 + }
561 }
562 if (old->path && old->name) {
563 char log_file[PATH_MAX], ref_file[PATH_MAX];