Skip to content

Commit 0963008

Browse files
committed
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
2 parents 060be00 + 754dbc4 commit 0963008

File tree

8 files changed

+13
-12
lines changed

8 files changed

+13
-12
lines changed

builtin/fsck.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ static int traverse_reachable(void)
144144
unsigned int nr = 0;
145145
int result = 0;
146146
if (show_progress)
147-
progress = start_progress_delay("Checking connectivity", 0, 0, 2);
147+
progress = start_progress_delay(_("Checking connectivity"), 0, 0, 2);
148148
while (pending.nr) {
149149
struct object_array_entry *entry;
150150
struct object *obj;
@@ -541,7 +541,7 @@ static void fsck_object_dir(const char *path)
541541
fprintf(stderr, "Checking object directory\n");
542542

543543
if (show_progress)
544-
progress = start_progress("Checking object directories", 256);
544+
progress = start_progress(_("Checking object directories"), 256);
545545
for (i = 0; i < 256; i++) {
546546
static char dir[4096];
547547
sprintf(dir, "%s/%02x", path, i);
@@ -670,7 +670,7 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
670670
total += p->num_objects;
671671
}
672672

673-
progress = start_progress("Checking objects", total);
673+
progress = start_progress(_("Checking objects"), total);
674674
}
675675
for (p = packed_git; p; p = p->next) {
676676
/* verify gives error messages itself */

builtin/pack-objects.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ static void write_pack_file(void)
755755
struct object_entry **write_order;
756756

757757
if (progress > pack_to_stdout)
758-
progress_state = start_progress("Writing objects", nr_result);
758+
progress_state = start_progress(_("Writing objects"), nr_result);
759759
written_list = xmalloc(to_pack.nr_objects * sizeof(*written_list));
760760
write_order = compute_write_order();
761761

@@ -2154,7 +2154,7 @@ static void prepare_pack(int window, int depth)
21542154
if (nr_deltas && n > 1) {
21552155
unsigned nr_done = 0;
21562156
if (progress)
2157-
progress_state = start_progress("Compressing objects",
2157+
progress_state = start_progress(_("Compressing objects"),
21582158
nr_deltas);
21592159
qsort(delta_list, n, sizeof(*delta_list), type_size_sort);
21602160
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)
26872687
prepare_packed_git();
26882688

26892689
if (progress)
2690-
progress_state = start_progress("Counting objects", 0);
2690+
progress_state = start_progress(_("Counting objects"), 0);
26912691
if (!use_internal_rev_list)
26922692
read_object_list_from_stdin();
26932693
else {

builtin/prune-packed.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void prune_packed_objects(int opts)
4646

4747
strbuf_addstr(&pathname, dir);
4848
if (opts & PRUNE_PACKED_VERBOSE)
49-
progress = start_progress_delay("Removing duplicate objects",
49+
progress = start_progress_delay(_("Removing duplicate objects"),
5050
256, 95, 2);
5151

5252
if (pathname.len && pathname.buf[pathname.len - 1] != '/')

builtin/prune.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ int cmd_prune(int argc, const char **argv, const char *prefix)
169169
if (show_progress == -1)
170170
show_progress = isatty(2);
171171
if (show_progress)
172-
progress = start_progress_delay("Checking connectivity", 0, 0, 2);
172+
progress = start_progress_delay(_("Checking connectivity"), 0, 0, 2);
173173

174174
mark_reachable_objects(&revs, 1, progress);
175175
stop_progress(&progress);

builtin/unpack-objects.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ static void unpack_all(void)
480480
use(sizeof(struct pack_header));
481481

482482
if (!quiet)
483-
progress = start_progress("Unpacking objects", nr_objects);
483+
progress = start_progress(_("Unpacking objects"), nr_objects);
484484
obj_list = xcalloc(nr_objects, sizeof(*obj_list));
485485
for (i = 0; i < nr_objects; i++) {
486486
unpack_one(i);

diffcore-rename.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ void diffcore_rename(struct diff_options *options)
522522

523523
if (options->show_rename_progress) {
524524
progress = start_progress_delay(
525-
"Performing inexact rename detection",
525+
_("Performing inexact rename detection"),
526526
rename_dst_nr * rename_src_nr, 50, 1);
527527
}
528528

progress.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010

1111
#include "git-compat-util.h"
12+
#include "gettext.h"
1213
#include "progress.h"
1314
#include "strbuf.h"
1415

@@ -220,7 +221,7 @@ struct progress *start_progress(const char *title, unsigned total)
220221

221222
void stop_progress(struct progress **p_progress)
222223
{
223-
stop_progress_msg(p_progress, "done");
224+
stop_progress_msg(p_progress, _("done"));
224225
}
225226

226227
void stop_progress_msg(struct progress **p_progress, const char *msg)

unpack-trees.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ static int check_updates(struct unpack_trees_options *o)
203203
total++;
204204
}
205205

206-
progress = start_progress_delay("Checking out files",
206+
progress = start_progress_delay(_("Checking out files"),
207207
total, 50, 1);
208208
cnt = 0;
209209
}

0 commit comments

Comments
 (0)