@matheusbsbs / matheus-bagliano / commits / 431b049e1b
Fork 0

i18n: git-mv basic messages

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 431b049e1bfcef5eb8165e4167b53f9717f8a526
1 file changed +8 -8
builtin/mv.c
+8 -8
@@ -74,7 +74,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
74
75 newfd = hold_locked_index(&lock_file, 1);
76 if (read_cache() < 0)
77 - die("index file corrupt");
77 + die(_("index file corrupt"));
78
79 source = copy_pathspec(prefix, argv, argc, 0);
80 modes = xcalloc(argc, sizeof(enum update_mode));
@@ -100,7 +100,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
100 const char *bad = NULL;
101
102 if (show_only)
103 - printf("Checking rename of '%s' to '%s'\n", src, dst);
103 + printf(_("Checking rename of '%s' to '%s'\n"), src, dst);
104
105 length = strlen(src);
106 if (lstat(src, &st) < 0)
@@ -120,7 +120,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
120
121 first = cache_name_pos(src_w_slash, len_w_slash);
122 if (first >= 0)
123 - die ("Huh? %.*s is in index?",
123 + die (_("Huh? %.*s is in index?"),
124 len_w_slash, src_w_slash);
125
126 first = -1 - first;
@@ -172,7 +172,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
172 * check both source and destination
173 */
174 if (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) {
175 - warning("%s; will overwrite!", bad);
175 + warning(_("%s; will overwrite!"), bad);
176 bad = NULL;
177 } else
178 bad = "Cannot overwrite";
@@ -193,7 +193,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
193 i--;
194 }
195 } else
196 - die ("%s, source=%s, destination=%s",
196 + die (_("%s, source=%s, destination=%s"),
197 bad, src, dst);
198 }
199 }
@@ -203,10 +203,10 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
203 enum update_mode mode = modes[i];
204 int pos;
205 if (show_only || verbose)
206 - printf("Renaming %s to %s\n", src, dst);
206 + printf(_("Renaming %s to %s\n"), src, dst);
207 if (!show_only && mode != INDEX &&
208 rename(src, dst) < 0 && !ignore_errors)
209 - die_errno ("renaming '%s' failed", src);
209 + die_errno (_("renaming '%s' failed"), src);
210
211 if (mode == WORKING_DIRECTORY)
212 continue;
@@ -220,7 +220,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
220 if (active_cache_changed) {
221 if (write_cache(newfd, active_cache, active_nr) ||
222 commit_locked_index(&lock_file))
223 - die("Unable to write new index file");
223 + die(_("Unable to write new index file"));
224 }
225
226 return 0;