i18n: git-grep basic messages
[gitweb.git] / builtin / checkout.c
index 48dccea48307679a780f4e7978b42218f163bc05..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();
@@ -613,7 +615,7 @@ static int switch_branches(struct checkout_opts *opts, struct branch_info *new)
         * to remind the user that it might be lost.
         */
        if (!opts->quiet && !old.path && old.commit && new->commit != old.commit)
-               describe_detached_head("Previous HEAD position was", old.commit);
+               describe_detached_head(_("Previous HEAD position was"), old.commit);
 
        update_refs_for_switch(opts, &old, new);