i18n: mark all progress lines for translation
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy committed
Feb 21, 2014 at 19:50 UTC
754dbc43f078625f38c7908f19dc71a0c617ec85
8 files changed
+13
-12
builtin/fsck.c
+3
-3
@@ -144,7 +144,7 @@ static int traverse_reachable(void)
144
unsigned int nr = 0;
145
int result = 0;
146
if (show_progress)
147
- progress = start_progress_delay("Checking connectivity", 0, 0, 2);
147
+ progress = start_progress_delay(_("Checking connectivity"), 0, 0, 2);
148
while (pending.nr) {
149
struct object_array_entry *entry;
150
struct object *obj;
@@ -541,7 +541,7 @@ static void fsck_object_dir(const char *path)
541
fprintf(stderr, "Checking object directory\n");
542
543
if (show_progress)
544
- progress = start_progress("Checking object directories", 256);
544
+ progress = start_progress(_("Checking object directories"), 256);
545
for (i = 0; i < 256; i++) {
546
static char dir[4096];
547
sprintf(dir, "%s/%02x", path, i);
@@ -670,7 +670,7 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
670
total += p->num_objects;
671
}
672
673
- progress = start_progress("Checking objects", total);
673
+ progress = start_progress(_("Checking objects"), total);
674
}
675
for (p = packed_git; p; p = p->next) {
676
/* verify gives error messages itself */
builtin/pack-objects.c
+3
-3
@@ -723,7 +723,7 @@ static void write_pack_file(void)
723
struct object_entry **write_order;
724
725
if (progress > pack_to_stdout)
726
- progress_state = start_progress("Writing objects", nr_result);
726
+ progress_state = start_progress(_("Writing objects"), nr_result);
727
written_list = xmalloc(nr_objects * sizeof(*written_list));
728
write_order = compute_write_order();
729
@@ -2097,7 +2097,7 @@ static void prepare_pack(int window, int depth)
2097
if (nr_deltas && n > 1) {
2098
unsigned nr_done = 0;
2099
if (progress)
2100
- progress_state = start_progress("Compressing objects",
2100
+ progress_state = start_progress(_("Compressing objects"),
2101
nr_deltas);
2102
qsort(delta_list, n, sizeof(*delta_list), type_size_sort);
2103
ll_find_deltas(delta_list, n, window+1, depth, &nr_done);
@@ -2576,7 +2576,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
2576
prepare_packed_git();
2577
2578
if (progress)
2579
- progress_state = start_progress("Counting objects", 0);
2579
+ progress_state = start_progress(_("Counting objects"), 0);
2580
if (!use_internal_rev_list)
2581
read_object_list_from_stdin();
2582
else {
builtin/prune-packed.c
+1
-1
@@ -46,7 +46,7 @@ void prune_packed_objects(int opts)
46
47
strbuf_addstr(&pathname, dir);
48
if (opts & PRUNE_PACKED_VERBOSE)
49
- progress = start_progress_delay("Removing duplicate objects",
49
+ progress = start_progress_delay(_("Removing duplicate objects"),
50
256, 95, 2);
51
52
if (pathname.len && pathname.buf[pathname.len - 1] != '/')
builtin/prune.c
+1
-1
@@ -169,7 +169,7 @@ int cmd_prune(int argc, const char **argv, const char *prefix)
169
if (show_progress == -1)
170
show_progress = isatty(2);
171
if (show_progress)
172
- progress = start_progress_delay("Checking connectivity", 0, 0, 2);
172
+ progress = start_progress_delay(_("Checking connectivity"), 0, 0, 2);
173
174
mark_reachable_objects(&revs, 1, progress);
175
stop_progress(&progress);
builtin/unpack-objects.c
+1
-1
@@ -480,7 +480,7 @@ static void unpack_all(void)
480
use(sizeof(struct pack_header));
481
482
if (!quiet)
483
- progress = start_progress("Unpacking objects", nr_objects);
483
+ progress = start_progress(_("Unpacking objects"), nr_objects);
484
obj_list = xcalloc(nr_objects, sizeof(*obj_list));
485
for (i = 0; i < nr_objects; i++) {
486
unpack_one(i);
diffcore-rename.c
+1
-1
@@ -579,7 +579,7 @@ void diffcore_rename(struct diff_options *options)
579
580
if (options->show_rename_progress) {
581
progress = start_progress_delay(
582
- "Performing inexact rename detection",
582
+ _("Performing inexact rename detection"),
583
rename_dst_nr * rename_src_nr, 50, 1);
584
}
585
progress.c
+2
-1
@@ -9,6 +9,7 @@
9
*/
10
11
#include "git-compat-util.h"
12
+#include "gettext.h"
13
#include "progress.h"
14
#include "strbuf.h"
15
@@ -220,7 +221,7 @@ struct progress *start_progress(const char *title, unsigned total)
221
222
void stop_progress(struct progress **p_progress)
223
{
223
- stop_progress_msg(p_progress, "done");
224
+ stop_progress_msg(p_progress, _("done"));
225
}
226
227
void stop_progress_msg(struct progress **p_progress, const char *msg)
unpack-trees.c
+1
-1
@@ -204,7 +204,7 @@ static int check_updates(struct unpack_trees_options *o)
204
total++;
205
}
206
207
- progress = start_progress_delay("Checking out files",
207
+ progress = start_progress_delay(_("Checking out files"),
208
total, 50, 1);
209
cnt = 0;
210
}