i18n: git-grep "--open-files-in-pager" message
[gitweb.git] / builtin / checkout.c
index d4c276cfe9c87757acd0a1eacfb74377a25f7d0c..9f8e41e37c271f7c76ac2ec58265414ef8334c39 100644 (file)
@@ -546,16 +546,18 @@ static void update_refs_for_switch(struct checkout_opts *opts,
        if (new->path) {
                create_symref("HEAD", new->path, msg.buf);
                if (!opts->quiet) {
-                       if (old->path && !strcmp(new->path, old->path))
+                       if (old->path && !strcmp(new->path, old->path)) {
                                fprintf(stderr, _("Already on '%s'\n"),
                                        new->name);
-                       else if (opts->new_branch)
-                               fprintf(stderr, "Switched to%s branch '%s'\n",
-                                       opts->branch_exists ? " and reset" : " a new",
-                                       new->name);
-                       else
+                       } else if (opts->new_branch) {
+                               if (opts->branch_exists)
+                                       fprintf(stderr, _("Switched to and reset branch '%s'\n"), new->name);
+                               else
+                                       fprintf(stderr, _("Switched to a new branch '%s'\n"), new->name);
+                       } else {
                                fprintf(stderr, _("Switched to branch '%s'\n"),
                                        new->name);
+                       }
                }
                if (old->path && old->name) {
                        char log_file[PATH_MAX], ref_file[PATH_MAX];
@@ -571,7 +573,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);
                }
        }
        remove_branch_state();