{"thread":{"id":"33486","subject":"[PATCH] i18n: make the translation of -u advise in one go","startedAt":"2013-04-12T02:46:26Z","lastAt":"2013-04-12T03:53:01Z","messageCount":4,"participants":["Jiang Xin","Eric Sunshine","Jonathan Nieder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"214023","messageId":"4003e29bb04b122897cefe2a8057266e2428dce5.1365734618.git.worldhello.net@gmail.com","threadId":"33486","inReplyTo":null,"subject":"[PATCH] i18n: make the translation of -u advise in one go","fromName":"Jiang Xin","fromEmail":"worldhello.net@gmail.com","sentAt":"2013-04-12T02:46:26Z","receivedAt":"2013-04-12T02:46:26Z","isPatch":true,"sender":{"key":"worldhello.net@gmail.com","avatar":"https://avatars.githubusercontent.com/u/183860?v=4"},"body":"The advise (consider use of -u when read_directory takes too long) is\nseparated into 3 different status_printf_ln() calls, and which brings\ntrouble for translators.\n\nSince status_vprintf() called by status_printf_ln() can handle eol in\nbuffer, we could simply join these lines into one paragraph.\n\nSigned-off-by: Jiang Xin <worldhello.net@gmail.com>\n---\n wt-status.c | 14 +++++---------\n 1 file changed, 5 insertions(+), 9 deletions(-)\n\ndiff --git a/wt-status.c b/wt-status.c\nindex 09416..f0d3 100644\n--- a/wt-status.c\n+++ b/wt-status.c\n@@ -1223,16 +1223,12 @@ void wt_status_print(struct wt_status *s)\n \t\tif (s->show_ignored_files)\n \t\t\twt_status_print_other(s, &s->ignored, _(\"Ignored files\"), \"add -f\");\n \t\tif (advice_status_u_option && 2000 < s->untracked_in_ms) {\n-\t\t\tstatus_printf_ln(s, GIT_COLOR_NORMAL, \"\");\n \t\t\tstatus_printf_ln(s, GIT_COLOR_NORMAL,\n-\t\t\t\t _(\"It took %.2f seconds to enumerate untracked files.\"\n-\t\t\t\t   \"  'status -uno'\"),\n-\t\t\t\t s->untracked_in_ms / 1000.0);\n-\t\t\tstatus_printf_ln(s, GIT_COLOR_NORMAL,\n-\t\t\t\t _(\"may speed it up, but you have to be careful not\"\n-\t\t\t\t   \" to forget to add\"));\n-\t\t\tstatus_printf_ln(s, GIT_COLOR_NORMAL,\n-\t\t\t\t _(\"new files yourself (see 'git help status').\"));\n+\t\t\t\t\t _(\"\\n\"\n+\t\t\t\t\t   \"It took %.2f seconds to enumerate untracked files. 'status -uno'\\n\"\n+\t\t\t\t\t   \"may speed it up, but you have to be careful not to forget to add\\n\"\n+\t\t\t\t\t   \"new files yourself (see 'git help status').\"),\n+\t\t\t\t\t s->untracked_in_ms / 1000.0);\n \t\t}\n \t} else if (s->commitable)\n \t\tstatus_printf_ln(s, GIT_COLOR_NORMAL, _(\"Untracked files not listed%s\"),\n-- \n1.8.2.1.347.g1003b3a.dirty\n"},{"id":"214024","messageId":"CAPig+cRu7kAsfqftuoC0HDZ3fRTXLC4j21God4SRk67psWR=1g@mail.gmail.com","threadId":"33486","inReplyTo":"4003e29bb04b122897cefe2a8057266e2428dce5.1365734618.git.worldhello.net@gmail.com","subject":"Re: [PATCH] i18n: make the translation of -u advise in one go","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2013-04-12T02:53:24Z","receivedAt":"2013-04-12T02:53:24Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Apr 11, 2013 at 10:46 PM, Jiang Xin <worldhello.net@gmail.com> wrote:\n> i18n: make the translation of -u advise in one go\n\ns/advise/advice/\n\n> The advise (consider use of -u when read_directory takes too long) is\n\nDitto: s/advise/advice/\n\n> separated into 3 different status_printf_ln() calls, and which brings\n> trouble for translators.\n>\n> Since status_vprintf() called by status_printf_ln() can handle eol in\n> buffer, we could simply join these lines into one paragraph.\n>\n> Signed-off-by: Jiang Xin <worldhello.net@gmail.com>\n"},{"id":"214025","messageId":"20130412025501.GB3266@elie.Belkin","threadId":"33486","inReplyTo":"4003e29bb04b122897cefe2a8057266e2428dce5.1365734618.git.worldhello.net@gmail.com","subject":"Re: [PATCH] i18n: make the translation of -u advise in one go","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-04-12T02:55:02Z","receivedAt":"2013-04-12T02:55:02Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nJiang Xin wrote:\n\n> Since status_vprintf() called by status_printf_ln() can handle eol in\n> buffer, we could simply join these lines into one paragraph.\n\nGood idea.\n\n[...]\n> --- a/wt-status.c\n> +++ b/wt-status.c\n> @@ -1223,16 +1223,12 @@ void wt_status_print(struct wt_status *s)\n>  \t\tif (s->show_ignored_files)\n>  \t\t\twt_status_print_other(s, &s->ignored, _(\"Ignored files\"), \"add -f\");\n>  \t\tif (advice_status_u_option && 2000 < s->untracked_in_ms) {\n> -\t\t\tstatus_printf_ln(s, GIT_COLOR_NORMAL, \"\");\n\nTiny nit: I'd suggest keeping the above line, making it:\n\n\t\t\tstatus_printf_ln(s, GIT_COLOR_NORMAL, \"\");\n\t\t\tstatus_printf_ln(s, GIT_COLOR_NORMAL,\n\t\t\t\t\t_(\"It took ...\"\n\t\t\t\t\t  \"... status').\"),\n\t\t\t\t\ts->untracked_in_ms / 1000.0);\n\nThat way, the message to be translated doesn't start with a newline,\nso translators don't have to worry about preserving it (or removing\nit if the layout ever changes in the future, etc).\n\nWith that change,\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n\nThanks.\n"},{"id":"214026","messageId":"7df2833fe51c614bf9a2a6208df2e09d913a046e.1365738420.git.worldhello.net@gmail.com","threadId":"33486","inReplyTo":"20130412025501.GB3266@elie.Belkin","subject":"[PATCH v2] i18n: make the translation of -u advice in one go","fromName":"Jiang Xin","fromEmail":"worldhello.net@gmail.com","sentAt":"2013-04-12T03:53:01Z","receivedAt":"2013-04-12T03:53:01Z","isPatch":true,"sender":{"key":"worldhello.net@gmail.com","avatar":"https://avatars.githubusercontent.com/u/183860?v=4"},"body":"The advice (consider use of -u when read_directory takes too long) is\nseparated into 3 different status_printf_ln() calls, and which brings\ntrouble for translators.\n\nSince status_vprintf() called by status_printf_ln() can handle eol in\nbuffer, we could simply join these lines into one paragraph.\n\nSigned-off-by: Jiang Xin <worldhello.net@gmail.com>\nReviewed-by: Eric Sunshine <sunshine@sunshineco.com>\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n---\n wt-status.c | 12 ++++--------\n 1 file changed, 4 insertions(+), 8 deletions(-)\n\ndiff --git a/wt-status.c b/wt-status.c\nindex 09416..ec5f2 100644\n--- a/wt-status.c\n+++ b/wt-status.c\n@@ -1225,14 +1225,10 @@ void wt_status_print(struct wt_status *s)\n \t\tif (advice_status_u_option && 2000 < s->untracked_in_ms) {\n \t\t\tstatus_printf_ln(s, GIT_COLOR_NORMAL, \"\");\n \t\t\tstatus_printf_ln(s, GIT_COLOR_NORMAL,\n-\t\t\t\t _(\"It took %.2f seconds to enumerate untracked files.\"\n-\t\t\t\t   \"  'status -uno'\"),\n-\t\t\t\t s->untracked_in_ms / 1000.0);\n-\t\t\tstatus_printf_ln(s, GIT_COLOR_NORMAL,\n-\t\t\t\t _(\"may speed it up, but you have to be careful not\"\n-\t\t\t\t   \" to forget to add\"));\n-\t\t\tstatus_printf_ln(s, GIT_COLOR_NORMAL,\n-\t\t\t\t _(\"new files yourself (see 'git help status').\"));\n+\t\t\t\t\t _(\"It took %.2f seconds to enumerate untracked files. 'status -uno'\\n\"\n+\t\t\t\t\t   \"may speed it up, but you have to be careful not to forget to add\\n\"\n+\t\t\t\t\t   \"new files yourself (see 'git help status').\"),\n+\t\t\t\t\t s->untracked_in_ms / 1000.0);\n \t\t}\n \t} else if (s->commitable)\n \t\tstatus_printf_ln(s, GIT_COLOR_NORMAL, _(\"Untracked files not listed%s\"),\n-- \n1.8.2.1.347.g1003b3a.dirty\n"}]}