i18n: git-clean 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
2da57add287c9a5b26e348c35947d6de369e77da
3 files changed
+15
-15
builtin/clean.c
+10
-10
@@ -75,7 +75,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
75
dir.flags |= DIR_SHOW_IGNORED;
76
77
if (ignored && ignored_only)
78
- die("-x and -X cannot be used together");
78
+ die(_("-x and -X cannot be used together"));
79
80
if (!show_only && !force)
81
die("clean.requireForce %s to true and neither -n nor -f given; "
@@ -87,7 +87,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
87
dir.flags |= DIR_SHOW_OTHER_DIRECTORIES;
88
89
if (read_cache() < 0)
90
- die("index file corrupt");
90
+ die(_("index file corrupt"));
91
92
if (!ignored)
93
setup_standard_excludes(&dir);
@@ -146,20 +146,20 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
146
qname = quote_path_relative(directory.buf, directory.len, &buf, prefix);
147
if (show_only && (remove_directories ||
148
(matches == MATCHED_EXACTLY))) {
149
- printf("Would remove %s\n", qname);
149
+ printf(_("Would remove %s\n"), qname);
150
} else if (remove_directories ||
151
(matches == MATCHED_EXACTLY)) {
152
if (!quiet)
153
- printf("Removing %s\n", qname);
153
+ printf(_("Removing %s\n"), qname);
154
if (remove_dir_recursively(&directory,
155
rm_flags) != 0) {
156
- warning("failed to remove %s", qname);
156
+ warning(_("failed to remove %s"), qname);
157
errors++;
158
}
159
} else if (show_only) {
160
- printf("Would not remove %s\n", qname);
160
+ printf(_("Would not remove %s\n"), qname);
161
} else {
162
- printf("Not removing %s\n", qname);
162
+ printf(_("Not removing %s\n"), qname);
163
}
164
strbuf_reset(&directory);
165
} else {
@@ -167,13 +167,13 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
167
continue;
168
qname = quote_path_relative(ent->name, -1, &buf, prefix);
169
if (show_only) {
170
- printf("Would remove %s\n", qname);
170
+ printf(_("Would remove %s\n"), qname);
171
continue;
172
} else if (!quiet) {
173
- printf("Removing %s\n", qname);
173
+ printf(_("Removing %s\n"), qname);
174
}
175
if (unlink(ent->name) != 0) {
176
- warning("failed to remove %s", qname);
176
+ warning(_("failed to remove %s"), qname);
177
errors++;
178
}
179
}
t/t7012-skip-worktree-writing.sh
+2
-2
@@ -124,13 +124,13 @@ cat >expected <<EOF
124
Would remove expected
125
Would remove result
126
EOF
127
-test_expect_success 'git-clean, absent case' '
127
+test_expect_success C_LOCALE_OUTPUT 'git-clean, absent case' '
128
setup_absent &&
129
git clean -n > result &&
130
test_cmp expected result
131
'
132
133
-test_expect_success 'git-clean, dirty case' '
133
+test_expect_success C_LOCALE_OUTPUT 'git-clean, dirty case' '
134
setup_dirty &&
135
git clean -n > result &&
136
test_cmp expected result
t/t7300-clean.sh
+3
-3
@@ -110,7 +110,7 @@ test_expect_success 'git clean with prefix' '
110
111
'
112
113
-test_expect_success 'git clean with relative prefix' '
113
+test_expect_success C_LOCALE_OUTPUT 'git clean with relative prefix' '
114
115
mkdir -p build docs &&
116
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
@@ -125,7 +125,7 @@ test_expect_success 'git clean with relative prefix' '
125
}
126
'
127
128
-test_expect_success 'git clean with absolute path' '
128
+test_expect_success C_LOCALE_OUTPUT 'git clean with absolute path' '
129
130
mkdir -p build docs &&
131
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
@@ -377,7 +377,7 @@ test_expect_success 'clean.requireForce and -f' '
377
378
'
379
380
-test_expect_success 'core.excludesfile' '
380
+test_expect_success C_LOCALE_OUTPUT 'core.excludesfile' '
381
382
echo excludes >excludes &&
383
echo included >included &&