i18n: git-status basic messages
[gitweb.git] / builtin / checkout.c
index 147fcb2ea3d6c29fe96141bfc29f8f62c54800f0..9f8e41e37c271f7c76ac2ec58265414ef8334c39 100644 (file)
@@ -103,9 +103,10 @@ static int check_stage(int stage, struct cache_entry *ce, int pos)
                        return 0;
                pos++;
        }
-       return error("path '%s' does not have %s version",
-                    ce->name,
-                    (stage == 2) ? "our" : "their");
+       if (stage == 2)
+               return error(_("path '%s' does not have our version"), ce->name);
+       else
+               return error(_("path '%s' does not have their version"), ce->name);
 }
 
 static int check_all_stages(struct cache_entry *ce, int pos)
@@ -130,9 +131,10 @@ static int checkout_stage(int stage, struct cache_entry *ce, int pos,
                        return checkout_entry(active_cache[pos], state, NULL);
                pos++;
        }
-       return error("path '%s' does not have %s version",
-                    ce->name,
-                    (stage == 2) ? "our" : "their");
+       if (stage == 2)
+               return error(_("path '%s' does not have our version"), ce->name);
+       else
+               return error(_("path '%s' does not have their version"), ce->name);
 }
 
 static int checkout_merged(int pos, struct checkout *state)
@@ -544,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];
@@ -569,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();
@@ -611,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);