{"thread":{"id":"39235","subject":"[PATCH] fixed translation errors","startedAt":"2015-05-03T22:19:44Z","lastAt":"2015-05-04T23:38:53Z","messageCount":3,"participants":["Alangi Derick","Stefan Beller","Eric Sunshine"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"260514","messageId":"5547675a.274ec20a.69fb.ffffce22@mx.google.com","threadId":"39235","inReplyTo":null,"subject":"[PATCH] fixed translation errors","fromName":"Alangi Derick","fromEmail":"alangiderick@gmail.com","sentAt":"2015-05-03T22:19:44Z","receivedAt":"2015-05-03T22:19:44Z","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/apply.c | 60 ++++++++++++++++++++++++++++-----------------------------\n 1 file changed, 30 insertions(+), 30 deletions(-)\n\ndiff --git a/builtin/apply.c b/builtin/apply.c\nindex 0769b09..66d2aba 100644\n--- a/builtin/apply.c\n+++ b/builtin/apply.c\n@@ -1381,7 +1381,7 @@ static void recount_diff(const char *line, int size, struct fragment *fragment)\n \tint oldlines = 0, newlines = 0, ret = 0;\n \n \tif (size < 1) {\n-\t\twarning(\"recount: ignore empty hunk\");\n+\t\twarning(_(\"recount: ignore empty hunk\"));\n \t\treturn;\n \t}\n \n@@ -1500,8 +1500,8 @@ static int find_header(const char *line, unsigned long size, int *hdrsize, struc\n \t\t\t\tpatch->new_name = xstrdup(patch->def_name);\n \t\t\t}\n \t\t\tif (!patch->is_delete && !patch->new_name)\n-\t\t\t\tdie(\"git diff header lacks filename information \"\n-\t\t\t\t    \"(line %d)\", linenr);\n+\t\t\t\tdie(_(\"git diff header lacks filename information \"\n+\t\t\t\t    \"(line %d)\"), linenr);\n \t\t\tpatch->is_toplevel_relative = 1;\n \t\t\t*hdrsize = git_hdr_len;\n \t\t\treturn offset;\n@@ -2237,7 +2237,7 @@ static void update_pre_post_images(struct image *preimage,\n \tif (postlen\n \t    ? postlen < new - postimage->buf\n \t    : postimage->len < new - postimage->buf)\n-\t\tdie(\"BUG: caller miscounted postlen: asked %d, orig = %d, used = %d\",\n+\t\tdie(_(\"BUG: caller miscounted postlen: asked %d, orig = %d, used = %d\"),\n \t\t    (int)postlen, (int) postimage->len, (int)(new - postimage->buf));\n \n \t/* Fix the length of the whole thing */\n@@ -2940,8 +2940,8 @@ static int apply_binary_fragment(struct image *img, struct patch *patch)\n \t/* Binary patch is irreversible without the optional second hunk */\n \tif (apply_in_reverse) {\n \t\tif (!fragment->next)\n-\t\t\treturn error(\"cannot reverse-apply a binary patch \"\n-\t\t\t\t     \"without the reverse hunk to '%s'\",\n+\t\t\treturn error(_(\"cannot reverse-apply a binary patch \"\n+\t\t\t\t     \"without the reverse hunk to '%s'\"),\n \t\t\t\t     patch->new_name\n \t\t\t\t     ? patch->new_name : patch->old_name);\n \t\tfragment = fragment->next;\n@@ -2984,8 +2984,8 @@ static int apply_binary(struct image *img, struct patch *patch)\n \t    strlen(patch->new_sha1_prefix) != 40 ||\n \t    get_sha1_hex(patch->old_sha1_prefix, sha1) ||\n \t    get_sha1_hex(patch->new_sha1_prefix, sha1))\n-\t\treturn error(\"cannot apply binary patch to '%s' \"\n-\t\t\t     \"without full index line\", name);\n+\t\treturn error(_(\"cannot apply binary patch to '%s' \"\n+\t\t\t     \"without full index line\"), name);\n \n \tif (patch->old_name) {\n \t\t/*\n@@ -2994,16 +2994,16 @@ static int apply_binary(struct image *img, struct patch *patch)\n \t\t */\n \t\thash_sha1_file(img->buf, img->len, blob_type, sha1);\n \t\tif (strcmp(sha1_to_hex(sha1), patch->old_sha1_prefix))\n-\t\t\treturn error(\"the patch applies to '%s' (%s), \"\n+\t\t\treturn error(_(\"the patch applies to '%s' (%s), \"\n \t\t\t\t     \"which does not match the \"\n-\t\t\t\t     \"current contents.\",\n+\t\t\t\t     \"current contents.\"),\n \t\t\t\t     name, sha1_to_hex(sha1));\n \t}\n \telse {\n \t\t/* Otherwise, the old one must be empty. */\n \t\tif (img->len)\n-\t\t\treturn error(\"the patch applies to an empty \"\n-\t\t\t\t     \"'%s' but it is not empty\", name);\n+\t\t\treturn error(_(\"the patch applies to an empty \"\n+\t\t\t\t     \"'%s' but it is not empty\"), name);\n \t}\n \n \tget_sha1_hex(patch->new_sha1_prefix, sha1);\n@@ -3020,8 +3020,8 @@ static int apply_binary(struct image *img, struct patch *patch)\n \n \t\tresult = read_sha1_file(sha1, &type, &size);\n \t\tif (!result)\n-\t\t\treturn error(\"the necessary postimage %s for \"\n-\t\t\t\t     \"'%s' cannot be read\",\n+\t\t\treturn error(_(\"the necessary postimage %s for \"\n+\t\t\t\t     \"'%s' cannot be read\"),\n \t\t\t\t     patch->new_sha1_prefix, name);\n \t\tclear_image(img);\n \t\timg->buf = result;\n@@ -3342,7 +3342,7 @@ static int load_current(struct image *image, struct patch *patch)\n \tunsigned mode = patch->new_mode;\n \n \tif (!patch->is_new)\n-\t\tdie(\"BUG: patch to %s is not a creation\", patch->old_name);\n+\t\tdie(_(\"BUG: patch to %s is not a creation\"), patch->old_name);\n \n \tpos = cache_name_pos(name, strlen(name));\n \tif (pos < 0)\n@@ -3387,7 +3387,7 @@ static int try_threeway(struct image *image, struct patch *patch,\n \t\twrite_sha1_file(\"\", 0, blob_type, pre_sha1);\n \telse if (get_sha1(patch->old_sha1_prefix, pre_sha1) ||\n \t\t read_blob_object(&buf, pre_sha1, patch->old_mode))\n-\t\treturn error(\"repository lacks the necessary blob to fall back on 3-way merge.\");\n+\t\treturn error(_(\"repository lacks the necessary blob to fall back on 3-way merge.\"));\n \n \tfprintf(stderr, \"Falling back to three-way merge...\\n\");\n \n@@ -3405,11 +3405,11 @@ static int try_threeway(struct image *image, struct patch *patch,\n \t/* our_sha1[] is ours */\n \tif (patch->is_new) {\n \t\tif (load_current(&tmp_image, patch))\n-\t\t\treturn error(\"cannot read the current contents of '%s'\",\n+\t\t\treturn error(_(\"cannot read the current contents of '%s'\"),\n \t\t\t\t     patch->new_name);\n \t} else {\n \t\tif (load_preimage(&tmp_image, patch, st, ce))\n-\t\t\treturn error(\"cannot read the current contents of '%s'\",\n+\t\t\treturn error(_(\"cannot read the current contents of '%s'\"),\n \t\t\t\t     patch->old_name);\n \t}\n \twrite_sha1_file(tmp_image.buf, tmp_image.len, blob_type, our_sha1);\n@@ -3572,7 +3572,7 @@ static int check_to_create(const char *new_name, int ok_if_exists)\n \n \t\treturn EXISTS_IN_WORKTREE;\n \t} else if ((errno != ENOENT) && (errno != ENOTDIR)) {\n-\t\treturn error(\"%s: %s\", new_name, strerror(errno));\n+\t\treturn error(_(\"%s: %s\"), new_name, strerror(errno));\n \t}\n \treturn 0;\n }\n@@ -3888,29 +3888,29 @@ static void build_fake_ancestor(struct patch *list, const char *filename)\n \t\t\tif (!preimage_sha1_in_gitlink_patch(patch, sha1))\n \t\t\t\t; /* ok, the textual part looks sane */\n \t\t\telse\n-\t\t\t\tdie(\"sha1 information is lacking or useless for submodule %s\",\n+\t\t\t\tdie(_(\"sha1 information is lacking or useless for submodule %s\"),\n \t\t\t\t    name);\n \t\t} else if (!get_sha1_blob(patch->old_sha1_prefix, sha1)) {\n \t\t\t; /* ok */\n \t\t} else if (!patch->lines_added && !patch->lines_deleted) {\n \t\t\t/* mode-only change: update the current */\n \t\t\tif (get_current_sha1(patch->old_name, sha1))\n-\t\t\t\tdie(\"mode change for %s, which is not \"\n-\t\t\t\t    \"in current HEAD\", name);\n+\t\t\t\tdie(_(\"mode change for %s, which is not \"\n+\t\t\t\t    \"in current HEAD\"), name);\n \t\t} else\n-\t\t\tdie(\"sha1 information is lacking or useless \"\n-\t\t\t    \"(%s).\", name);\n+\t\t\tdie(_(\"sha1 information is lacking or useless \"\n+\t\t\t    \"(%s).\"), name);\n \n \t\tce = make_cache_entry(patch->old_mode, sha1, name, 0, 0);\n \t\tif (!ce)\n \t\t\tdie(_(\"make_cache_entry failed for path '%s'\"), name);\n \t\tif (add_index_entry(&result, ce, ADD_CACHE_OK_TO_ADD))\n-\t\t\tdie (\"Could not add %s to temporary index\", name);\n+\t\t\tdie(_(\"Could not add %s to temporary index\"), name);\n \t}\n \n \thold_lock_file_for_update(&lock, filename, LOCK_DIE_ON_ERROR);\n \tif (write_locked_index(&result, &lock, COMMIT_LOCK))\n-\t\tdie (\"Could not write temporary index to %s\", filename);\n+\t\tdie(_(\"Could not write temporary index to %s\"), filename);\n \n \tdiscard_index(&result);\n }\n@@ -4599,9 +4599,9 @@ int cmd_apply(int argc, const char **argv, const char *prefix_)\n \t\t\tapply_usage, 0);\n \n \tif (apply_with_reject && threeway)\n-\t\tdie(\"--reject and --3way cannot be used together.\");\n+\t\tdie((\"--reject and --3way cannot be used together.\"));\n \tif (cached && threeway)\n-\t\tdie(\"--cached and --3way cannot be used together.\");\n+\t\tdie((\"--cached and --3way cannot be used together.\"));\n \tif (threeway) {\n \t\tif (is_not_gitdir)\n \t\t\tdie(_(\"--3way outside a repository\"));\n@@ -4659,8 +4659,8 @@ int cmd_apply(int argc, const char **argv, const char *prefix_)\n \t\t\t       whitespace_error),\n \t\t\t    whitespace_error);\n \t\tif (applied_after_fixing_ws && apply)\n-\t\t\twarning(\"%d line%s applied after\"\n-\t\t\t\t\" fixing whitespace errors.\",\n+\t\t\twarning(_(\"%d line%s applied after\"\n+\t\t\t\t\" fixing whitespace errors.\"),\n \t\t\t\tapplied_after_fixing_ws,\n \t\t\t\tapplied_after_fixing_ws == 1 ? \"\" : \"s\");\n \t\telse if (whitespace_error)\n-- \n2.4.0.2.g3386abe.dirty\n"},{"id":"260532","messageId":"CAGZ79kZW40f0q+ecxHKHZ=MxVc2Wt-960L9kcd_E8Xh7jbLNHw@mail.gmail.com","threadId":"39235","inReplyTo":"5547675a.274ec20a.69fb.ffffce22@mx.google.com","subject":"Re: [PATCH] fixed translation errors","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2015-05-04T17:39:02Z","receivedAt":"2015-05-04T17:39:02Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Sun, May 3, 2015 at 3:19 PM, Alangi Derick <alangiderick@gmail.com> wrote:\n> Signed-off-by: Alangi Derick <alangiderick@gmail.com>\n> ---\n>  builtin/apply.c | 60 ++++++++++++++++++++++++++++-----------------------------\n>  1 file changed, 30 insertions(+), 30 deletions(-)\n>\n> diff --git a/builtin/apply.c b/builtin/apply.c\n> index 0769b09..66d2aba 100644\n> --- a/builtin/apply.c\n> +++ b/builtin/apply.c\n\nPlease have a look at command-list.txt\nor the entry man page of git [1], which makes\na difference between plumbing commands and\nporcelain commands.\n\nThe plumbing layer is intended for use in scripts.\nAnd looking for error messages in scripts is quite un easy\nif these are actually translated.\n\nThe porcelain layer, which is intended to be used by people,\nshould have all the translations, because humans do like to\nsee the error message in their configured language.\n\n[1] https://www.kernel.org/pub/software/scm/git/docs/\n\n> @@ -1381,7 +1381,7 @@ static void recount_diff(const char *line, int size, struct fragment *fragment)\n>         int oldlines = 0, newlines = 0, ret = 0;\n>\n>         if (size < 1) {\n> -               warning(\"recount: ignore empty hunk\");\n> +               warning(_(\"recount: ignore empty hunk\"));\n>                 return;\n>         }\n>\n> @@ -1500,8 +1500,8 @@ static int find_header(const char *line, unsigned long size, int *hdrsize, struc\n>                                 patch->new_name = xstrdup(patch->def_name);\n>                         }\n>                         if (!patch->is_delete && !patch->new_name)\n> -                               die(\"git diff header lacks filename information \"\n> -                                   \"(line %d)\", linenr);\n> +                               die(_(\"git diff header lacks filename information \"\n> +                                   \"(line %d)\"), linenr);\n>                         patch->is_toplevel_relative = 1;\n>                         *hdrsize = git_hdr_len;\n>                         return offset;\n> @@ -2237,7 +2237,7 @@ static void update_pre_post_images(struct image *preimage,\n>         if (postlen\n>             ? postlen < new - postimage->buf\n>             : postimage->len < new - postimage->buf)\n> -               die(\"BUG: caller miscounted postlen: asked %d, orig = %d, used = %d\",\n> +               die(_(\"BUG: caller miscounted postlen: asked %d, orig = %d, used = %d\"),\n>                     (int)postlen, (int) postimage->len, (int)(new - postimage->buf));\n>\n>         /* Fix the length of the whole thing */\n> @@ -2940,8 +2940,8 @@ static int apply_binary_fragment(struct image *img, struct patch *patch)\n>         /* Binary patch is irreversible without the optional second hunk */\n>         if (apply_in_reverse) {\n>                 if (!fragment->next)\n> -                       return error(\"cannot reverse-apply a binary patch \"\n> -                                    \"without the reverse hunk to '%s'\",\n> +                       return error(_(\"cannot reverse-apply a binary patch \"\n> +                                    \"without the reverse hunk to '%s'\"),\n>                                      patch->new_name\n>                                      ? patch->new_name : patch->old_name);\n>                 fragment = fragment->next;\n> @@ -2984,8 +2984,8 @@ static int apply_binary(struct image *img, struct patch *patch)\n>             strlen(patch->new_sha1_prefix) != 40 ||\n>             get_sha1_hex(patch->old_sha1_prefix, sha1) ||\n>             get_sha1_hex(patch->new_sha1_prefix, sha1))\n> -               return error(\"cannot apply binary patch to '%s' \"\n> -                            \"without full index line\", name);\n> +               return error(_(\"cannot apply binary patch to '%s' \"\n> +                            \"without full index line\"), name);\n>\n>         if (patch->old_name) {\n>                 /*\n> @@ -2994,16 +2994,16 @@ static int apply_binary(struct image *img, struct patch *patch)\n>                  */\n>                 hash_sha1_file(img->buf, img->len, blob_type, sha1);\n>                 if (strcmp(sha1_to_hex(sha1), patch->old_sha1_prefix))\n> -                       return error(\"the patch applies to '%s' (%s), \"\n> +                       return error(_(\"the patch applies to '%s' (%s), \"\n>                                      \"which does not match the \"\n> -                                    \"current contents.\",\n> +                                    \"current contents.\"),\n>                                      name, sha1_to_hex(sha1));\n>         }\n>         else {\n>                 /* Otherwise, the old one must be empty. */\n>                 if (img->len)\n> -                       return error(\"the patch applies to an empty \"\n> -                                    \"'%s' but it is not empty\", name);\n> +                       return error(_(\"the patch applies to an empty \"\n> +                                    \"'%s' but it is not empty\"), name);\n>         }\n>\n>         get_sha1_hex(patch->new_sha1_prefix, sha1);\n> @@ -3020,8 +3020,8 @@ static int apply_binary(struct image *img, struct patch *patch)\n>\n>                 result = read_sha1_file(sha1, &type, &size);\n>                 if (!result)\n> -                       return error(\"the necessary postimage %s for \"\n> -                                    \"'%s' cannot be read\",\n> +                       return error(_(\"the necessary postimage %s for \"\n> +                                    \"'%s' cannot be read\"),\n>                                      patch->new_sha1_prefix, name);\n>                 clear_image(img);\n>                 img->buf = result;\n> @@ -3342,7 +3342,7 @@ static int load_current(struct image *image, struct patch *patch)\n>         unsigned mode = patch->new_mode;\n>\n>         if (!patch->is_new)\n> -               die(\"BUG: patch to %s is not a creation\", patch->old_name);\n> +               die(_(\"BUG: patch to %s is not a creation\"), patch->old_name);\n>\n>         pos = cache_name_pos(name, strlen(name));\n>         if (pos < 0)\n> @@ -3387,7 +3387,7 @@ static int try_threeway(struct image *image, struct patch *patch,\n>                 write_sha1_file(\"\", 0, blob_type, pre_sha1);\n>         else if (get_sha1(patch->old_sha1_prefix, pre_sha1) ||\n>                  read_blob_object(&buf, pre_sha1, patch->old_mode))\n> -               return error(\"repository lacks the necessary blob to fall back on 3-way merge.\");\n> +               return error(_(\"repository lacks the necessary blob to fall back on 3-way merge.\"));\n>\n>         fprintf(stderr, \"Falling back to three-way merge...\\n\");\n>\n> @@ -3405,11 +3405,11 @@ static int try_threeway(struct image *image, struct patch *patch,\n>         /* our_sha1[] is ours */\n>         if (patch->is_new) {\n>                 if (load_current(&tmp_image, patch))\n> -                       return error(\"cannot read the current contents of '%s'\",\n> +                       return error(_(\"cannot read the current contents of '%s'\"),\n>                                      patch->new_name);\n>         } else {\n>                 if (load_preimage(&tmp_image, patch, st, ce))\n> -                       return error(\"cannot read the current contents of '%s'\",\n> +                       return error(_(\"cannot read the current contents of '%s'\"),\n>                                      patch->old_name);\n>         }\n>         write_sha1_file(tmp_image.buf, tmp_image.len, blob_type, our_sha1);\n> @@ -3572,7 +3572,7 @@ static int check_to_create(const char *new_name, int ok_if_exists)\n>\n>                 return EXISTS_IN_WORKTREE;\n>         } else if ((errno != ENOENT) && (errno != ENOTDIR)) {\n> -               return error(\"%s: %s\", new_name, strerror(errno));\n> +               return error(_(\"%s: %s\"), new_name, strerror(errno));\n>         }\n>         return 0;\n>  }\n> @@ -3888,29 +3888,29 @@ static void build_fake_ancestor(struct patch *list, const char *filename)\n>                         if (!preimage_sha1_in_gitlink_patch(patch, sha1))\n>                                 ; /* ok, the textual part looks sane */\n>                         else\n> -                               die(\"sha1 information is lacking or useless for submodule %s\",\n> +                               die(_(\"sha1 information is lacking or useless for submodule %s\"),\n>                                     name);\n>                 } else if (!get_sha1_blob(patch->old_sha1_prefix, sha1)) {\n>                         ; /* ok */\n>                 } else if (!patch->lines_added && !patch->lines_deleted) {\n>                         /* mode-only change: update the current */\n>                         if (get_current_sha1(patch->old_name, sha1))\n> -                               die(\"mode change for %s, which is not \"\n> -                                   \"in current HEAD\", name);\n> +                               die(_(\"mode change for %s, which is not \"\n> +                                   \"in current HEAD\"), name);\n>                 } else\n> -                       die(\"sha1 information is lacking or useless \"\n> -                           \"(%s).\", name);\n> +                       die(_(\"sha1 information is lacking or useless \"\n> +                           \"(%s).\"), name);\n>\n>                 ce = make_cache_entry(patch->old_mode, sha1, name, 0, 0);\n>                 if (!ce)\n>                         die(_(\"make_cache_entry failed for path '%s'\"), name);\n>                 if (add_index_entry(&result, ce, ADD_CACHE_OK_TO_ADD))\n> -                       die (\"Could not add %s to temporary index\", name);\n> +                       die(_(\"Could not add %s to temporary index\"), name);\n>         }\n>\n>         hold_lock_file_for_update(&lock, filename, LOCK_DIE_ON_ERROR);\n>         if (write_locked_index(&result, &lock, COMMIT_LOCK))\n> -               die (\"Could not write temporary index to %s\", filename);\n> +               die(_(\"Could not write temporary index to %s\"), filename);\n>\n>         discard_index(&result);\n>  }\n> @@ -4599,9 +4599,9 @@ int cmd_apply(int argc, const char **argv, const char *prefix_)\n>                         apply_usage, 0);\n>\n>         if (apply_with_reject && threeway)\n> -               die(\"--reject and --3way cannot be used together.\");\n> +               die((\"--reject and --3way cannot be used together.\"));\n>         if (cached && threeway)\n> -               die(\"--cached and --3way cannot be used together.\");\n> +               die((\"--cached and --3way cannot be used together.\"));\n>         if (threeway) {\n>                 if (is_not_gitdir)\n>                         die(_(\"--3way outside a repository\"));\n> @@ -4659,8 +4659,8 @@ int cmd_apply(int argc, const char **argv, const char *prefix_)\n>                                whitespace_error),\n>                             whitespace_error);\n>                 if (applied_after_fixing_ws && apply)\n> -                       warning(\"%d line%s applied after\"\n> -                               \" fixing whitespace errors.\",\n> +                       warning(_(\"%d line%s applied after\"\n> +                               \" fixing whitespace errors.\"),\n>                                 applied_after_fixing_ws,\n>                                 applied_after_fixing_ws == 1 ? \"\" : \"s\");\n>                 else if (whitespace_error)\n> --\n> 2.4.0.2.g3386abe.dirty\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"260571","messageId":"CAPig+cTHqwsmk4xiHG3v6d9uwTmz08NFP0mihRdnTiXQe5E68Q@mail.gmail.com","threadId":"39235","inReplyTo":"5547675a.274ec20a.69fb.ffffce22@mx.google.com","subject":"Re: [PATCH] fixed translation errors","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2015-05-04T23:38:53Z","receivedAt":"2015-05-04T23:38:53Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Sun, May 3, 2015 at 6:19 PM, Alangi Derick <alangiderick@gmail.com> wrote:\n> Signed-off-by: Alangi Derick <alangiderick@gmail.com>\n> ---\n> diff --git a/builtin/apply.c b/builtin/apply.c\n> index 0769b09..66d2aba 100644\n> --- a/builtin/apply.c\n> +++ b/builtin/apply.c\n> @@ -2237,7 +2237,7 @@ static void update_pre_post_images(struct image *preimage,\n>         if (postlen\n>             ? postlen < new - postimage->buf\n>             : postimage->len < new - postimage->buf)\n> -               die(\"BUG: caller miscounted postlen: asked %d, orig = %d, used = %d\",\n> +               die(_(\"BUG: caller miscounted postlen: asked %d, orig = %d, used = %d\"),\n>                     (int)postlen, (int) postimage->len, (int)(new - postimage->buf));\n\nThis condition represents a bug in Git itself, which should never\ntrigger. As such, there's probably very little value in having it\ntranslated, and doing so would make extra work for those translating\nthe messages.\n\n>         /* Fix the length of the whole thing */\n> @@ -3342,7 +3342,7 @@ static int load_current(struct image *image, struct patch *patch)\n>         unsigned mode = patch->new_mode;\n>\n>         if (!patch->is_new)\n> -               die(\"BUG: patch to %s is not a creation\", patch->old_name);\n> +               die(_(\"BUG: patch to %s is not a creation\"), patch->old_name);\n\nDitto: Internal Git error.\n\n>         pos = cache_name_pos(name, strlen(name));\n>         if (pos < 0)\n> @@ -3572,7 +3572,7 @@ static int check_to_create(const char *new_name, int ok_if_exists)\n>\n>                 return EXISTS_IN_WORKTREE;\n>         } else if ((errno != ENOENT) && (errno != ENOTDIR)) {\n> -               return error(\"%s: %s\", new_name, strerror(errno));\n> +               return error(_(\"%s: %s\"), new_name, strerror(errno));\n\nThere isn't a whole lot here for translators to work with; no context\nor indication of what this message is about. (Perhaps the only thing a\ntranslator can do is adjust whitespace around the colon.) This might\nbe the sort of case where you want to submit a separate patch which\nboth fleshes out this error message with enough context for\ntranslators to sink their teeth into, and make the string\ntranslatable.\n\n>         }\n>         return 0;\n>  }\n> @@ -4599,9 +4599,9 @@ int cmd_apply(int argc, const char **argv, const char *prefix_)\n>                         apply_usage, 0);\n>\n>         if (apply_with_reject && threeway)\n> -               die(\"--reject and --3way cannot be used together.\");\n> +               die((\"--reject and --3way cannot be used together.\"));\n>         if (cached && threeway)\n> -               die(\"--cached and --3way cannot be used together.\");\n> +               die((\"--cached and --3way cannot be used together.\"));\n\nYou forgot the '_' in '_(...)' on both of these.\n\n>         if (threeway) {\n>                 if (is_not_gitdir)\n>                         die(_(\"--3way outside a repository\"));\n> @@ -4659,8 +4659,8 @@ int cmd_apply(int argc, const char **argv, const char *prefix_)\n>                                whitespace_error),\n>                             whitespace_error);\n>                 if (applied_after_fixing_ws && apply)\n> -                       warning(\"%d line%s applied after\"\n> -                               \" fixing whitespace errors.\",\n> +                       warning(_(\"%d line%s applied after\"\n> +                               \" fixing whitespace errors.\"),\n>                                 applied_after_fixing_ws,\n>                                 applied_after_fixing_ws == 1 ? \"\" : \"s\");\n\nThis sort of pluralization (adding \"s\") only works in some languages.\nTo translate this properly use Q_(...). See [1] for details, as well\nas existing uses of Q_(...) in Git.\n\n[1]: http://www.gnu.org/savannah-checkouts/gnu/gettext/manual/html_node/Plural-forms.html\n\n>                 else if (whitespace_error)\n> --\n> 2.4.0.2.g3386abe.dirty\n"}]}