{"thread":{"id":"39237","subject":"[PATCH] fixed translation error in fast-export","startedAt":"2015-05-04T11:33:57Z","lastAt":"2015-05-04T11:33:57Z","messageCount":1,"participants":["Alangi Derick"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"260516","messageId":"554767e1.e33ac20a.753d.ffffc684@mx.google.com","threadId":"39237","inReplyTo":null,"subject":"[PATCH] fixed translation error in fast-export","fromName":"Alangi Derick","fromEmail":"alangiderick@gmail.com","sentAt":"2015-05-04T11:33:57Z","receivedAt":"2015-05-04T11:33:57Z","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/fast-export.c | 64 +++++++++++++++++++++++++--------------------------\n 1 file changed, 32 insertions(+), 32 deletions(-)\n\ndiff --git a/builtin/fast-export.c b/builtin/fast-export.c\nindex b8182c2..0af5a68 100644\n--- a/builtin/fast-export.c\n+++ b/builtin/fast-export.c\n@@ -51,7 +51,7 @@ static int parse_opt_signed_tag_mode(const struct option *opt,\n \telse if (!strcmp(arg, \"strip\"))\n \t\tsigned_tag_mode = STRIP;\n \telse\n-\t\treturn error(\"Unknown signed-tags mode: %s\", arg);\n+\t\treturn error(_(\"Unknown signed-tags mode: %s\"), arg);\n \treturn 0;\n }\n \n@@ -65,7 +65,7 @@ static int parse_opt_tag_of_filtered_mode(const struct option *opt,\n \telse if (!strcmp(arg, \"rewrite\"))\n \t\ttag_of_filtered_mode = REWRITE;\n \telse\n-\t\treturn error(\"Unknown tag-of-filtered mode: %s\", arg);\n+\t\treturn error(_(\"Unknown tag-of-filtered mode: %s\"), arg);\n \treturn 0;\n }\n \n@@ -236,20 +236,20 @@ static void export_blob(const unsigned char *sha1)\n \t} else {\n \t\tbuf = read_sha1_file(sha1, &type, &size);\n \t\tif (!buf)\n-\t\t\tdie (\"Could not read blob %s\", sha1_to_hex(sha1));\n+\t\t\tdie(_(\"Could not read blob %s\"), sha1_to_hex(sha1));\n \t\tif (check_sha1_signature(sha1, buf, size, typename(type)) < 0)\n-\t\t\tdie(\"sha1 mismatch in blob %s\", sha1_to_hex(sha1));\n+\t\t\tdie(_(\"sha1 mismatch in blob %s\"), sha1_to_hex(sha1));\n \t\tobject = parse_object_buffer(sha1, type, size, buf, &eaten);\n \t}\n \n \tif (!object)\n-\t\tdie(\"Could not read blob %s\", sha1_to_hex(sha1));\n+\t\tdie(_(\"Could not read blob %s\"), sha1_to_hex(sha1));\n \n \tmark_next_object(object);\n \n \tprintf(\"blob\\nmark :%\"PRIu32\"\\ndata %lu\\n\", last_idnum, size);\n \tif (size && fwrite(buf, size, 1, stdout) != 1)\n-\t\tdie_errno (\"Could not write blob '%s'\", sha1_to_hex(sha1));\n+\t\tdie_errno(_(\"Could not write blob '%s'\"), sha1_to_hex(sha1));\n \tprintf(\"\\n\");\n \n \tshow_progress();\n@@ -394,7 +394,7 @@ static void show_filemodify(struct diff_queue_struct *q,\n \t\t\tbreak;\n \n \t\tdefault:\n-\t\t\tdie(\"Unexpected comparison status '%c' for %s, %s\",\n+\t\t\tdie(_(\"Unexpected comparison status '%c' for %s, %s\"),\n \t\t\t\tq->queue[i]->status,\n \t\t\t\tospec->path ? ospec->path : \"none\",\n \t\t\t\tspec->path ? spec->path : \"none\");\n@@ -501,7 +501,7 @@ static void anonymize_ident_line(const char **beg, const char **end)\n \t/* skip \"committer\", \"author\", \"tagger\", etc */\n \tend_of_header = strchr(*beg, ' ');\n \tif (!end_of_header)\n-\t\tdie(\"BUG: malformed line fed to anonymize_ident_line: %.*s\",\n+\t\tdie(_(\"BUG: malformed line fed to anonymize_ident_line: %.*s\"),\n \t\t    (int)(*end - *beg), *beg);\n \tend_of_header++;\n \tstrbuf_add(out, *beg, end_of_header - *beg);\n@@ -542,13 +542,13 @@ static void handle_commit(struct commit *commit, struct rev_info *rev)\n \tcommit_buffer = get_commit_buffer(commit, NULL);\n \tauthor = strstr(commit_buffer, \"\\nauthor \");\n \tif (!author)\n-\t\tdie (\"Could not find author in commit %s\",\n+\t\tdie(_(\"Could not find author in commit %s\"),\n \t\t     sha1_to_hex(commit->object.sha1));\n \tauthor++;\n \tauthor_end = strchrnul(author, '\\n');\n \tcommitter = strstr(author_end, \"\\ncommitter \");\n \tif (!committer)\n-\t\tdie (\"Could not find committer in commit %s\",\n+\t\tdie(_(\"Could not find committer in commit %s\"),\n \t\t     sha1_to_hex(commit->object.sha1));\n \tcommitter++;\n \tcommitter_end = strchrnul(committer, '\\n');\n@@ -659,14 +659,14 @@ static void handle_tag(const char *name, struct tag *tag)\n \t\ttagged = ((struct tag *)tagged)->tagged;\n \t}\n \tif (tagged->type == OBJ_TREE) {\n-\t\twarning(\"Omitting tag %s,\\nsince tags of trees (or tags of tags of trees, etc.) are not supported.\",\n+\t\twarning(_(\"Omitting tag %s,\\nsince tags of trees (or tags of tags of trees, etc.) are not supported.\"),\n \t\t\tsha1_to_hex(tag->object.sha1));\n \t\treturn;\n \t}\n \n \tbuf = read_sha1_file(tag->object.sha1, &type, &size);\n \tif (!buf)\n-\t\tdie (\"Could not read tag %s\", sha1_to_hex(tag->object.sha1));\n+\t\tdie(_(\"Could not read tag %s\"), sha1_to_hex(tag->object.sha1));\n \tmessage = memmem(buf, size, \"\\n\\n\", 2);\n \tif (message) {\n \t\tmessage += 2;\n@@ -703,17 +703,17 @@ static void handle_tag(const char *name, struct tag *tag)\n \t\tif (signature)\n \t\t\tswitch(signed_tag_mode) {\n \t\t\tcase ABORT:\n-\t\t\t\tdie (\"Encountered signed tag %s; use \"\n-\t\t\t\t     \"--signed-tags=<mode> to handle it.\",\n+\t\t\t\tdie(_(\"Encountered signed tag %s; use \"\n+\t\t\t\t     \"--signed-tags=<mode> to handle it.\"),\n \t\t\t\t     sha1_to_hex(tag->object.sha1));\n \t\t\tcase WARN:\n-\t\t\t\twarning (\"Exporting signed tag %s\",\n+\t\t\t\twarning(_(\"Exporting signed tag %s\"),\n \t\t\t\t\t sha1_to_hex(tag->object.sha1));\n \t\t\t\t/* fallthru */\n \t\t\tcase VERBATIM:\n \t\t\t\tbreak;\n \t\t\tcase WARN_STRIP:\n-\t\t\t\twarning (\"Stripping signature from tag %s\",\n+\t\t\t\twarning(_(\"Stripping signature from tag %s\"),\n \t\t\t\t\t sha1_to_hex(tag->object.sha1));\n \t\t\t\t/* fallthru */\n \t\t\tcase STRIP:\n@@ -728,15 +728,15 @@ static void handle_tag(const char *name, struct tag *tag)\n \tif (!tagged_mark) {\n \t\tswitch(tag_of_filtered_mode) {\n \t\tcase ABORT:\n-\t\t\tdie (\"Tag %s tags unexported object; use \"\n-\t\t\t     \"--tag-of-filtered-object=<mode> to handle it.\",\n+\t\t\tdie(_(\"Tag %s tags unexported object; use \"\n+\t\t\t     \"--tag-of-filtered-object=<mode> to handle it.\"),\n \t\t\t     sha1_to_hex(tag->object.sha1));\n \t\tcase DROP:\n \t\t\t/* Ignore this tag altogether */\n \t\t\treturn;\n \t\tcase REWRITE:\n \t\t\tif (tagged->type != OBJ_COMMIT) {\n-\t\t\t\tdie (\"Tag %s tags unexported %s!\",\n+\t\t\t\tdie(_(\"Tag %s tags unexported %s!\"),\n \t\t\t\t     sha1_to_hex(tag->object.sha1),\n \t\t\t\t     typename(tagged->type));\n \t\t\t}\n@@ -749,7 +749,7 @@ static void handle_tag(const char *name, struct tag *tag)\n \t\t\t\tif (!(p->object.flags & TREESAME))\n \t\t\t\t\tbreak;\n \t\t\t\tif (!p->parents)\n-\t\t\t\t\tdie (\"Can't find replacement commit for tag %s\\n\",\n+\t\t\t\t\tdie(_(\"Can't find replacement commit for tag %s\\n\"),\n \t\t\t\t\t     sha1_to_hex(tag->object.sha1));\n \t\t\t\tp = p->parents->item;\n \t\t\t}\n@@ -781,7 +781,7 @@ static struct commit *get_commit(struct rev_cmdline_entry *e, char *full_name)\n \t\t\ttag = (struct tag *)tag->tagged;\n \t\t}\n \t\tif (!tag)\n-\t\t\tdie(\"Tag %s points nowhere?\", e->name);\n+\t\t\tdie(_(\"Tag %s points nowhere?\"), e->name);\n \t\treturn (struct commit *)tag;\n \t\tbreak;\n \t}\n@@ -817,7 +817,7 @@ static void get_tags_and_duplicates(struct rev_cmdline_info *info)\n \n \t\tcommit = get_commit(e, full_name);\n \t\tif (!commit) {\n-\t\t\twarning(\"%s: Unexpected object of type %s, skipping.\",\n+\t\t\twarning(_(\"%s: Unexpected object of type %s, skipping.\"),\n \t\t\t\te->name,\n \t\t\t\ttypename(e->item->type));\n \t\t\tcontinue;\n@@ -830,7 +830,7 @@ static void get_tags_and_duplicates(struct rev_cmdline_info *info)\n \t\t\texport_blob(commit->object.sha1);\n \t\t\tcontinue;\n \t\tdefault: /* OBJ_TAG (nested tags) is already handled */\n-\t\t\twarning(\"Tag points to object of unexpected type %s, skipping.\",\n+\t\t\twarning(_(\"Tag points to object of unexpected type %s, skipping.\"),\n \t\t\t\ttypename(commit->object.type));\n \t\t\tcontinue;\n \t\t}\n@@ -881,7 +881,7 @@ static void export_marks(char *file)\n \n \tf = fopen(file, \"w\");\n \tif (!f)\n-\t\tdie_errno(\"Unable to open marks file %s for writing.\", file);\n+\t\tdie_errno(_(\"Unable to open marks file %s for writing.\"), file);\n \n \tfor (i = 0; i < idnums.size; i++) {\n \t\tif (deco->base && deco->base->type == 1) {\n@@ -898,7 +898,7 @@ static void export_marks(char *file)\n \te |= ferror(f);\n \te |= fclose(f);\n \tif (e)\n-\t\terror(\"Unable to write marks file %s.\", file);\n+\t\terror(_(\"Unable to write marks file %s.\"), file);\n }\n \n static void import_marks(char *input_file)\n@@ -906,7 +906,7 @@ static void import_marks(char *input_file)\n \tchar line[512];\n \tFILE *f = fopen(input_file, \"r\");\n \tif (!f)\n-\t\tdie_errno(\"cannot read '%s'\", input_file);\n+\t\tdie_errno(_(\"cannot read '%s'\"), input_file);\n \n \twhile (fgets(line, sizeof(line), f)) {\n \t\tuint32_t mark;\n@@ -918,20 +918,20 @@ static void import_marks(char *input_file)\n \n \t\tline_end = strchr(line, '\\n');\n \t\tif (line[0] != ':' || !line_end)\n-\t\t\tdie(\"corrupt mark line: %s\", line);\n+\t\t\tdie(_(\"corrupt mark line: %s\"), line);\n \t\t*line_end = '\\0';\n \n \t\tmark = strtoumax(line + 1, &mark_end, 10);\n \t\tif (!mark || mark_end == line + 1\n \t\t\t|| *mark_end != ' ' || get_sha1_hex(mark_end + 1, sha1))\n-\t\t\tdie(\"corrupt mark line: %s\", line);\n+\t\t\tdie(_(\"corrupt mark line: %s\"), line);\n \n \t\tif (last_idnum < mark)\n \t\t\tlast_idnum = mark;\n \n \t\ttype = sha1_object_info(sha1, NULL);\n \t\tif (type < 0)\n-\t\t\tdie(\"object not found: %s\", sha1_to_hex(sha1));\n+\t\t\tdie(_(\"object not found: %s\"), sha1_to_hex(sha1));\n \n \t\tif (type != OBJ_COMMIT)\n \t\t\t/* only commits */\n@@ -939,12 +939,12 @@ static void import_marks(char *input_file)\n \n \t\tcommit = lookup_commit(sha1);\n \t\tif (!commit)\n-\t\t\tdie(\"not a commit? can't happen: %s\", sha1_to_hex(sha1));\n+\t\t\tdie(_(\"not a commit? can't happen: %s\"), sha1_to_hex(sha1));\n \n \t\tobject = &commit->object;\n \n \t\tif (object->flags & SHOWN)\n-\t\t\terror(\"Object %s already has a mark\", sha1_to_hex(sha1));\n+\t\t\terror(_(\"Object %s already has a mark\"), sha1_to_hex(sha1));\n \n \t\tmark_object(object, mark);\n \n@@ -1044,7 +1044,7 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix)\n \tget_tags_and_duplicates(&revs.cmdline);\n \n \tif (prepare_revision_walk(&revs))\n-\t\tdie(\"revision walk setup failed\");\n+\t\tdie(_(\"revision walk setup failed\"));\n \trevs.diffopt.format_callback = show_filemodify;\n \tDIFF_OPT_SET(&revs.diffopt, RECURSIVE);\n \twhile ((commit = get_revision(&revs))) {\n-- \n2.4.0.7.g31e7007.dirty\n"}]}