{"thread":{"id":"35331","subject":"[PATCH] transport.c: mark push status strings for translation","startedAt":"2013-11-13T12:30:33Z","lastAt":"2013-11-16T03:21:10Z","messageCount":4,"participants":["Nguyễn Thái Ngọc Duy","Jonathan Nieder","Duy Nguyen"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"230564","messageId":"1384345833-8345-1-git-send-email-pclouds@gmail.com","threadId":"35331","inReplyTo":null,"subject":"[PATCH] transport.c: mark push status strings for translation","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2013-11-13T12:30:33Z","receivedAt":"2013-11-13T12:30:33Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Strings are only marked for translations, the actual lookup is delayed\nuntil inside print_ref_status(), so we only have to check for\nporcelain flag once.\n\nWhile at there, mark some error strings in git push for translation\ntoo.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n I was doing something else and stumbled upon this code block, the\n porcelain flag says there's low risk that this change may break\n something.\n\n builtin/push.c |  8 +++----\n transport.c    | 75 ++++++++++++++++++++++++++++++++--------------------------\n 2 files changed, 46 insertions(+), 37 deletions(-)\n\ndiff --git a/builtin/push.c b/builtin/push.c\nindex 7b1b66c..22e2d4c 100644\n--- a/builtin/push.c\n+++ b/builtin/push.c\n@@ -319,7 +319,7 @@ static int push_with_options(struct transport *transport, int flags)\n \n \tif (!is_empty_cas(&cas)) {\n \t\tif (!transport->smart_options)\n-\t\t\tdie(\"underlying transport does not support --%s option\",\n+\t\t\tdie(_(\"underlying transport does not support --%s option\"),\n \t\t\t    CAS_OPT_NAME);\n \t\ttransport->smart_options->cas = &cas;\n \t}\n@@ -426,7 +426,7 @@ static int option_parse_recurse_submodules(const struct option *opt,\n \n \tif (*flags & (TRANSPORT_RECURSE_SUBMODULES_CHECK |\n \t\t      TRANSPORT_RECURSE_SUBMODULES_ON_DEMAND))\n-\t\tdie(\"%s can only be used once.\", opt->long_name);\n+\t\tdie(_(\"%s can only be used once.\"), opt->long_name);\n \n \tif (arg) {\n \t\tif (!strcmp(arg, \"check\"))\n@@ -434,9 +434,9 @@ static int option_parse_recurse_submodules(const struct option *opt,\n \t\telse if (!strcmp(arg, \"on-demand\"))\n \t\t\t*flags |= TRANSPORT_RECURSE_SUBMODULES_ON_DEMAND;\n \t\telse\n-\t\t\tdie(\"bad %s argument: %s\", opt->long_name, arg);\n+\t\t\tdie(_(\"bad %s argument: %s\"), opt->long_name, arg);\n \t} else\n-\t\tdie(\"option %s needs an argument (check|on-demand)\",\n+\t\tdie(_(\"option %s needs an argument (check|on-demand)\"),\n \t\t\t\topt->long_name);\n \n \treturn 0;\ndiff --git a/transport.c b/transport.c\nindex 7202b77..097b1fe 100644\n--- a/transport.c\n+++ b/transport.c\n@@ -14,6 +14,7 @@\n #include \"url.h\"\n #include \"submodule.h\"\n #include \"string-list.h\"\n+#include \"utf8.h\"\n \n /* rsync support */\n \n@@ -627,16 +628,17 @@ static void print_ref_status(char flag, const char *summary, struct ref *to, str\n \t\telse\n \t\t\tfprintf(stdout, \"%s\\n\", summary);\n \t} else {\n-\t\tfprintf(stderr, \" %c %-*s \", flag, TRANSPORT_SUMMARY_WIDTH, summary);\n+\t\tint width = TRANSPORT_SUMMARY_WIDTH;\n+\t\tconst char *localized_summary = _(summary);\n+\t\t/* compensate the invisible bytes in utf-8 strings */\n+\t\twidth += strlen(localized_summary) - utf8_strwidth(localized_summary);\n+\t\tfprintf(stderr, \" %c %-*s \", flag, width, localized_summary);\n \t\tif (from)\n \t\t\tfprintf(stderr, \"%s -> %s\", prettify_refname(from->name), prettify_refname(to->name));\n \t\telse\n \t\t\tfputs(prettify_refname(to->name), stderr);\n-\t\tif (msg) {\n-\t\t\tfputs(\" (\", stderr);\n-\t\t\tfputs(msg, stderr);\n-\t\t\tfputc(')', stderr);\n-\t\t}\n+\t\tif (msg)\n+\t\t\tfprintf(stderr, \" (%s)\", _(msg));\n \t\tfputc('\\n', stderr);\n \t}\n }\n@@ -649,11 +651,11 @@ static const char *status_abbrev(unsigned char sha1[20])\n static void print_ok_ref_status(struct ref *ref, int porcelain)\n {\n \tif (ref->deletion)\n-\t\tprint_ref_status('-', \"[deleted]\", ref, NULL, NULL, porcelain);\n+\t\tprint_ref_status('-', N_(\"[deleted]\"), ref, NULL, NULL, porcelain);\n \telse if (is_null_sha1(ref->old_sha1))\n \t\tprint_ref_status('*',\n-\t\t\t(!prefixcmp(ref->name, \"refs/tags/\") ? \"[new tag]\" :\n-\t\t\t\"[new branch]\"),\n+\t\t\t(!prefixcmp(ref->name, \"refs/tags/\") ? N_(\"[new tag]\") :\n+\t\t\t N_(\"[new branch]\")),\n \t\t\tref, ref->peer_ref, NULL, porcelain);\n \telse {\n \t\tchar quickref[84];\n@@ -664,7 +666,7 @@ static void print_ok_ref_status(struct ref *ref, int porcelain)\n \t\tif (ref->forced_update) {\n \t\t\tstrcat(quickref, \"...\");\n \t\t\ttype = '+';\n-\t\t\tmsg = \"forced update\";\n+\t\t\tmsg = N_(\"forced update\");\n \t\t} else {\n \t\t\tstrcat(quickref, \"..\");\n \t\t\ttype = ' ';\n@@ -678,50 +680,57 @@ static void print_ok_ref_status(struct ref *ref, int porcelain)\n \n static int print_one_push_status(struct ref *ref, const char *dest, int count, int porcelain)\n {\n-\tif (!count)\n-\t\tfprintf(porcelain ? stdout : stderr, \"To %s\\n\", dest);\n+\tif (!count) {\n+\t\tif (porcelain)\n+\t\t\tfprintf(stdout, \"To %s\\n\", dest);\n+\t\telse\n+\t\t\tfprintf_ln(stderr, _(\"To %s\"), dest);\n+\t}\n \n \tswitch(ref->status) {\n \tcase REF_STATUS_NONE:\n-\t\tprint_ref_status('X', \"[no match]\", ref, NULL, NULL, porcelain);\n+\t\tprint_ref_status('X', N_(\"[no match]\"), ref, NULL,\n+\t\t\t\t NULL, porcelain);\n \t\tbreak;\n \tcase REF_STATUS_REJECT_NODELETE:\n-\t\tprint_ref_status('!', \"[rejected]\", ref, NULL,\n-\t\t\t\t\t\t \"remote does not support deleting refs\", porcelain);\n+\t\tprint_ref_status('!', N_(\"[rejected]\"), ref, NULL,\n+\t\t\t\t N_(\"remote does not support deleting refs\"),\n+\t\t\t\t porcelain);\n \t\tbreak;\n \tcase REF_STATUS_UPTODATE:\n-\t\tprint_ref_status('=', \"[up to date]\", ref,\n-\t\t\t\t\t\t ref->peer_ref, NULL, porcelain);\n+\t\tprint_ref_status('=', N_(\"[up to date]\"), ref,\n+\t\t\t\t ref->peer_ref, NULL, porcelain);\n \t\tbreak;\n \tcase REF_STATUS_REJECT_NONFASTFORWARD:\n-\t\tprint_ref_status('!', \"[rejected]\", ref, ref->peer_ref,\n-\t\t\t\t\t\t \"non-fast-forward\", porcelain);\n+\t\tprint_ref_status('!', N_(\"[rejected]\"), ref, ref->peer_ref,\n+\t\t\t\t N_(\"non-fast-forward\"), porcelain);\n \t\tbreak;\n \tcase REF_STATUS_REJECT_ALREADY_EXISTS:\n-\t\tprint_ref_status('!', \"[rejected]\", ref, ref->peer_ref,\n-\t\t\t\t\t\t \"already exists\", porcelain);\n+\t\tprint_ref_status('!', N_(\"[rejected]\"), ref, ref->peer_ref,\n+\t\t\t\t N_(\"already exists\"), porcelain);\n \t\tbreak;\n \tcase REF_STATUS_REJECT_FETCH_FIRST:\n-\t\tprint_ref_status('!', \"[rejected]\", ref, ref->peer_ref,\n-\t\t\t\t\t\t \"fetch first\", porcelain);\n+\t\tprint_ref_status('!', N_(\"[rejected]\"), ref, ref->peer_ref,\n+\t\t\t\t N_(\"fetch first\"), porcelain);\n \t\tbreak;\n \tcase REF_STATUS_REJECT_NEEDS_FORCE:\n-\t\tprint_ref_status('!', \"[rejected]\", ref, ref->peer_ref,\n-\t\t\t\t\t\t \"needs force\", porcelain);\n+\t\tprint_ref_status('!', N_(\"[rejected]\"), ref, ref->peer_ref,\n+\t\t\t\t N_(\"needs force\"), porcelain);\n \t\tbreak;\n \tcase REF_STATUS_REJECT_STALE:\n-\t\tprint_ref_status('!', \"[rejected]\", ref, ref->peer_ref,\n-\t\t\t\t\t\t \"stale info\", porcelain);\n+\t\tprint_ref_status('!', N_(\"[rejected]\"), ref, ref->peer_ref,\n+\t\t\t\t N_(\"stale info\"), porcelain);\n \t\tbreak;\n \tcase REF_STATUS_REMOTE_REJECT:\n-\t\tprint_ref_status('!', \"[remote rejected]\", ref,\n-\t\t\t\t\t\t ref->deletion ? NULL : ref->peer_ref,\n-\t\t\t\t\t\t ref->remote_status, porcelain);\n+\t\tprint_ref_status('!', N_(\"[remote rejected]\"), ref,\n+\t\t\t\t ref->deletion ? NULL : ref->peer_ref,\n+\t\t\t\t ref->remote_status, porcelain);\n \t\tbreak;\n \tcase REF_STATUS_EXPECTING_REPORT:\n-\t\tprint_ref_status('!', \"[remote failure]\", ref,\n-\t\t\t\t\t\t ref->deletion ? NULL : ref->peer_ref,\n-\t\t\t\t\t\t \"remote failed to report status\", porcelain);\n+\t\tprint_ref_status('!', N_(\"[remote failure]\"), ref,\n+\t\t\t\t ref->deletion ? NULL : ref->peer_ref,\n+\t\t\t\t N_(\"remote failed to report status\"),\n+\t\t\t\t porcelain);\n \t\tbreak;\n \tcase REF_STATUS_OK:\n \t\tprint_ok_ref_status(ref, porcelain);\n-- \n1.8.2.82.gc24b958\n"},{"id":"230582","messageId":"20131113232529.GQ10302@google.com","threadId":"35331","inReplyTo":"1384345833-8345-1-git-send-email-pclouds@gmail.com","subject":"Re: [PATCH] transport.c: mark push status strings for translation","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-11-13T23:25:29Z","receivedAt":"2013-11-13T23:25:29Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Nguyễn Thái Ngọc Duy wrote:\n\n> Strings are only marked for translations, the actual lookup is delayed\n> until inside print_ref_status(), so we only have to check for\n> porcelain flag once.\n\nI was confused about what this means (why would it be faster to call\ngettext() once inside print_ref_status() instead of once per caller\nin the argument to print_ref_status()?) until I looked at the code.\nI guess you mean something like\n\n\tMark strings like \"[up to date]\" passed to print_ref_status() for\n\ttranslation with N_() instead of _() so they can remain untranslated\n\tin porcelain mode.\n\n> While at there, mark some error strings in git push for translation\n> too.\n\nThanks.\n\n[...]\n> +++ b/transport.c\n[...]\n> @@ -627,16 +628,17 @@ static void print_ref_status(char flag, const char *summary, struct ref *to, str\n>  \t\telse\n>  \t\t\tfprintf(stdout, \"%s\\n\", summary);\n>  \t} else {\n> -\t\tfprintf(stderr, \" %c %-*s \", flag, TRANSPORT_SUMMARY_WIDTH, summary);\n> +\t\tint width = TRANSPORT_SUMMARY_WIDTH;\n> +\t\tconst char *localized_summary = _(summary);\n> +\t\t/* compensate the invisible bytes in utf-8 strings */\n> +\t\twidth += strlen(localized_summary) - utf8_strwidth(localized_summary);\n> +\t\tfprintf(stderr, \" %c %-*s \", flag, width, localized_summary);\n\nNit: \"Compensate for the ...\".\n\nWhat would happen if 'width' became negative?  That can't happen\nbecause none of the doublewidth characters are ASCII characters, so\nthe question is just academic, but maybe it's worth a note in the\ncomment to avoid slowing down people reading.\n\n>  \t\tif (from)\n>  \t\t\tfprintf(stderr, \"%s -> %s\", prettify_refname(from->name), prettify_refname(to->name));\n\nI'm not sure this is correct for right-to-left languages.  Something\nto solve another day.\n\nThe rest looks good.\n\nIf the commit message is clarified,\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n"},{"id":"230693","messageId":"1384571986-19470-1-git-send-email-pclouds@gmail.com","threadId":"35331","inReplyTo":"1384345833-8345-1-git-send-email-pclouds@gmail.com","subject":"[PATCH v2] transport.c: mark push status strings for translation","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2013-11-16T03:19:46Z","receivedAt":"2013-11-16T03:19:46Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Mark strings like \"[up to date]\" passed to print_ref_status() for\ntranslation with N_() instead of _() so they can remain untranslated\nin porcelain mode.\n\nWhile at there, mark some error strings in git push for translation\ntoo.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n---\n builtin/push.c |  8 +++---\n transport.c    | 81 ++++++++++++++++++++++++++++++++++------------------------\n 2 files changed, 52 insertions(+), 37 deletions(-)\n\ndiff --git a/builtin/push.c b/builtin/push.c\nindex 7b1b66c..22e2d4c 100644\n--- a/builtin/push.c\n+++ b/builtin/push.c\n@@ -319,7 +319,7 @@ static int push_with_options(struct transport *transport, int flags)\n \n \tif (!is_empty_cas(&cas)) {\n \t\tif (!transport->smart_options)\n-\t\t\tdie(\"underlying transport does not support --%s option\",\n+\t\t\tdie(_(\"underlying transport does not support --%s option\"),\n \t\t\t    CAS_OPT_NAME);\n \t\ttransport->smart_options->cas = &cas;\n \t}\n@@ -426,7 +426,7 @@ static int option_parse_recurse_submodules(const struct option *opt,\n \n \tif (*flags & (TRANSPORT_RECURSE_SUBMODULES_CHECK |\n \t\t      TRANSPORT_RECURSE_SUBMODULES_ON_DEMAND))\n-\t\tdie(\"%s can only be used once.\", opt->long_name);\n+\t\tdie(_(\"%s can only be used once.\"), opt->long_name);\n \n \tif (arg) {\n \t\tif (!strcmp(arg, \"check\"))\n@@ -434,9 +434,9 @@ static int option_parse_recurse_submodules(const struct option *opt,\n \t\telse if (!strcmp(arg, \"on-demand\"))\n \t\t\t*flags |= TRANSPORT_RECURSE_SUBMODULES_ON_DEMAND;\n \t\telse\n-\t\t\tdie(\"bad %s argument: %s\", opt->long_name, arg);\n+\t\t\tdie(_(\"bad %s argument: %s\"), opt->long_name, arg);\n \t} else\n-\t\tdie(\"option %s needs an argument (check|on-demand)\",\n+\t\tdie(_(\"option %s needs an argument (check|on-demand)\"),\n \t\t\t\topt->long_name);\n \n \treturn 0;\ndiff --git a/transport.c b/transport.c\nindex 7202b77..1fb92a1 100644\n--- a/transport.c\n+++ b/transport.c\n@@ -14,6 +14,7 @@\n #include \"url.h\"\n #include \"submodule.h\"\n #include \"string-list.h\"\n+#include \"utf8.h\"\n \n /* rsync support */\n \n@@ -627,16 +628,23 @@ static void print_ref_status(char flag, const char *summary, struct ref *to, str\n \t\telse\n \t\t\tfprintf(stdout, \"%s\\n\", summary);\n \t} else {\n-\t\tfprintf(stderr, \" %c %-*s \", flag, TRANSPORT_SUMMARY_WIDTH, summary);\n+\t\tint width = TRANSPORT_SUMMARY_WIDTH;\n+\t\tconst char *localized_summary = _(summary);\n+\t\t/*\n+\t\t * Compensate for the invisible bytes in utf-8\n+\t\t * strings. The expression below is guaranteed always\n+\t\t * positive (or zero in case of ascii strings) because\n+\t\t * none of the doublewidth characters are ASCII\n+\t\t * characters.\n+\t\t */\n+\t\twidth += strlen(localized_summary) - utf8_strwidth(localized_summary);\n+\t\tfprintf(stderr, \" %c %-*s \", flag, width, localized_summary);\n \t\tif (from)\n \t\t\tfprintf(stderr, \"%s -> %s\", prettify_refname(from->name), prettify_refname(to->name));\n \t\telse\n \t\t\tfputs(prettify_refname(to->name), stderr);\n-\t\tif (msg) {\n-\t\t\tfputs(\" (\", stderr);\n-\t\t\tfputs(msg, stderr);\n-\t\t\tfputc(')', stderr);\n-\t\t}\n+\t\tif (msg)\n+\t\t\tfprintf(stderr, \" (%s)\", _(msg));\n \t\tfputc('\\n', stderr);\n \t}\n }\n@@ -649,11 +657,11 @@ static const char *status_abbrev(unsigned char sha1[20])\n static void print_ok_ref_status(struct ref *ref, int porcelain)\n {\n \tif (ref->deletion)\n-\t\tprint_ref_status('-', \"[deleted]\", ref, NULL, NULL, porcelain);\n+\t\tprint_ref_status('-', N_(\"[deleted]\"), ref, NULL, NULL, porcelain);\n \telse if (is_null_sha1(ref->old_sha1))\n \t\tprint_ref_status('*',\n-\t\t\t(!prefixcmp(ref->name, \"refs/tags/\") ? \"[new tag]\" :\n-\t\t\t\"[new branch]\"),\n+\t\t\t(!prefixcmp(ref->name, \"refs/tags/\") ? N_(\"[new tag]\") :\n+\t\t\t N_(\"[new branch]\")),\n \t\t\tref, ref->peer_ref, NULL, porcelain);\n \telse {\n \t\tchar quickref[84];\n@@ -664,7 +672,7 @@ static void print_ok_ref_status(struct ref *ref, int porcelain)\n \t\tif (ref->forced_update) {\n \t\t\tstrcat(quickref, \"...\");\n \t\t\ttype = '+';\n-\t\t\tmsg = \"forced update\";\n+\t\t\tmsg = N_(\"forced update\");\n \t\t} else {\n \t\t\tstrcat(quickref, \"..\");\n \t\t\ttype = ' ';\n@@ -678,50 +686,57 @@ static void print_ok_ref_status(struct ref *ref, int porcelain)\n \n static int print_one_push_status(struct ref *ref, const char *dest, int count, int porcelain)\n {\n-\tif (!count)\n-\t\tfprintf(porcelain ? stdout : stderr, \"To %s\\n\", dest);\n+\tif (!count) {\n+\t\tif (porcelain)\n+\t\t\tfprintf(stdout, \"To %s\\n\", dest);\n+\t\telse\n+\t\t\tfprintf_ln(stderr, _(\"To %s\"), dest);\n+\t}\n \n \tswitch(ref->status) {\n \tcase REF_STATUS_NONE:\n-\t\tprint_ref_status('X', \"[no match]\", ref, NULL, NULL, porcelain);\n+\t\tprint_ref_status('X', N_(\"[no match]\"), ref, NULL,\n+\t\t\t\t NULL, porcelain);\n \t\tbreak;\n \tcase REF_STATUS_REJECT_NODELETE:\n-\t\tprint_ref_status('!', \"[rejected]\", ref, NULL,\n-\t\t\t\t\t\t \"remote does not support deleting refs\", porcelain);\n+\t\tprint_ref_status('!', N_(\"[rejected]\"), ref, NULL,\n+\t\t\t\t N_(\"remote does not support deleting refs\"),\n+\t\t\t\t porcelain);\n \t\tbreak;\n \tcase REF_STATUS_UPTODATE:\n-\t\tprint_ref_status('=', \"[up to date]\", ref,\n-\t\t\t\t\t\t ref->peer_ref, NULL, porcelain);\n+\t\tprint_ref_status('=', N_(\"[up to date]\"), ref,\n+\t\t\t\t ref->peer_ref, NULL, porcelain);\n \t\tbreak;\n \tcase REF_STATUS_REJECT_NONFASTFORWARD:\n-\t\tprint_ref_status('!', \"[rejected]\", ref, ref->peer_ref,\n-\t\t\t\t\t\t \"non-fast-forward\", porcelain);\n+\t\tprint_ref_status('!', N_(\"[rejected]\"), ref, ref->peer_ref,\n+\t\t\t\t N_(\"non-fast-forward\"), porcelain);\n \t\tbreak;\n \tcase REF_STATUS_REJECT_ALREADY_EXISTS:\n-\t\tprint_ref_status('!', \"[rejected]\", ref, ref->peer_ref,\n-\t\t\t\t\t\t \"already exists\", porcelain);\n+\t\tprint_ref_status('!', N_(\"[rejected]\"), ref, ref->peer_ref,\n+\t\t\t\t N_(\"already exists\"), porcelain);\n \t\tbreak;\n \tcase REF_STATUS_REJECT_FETCH_FIRST:\n-\t\tprint_ref_status('!', \"[rejected]\", ref, ref->peer_ref,\n-\t\t\t\t\t\t \"fetch first\", porcelain);\n+\t\tprint_ref_status('!', N_(\"[rejected]\"), ref, ref->peer_ref,\n+\t\t\t\t N_(\"fetch first\"), porcelain);\n \t\tbreak;\n \tcase REF_STATUS_REJECT_NEEDS_FORCE:\n-\t\tprint_ref_status('!', \"[rejected]\", ref, ref->peer_ref,\n-\t\t\t\t\t\t \"needs force\", porcelain);\n+\t\tprint_ref_status('!', N_(\"[rejected]\"), ref, ref->peer_ref,\n+\t\t\t\t N_(\"needs force\"), porcelain);\n \t\tbreak;\n \tcase REF_STATUS_REJECT_STALE:\n-\t\tprint_ref_status('!', \"[rejected]\", ref, ref->peer_ref,\n-\t\t\t\t\t\t \"stale info\", porcelain);\n+\t\tprint_ref_status('!', N_(\"[rejected]\"), ref, ref->peer_ref,\n+\t\t\t\t N_(\"stale info\"), porcelain);\n \t\tbreak;\n \tcase REF_STATUS_REMOTE_REJECT:\n-\t\tprint_ref_status('!', \"[remote rejected]\", ref,\n-\t\t\t\t\t\t ref->deletion ? NULL : ref->peer_ref,\n-\t\t\t\t\t\t ref->remote_status, porcelain);\n+\t\tprint_ref_status('!', N_(\"[remote rejected]\"), ref,\n+\t\t\t\t ref->deletion ? NULL : ref->peer_ref,\n+\t\t\t\t ref->remote_status, porcelain);\n \t\tbreak;\n \tcase REF_STATUS_EXPECTING_REPORT:\n-\t\tprint_ref_status('!', \"[remote failure]\", ref,\n-\t\t\t\t\t\t ref->deletion ? NULL : ref->peer_ref,\n-\t\t\t\t\t\t \"remote failed to report status\", porcelain);\n+\t\tprint_ref_status('!', N_(\"[remote failure]\"), ref,\n+\t\t\t\t ref->deletion ? NULL : ref->peer_ref,\n+\t\t\t\t N_(\"remote failed to report status\"),\n+\t\t\t\t porcelain);\n \t\tbreak;\n \tcase REF_STATUS_OK:\n \t\tprint_ok_ref_status(ref, porcelain);\n-- \n1.8.2.83.gc99314b\n"},{"id":"230694","messageId":"CACsJy8DNAOO8mFPyDOLc_y6x7wAUze=MHYp=mVDQ=N8jkFcKbA@mail.gmail.com","threadId":"35331","inReplyTo":"20131113232529.GQ10302@google.com","subject":"Re: [PATCH] transport.c: mark push status strings for translation","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2013-11-16T03:21:10Z","receivedAt":"2013-11-16T03:21:10Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Thu, Nov 14, 2013 at 6:25 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:\n>>               if (from)\n>>                       fprintf(stderr, \"%s -> %s\", prettify_refname(from->name), prettify_refname(to->name));\n>\n> I'm not sure this is correct for right-to-left languages.  Something\n> to solve another day.\n\nI don't speak rtl languages and don't know the support status for\nthem. But to me rtl on terminal is a terrible idea as it's assumed\neverywhere that the terminal prints from left to right. Anyway let's\nwait until a rtl translation comes to git, then we'll have somebody\nknowledgable about the languages to talk about.\n-- \nDuy\n"}]}