From: Ævar Arnfjörð Bjarmason Date: Thu, 2 Sep 2010 18:37:33 +0000 (+0000) Subject: gettextize: git-rm basic messages X-Git-Tag: ko-pu~10^2~96 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=03dd26a1e5f10f042fcb2c4b8dddbdb58ede98d9;p=git.git gettextize: git-rm basic messages Make the basic git-mv messages translatable, but skip things like "rm '%s'\n" and "git rm '%s'\n" for now. Signed-off-by: Ævar Arnfjörð Bjarmason --- diff --git a/builtin/rm.c b/builtin/rm.c index f3772c84d..68656f32a 100644 --- a/builtin/rm.c +++ b/builtin/rm.c @@ -115,19 +115,19 @@ static int check_local_mod(unsigned char *head, int index_only) */ if (local_changes && staged_changes) { if (!index_only || !(ce->ce_flags & CE_INTENT_TO_ADD)) - errs = error("'%s' has staged content different " + errs = error(_("'%s' has staged content different " "from both the file and the HEAD\n" - "(use -f to force removal)", name); + "(use -f to force removal)"), name); } else if (!index_only) { if (staged_changes) - errs = error("'%s' has changes staged in the index\n" + errs = error(_("'%s' has changes staged in the index\n" "(use --cached to keep the file, " - "or -f to force removal)", name); + "or -f to force removal)"), name); if (local_changes) - errs = error("'%s' has local modifications\n" + errs = error(_("'%s' has local modifications\n" "(use --cached to keep the file, " - "or -f to force removal)", name); + "or -f to force removal)"), name); } } return errs; @@ -168,7 +168,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix) newfd = hold_locked_index(&lock_file, 1); if (read_cache() < 0) - die("index file corrupt"); + die(_("index file corrupt")); pathspec = get_pathspec(prefix, argv); refresh_index(&the_index, REFRESH_QUIET, pathspec, NULL, NULL); @@ -191,7 +191,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix) for (i = 0; (match = pathspec[i]) != NULL ; i++) { if (!seen[i]) { if (!ignore_unmatch) { - die("pathspec '%s' did not match any files", + die(_("pathspec '%s' did not match any files"), match); } } @@ -199,7 +199,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix) seen_any = 1; } if (!recursive && seen[i] == MATCHED_RECURSIVELY) - die("not removing '%s' recursively without -r", + die(_("not removing '%s' recursively without -r"), *match ? match : "."); } @@ -235,7 +235,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix) printf("rm '%s'\n", path); if (remove_file_from_cache(path)) - die("git rm: unable to remove %s", path); + die(_("git rm: unable to remove %s"), path); } if (show_only) @@ -265,7 +265,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix) if (active_cache_changed) { if (write_cache(newfd, active_cache, active_nr) || commit_locked_index(&lock_file)) - die("Unable to write new index file"); + die(_("Unable to write new index file")); } return 0;