Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
i18n: git-mv "bad" messages
author
Ævar Arnfjörð Bjarmason
<avarab@gmail.com>
Tue, 22 Feb 2011 23:42:04 +0000
(23:42 +0000)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 10 Mar 2011 07:52:56 +0000
(23:52 -0800)
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>
builtin/mv.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (from parent 1:
431b049
)
diff --git
a/builtin/mv.c
b/builtin/mv.c
index 18a2218bd079d73036aea920047c2f036d50e3c5..40f33ca4d0e6d0bb1733e0544029c6f588d09b59 100644
(file)
--- a/
builtin/mv.c
+++ b/
builtin/mv.c
@@
-104,13
+104,13
@@
int cmd_mv(int argc, const char **argv, const char *prefix)
length = strlen(src);
if (lstat(src, &st) < 0)
length = strlen(src);
if (lstat(src, &st) < 0)
- bad =
"bad source"
;
+ bad =
_("bad source")
;
else if (!strncmp(src, dst, length) &&
(dst[length] == 0 || dst[length] == '/')) {
else if (!strncmp(src, dst, length) &&
(dst[length] == 0 || dst[length] == '/')) {
- bad =
"can not move directory into itself"
;
+ bad =
_("can not move directory into itself")
;
} else if ((src_is_dir = S_ISDIR(st.st_mode))
&& lstat(dst, &st) == 0)
} else if ((src_is_dir = S_ISDIR(st.st_mode))
&& lstat(dst, &st) == 0)
- bad =
"cannot move directory over file"
;
+ bad =
_("cannot move directory over file")
;
else if (src_is_dir) {
const char *src_w_slash = add_slash(src);
int len_w_slash = length + 1;
else if (src_is_dir) {
const char *src_w_slash = add_slash(src);
int len_w_slash = length + 1;
@@
-132,7
+132,7
@@
int cmd_mv(int argc, const char **argv, const char *prefix)
free((char *)src_w_slash);
if (last - first < 1)
free((char *)src_w_slash);
if (last - first < 1)
- bad =
"source directory is empty"
;
+ bad =
_("source directory is empty")
;
else {
int j, dst_len;
else {
int j, dst_len;
@@
-163,9
+163,9
@@
int cmd_mv(int argc, const char **argv, const char *prefix)
argc += last - first;
}
} else if (cache_name_pos(src, length) < 0)
argc += last - first;
}
} else if (cache_name_pos(src, length) < 0)
- bad =
"not under version control"
;
+ bad =
_("not under version control")
;
else if (lstat(dst, &st) == 0) {
else if (lstat(dst, &st) == 0) {
- bad =
"destination exists"
;
+ bad =
_("destination exists")
;
if (force) {
/*
* only files can overwrite each other:
if (force) {
/*
* only files can overwrite each other:
@@
-175,10
+175,10
@@
int cmd_mv(int argc, const char **argv, const char *prefix)
warning(_("%s; will overwrite!"), bad);
bad = NULL;
} else
warning(_("%s; will overwrite!"), bad);
bad = NULL;
} else
- bad =
"Cannot overwrite"
;
+ bad =
_("Cannot overwrite")
;
}
} else if (string_list_has_string(&src_for_dst, dst))
}
} else if (string_list_has_string(&src_for_dst, dst))
- bad =
"multiple sources for the same target"
;
+ bad =
_("multiple sources for the same target")
;
else
string_list_insert(&src_for_dst, dst);
else
string_list_insert(&src_for_dst, dst);