{"thread":{"id":"39232","subject":"[PATCH] fix a translation error in diff-tree","startedAt":"2015-05-04T11:22:33Z","lastAt":"2015-05-04T17:47:41Z","messageCount":2,"participants":["Alangi Derick","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"260511","messageId":"55476653.e33ac20a.753d.ffffc3cc@mx.google.com","threadId":"39232","inReplyTo":null,"subject":"[PATCH] fix a translation error in diff-tree","fromName":"Alangi Derick","fromEmail":"alangiderick@gmail.com","sentAt":"2015-05-04T11:22:33Z","receivedAt":"2015-05-04T11:22:33Z","isPatch":true,"sender":{"key":"alangiderick@gmail.com","avatar":"https://gravatar.com/avatar/f5878e69e83b4cf7ed499336c4a114dc2cb253253bc57c9b8ffcf0e129320795?d=mp&s=160"},"body":"Signed-off-by: Alangi Derick <alangiderick@gmail.com>\n---\n builtin/diff-tree.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin/diff-tree.c b/builtin/diff-tree.c\nindex 12b683d..602b5f9 100644\n--- a/builtin/diff-tree.c\n+++ b/builtin/diff-tree.c\n@@ -45,7 +45,7 @@ static int stdin_diff_trees(struct tree *tree1, char *line, int len)\n \tunsigned char sha1[20];\n \tstruct tree *tree2;\n \tif (len != 82 || !isspace(line[40]) || get_sha1_hex(line + 41, sha1))\n-\t\treturn error(\"Need exactly two trees, separated by a space\");\n+\t\treturn error(_(\"Need exactly two trees, separated by a space\"));\n \ttree2 = lookup_tree(sha1);\n \tif (!tree2 || parse_tree(tree2))\n \t\treturn -1;\n@@ -75,7 +75,7 @@ static int diff_tree_stdin(char *line)\n \t\treturn stdin_diff_commit((struct commit *)obj, line, len);\n \tif (obj->type == OBJ_TREE)\n \t\treturn stdin_diff_trees((struct tree *)obj, line, len);\n-\terror(\"Object %s is a %s, not a commit or tree\",\n+\terror(_(\"Object %s is a %s, not a commit or tree\"),\n \t      sha1_to_hex(sha1), typename(obj->type));\n \treturn -1;\n }\n-- \n2.4.0.5.g7a7787e.dirty\n"},{"id":"260533","messageId":"xmqqh9rstete.fsf@gitster.dls.corp.google.com","threadId":"39232","inReplyTo":"55476653.e33ac20a.753d.ffffc3cc@mx.google.com","subject":"Re: [PATCH] fix a translation error in diff-tree","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-05-04T17:47:41Z","receivedAt":"2015-05-04T17:47:41Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alangi Derick <alangiderick@gmail.com> writes:\n\n[... actually he writes nothing here ;-) ...]\n\n> Signed-off-by: Alangi Derick <alangiderick@gmail.com>\n> ---\n\n>> Subject: Re: [PATCH] fix a translation error in diff-tree\n\nAmong many ones you sent recently, this title looks the closest in\nshape to what SubmittingPatches expects to see.  It however is not\nquite there; SubmittingPatches prefers to see an \"<area>:\" prefix so\nthat output of \"git shortlog --no-merges -100\" would give the\nreaders a better overview of the changes.\n\nWhen \"fix a translation error in diff-tree\" appears among 100 other\ncommits in \"git shortlog\" output, what kind of change would a reader\nimagine this to be, though?\n\nMy answer to that question would be: \"There was an existing\ntranslation of diff-tree output, that was incorrect in some\nunspecified way, and this change corrects that breakage.\"\n\nAnd that is not what is going on, so the change is mistitled.\nPerhaps\n\n    diff-tree.c: mark error strings for translation\n\nor something, modelling after 8262aaa2 (config.c: mark error and\nwarnings strings for translation, 2014-08-07), may be more\nappropriate.\n\nHaving said all that, I do not think we should break scripts by\nadding _(\"\") to \"git diff-tree\" which is a plumbing command whose\noutput is meant for machine consumption.\n\n>  builtin/diff-tree.c | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/builtin/diff-tree.c b/builtin/diff-tree.c\n> index 12b683d..602b5f9 100644\n> --- a/builtin/diff-tree.c\n> +++ b/builtin/diff-tree.c\n> @@ -45,7 +45,7 @@ static int stdin_diff_trees(struct tree *tree1, char *line, int len)\n>  \tunsigned char sha1[20];\n>  \tstruct tree *tree2;\n>  \tif (len != 82 || !isspace(line[40]) || get_sha1_hex(line + 41, sha1))\n> -\t\treturn error(\"Need exactly two trees, separated by a space\");\n> +\t\treturn error(_(\"Need exactly two trees, separated by a space\"));\n>  \ttree2 = lookup_tree(sha1);\n>  \tif (!tree2 || parse_tree(tree2))\n>  \t\treturn -1;\n> @@ -75,7 +75,7 @@ static int diff_tree_stdin(char *line)\n>  \t\treturn stdin_diff_commit((struct commit *)obj, line, len);\n>  \tif (obj->type == OBJ_TREE)\n>  \t\treturn stdin_diff_trees((struct tree *)obj, line, len);\n> -\terror(\"Object %s is a %s, not a commit or tree\",\n> +\terror(_(\"Object %s is a %s, not a commit or tree\"),\n>  \t      sha1_to_hex(sha1), typename(obj->type));\n>  \treturn -1;\n>  }\n"}]}