{"thread":{"id":"31235","subject":"[PATCH] i18n: mark progress strings for translation","startedAt":"2012-08-11T11:25:04Z","lastAt":"2012-08-12T11:42:26Z","messageCount":3,"participants":["Nguyễn Thái Ngọc Duy","Junio C Hamano","Nguyen Thai Ngoc Duy"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"196860","messageId":"1344684304-22425-1-git-send-email-pclouds@gmail.com","threadId":"31235","inReplyTo":null,"subject":"[PATCH] i18n: mark progress strings for translation","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2012-08-11T11:25:04Z","receivedAt":"2012-08-11T11:25:04Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n I know it's late in the cycle so let's queue it for the next one\n before I forget it.\n \n I'm after the \"done\\n\" in index-pack but we should also make it\n possible to translate units (especially \"bytes\" which is plural).\n There are ellipsis elsewhere in this file but I don't think it's\n worth translating.\n\n progress.c | 15 ++++++++-------\n 1 tập tin đã bị thay đổi, 8 được thêm vào(+), 7 bị xóa(-)\n\ndiff --git a/progress.c b/progress.c\nindex 3971f49..b69d657 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 \n #define TP_IDX_MAX      8\n@@ -117,29 +118,29 @@ static void throughput_string(struct throughput *tp, off_t total,\n {\n \tint l = sizeof(tp->display);\n \tif (total > 1 << 30) {\n-\t\tl -= snprintf(tp->display, l, \", %u.%2.2u GiB\",\n+\t\tl -= snprintf(tp->display, l, _(\", %u.%2.2u GiB\"),\n \t\t\t      (int)(total >> 30),\n \t\t\t      (int)(total & ((1 << 30) - 1)) / 10737419);\n \t} else if (total > 1 << 20) {\n \t\tint x = total + 5243;  /* for rounding */\n-\t\tl -= snprintf(tp->display, l, \", %u.%2.2u MiB\",\n+\t\tl -= snprintf(tp->display, l, _(\", %u.%2.2u MiB\"),\n \t\t\t      x >> 20, ((x & ((1 << 20) - 1)) * 100) >> 20);\n \t} else if (total > 1 << 10) {\n \t\tint x = total + 5;  /* for rounding */\n-\t\tl -= snprintf(tp->display, l, \", %u.%2.2u KiB\",\n+\t\tl -= snprintf(tp->display, l, _(\", %u.%2.2u KiB\"),\n \t\t\t      x >> 10, ((x & ((1 << 10) - 1)) * 100) >> 10);\n \t} else {\n-\t\tl -= snprintf(tp->display, l, \", %u bytes\", (int)total);\n+\t\tl -= snprintf(tp->display, l, _(\", %u bytes\"), (int)total);\n \t}\n \n \tif (rate > 1 << 10) {\n \t\tint x = rate + 5;  /* for rounding */\n \t\tsnprintf(tp->display + sizeof(tp->display) - l, l,\n-\t\t\t \" | %u.%2.2u MiB/s\",\n+\t\t\t _(\" | %u.%2.2u MiB/s\"),\n \t\t\t x >> 10, ((x & ((1 << 10) - 1)) * 100) >> 10);\n \t} else if (rate)\n \t\tsnprintf(tp->display + sizeof(tp->display) - l, l,\n-\t\t\t \" | %u KiB/s\", rate);\n+\t\t\t _(\" | %u KiB/s\"), rate);\n }\n \n void display_throughput(struct progress *progress, off_t total)\n@@ -236,7 +237,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)\n-- \n1.7.12.rc2.18.g61b472e\n"},{"id":"196877","messageId":"7v8vdkhgqb.fsf@alter.siamese.dyndns.org","threadId":"31235","inReplyTo":"1344684304-22425-1-git-send-email-pclouds@gmail.com","subject":"Re: [PATCH] i18n: mark progress strings for translation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-08-12T04:33:16Z","receivedAt":"2012-08-12T04:33:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:\n\n> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n> ---\n>  I know it's late in the cycle so let's queue it for the next one\n>  before I forget it.\n\nI won't necessarily be queuing this.  Not forgetting is a\nresponsibility of individual developers.\n\nBut it is a good idea to show an early iteration for input from\nothers.\n\nI personally do not think this makes much sense, as half the\nprogress message you see comes from the other end of the connection,\nwhich does not know nor care what language you speak.\n"},{"id":"196881","messageId":"CACsJy8Afhu+kaou6J_Ts5u0ffP+_5wF+1+rc5H2o5rY23vnJeg@mail.gmail.com","threadId":"31235","inReplyTo":"7v8vdkhgqb.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] i18n: mark progress strings for translation","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2012-08-12T11:42:26Z","receivedAt":"2012-08-12T11:42:26Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Sun, Aug 12, 2012 at 11:33 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> I personally do not think this makes much sense, as half the\n> progress message you see comes from the other end of the connection,\n> which does not know nor care what language you speak.\n\nThat's something we should fix too (either make it entirely in English\nor a native language). Still there are commands where all progress\nmessages come from local side and it should not show \"done\" in English\nin such cases.\n-- \nDuy\n"}]}