{"thread":{"id":"35923","subject":"[PATCH] i18n: mark all progress lines for translation","startedAt":"2014-02-21T12:50:18Z","lastAt":"2014-02-22T21:45:55Z","messageCount":2,"participants":["Nguyễn Thái Ngọc Duy","Peter Krefting"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"235126","messageId":"1392987018-16598-1-git-send-email-pclouds@gmail.com","threadId":"35923","inReplyTo":null,"subject":"[PATCH] i18n: mark all progress lines for translation","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2014-02-21T12:50:18Z","receivedAt":"2014-02-21T12:50:18Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n I can't think of any case that progress lines are for machine. It\n started because of the only local untranslated line in \"git clone\".\n But I think we should do all at once.\n\n builtin/fsck.c           | 6 +++---\n builtin/pack-objects.c   | 6 +++---\n builtin/prune-packed.c   | 2 +-\n builtin/prune.c          | 2 +-\n builtin/unpack-objects.c | 2 +-\n diffcore-rename.c        | 2 +-\n progress.c               | 3 ++-\n unpack-trees.c           | 2 +-\n 8 files changed, 13 insertions(+), 12 deletions(-)\n\ndiff --git a/builtin/fsck.c b/builtin/fsck.c\nindex 1affdd5..73afedd 100644\n--- a/builtin/fsck.c\n+++ b/builtin/fsck.c\n@@ -144,7 +144,7 @@ static int traverse_reachable(void)\n \tunsigned int nr = 0;\n \tint result = 0;\n \tif (show_progress)\n-\t\tprogress = start_progress_delay(\"Checking connectivity\", 0, 0, 2);\n+\t\tprogress = start_progress_delay(_(\"Checking connectivity\"), 0, 0, 2);\n \twhile (pending.nr) {\n \t\tstruct object_array_entry *entry;\n \t\tstruct object *obj;\n@@ -541,7 +541,7 @@ static void fsck_object_dir(const char *path)\n \t\tfprintf(stderr, \"Checking object directory\\n\");\n \n \tif (show_progress)\n-\t\tprogress = start_progress(\"Checking object directories\", 256);\n+\t\tprogress = start_progress(_(\"Checking object directories\"), 256);\n \tfor (i = 0; i < 256; i++) {\n \t\tstatic char dir[4096];\n \t\tsprintf(dir, \"%s/%02x\", path, i);\n@@ -670,7 +670,7 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)\n \t\t\t\ttotal += p->num_objects;\n \t\t\t}\n \n-\t\t\tprogress = start_progress(\"Checking objects\", total);\n+\t\t\tprogress = start_progress(_(\"Checking objects\"), total);\n \t\t}\n \t\tfor (p = packed_git; p; p = p->next) {\n \t\t\t/* verify gives error messages itself */\ndiff --git a/builtin/pack-objects.c b/builtin/pack-objects.c\nindex 541667f..91b8612 100644\n--- a/builtin/pack-objects.c\n+++ b/builtin/pack-objects.c\n@@ -723,7 +723,7 @@ static void write_pack_file(void)\n \tstruct object_entry **write_order;\n \n \tif (progress > pack_to_stdout)\n-\t\tprogress_state = start_progress(\"Writing objects\", nr_result);\n+\t\tprogress_state = start_progress(_(\"Writing objects\"), nr_result);\n \twritten_list = xmalloc(nr_objects * sizeof(*written_list));\n \twrite_order = compute_write_order();\n \n@@ -2097,7 +2097,7 @@ static void prepare_pack(int window, int depth)\n \tif (nr_deltas && n > 1) {\n \t\tunsigned nr_done = 0;\n \t\tif (progress)\n-\t\t\tprogress_state = start_progress(\"Compressing objects\",\n+\t\t\tprogress_state = start_progress(_(\"Compressing objects\"),\n \t\t\t\t\t\t\tnr_deltas);\n \t\tqsort(delta_list, n, sizeof(*delta_list), type_size_sort);\n \t\tll_find_deltas(delta_list, n, window+1, depth, &nr_done);\n@@ -2576,7 +2576,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)\n \tprepare_packed_git();\n \n \tif (progress)\n-\t\tprogress_state = start_progress(\"Counting objects\", 0);\n+\t\tprogress_state = start_progress(_(\"Counting objects\"), 0);\n \tif (!use_internal_rev_list)\n \t\tread_object_list_from_stdin();\n \telse {\ndiff --git a/builtin/prune-packed.c b/builtin/prune-packed.c\nindex fcf5fb6..6879468 100644\n--- a/builtin/prune-packed.c\n+++ b/builtin/prune-packed.c\n@@ -46,7 +46,7 @@ void prune_packed_objects(int opts)\n \n \tstrbuf_addstr(&pathname, dir);\n \tif (opts & PRUNE_PACKED_VERBOSE)\n-\t\tprogress = start_progress_delay(\"Removing duplicate objects\",\n+\t\tprogress = start_progress_delay(_(\"Removing duplicate objects\"),\n \t\t\t256, 95, 2);\n \n \tif (pathname.len && pathname.buf[pathname.len - 1] != '/')\ndiff --git a/builtin/prune.c b/builtin/prune.c\nindex de43b26..25f1477 100644\n--- a/builtin/prune.c\n+++ b/builtin/prune.c\n@@ -169,7 +169,7 @@ int cmd_prune(int argc, const char **argv, const char *prefix)\n \tif (show_progress == -1)\n \t\tshow_progress = isatty(2);\n \tif (show_progress)\n-\t\tprogress = start_progress_delay(\"Checking connectivity\", 0, 0, 2);\n+\t\tprogress = start_progress_delay(_(\"Checking connectivity\"), 0, 0, 2);\n \n \tmark_reachable_objects(&revs, 1, progress);\n \tstop_progress(&progress);\ndiff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c\nindex 62ff673..e6856f1 100644\n--- a/builtin/unpack-objects.c\n+++ b/builtin/unpack-objects.c\n@@ -480,7 +480,7 @@ static void unpack_all(void)\n \tuse(sizeof(struct pack_header));\n \n \tif (!quiet)\n-\t\tprogress = start_progress(\"Unpacking objects\", nr_objects);\n+\t\tprogress = start_progress(_(\"Unpacking objects\"), nr_objects);\n \tobj_list = xcalloc(nr_objects, sizeof(*obj_list));\n \tfor (i = 0; i < nr_objects; i++) {\n \t\tunpack_one(i);\ndiff --git a/diffcore-rename.c b/diffcore-rename.c\nindex 6c7a72f..20a5c5d 100644\n--- a/diffcore-rename.c\n+++ b/diffcore-rename.c\n@@ -579,7 +579,7 @@ void diffcore_rename(struct diff_options *options)\n \n \tif (options->show_rename_progress) {\n \t\tprogress = start_progress_delay(\n-\t\t\t\t\"Performing inexact rename detection\",\n+\t\t\t\t_(\"Performing inexact rename detection\"),\n \t\t\t\trename_dst_nr * rename_src_nr, 50, 1);\n \t}\n \ndiff --git a/progress.c b/progress.c\nindex 10652b1..261314e 100644\n--- a/progress.c\n+++ b/progress.c\n@@ -9,6 +9,7 @@\n  */\n \n #include \"git-compat-util.h\"\n+#include \"gettext.h\"\n #include \"progress.h\"\n #include \"strbuf.h\"\n \n@@ -220,7 +221,7 @@ struct progress *start_progress(const char *title, unsigned total)\n \n void stop_progress(struct progress **p_progress)\n {\n-\tstop_progress_msg(p_progress, \"done\");\n+\tstop_progress_msg(p_progress, _(\"done\"));\n }\n \n void stop_progress_msg(struct progress **p_progress, const char *msg)\ndiff --git a/unpack-trees.c b/unpack-trees.c\nindex 164354d..9535793 100644\n--- a/unpack-trees.c\n+++ b/unpack-trees.c\n@@ -204,7 +204,7 @@ static int check_updates(struct unpack_trees_options *o)\n \t\t\t\ttotal++;\n \t\t}\n \n-\t\tprogress = start_progress_delay(\"Checking out files\",\n+\t\tprogress = start_progress_delay(_(\"Checking out files\"),\n \t\t\t\t\t\ttotal, 50, 1);\n \t\tcnt = 0;\n \t}\n-- \n1.9.0.40.gaa8c3ea\n"},{"id":"235194","messageId":"alpine.DEB.2.00.1402222244450.1524@ds9.cixit.se","threadId":"35923","inReplyTo":"1392987018-16598-1-git-send-email-pclouds@gmail.com","subject":"Re: [PATCH] i18n: mark all progress lines for translation","fromName":"Peter Krefting","fromEmail":"peter@softwolves.pp.se","sentAt":"2014-02-22T21:45:55Z","receivedAt":"2014-02-22T21:45:55Z","isPatch":true,"sender":{"key":"peter@softwolves.pp.se","avatar":"https://avatars.githubusercontent.com/u/990764?v=4"},"body":"Nguy?n Thái Ng?c Duy:\n\n> I can't think of any case that progress lines are for machine. It \n> started because of the only local untranslated line in \"git clone\". \n> But I think we should do all at once.\n\nIndeed, a good move. Anything that is to be displayed to the end user \nshould be subject to localization; if it is part of a protocol, then \nit needs to be translated on the receiving end.\n\n-- \n\\\\// Peter - http://www.softwolves.pp.se/\n"}]}