@matheusbsbs / matheus-bagliano / commits / b9b537f7dc
Fork 0

i18n: 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 <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Feb 22, 2011 at 23:42 UTC b9b537f7dcd90c125d4902e1eafebc8a151c6a05
1 file changed +11 -11
builtin/rm.c
+11 -11
@@ -106,19 +106,19 @@ static int check_local_mod(unsigned char *head, int index_only)
106 */
107 if (local_changes && staged_changes) {
108 if (!index_only || !(ce->ce_flags & CE_INTENT_TO_ADD))
109 - errs = error("'%s' has staged content different "
109 + errs = error(_("'%s' has staged content different "
110 "from both the file and the HEAD\n"
111 - "(use -f to force removal)", name);
111 + "(use -f to force removal)"), name);
112 }
113 else if (!index_only) {
114 if (staged_changes)
115 - errs = error("'%s' has changes staged in the index\n"
115 + errs = error(_("'%s' has changes staged in the index\n"
116 "(use --cached to keep the file, "
117 - "or -f to force removal)", name);
117 + "or -f to force removal)"), name);
118 if (local_changes)
119 - errs = error("'%s' has local modifications\n"
119 + errs = error(_("'%s' has local modifications\n"
120 "(use --cached to keep the file, "
121 - "or -f to force removal)", name);
121 + "or -f to force removal)"), name);
122 }
123 }
124 return errs;
@@ -159,7 +159,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
159 newfd = hold_locked_index(&lock_file, 1);
160
161 if (read_cache() < 0)
162 - die("index file corrupt");
162 + die(_("index file corrupt"));
163
164 pathspec = get_pathspec(prefix, argv);
165 refresh_index(&the_index, REFRESH_QUIET, pathspec, NULL, NULL);
@@ -183,7 +183,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
183 for (i = 0; (match = pathspec[i]) != NULL ; i++) {
184 if (!seen[i]) {
185 if (!ignore_unmatch) {
186 - die("pathspec '%s' did not match any files",
186 + die(_("pathspec '%s' did not match any files"),
187 match);
188 }
189 }
@@ -191,7 +191,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
191 seen_any = 1;
192 }
193 if (!recursive && seen[i] == MATCHED_RECURSIVELY)
194 - die("not removing '%s' recursively without -r",
194 + die(_("not removing '%s' recursively without -r"),
195 *match ? match : ".");
196 }
197
@@ -227,7 +227,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
227 printf("rm '%s'\n", path);
228
229 if (remove_file_from_cache(path))
230 - die("git rm: unable to remove %s", path);
230 + die(_("git rm: unable to remove %s"), path);
231 }
232
233 if (show_only)
@@ -257,7 +257,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
257 if (active_cache_changed) {
258 if (write_cache(newfd, active_cache, active_nr) ||
259 commit_locked_index(&lock_file))
260 - die("Unable to write new index file");
260 + die(_("Unable to write new index file"));
261 }
262
263 return 0;