Merge branch 'nd/i18n-progress'

Mark the progress indicators from various time-consuming commands
for i18n/l10n.

* nd/i18n-progress:
  i18n: mark all progress lines for translation
This commit is contained in:
Junio C Hamano 2014-03-14 14:26:31 -07:00
commit 0963008cbf
8 changed files with 13 additions and 12 deletions

View File

@ -144,7 +144,7 @@ static int traverse_reachable(void)
unsigned int nr = 0; unsigned int nr = 0;
int result = 0; int result = 0;
if (show_progress) if (show_progress)
progress = start_progress_delay("Checking connectivity", 0, 0, 2); progress = start_progress_delay(_("Checking connectivity"), 0, 0, 2);
while (pending.nr) { while (pending.nr) {
struct object_array_entry *entry; struct object_array_entry *entry;
struct object *obj; struct object *obj;
@ -541,7 +541,7 @@ static void fsck_object_dir(const char *path)
fprintf(stderr, "Checking object directory\n"); fprintf(stderr, "Checking object directory\n");
if (show_progress) if (show_progress)
progress = start_progress("Checking object directories", 256); progress = start_progress(_("Checking object directories"), 256);
for (i = 0; i < 256; i++) { for (i = 0; i < 256; i++) {
static char dir[4096]; static char dir[4096];
sprintf(dir, "%s/%02x", path, i); sprintf(dir, "%s/%02x", path, i);
@ -670,7 +670,7 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
total += p->num_objects; total += p->num_objects;
} }
progress = start_progress("Checking objects", total); progress = start_progress(_("Checking objects"), total);
} }
for (p = packed_git; p; p = p->next) { for (p = packed_git; p; p = p->next) {
/* verify gives error messages itself */ /* verify gives error messages itself */

View File

@ -755,7 +755,7 @@ static void write_pack_file(void)
struct object_entry **write_order; struct object_entry **write_order;
if (progress > pack_to_stdout) if (progress > pack_to_stdout)
progress_state = start_progress("Writing objects", nr_result); progress_state = start_progress(_("Writing objects"), nr_result);
written_list = xmalloc(to_pack.nr_objects * sizeof(*written_list)); written_list = xmalloc(to_pack.nr_objects * sizeof(*written_list));
write_order = compute_write_order(); write_order = compute_write_order();
@ -2154,7 +2154,7 @@ static void prepare_pack(int window, int depth)
if (nr_deltas && n > 1) { if (nr_deltas && n > 1) {
unsigned nr_done = 0; unsigned nr_done = 0;
if (progress) if (progress)
progress_state = start_progress("Compressing objects", progress_state = start_progress(_("Compressing objects"),
nr_deltas); nr_deltas);
qsort(delta_list, n, sizeof(*delta_list), type_size_sort); qsort(delta_list, n, sizeof(*delta_list), type_size_sort);
ll_find_deltas(delta_list, n, window+1, depth, &nr_done); ll_find_deltas(delta_list, n, window+1, depth, &nr_done);
@ -2687,7 +2687,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
prepare_packed_git(); prepare_packed_git();
if (progress) if (progress)
progress_state = start_progress("Counting objects", 0); progress_state = start_progress(_("Counting objects"), 0);
if (!use_internal_rev_list) if (!use_internal_rev_list)
read_object_list_from_stdin(); read_object_list_from_stdin();
else { else {

View File

@ -46,7 +46,7 @@ void prune_packed_objects(int opts)
strbuf_addstr(&pathname, dir); strbuf_addstr(&pathname, dir);
if (opts & PRUNE_PACKED_VERBOSE) if (opts & PRUNE_PACKED_VERBOSE)
progress = start_progress_delay("Removing duplicate objects", progress = start_progress_delay(_("Removing duplicate objects"),
256, 95, 2); 256, 95, 2);
if (pathname.len && pathname.buf[pathname.len - 1] != '/') if (pathname.len && pathname.buf[pathname.len - 1] != '/')

View File

@ -169,7 +169,7 @@ int cmd_prune(int argc, const char **argv, const char *prefix)
if (show_progress == -1) if (show_progress == -1)
show_progress = isatty(2); show_progress = isatty(2);
if (show_progress) if (show_progress)
progress = start_progress_delay("Checking connectivity", 0, 0, 2); progress = start_progress_delay(_("Checking connectivity"), 0, 0, 2);
mark_reachable_objects(&revs, 1, progress); mark_reachable_objects(&revs, 1, progress);
stop_progress(&progress); stop_progress(&progress);

View File

@ -480,7 +480,7 @@ static void unpack_all(void)
use(sizeof(struct pack_header)); use(sizeof(struct pack_header));
if (!quiet) if (!quiet)
progress = start_progress("Unpacking objects", nr_objects); progress = start_progress(_("Unpacking objects"), nr_objects);
obj_list = xcalloc(nr_objects, sizeof(*obj_list)); obj_list = xcalloc(nr_objects, sizeof(*obj_list));
for (i = 0; i < nr_objects; i++) { for (i = 0; i < nr_objects; i++) {
unpack_one(i); unpack_one(i);

View File

@ -522,7 +522,7 @@ void diffcore_rename(struct diff_options *options)
if (options->show_rename_progress) { if (options->show_rename_progress) {
progress = start_progress_delay( progress = start_progress_delay(
"Performing inexact rename detection", _("Performing inexact rename detection"),
rename_dst_nr * rename_src_nr, 50, 1); rename_dst_nr * rename_src_nr, 50, 1);
} }

View File

@ -9,6 +9,7 @@
*/ */
#include "git-compat-util.h" #include "git-compat-util.h"
#include "gettext.h"
#include "progress.h" #include "progress.h"
#include "strbuf.h" #include "strbuf.h"
@ -220,7 +221,7 @@ struct progress *start_progress(const char *title, unsigned total)
void stop_progress(struct progress **p_progress) void stop_progress(struct progress **p_progress)
{ {
stop_progress_msg(p_progress, "done"); stop_progress_msg(p_progress, _("done"));
} }
void stop_progress_msg(struct progress **p_progress, const char *msg) void stop_progress_msg(struct progress **p_progress, const char *msg)

View File

@ -203,7 +203,7 @@ static int check_updates(struct unpack_trees_options *o)
total++; total++;
} }
progress = start_progress_delay("Checking out files", progress = start_progress_delay(_("Checking out files"),
total, 50, 1); total, 50, 1);
cnt = 0; cnt = 0;
} }