i18n: git-mv "bad" messages
Gettextize messages made by assigning to the "bad" char* variable. 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
a7d5629fe0580bd3e154206388371f5b8fc832db
1 file changed
+8
-8
builtin/mv.c
+8
-8
@@ -104,13 +104,13 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
104
105
length = strlen(src);
106
if (lstat(src, &st) < 0)
107
- bad = "bad source";
107
+ bad = _("bad source");
108
else if (!strncmp(src, dst, length) &&
109
(dst[length] == 0 || dst[length] == '/')) {
110
- bad = "can not move directory into itself";
110
+ bad = _("can not move directory into itself");
111
} else if ((src_is_dir = S_ISDIR(st.st_mode))
112
&& lstat(dst, &st) == 0)
113
- bad = "cannot move directory over file";
113
+ bad = _("cannot move directory over file");
114
else if (src_is_dir) {
115
const char *src_w_slash = add_slash(src);
116
int len_w_slash = length + 1;
@@ -132,7 +132,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
132
free((char *)src_w_slash);
133
134
if (last - first < 1)
135
- bad = "source directory is empty";
135
+ bad = _("source directory is empty");
136
else {
137
int j, dst_len;
138
@@ -163,9 +163,9 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
163
argc += last - first;
164
}
165
} else if (cache_name_pos(src, length) < 0)
166
- bad = "not under version control";
166
+ bad = _("not under version control");
167
else if (lstat(dst, &st) == 0) {
168
- bad = "destination exists";
168
+ bad = _("destination exists");
169
if (force) {
170
/*
171
* only files can overwrite each other:
@@ -175,10 +175,10 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
175
warning(_("%s; will overwrite!"), bad);
176
bad = NULL;
177
} else
178
- bad = "Cannot overwrite";
178
+ bad = _("Cannot overwrite");
179
}
180
} else if (string_list_has_string(&src_for_dst, dst))
181
- bad = "multiple sources for the same target";
181
+ bad = _("multiple sources for the same target");
182
else
183
string_list_insert(&src_for_dst, dst);
184