{"thread":{"id":"24943","subject":"[PATCH 00/13] gettextize the first 4 C mainporcelain common commands","startedAt":"2010-09-01T20:43:52Z","lastAt":"2010-09-15T15:50:00Z","messageCount":63,"participants":["Ævar Arnfjörð Bjarmason","Jonathan Nieder","Jeff King","Peter Krefting","Thomas Rast"],"isPatch":true,"patchVersion":1,"patchTotal":13},"messages":[{"id":"149591","messageId":"1283373845-2022-1-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":null,"subject":"[PATCH 00/13] gettextize the first 4 C mainporcelain common commands","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-01T20:43:52Z","receivedAt":"2010-09-01T20:43:52Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"This series makes the first 4 C mainporcelain common commands\ntranslatable with gettext.\n\nI'm avoiding translating things like git-bisect for now simply because\nI have some scripts to make this easier that are currently aimed at\nthe C code.\n\n    $ grep 'mainporcelain common' *txt\n  * git-add                                 mainporcelain common\n    git-bisect                              mainporcelain common\n  * git-branch                              mainporcelain common\n  * git-checkout                            mainporcelain common\n  * git-clone                               mainporcelain common\n    git-commit                              mainporcelain common\n    ...\n\nThis is around 3 patches per command (so at this rate I should finish\nall 22 commands in ~63 patches).\n\nI'm making an effort to split these up into different types of\nmessages for discussion.\n\nÆvar Arnfjörð Bjarmason (13):\n  git-clone: use builtin.h to get gettext.h\n  gettextize: git-clone basic messages\n  gettextize: git-clone \"Cloning into\" message\n  gettextize: git-add basic messages\n  gettextize: git-add refresh_index message\n  gettextize: git-branch basic messages\n  gettextize: git-branch \"remote branch '%s' not found\" message\n  gettextize: git-branch \"git branch -v\" messages\n  gettextize: git-branch \"(no branch)\" message\n  gettextize: git-checkout: our/their version message\n  gettextize: git-checkout basic messages\n  gettextize: git-checkout describe_detached_head messages\n  gettextize: git-checkout \"Switched to a .. branch\" message\n\n builtin/add.c      |   46 +++++++++++++-------------\n builtin/branch.c   |   69 +++++++++++++++++++-------------------\n builtin/checkout.c |   93 +++++++++++++++++++++++++++-------------------------\n builtin/clone.c    |   63 ++++++++++++++++++-----------------\n 4 files changed, 138 insertions(+), 133 deletions(-)\n\n-- \n1.7.2.2.579.g2183d\n"},{"id":"149592","messageId":"1283373845-2022-2-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 01/13] git-clone: use builtin.h to get gettext.h","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-01T20:43:53Z","receivedAt":"2010-09-01T20:43:53Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Change builtin/clone.c to use builtin.h. The only other command in\n'mainporcelain common' which doesn't include it yet is builtin/reset.c\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n\nThis is just here so that the series applies stand-alone to pu. It's\nmade redundant by my \"[PATCH] builtin: use builtin.h for all builtin/\ncommands\" patch, but Junio expressed some reservations about it, so\nhere's a more minimal version sufficient for this series.\n\n builtin/clone.c |    3 +--\n 1 files changed, 1 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin/clone.c b/builtin/clone.c\nindex 19ed640..994d527 100644\n--- a/builtin/clone.c\n+++ b/builtin/clone.c\n@@ -8,7 +8,7 @@\n  * Clone a repository into a different directory that does not yet exist.\n  */\n \n-#include \"cache.h\"\n+#include \"builtin.h\"\n #include \"parse-options.h\"\n #include \"fetch-pack.h\"\n #include \"refs.h\"\n@@ -16,7 +16,6 @@\n #include \"tree-walk.h\"\n #include \"unpack-trees.h\"\n #include \"transport.h\"\n-#include \"strbuf.h\"\n #include \"dir.h\"\n #include \"pack-refs.h\"\n #include \"sigchain.h\"\n-- \n1.7.2.2.579.g2183d\n"},{"id":"149597","messageId":"1283373845-2022-3-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 02/13] gettextize: git-clone basic messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-01T20:43:54Z","receivedAt":"2010-09-01T20:43:54Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/clone.c |   54 +++++++++++++++++++++++++++---------------------------\n 1 files changed, 27 insertions(+), 27 deletions(-)\n\ndiff --git a/builtin/clone.c b/builtin/clone.c\nindex 994d527..0b595ba 100644\n--- a/builtin/clone.c\n+++ b/builtin/clone.c\n@@ -205,7 +205,7 @@ static void setup_reference(const char *repo)\n \tif (is_directory(mkpath(\"%s/.git/objects\", ref_git)))\n \t\tref_git = mkpath(\"%s/.git\", ref_git);\n \telse if (!is_directory(mkpath(\"%s/objects\", ref_git)))\n-\t\tdie(\"reference repository '%s' is not a local directory.\",\n+\t\tdie(_(\"reference repository '%s' is not a local directory.\"),\n \t\t    option_reference);\n \n \tref_git_copy = xstrdup(ref_git);\n@@ -232,15 +232,15 @@ static void copy_or_link_directory(struct strbuf *src, struct strbuf *dest)\n \n \tdir = opendir(src->buf);\n \tif (!dir)\n-\t\tdie_errno(\"failed to open '%s'\", src->buf);\n+\t\tdie_errno(_(\"failed to open '%s'\"), src->buf);\n \n \tif (mkdir(dest->buf, 0777)) {\n \t\tif (errno != EEXIST)\n-\t\t\tdie_errno(\"failed to create directory '%s'\", dest->buf);\n+\t\t\tdie_errno(_(\"failed to create directory '%s'\"), dest->buf);\n \t\telse if (stat(dest->buf, &buf))\n-\t\t\tdie_errno(\"failed to stat '%s'\", dest->buf);\n+\t\t\tdie_errno(_(\"failed to stat '%s'\"), dest->buf);\n \t\telse if (!S_ISDIR(buf.st_mode))\n-\t\t\tdie(\"%s exists and is not a directory\", dest->buf);\n+\t\t\tdie(_(\"%s exists and is not a directory\"), dest->buf);\n \t}\n \n \tstrbuf_addch(src, '/');\n@@ -254,7 +254,7 @@ static void copy_or_link_directory(struct strbuf *src, struct strbuf *dest)\n \t\tstrbuf_setlen(dest, dest_len);\n \t\tstrbuf_addstr(dest, de->d_name);\n \t\tif (stat(src->buf, &buf)) {\n-\t\t\twarning (\"failed to stat %s\\n\", src->buf);\n+\t\t\twarning (_(\"failed to stat %s\\n\"), src->buf);\n \t\t\tcontinue;\n \t\t}\n \t\tif (S_ISDIR(buf.st_mode)) {\n@@ -264,16 +264,16 @@ static void copy_or_link_directory(struct strbuf *src, struct strbuf *dest)\n \t\t}\n \n \t\tif (unlink(dest->buf) && errno != ENOENT)\n-\t\t\tdie_errno(\"failed to unlink '%s'\", dest->buf);\n+\t\t\tdie_errno(_(\"failed to unlink '%s'\"), dest->buf);\n \t\tif (!option_no_hardlinks) {\n \t\t\tif (!link(src->buf, dest->buf))\n \t\t\t\tcontinue;\n \t\t\tif (option_local)\n-\t\t\t\tdie_errno(\"failed to create link '%s'\", dest->buf);\n+\t\t\t\tdie_errno(_(\"failed to create link '%s'\"), dest->buf);\n \t\t\toption_no_hardlinks = 1;\n \t\t}\n \t\tif (copy_file_with_time(dest->buf, src->buf, 0666))\n-\t\t\tdie_errno(\"failed to copy file to '%s'\", dest->buf);\n+\t\t\tdie_errno(_(\"failed to copy file to '%s'\"), dest->buf);\n \t}\n \tclosedir(dir);\n }\n@@ -302,7 +302,7 @@ static const struct ref *clone_local(const char *src_repo,\n \tret = transport_get_remote_refs(transport);\n \ttransport_disconnect(transport);\n \tif (0 <= option_verbosity)\n-\t\tprintf(\"done.\\n\");\n+\t\tprintf(_(\"done.\\n\"));\n \treturn ret;\n }\n \n@@ -384,11 +384,11 @@ int cmd_clone(int argc, const char **argv, const char *prefix)\n \t\t\t     builtin_clone_usage, 0);\n \n \tif (argc > 2)\n-\t\tusage_msg_opt(\"Too many arguments.\",\n+\t\tusage_msg_opt(_(\"Too many arguments.\"),\n \t\t\tbuiltin_clone_usage, builtin_clone_options);\n \n \tif (argc == 0)\n-\t\tusage_msg_opt(\"You must specify a repository to clone.\",\n+\t\tusage_msg_opt(_(\"You must specify a repository to clone.\"),\n \t\t\tbuiltin_clone_usage, builtin_clone_options);\n \n \tif (option_mirror)\n@@ -396,7 +396,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)\n \n \tif (option_bare) {\n \t\tif (option_origin)\n-\t\t\tdie(\"--bare and --origin %s options are incompatible.\",\n+\t\t\tdie(_(\"--bare and --origin %s options are incompatible.\"),\n \t\t\t    option_origin);\n \t\toption_no_checkout = 1;\n \t}\n@@ -415,7 +415,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)\n \t\trepo = repo_name;\n \tis_local = path && !is_bundle;\n \tif (is_local && option_depth)\n-\t\twarning(\"--depth is ignored in local clones; use file:// instead.\");\n+\t\twarning(_(\"--depth is ignored in local clones; use file:// instead.\"));\n \n \tif (argc == 2)\n \t\tdir = xstrdup(argv[1]);\n@@ -425,8 +425,8 @@ int cmd_clone(int argc, const char **argv, const char *prefix)\n \n \tdest_exists = !stat(dir, &buf);\n \tif (dest_exists && !is_empty_dir(dir))\n-\t\tdie(\"destination path '%s' already exists and is not \"\n-\t\t\t\"an empty directory.\", dir);\n+\t\tdie(_(\"destination path '%s' already exists and is not \"\n+\t\t\t\"an empty directory.\"), dir);\n \n \tstrbuf_addf(&reflog_msg, \"clone: from %s\", repo);\n \n@@ -435,7 +435,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)\n \telse {\n \t\twork_tree = getenv(\"GIT_WORK_TREE\");\n \t\tif (work_tree && !stat(work_tree, &buf))\n-\t\t\tdie(\"working tree '%s' already exists.\", work_tree);\n+\t\t\tdie(_(\"working tree '%s' already exists.\"), work_tree);\n \t}\n \n \tif (option_bare || work_tree)\n@@ -448,10 +448,10 @@ int cmd_clone(int argc, const char **argv, const char *prefix)\n \tif (!option_bare) {\n \t\tjunk_work_tree = work_tree;\n \t\tif (safe_create_leading_directories_const(work_tree) < 0)\n-\t\t\tdie_errno(\"could not create leading directories of '%s'\",\n+\t\t\tdie_errno(_(\"could not create leading directories of '%s'\"),\n \t\t\t\t  work_tree);\n \t\tif (!dest_exists && mkdir(work_tree, 0755))\n-\t\t\tdie_errno(\"could not create work tree dir '%s'.\",\n+\t\t\tdie_errno(_(\"could not create work tree dir '%s'.\"),\n \t\t\t\t  work_tree);\n \t\tset_git_work_tree(work_tree);\n \t}\n@@ -462,7 +462,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)\n \tsetenv(CONFIG_ENVIRONMENT, mkpath(\"%s/config\", git_dir), 1);\n \n \tif (safe_create_leading_directories_const(git_dir) < 0)\n-\t\tdie(\"could not create leading directories of '%s'\", git_dir);\n+\t\tdie(_(\"could not create leading directories of '%s'\"), git_dir);\n \tset_git_dir(make_absolute_path(git_dir));\n \n \tif (0 <= option_verbosity)\n@@ -524,7 +524,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)\n \t\ttransport = transport_get(remote, remote->url[0]);\n \n \t\tif (!transport->get_refs_list || !transport->fetch)\n-\t\t\tdie(\"Don't know how to clone %s\", transport->url);\n+\t\t\tdie(_(\"Don't know how to clone %s\"), transport->url);\n \n \t\ttransport_set_option(transport, TRANS_OPT_KEEP, \"yes\");\n \n@@ -563,8 +563,8 @@ int cmd_clone(int argc, const char **argv, const char *prefix)\n \t\t\tstrbuf_release(&head);\n \n \t\t\tif (!our_head_points_at) {\n-\t\t\t\twarning(\"Remote branch %s not found in \"\n-\t\t\t\t\t\"upstream %s, using HEAD instead\",\n+\t\t\t\twarning(_(\"Remote branch %s not found in \"\n+\t\t\t\t\t\"upstream %s, using HEAD instead\"),\n \t\t\t\t\toption_branch, option_origin);\n \t\t\t\tour_head_points_at = remote_head_points_at;\n \t\t\t}\n@@ -573,7 +573,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)\n \t\t\tour_head_points_at = remote_head_points_at;\n \t}\n \telse {\n-\t\twarning(\"You appear to have cloned an empty repository.\");\n+\t\twarning(_(\"You appear to have cloned an empty repository.\"));\n \t\tour_head_points_at = NULL;\n \t\tremote_head_points_at = NULL;\n \t\tremote_head = NULL;\n@@ -615,8 +615,8 @@ int cmd_clone(int argc, const char **argv, const char *prefix)\n \t} else {\n \t\t/* Nothing to checkout out */\n \t\tif (!option_no_checkout)\n-\t\t\twarning(\"remote HEAD refers to nonexistent ref, \"\n-\t\t\t\t\"unable to checkout.\\n\");\n+\t\t\twarning(_(\"remote HEAD refers to nonexistent ref, \"\n+\t\t\t\t\"unable to checkout.\\n\"));\n \t\toption_no_checkout = 1;\n \t}\n \n@@ -652,7 +652,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)\n \n \t\tif (write_cache(fd, active_cache, active_nr) ||\n \t\t    commit_locked_index(lock_file))\n-\t\t\tdie(\"unable to write new index file\");\n+\t\t\tdie(_(\"unable to write new index file\"));\n \n \t\terr |= run_hook(NULL, \"post-checkout\", sha1_to_hex(null_sha1),\n \t\t\t\tsha1_to_hex(our_head_points_at->old_sha1), \"1\",\n-- \n1.7.2.2.579.g2183d\n"},{"id":"149594","messageId":"1283373845-2022-4-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 03/13] gettextize: git-clone \"Cloning into\" message","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-01T20:43:55Z","receivedAt":"2010-09-01T20:43:55Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Split up the \"Cloning into %s\" and \"Cloning into bare repository %s\"\nmessages to make them easier to translate.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/clone.c |    6 ++++--\n 1 files changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin/clone.c b/builtin/clone.c\nindex 0b595ba..d1cf6dd 100644\n--- a/builtin/clone.c\n+++ b/builtin/clone.c\n@@ -466,8 +466,10 @@ int cmd_clone(int argc, const char **argv, const char *prefix)\n \tset_git_dir(make_absolute_path(git_dir));\n \n \tif (0 <= option_verbosity)\n-\t\tprintf(\"Cloning into %s%s...\\n\",\n-\t\t       option_bare ? \"bare repository \" : \"\", dir);\n+\t\tif (option_bare)\n+\t\t\tprintf(_(\"Cloning into bare repository %s\"), dir);\n+\t\telse\n+\t\t\tprintf(_(\"Cloning into %s\"), dir);\n \tinit_db(option_template, INIT_DB_QUIET);\n \n \t/*\n-- \n1.7.2.2.579.g2183d\n"},{"id":"149602","messageId":"1283373845-2022-5-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 04/13] gettextize: git-add basic messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-01T20:43:56Z","receivedAt":"2010-09-01T20:43:56Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/add.c |   44 ++++++++++++++++++++++----------------------\n 1 files changed, 22 insertions(+), 22 deletions(-)\n\ndiff --git a/builtin/add.c b/builtin/add.c\nindex 56a4e0a..6578cdd 100644\n--- a/builtin/add.c\n+++ b/builtin/add.c\n@@ -38,7 +38,7 @@ static void update_callback(struct diff_queue_struct *q,\n \t\tconst char *path = p->one->path;\n \t\tswitch (p->status) {\n \t\tdefault:\n-\t\t\tdie(\"unexpected diff status %c\", p->status);\n+\t\t\tdie(_(\"unexpected diff status %c\"), p->status);\n \t\tcase DIFF_STATUS_UNMERGED:\n \t\t\t/*\n \t\t\t * ADD_CACHE_IGNORE_REMOVAL is unset if \"git\n@@ -64,7 +64,7 @@ static void update_callback(struct diff_queue_struct *q,\n \t\tcase DIFF_STATUS_TYPE_CHANGED:\n \t\t\tif (add_file_to_index(&the_index, path, data->flags)) {\n \t\t\t\tif (!(data->flags & ADD_CACHE_IGNORE_ERRORS))\n-\t\t\t\t\tdie(\"updating files failed\");\n+\t\t\t\t\tdie(_(\"updating files failed\"));\n \t\t\t\tdata->add_errors++;\n \t\t\t}\n \t\t\tbreak;\n@@ -74,7 +74,7 @@ static void update_callback(struct diff_queue_struct *q,\n \t\t\tif (!(data->flags & ADD_CACHE_PRETEND))\n \t\t\t\tremove_file_from_index(&the_index, path);\n \t\t\tif (data->flags & (ADD_CACHE_PRETEND|ADD_CACHE_VERBOSE))\n-\t\t\t\tprintf(\"remove '%s'\\n\", path);\n+\t\t\t\tprintf(_(\"remove '%s'\\n\"), path);\n \t\t\tbreak;\n \t\t}\n \t}\n@@ -172,7 +172,7 @@ static void treat_gitlinks(const char **pathspec)\n \t\t\t\t\t/* strip trailing slash */\n \t\t\t\t\tpathspec[j] = xstrndup(ce->name, len);\n \t\t\t\telse\n-\t\t\t\t\tdie (\"Path '%s' is in submodule '%.*s'\",\n+\t\t\t\t\tdie (_(\"Path '%s' is in submodule '%.*s'\"),\n \t\t\t\t\t\tpathspec[j], len, ce->name);\n \t\t\t}\n \t\t}\n@@ -191,7 +191,7 @@ static void refresh(int verbose, const char **pathspec)\n \t\t      pathspec, seen, \"Unstaged changes after refreshing the index:\");\n \tfor (i = 0; i < specs; i++) {\n \t\tif (!seen[i])\n-\t\t\tdie(\"pathspec '%s' did not match any files\", pathspec[i]);\n+\t\t\tdie(_(\"pathspec '%s' did not match any files\"), pathspec[i]);\n \t}\n         free(seen);\n }\n@@ -205,7 +205,7 @@ static const char **validate_pathspec(int argc, const char **argv, const char *p\n \t\tfor (p = pathspec; *p; p++) {\n \t\t\tif (has_symlink_leading_path(*p, strlen(*p))) {\n \t\t\t\tint len = prefix ? strlen(prefix) : 0;\n-\t\t\t\tdie(\"'%s' is beyond a symbolic link\", *p + len);\n+\t\t\t\tdie(_(\"'%s' is beyond a symbolic link\"), *p + len);\n \t\t\t}\n \t\t}\n \t}\n@@ -272,7 +272,7 @@ static int edit_patch(int argc, const char **argv, const char *prefix)\n \tgit_config(git_diff_basic_config, NULL); /* no \"diff\" UI options */\n \n \tif (read_cache() < 0)\n-\t\tdie (\"Could not read the index\");\n+\t\tdie (_(\"Could not read the index\"));\n \n \tinit_revisions(&rev, prefix);\n \trev.diffopt.context = 7;\n@@ -281,24 +281,24 @@ static int edit_patch(int argc, const char **argv, const char *prefix)\n \trev.diffopt.output_format = DIFF_FORMAT_PATCH;\n \tout = open(file, O_CREAT | O_WRONLY, 0644);\n \tif (out < 0)\n-\t\tdie (\"Could not open '%s' for writing.\", file);\n+\t\tdie (_(\"Could not open '%s' for writing.\"), file);\n \trev.diffopt.file = xfdopen(out, \"w\");\n \trev.diffopt.close_file = 1;\n \tif (run_diff_files(&rev, 0))\n-\t\tdie (\"Could not write patch\");\n+\t\tdie (_(\"Could not write patch\"));\n \n \tlaunch_editor(file, NULL, NULL);\n \n \tif (stat(file, &st))\n-\t\tdie_errno(\"Could not stat '%s'\", file);\n+\t\tdie_errno(_(\"Could not stat '%s'\"), file);\n \tif (!st.st_size)\n-\t\tdie(\"Empty patch. Aborted.\");\n+\t\tdie(_(\"Empty patch. Aborted.\"));\n \n \tmemset(&child, 0, sizeof(child));\n \tchild.git_cmd = 1;\n \tchild.argv = apply_argv;\n \tif (run_command(&child))\n-\t\tdie (\"Could not apply '%s'\", file);\n+\t\tdie (_(\"Could not apply '%s'\"), file);\n \n \tunlink(file);\n \treturn 0;\n@@ -346,14 +346,14 @@ static int add_files(struct dir_struct *dir, int flags)\n \t\tfprintf(stderr, ignore_error);\n \t\tfor (i = 0; i < dir->ignored_nr; i++)\n \t\t\tfprintf(stderr, \"%s\\n\", dir->ignored[i]->name);\n-\t\tfprintf(stderr, \"Use -f if you really want to add them.\\n\");\n-\t\tdie(\"no files added\");\n+\t\tfprintf(stderr, _(\"Use -f if you really want to add them.\\n\"));\n+\t\tdie(_(\"no files added\"));\n \t}\n \n \tfor (i = 0; i < dir->nr; i++)\n \t\tif (add_file_to_cache(dir->entries[i]->name, flags)) {\n \t\t\tif (!ignore_add_errors)\n-\t\t\t\tdie(\"adding files failed\");\n+\t\t\t\tdie(_(\"adding files failed\"));\n \t\t\texit_status = 1;\n \t\t}\n \treturn exit_status;\n@@ -385,9 +385,9 @@ int cmd_add(int argc, const char **argv, const char *prefix)\n \targv++;\n \n \tif (addremove && take_worktree_changes)\n-\t\tdie(\"-A and -u are mutually incompatible\");\n+\t\tdie(_(\"-A and -u are mutually incompatible\"));\n \tif (!show_only && ignore_missing)\n-\t\tdie(\"Option --ignore-missing can only be used together with --dry-run\");\n+\t\tdie(_(\"Option --ignore-missing can only be used together with --dry-run\"));\n \tif ((addremove || take_worktree_changes) && !argc) {\n \t\tstatic const char *here[2] = { \".\", NULL };\n \t\targc = 1;\n@@ -407,14 +407,14 @@ int cmd_add(int argc, const char **argv, const char *prefix)\n \t\t  ? ADD_CACHE_IGNORE_REMOVAL : 0));\n \n \tif (require_pathspec && argc == 0) {\n-\t\tfprintf(stderr, \"Nothing specified, nothing added.\\n\");\n-\t\tfprintf(stderr, \"Maybe you wanted to say 'git add .'?\\n\");\n+\t\tfprintf(stderr, _(\"Nothing specified, nothing added.\\n\"));\n+\t\tfprintf(stderr, _(\"Maybe you wanted to say 'git add .'?\\n\"));\n \t\treturn 0;\n \t}\n \tpathspec = validate_pathspec(argc, argv, prefix);\n \n \tif (read_cache() < 0)\n-\t\tdie(\"index file corrupt\");\n+\t\tdie(_(\"index file corrupt\"));\n \ttreat_gitlinks(pathspec);\n \n \tif (add_new_files) {\n@@ -449,7 +449,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)\n \t\t\t\t\tif (excluded(&dir, pathspec[i], DT_UNKNOWN))\n \t\t\t\t\t\tdir_add_ignored(&dir, pathspec[i], strlen(pathspec[i]));\n \t\t\t\t} else\n-\t\t\t\t\tdie(\"pathspec '%s' did not match any files\",\n+\t\t\t\t\tdie(_(\"pathspec '%s' did not match any files\"),\n \t\t\t\t\t    pathspec[i]);\n \t\t\t}\n \t\t}\n@@ -465,7 +465,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)\n \tif (active_cache_changed) {\n \t\tif (write_cache(newfd, active_cache, active_nr) ||\n \t\t    commit_locked_index(&lock_file))\n-\t\t\tdie(\"Unable to write new index file\");\n+\t\t\tdie(_(\"Unable to write new index file\"));\n \t}\n \n \treturn exit_status;\n-- \n1.7.2.2.579.g2183d\n"},{"id":"149599","messageId":"1283373845-2022-6-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 05/13] gettextize: git-add refresh_index message","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-01T20:43:57Z","receivedAt":"2010-09-01T20:43:57Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n\nI can't find the command that makes this message appear, but it seems\nto be a human-readable header printed by \"git-add\".\n\n builtin/add.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin/add.c b/builtin/add.c\nindex 6578cdd..eed37bf 100644\n--- a/builtin/add.c\n+++ b/builtin/add.c\n@@ -188,7 +188,7 @@ static void refresh(int verbose, const char **pathspec)\n \t\t/* nothing */;\n \tseen = xcalloc(specs, 1);\n \trefresh_index(&the_index, verbose ? REFRESH_IN_PORCELAIN : REFRESH_QUIET,\n-\t\t      pathspec, seen, \"Unstaged changes after refreshing the index:\");\n+\t\t      pathspec, seen, _(\"Unstaged changes after refreshing the index:\"));\n \tfor (i = 0; i < specs; i++) {\n \t\tif (!seen[i])\n \t\t\tdie(_(\"pathspec '%s' did not match any files\"), pathspec[i]);\n-- \n1.7.2.2.579.g2183d\n"},{"id":"149604","messageId":"1283373845-2022-7-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 06/13] gettextize: git-branch basic messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-01T20:43:58Z","receivedAt":"2010-09-01T20:43:58Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/branch.c |   58 +++++++++++++++++++++++++++---------------------------\n 1 files changed, 29 insertions(+), 29 deletions(-)\n\ndiff --git a/builtin/branch.c b/builtin/branch.c\nindex 87976f0..50c15c1 100644\n--- a/builtin/branch.c\n+++ b/builtin/branch.c\n@@ -133,12 +133,12 @@ static int branch_merged(int kind, const char *name,\n \tif ((head_rev != reference_rev) &&\n \t    in_merge_bases(rev, &head_rev, 1) != merged) {\n \t\tif (merged)\n-\t\t\twarning(\"deleting branch '%s' that has been merged to\\n\"\n-\t\t\t\t\"         '%s', but it is not yet merged to HEAD.\",\n+\t\t\twarning(_(\"deleting branch '%s' that has been merged to\\n\"\n+\t\t\t\t\"         '%s', but it is not yet merged to HEAD.\"),\n \t\t\t\tname, reference_name);\n \t\telse\n-\t\t\twarning(\"not deleting branch '%s' that is not yet merged to\\n\"\n-\t\t\t\t\"         '%s', even though it is merged to HEAD.\",\n+\t\t\twarning(_(\"not deleting branch '%s' that is not yet merged to\\n\"\n+\t\t\t\t\"         '%s', even though it is merged to HEAD.\"),\n \t\t\t\tname, reference_name);\n \t}\n \treturn merged;\n@@ -165,19 +165,19 @@ static int delete_branches(int argc, const char **argv, int force, int kinds)\n \t\tremote = \"\";\n \t\tbreak;\n \tdefault:\n-\t\tdie(\"cannot use -a with -d\");\n+\t\tdie(_(\"cannot use -a with -d\"));\n \t}\n \n \tif (!force) {\n \t\thead_rev = lookup_commit_reference(head_sha1);\n \t\tif (!head_rev)\n-\t\t\tdie(\"Couldn't look up commit object for HEAD\");\n+\t\t\tdie(_(\"Couldn't look up commit object for HEAD\"));\n \t}\n \tfor (i = 0; i < argc; i++, strbuf_release(&bname)) {\n \t\tstrbuf_branchname(&bname, argv[i]);\n \t\tif (kinds == REF_LOCAL_BRANCH && !strcmp(head, bname.buf)) {\n-\t\t\terror(\"Cannot delete the branch '%s' \"\n-\t\t\t      \"which you are currently on.\", bname.buf);\n+\t\t\terror(_(\"Cannot delete the branch '%s' \"\n+\t\t\t      \"which you are currently on.\"), bname.buf);\n \t\t\tret = 1;\n \t\t\tcontinue;\n \t\t}\n@@ -186,7 +186,7 @@ static int delete_branches(int argc, const char **argv, int force, int kinds)\n \n \t\tname = xstrdup(mkpath(fmt, bname.buf));\n \t\tif (!resolve_ref(name, sha1, 1, NULL)) {\n-\t\t\terror(\"%sbranch '%s' not found.\",\n+\t\t\terror(_(\"%sbranch '%s' not found.\"),\n \t\t\t\t\tremote, bname.buf);\n \t\t\tret = 1;\n \t\t\tcontinue;\n@@ -194,31 +194,31 @@ static int delete_branches(int argc, const char **argv, int force, int kinds)\n \n \t\trev = lookup_commit_reference(sha1);\n \t\tif (!rev) {\n-\t\t\terror(\"Couldn't look up commit object for '%s'\", name);\n+\t\t\terror(_(\"Couldn't look up commit object for '%s'\"), name);\n \t\t\tret = 1;\n \t\t\tcontinue;\n \t\t}\n \n \t\tif (!force && !branch_merged(kinds, bname.buf, rev, head_rev)) {\n-\t\t\terror(\"The branch '%s' is not fully merged.\\n\"\n+\t\t\terror(_(\"The branch '%s' is not fully merged.\\n\"\n \t\t\t      \"If you are sure you want to delete it, \"\n-\t\t\t      \"run 'git branch -D %s'.\", bname.buf, bname.buf);\n+\t\t\t      \"run 'git branch -D %s'.\"), bname.buf, bname.buf);\n \t\t\tret = 1;\n \t\t\tcontinue;\n \t\t}\n \n \t\tif (delete_ref(name, sha1, 0)) {\n-\t\t\terror(\"Error deleting %sbranch '%s'\", remote,\n+\t\t\terror(_(\"Error deleting %sbranch '%s'\"), remote,\n \t\t\t      bname.buf);\n \t\t\tret = 1;\n \t\t} else {\n \t\t\tstruct strbuf buf = STRBUF_INIT;\n-\t\t\tprintf(\"Deleted %sbranch %s (was %s).\\n\", remote,\n+\t\t\tprintf(_(\"Deleted %sbranch %s (was %s).\\n\"), remote,\n \t\t\t       bname.buf,\n \t\t\t       find_unique_abbrev(sha1, DEFAULT_ABBREV));\n \t\t\tstrbuf_addf(&buf, \"branch.%s\", bname.buf);\n \t\t\tif (git_config_rename_section(buf.buf, NULL) < 0)\n-\t\t\t\twarning(\"Update of config-file failed\");\n+\t\t\t\twarning(_(\"Update of config-file failed\"));\n \t\t\tstrbuf_release(&buf);\n \t\t}\n \t}\n@@ -300,7 +300,7 @@ static int append_ref(const char *refname, const unsigned char *sha1, int flags,\n \tif (ref_list->verbose || ref_list->with_commit || merge_filter != NO_FILTER) {\n \t\tcommit = lookup_commit_reference_gently(sha1, 1);\n \t\tif (!commit) {\n-\t\t\tcb->ret = error(\"branch '%s' does not point at a commit\", refname);\n+\t\t\tcb->ret = error(_(\"branch '%s' does not point at a commit\"), refname);\n \t\t\treturn 0;\n \t\t}\n \n@@ -540,7 +540,7 @@ static int print_ref_list(int kinds, int detached, int verbose, int abbrev, stru\n \tfree_ref_list(&ref_list);\n \n \tif (cb.ret)\n-\t\terror(\"some refs could not be read\");\n+\t\terror(_(\"some refs could not be read\"));\n \n \treturn cb.ret;\n }\n@@ -553,7 +553,7 @@ static void rename_branch(const char *oldname, const char *newname, int force)\n \tint recovery = 0;\n \n \tif (!oldname)\n-\t\tdie(\"cannot rename the current branch while not on any.\");\n+\t\tdie(_(\"cannot rename the current branch while not on any.\"));\n \n \tif (strbuf_check_branch_ref(&oldref, oldname)) {\n \t\t/*\n@@ -563,35 +563,35 @@ static void rename_branch(const char *oldname, const char *newname, int force)\n \t\tif (resolve_ref(oldref.buf, sha1, 1, NULL))\n \t\t\trecovery = 1;\n \t\telse\n-\t\t\tdie(\"Invalid branch name: '%s'\", oldname);\n+\t\t\tdie(_(\"Invalid branch name: '%s'\"), oldname);\n \t}\n \n \tif (strbuf_check_branch_ref(&newref, newname))\n-\t\tdie(\"Invalid branch name: '%s'\", newname);\n+\t\tdie(_(\"Invalid branch name: '%s'\"), newname);\n \n \tif (resolve_ref(newref.buf, sha1, 1, NULL) && !force)\n-\t\tdie(\"A branch named '%s' already exists.\", newref.buf + 11);\n+\t\tdie(_(\"A branch named '%s' already exists.\"), newref.buf + 11);\n \n \tstrbuf_addf(&logmsg, \"Branch: renamed %s to %s\",\n \t\t oldref.buf, newref.buf);\n \n \tif (rename_ref(oldref.buf, newref.buf, logmsg.buf))\n-\t\tdie(\"Branch rename failed\");\n+\t\tdie(_(\"Branch rename failed\"));\n \tstrbuf_release(&logmsg);\n \n \tif (recovery)\n-\t\twarning(\"Renamed a misnamed branch '%s' away\", oldref.buf + 11);\n+\t\twarning(_(\"Renamed a misnamed branch '%s' away\"), oldref.buf + 11);\n \n \t/* no need to pass logmsg here as HEAD didn't really move */\n \tif (!strcmp(oldname, head) && create_symref(\"HEAD\", newref.buf, NULL))\n-\t\tdie(\"Branch renamed to %s, but HEAD is not updated!\", newname);\n+\t\tdie(_(\"Branch renamed to %s, but HEAD is not updated!\"), newname);\n \n \tstrbuf_addf(&oldsection, \"branch.%s\", oldref.buf + 11);\n \tstrbuf_release(&oldref);\n \tstrbuf_addf(&newsection, \"branch.%s\", newref.buf + 11);\n \tstrbuf_release(&newref);\n \tif (git_config_rename_section(oldsection.buf, newsection.buf) < 0)\n-\t\tdie(\"Branch is renamed, but update of config-file failed\");\n+\t\tdie(_(\"Branch is renamed, but update of config-file failed\"));\n \tstrbuf_release(&oldsection);\n \tstrbuf_release(&newsection);\n }\n@@ -606,7 +606,7 @@ static int opt_parse_merge_filter(const struct option *opt, const char *arg, int\n \tif (!arg)\n \t\targ = \"HEAD\";\n \tif (get_sha1(arg, merge_filter_ref))\n-\t\tdie(\"malformed object name %s\", arg);\n+\t\tdie(_(\"malformed object name %s\"), arg);\n \treturn 0;\n }\n \n@@ -676,13 +676,13 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n \n \thead = resolve_ref(\"HEAD\", head_sha1, 0, NULL);\n \tif (!head)\n-\t\tdie(\"Failed to resolve HEAD as a valid ref.\");\n+\t\tdie(_(\"Failed to resolve HEAD as a valid ref.\"));\n \thead = xstrdup(head);\n \tif (!strcmp(head, \"HEAD\")) {\n \t\tdetached = 1;\n \t} else {\n \t\tif (prefixcmp(head, \"refs/heads/\"))\n-\t\t\tdie(\"HEAD not found below refs/heads!\");\n+\t\t\tdie(_(\"HEAD not found below refs/heads!\"));\n \t\thead += 11;\n \t}\n \thashcpy(merge_filter_ref, head_sha1);\n@@ -702,7 +702,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n \t\trename_branch(argv[0], argv[1], rename > 1);\n \telse if (argc <= 2) {\n \t\tif (kinds != REF_LOCAL_BRANCH)\n-\t\t\tdie(\"-a and -r options to 'git branch' do not make sense with a branch name\");\n+\t\t\tdie(_(\"-a and -r options to 'git branch' do not make sense with a branch name\"));\n \t\tcreate_branch(head, argv[0], (argc == 2) ? argv[1] : head,\n \t\t\t      force_create, reflog, track);\n \t} else\n-- \n1.7.2.2.579.g2183d\n"},{"id":"149603","messageId":"1283373845-2022-8-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 07/13] gettextize: git-branch \"remote branch '%s' not found\" message","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-01T20:43:59Z","receivedAt":"2010-09-01T20:43:59Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"This could be done better by splitting it up, but it would change too\nmuch code, which I'm trying to avoid at this point. Instead add a\nTRANSLATORS comment to explain what \"remote \" does.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/branch.c |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin/branch.c b/builtin/branch.c\nindex 50c15c1..8802033 100644\n--- a/builtin/branch.c\n+++ b/builtin/branch.c\n@@ -157,7 +157,8 @@ static int delete_branches(int argc, const char **argv, int force, int kinds)\n \tswitch (kinds) {\n \tcase REF_REMOTE_BRANCH:\n \t\tfmt = \"refs/remotes/%s\";\n-\t\tremote = \"remote \";\n+\t\t/* TRANSLATORS: This is \"remote \" in \"remote branch '%s' not found\" */\n+\t\tremote = _(\"remote \");\n \t\tforce = 1;\n \t\tbreak;\n \tcase REF_LOCAL_BRANCH:\n-- \n1.7.2.2.579.g2183d\n"},{"id":"149593","messageId":"1283373845-2022-9-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 08/13] gettextize: git-branch \"git branch -v\" messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-01T20:44:00Z","receivedAt":"2010-09-01T20:44:00Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Make the \"git branch -v\" messages translatable, e.g.:\n\n    5054b57 [ahead 8] branch error fixup\n\nThis is possibly a plumbing message.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n\nI don't know whether we consider \"git branch -v\" output plumbing or\nnot, probably not.\n\n builtin/branch.c |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/builtin/branch.c b/builtin/branch.c\nindex 8802033..59e71fc 100644\n--- a/builtin/branch.c\n+++ b/builtin/branch.c\n@@ -378,11 +378,11 @@ static void fill_tracking_info(struct strbuf *stat, const char *branch_name,\n \t\tstrbuf_addf(stat, \"%s: \",\n \t\t\tshorten_unambiguous_ref(branch->merge[0]->dst, 0));\n \tif (!ours)\n-\t\tstrbuf_addf(stat, \"behind %d] \", theirs);\n+\t\tstrbuf_addf(stat, _(\"behind %d] \"), theirs);\n \telse if (!theirs)\n-\t\tstrbuf_addf(stat, \"ahead %d] \", ours);\n+\t\tstrbuf_addf(stat, _(\"ahead %d] \"), ours);\n \telse\n-\t\tstrbuf_addf(stat, \"ahead %d, behind %d] \", ours, theirs);\n+\t\tstrbuf_addf(stat, _(\"ahead %d, behind %d] \"), ours, theirs);\n }\n \n static int matches_merge_filter(struct commit *commit)\n-- \n1.7.2.2.579.g2183d\n"},{"id":"149596","messageId":"1283373845-2022-10-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 09/13] gettextize: git-branch \"(no branch)\" message","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-01T20:44:01Z","receivedAt":"2010-09-01T20:44:01Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"This is possibly a plumbing message.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n\nditto about the maybe plumbing output, but I think not.\n\n builtin/branch.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin/branch.c b/builtin/branch.c\nindex 59e71fc..fc6c4c3 100644\n--- a/builtin/branch.c\n+++ b/builtin/branch.c\n@@ -481,7 +481,7 @@ static void show_detached(struct ref_list *ref_list)\n \n \tif (head_commit && is_descendant_of(head_commit, ref_list->with_commit)) {\n \t\tstruct ref_item item;\n-\t\titem.name = xstrdup(\"(no branch)\");\n+\t\titem.name = xstrdup(_(\"(no branch)\"));\n \t\titem.len = strlen(item.name);\n \t\titem.kind = REF_LOCAL_BRANCH;\n \t\titem.dest = NULL;\n-- \n1.7.2.2.579.g2183d\n"},{"id":"149600","messageId":"1283373845-2022-11-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 10/13] gettextize: git-checkout: our/their version message","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-01T20:44:02Z","receivedAt":"2010-09-01T20:44:02Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Split up the \"does not have our/their version\" message to make it\neasier to translate.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n\nI'm splitting this sort of thing into an if/else rather than:\n\n    printf(foo ? _(\"bar\") : _(\"blah\"), ...)\n\nbecause I think the alternative is harder to read.\n\n builtin/checkout.c |   14 ++++++++------\n 1 files changed, 8 insertions(+), 6 deletions(-)\n\ndiff --git a/builtin/checkout.c b/builtin/checkout.c\nindex 97bf2ec..a096e3d 100644\n--- a/builtin/checkout.c\n+++ b/builtin/checkout.c\n@@ -103,9 +103,10 @@ static int check_stage(int stage, struct cache_entry *ce, int pos)\n \t\t\treturn 0;\n \t\tpos++;\n \t}\n-\treturn error(\"path '%s' does not have %s version\",\n-\t\t     ce->name,\n-\t\t     (stage == 2) ? \"our\" : \"their\");\n+\tif (stage == 2)\n+\t\treturn error(_(\"path '%s' does not have our version\"), ce->name);\n+\telse\n+\t\treturn error(_(\"path '%s' does not have their version\"), ce->name);\n }\n \n static int check_all_stages(struct cache_entry *ce, int pos)\n@@ -130,9 +131,10 @@ static int checkout_stage(int stage, struct cache_entry *ce, int pos,\n \t\t\treturn checkout_entry(active_cache[pos], state, NULL);\n \t\tpos++;\n \t}\n-\treturn error(\"path '%s' does not have %s version\",\n-\t\t     ce->name,\n-\t\t     (stage == 2) ? \"our\" : \"their\");\n+\tif (stage == 2)\n+\t\treturn error(_(\"path '%s' does not have our version\"), ce->name);\n+\telse\n+\t\treturn error(_(\"path '%s' does not have their version\"), ce->name);\n }\n \n static int checkout_merged(int pos, struct checkout *state)\n-- \n1.7.2.2.579.g2183d\n"},{"id":"149595","messageId":"1283373845-2022-12-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 11/13] gettextize: git-checkout basic messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-01T20:44:03Z","receivedAt":"2010-09-01T20:44:03Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/checkout.c |   68 ++++++++++++++++++++++++++--------------------------\n 1 files changed, 34 insertions(+), 34 deletions(-)\n\ndiff --git a/builtin/checkout.c b/builtin/checkout.c\nindex a096e3d..a7033a0 100644\n--- a/builtin/checkout.c\n+++ b/builtin/checkout.c\n@@ -117,7 +117,7 @@ static int check_all_stages(struct cache_entry *ce, int pos)\n \t    ce_stage(active_cache[pos+1]) != 2 ||\n \t    strcmp(active_cache[pos+2]->name, ce->name) ||\n \t    ce_stage(active_cache[pos+2]) != 3)\n-\t\treturn error(\"path '%s' does not have all three versions\",\n+\t\treturn error(_(\"path '%s' does not have all three versions\"),\n \t\t\t     ce->name);\n \treturn 0;\n }\n@@ -152,7 +152,7 @@ static int checkout_merged(int pos, struct checkout *state)\n \t    ce_stage(active_cache[pos+1]) != 2 ||\n \t    strcmp(active_cache[pos+2]->name, path) ||\n \t    ce_stage(active_cache[pos+2]) != 3)\n-\t\treturn error(\"path '%s' does not have all 3 versions\", path);\n+\t\treturn error(_(\"path '%s' does not have all 3 versions\"), path);\n \n \tread_mmblob(&ancestor, active_cache[pos]->sha1);\n \tread_mmblob(&ours, active_cache[pos+1]->sha1);\n@@ -169,7 +169,7 @@ static int checkout_merged(int pos, struct checkout *state)\n \tfree(theirs.ptr);\n \tif (status < 0 || !result_buf.ptr) {\n \t\tfree(result_buf.ptr);\n-\t\treturn error(\"path '%s': cannot merge\", path);\n+\t\treturn error(_(\"path '%s': cannot merge\"), path);\n \t}\n \n \t/*\n@@ -186,12 +186,12 @@ static int checkout_merged(int pos, struct checkout *state)\n \t */\n \tif (write_sha1_file(result_buf.ptr, result_buf.size,\n \t\t\t    blob_type, sha1))\n-\t\tdie(\"Unable to add merge result for '%s'\", path);\n+\t\tdie(_(\"Unable to add merge result for '%s'\"), path);\n \tce = make_cache_entry(create_ce_mode(active_cache[pos+1]->ce_mode),\n \t\t\t      sha1,\n \t\t\t      path, 2, 0);\n \tif (!ce)\n-\t\tdie(\"make_cache_entry failed for path '%s'\", path);\n+\t\tdie(_(\"make_cache_entry failed for path '%s'\"), path);\n \tstatus = checkout_entry(ce, state, NULL);\n \treturn status;\n }\n@@ -213,7 +213,7 @@ static int checkout_paths(struct tree *source_tree, const char **pathspec,\n \n \tnewfd = hold_locked_index(lock_file, 1);\n \tif (read_cache_preload(pathspec) < 0)\n-\t\treturn error(\"corrupt index file\");\n+\t\treturn error(_(\"corrupt index file\"));\n \n \tif (source_tree)\n \t\tread_tree_some(source_tree, pathspec);\n@@ -241,14 +241,14 @@ static int checkout_paths(struct tree *source_tree, const char **pathspec,\n \t\t\tif (!ce_stage(ce))\n \t\t\t\tcontinue;\n \t\t\tif (opts->force) {\n-\t\t\t\twarning(\"path '%s' is unmerged\", ce->name);\n+\t\t\t\twarning(_(\"path '%s' is unmerged\"), ce->name);\n \t\t\t} else if (stage) {\n \t\t\t\terrs |= check_stage(stage, ce, pos);\n \t\t\t} else if (opts->merge) {\n \t\t\t\terrs |= check_all_stages(ce, pos);\n \t\t\t} else {\n \t\t\t\terrs = 1;\n-\t\t\t\terror(\"path '%s' is unmerged\", ce->name);\n+\t\t\t\terror(_(\"path '%s' is unmerged\"), ce->name);\n \t\t\t}\n \t\t\tpos = skip_same_name(ce, pos) - 1;\n \t\t}\n@@ -277,7 +277,7 @@ static int checkout_paths(struct tree *source_tree, const char **pathspec,\n \n \tif (write_cache(newfd, active_cache, active_nr) ||\n \t    commit_locked_index(lock_file))\n-\t\tdie(\"unable to write new index file\");\n+\t\tdie(_(\"unable to write new index file\"));\n \n \tresolve_ref(\"HEAD\", rev, 0, &flag);\n \thead = lookup_commit_reference_gently(rev, 1);\n@@ -294,7 +294,7 @@ static void show_local_changes(struct object *head, struct diff_options *opts)\n \trev.diffopt.flags = opts->flags;\n \trev.diffopt.output_format |= DIFF_FORMAT_NAME_STATUS;\n \tif (diff_setup_done(&rev.diffopt) < 0)\n-\t\tdie(\"diff_setup_done failed\");\n+\t\tdie(_(\"diff_setup_done failed\"));\n \tadd_pending_object(&rev, head, NULL);\n \trun_diff_index(&rev, 0);\n }\n@@ -368,7 +368,7 @@ static int merge_working_tree(struct checkout_opts *opts,\n \tint newfd = hold_locked_index(lock_file, 1);\n \n \tif (read_cache_preload(NULL) < 0)\n-\t\treturn error(\"corrupt index file\");\n+\t\treturn error(_(\"corrupt index file\"));\n \n \tresolve_undo_clear();\n \tif (opts->force) {\n@@ -390,7 +390,7 @@ static int merge_working_tree(struct checkout_opts *opts,\n \t\trefresh_cache(REFRESH_QUIET);\n \n \t\tif (unmerged_cache()) {\n-\t\t\terror(\"you need to resolve your current index first\");\n+\t\t\terror(_(\"you need to resolve your current index first\"));\n \t\t\treturn 1;\n \t\t}\n \n@@ -475,7 +475,7 @@ static int merge_working_tree(struct checkout_opts *opts,\n \n \tif (write_cache(newfd, active_cache, active_nr) ||\n \t    commit_locked_index(lock_file))\n-\t\tdie(\"unable to write new index file\");\n+\t\tdie(_(\"unable to write new index file\"));\n \n \tif (!opts->force && !opts->quiet)\n \t\tshow_local_changes(&new->commit->object, &opts->diff_options);\n@@ -524,7 +524,7 @@ static void update_refs_for_switch(struct checkout_opts *opts,\n \t\t\t\ttemp = log_all_ref_updates;\n \t\t\t\tlog_all_ref_updates = 1;\n \t\t\t\tif (log_ref_setup(ref_name, log_file, sizeof(log_file))) {\n-\t\t\t\t\tfprintf(stderr, \"Can not do reflog for '%s'\\n\",\n+\t\t\t\t\tfprintf(stderr, _(\"Can not do reflog for '%s'\\n\"),\n \t\t\t\t\t    opts->new_orphan_branch);\n \t\t\t\t\tlog_all_ref_updates = temp;\n \t\t\t\t\treturn;\n@@ -550,14 +550,14 @@ static void update_refs_for_switch(struct checkout_opts *opts,\n \t\tcreate_symref(\"HEAD\", new->path, msg.buf);\n \t\tif (!opts->quiet) {\n \t\t\tif (old->path && !strcmp(new->path, old->path))\n-\t\t\t\tfprintf(stderr, \"Already on '%s'\\n\",\n+\t\t\t\tfprintf(stderr, _(\"Already on '%s'\\n\"),\n \t\t\t\t\tnew->name);\n \t\t\telse if (opts->new_branch)\n \t\t\t\tfprintf(stderr, \"Switched to%s branch '%s'\\n\",\n \t\t\t\t\topts->branch_exists ? \" and reset\" : \" a new\",\n \t\t\t\t\tnew->name);\n \t\t\telse\n-\t\t\t\tfprintf(stderr, \"Switched to branch '%s'\\n\",\n+\t\t\t\tfprintf(stderr, _(\"Switched to branch '%s'\\n\"),\n \t\t\t\t\tnew->name);\n \t\t}\n \t\tif (old->path && old->name) {\n@@ -602,7 +602,7 @@ static int switch_branches(struct checkout_opts *opts, struct branch_info *new)\n \t\tnew->name = \"HEAD\";\n \t\tnew->commit = old.commit;\n \t\tif (!new->commit)\n-\t\t\tdie(\"You are on a branch yet to be born\");\n+\t\t\tdie(_(\"You are on a branch yet to be born\"));\n \t\tparse_commit(new->commit);\n \t}\n \n@@ -731,7 +731,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)\n \n \t/* we can assume from now on new_branch = !new_branch_force */\n \tif (opts.new_branch && opts.new_branch_force)\n-\t\tdie(\"-B cannot be used with -b\");\n+\t\tdie(_(\"-B cannot be used with -b\"));\n \n \t/* copy -B over to -b, so that we can just check the latter */\n \tif (opts.new_branch_force)\n@@ -739,28 +739,28 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)\n \n \tif (patch_mode && (opts.track > 0 || opts.new_branch\n \t\t\t   || opts.new_branch_log || opts.merge || opts.force))\n-\t\tdie (\"--patch is incompatible with all other options\");\n+\t\tdie (_(\"--patch is incompatible with all other options\"));\n \n \t/* --track without -b should DWIM */\n \tif (0 < opts.track && !opts.new_branch) {\n \t\tconst char *argv0 = argv[0];\n \t\tif (!argc || !strcmp(argv0, \"--\"))\n-\t\t\tdie (\"--track needs a branch name\");\n+\t\t\tdie (_(\"--track needs a branch name\"));\n \t\tif (!prefixcmp(argv0, \"refs/\"))\n \t\t\targv0 += 5;\n \t\tif (!prefixcmp(argv0, \"remotes/\"))\n \t\t\targv0 += 8;\n \t\targv0 = strchr(argv0, '/');\n \t\tif (!argv0 || !argv0[1])\n-\t\t\tdie (\"Missing branch name; try -b\");\n+\t\t\tdie (_(\"Missing branch name; try -b\"));\n \t\topts.new_branch = argv0 + 1;\n \t}\n \n \tif (opts.new_orphan_branch) {\n \t\tif (opts.new_branch)\n-\t\t\tdie(\"--orphan and -b|-B are mutually exclusive\");\n+\t\t\tdie(_(\"--orphan and -b|-B are mutually exclusive\"));\n \t\tif (opts.track > 0)\n-\t\t\tdie(\"--orphan cannot be used with -t\");\n+\t\t\tdie(_(\"--orphan cannot be used with -t\"));\n \t\topts.new_branch = opts.new_orphan_branch;\n \t}\n \n@@ -770,7 +770,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)\n \t}\n \n \tif (opts.force && opts.merge)\n-\t\tdie(\"git checkout: -f and -m are incompatible\");\n+\t\tdie(_(\"git checkout: -f and -m are incompatible\"));\n \n \t/*\n \t * case 1: git checkout <ref> -- [<paths>]\n@@ -816,7 +816,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)\n \n \t\tif (get_sha1_mb(arg, rev)) {\n \t\t\tif (has_dash_dash)          /* case (1) */\n-\t\t\t\tdie(\"invalid reference: %s\", arg);\n+\t\t\t\tdie(_(\"invalid reference: %s\"), arg);\n \t\t\tif (!patch_mode &&\n \t\t\t    dwim_new_local_branch &&\n \t\t\t    opts.track == BRANCH_TRACK_UNSPECIFIED &&\n@@ -853,7 +853,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)\n \t\t\tsource_tree = parse_tree_indirect(rev);\n \n \t\tif (!source_tree)                   /* case (1): want a tree */\n-\t\t\tdie(\"reference is not a tree: %s\", arg);\n+\t\t\tdie(_(\"reference is not a tree: %s\"), arg);\n \t\tif (!has_dash_dash) {/* case (3 -> 1) */\n \t\t\t/*\n \t\t\t * Do not complain the most common case\n@@ -879,7 +879,7 @@ no_reference:\n \t\tconst char **pathspec = get_pathspec(prefix, argv);\n \n \t\tif (!pathspec)\n-\t\t\tdie(\"invalid path specification\");\n+\t\t\tdie(_(\"invalid path specification\"));\n \n \t\tif (patch_mode)\n \t\t\treturn interactive_checkout(new.name, pathspec, &opts);\n@@ -887,14 +887,14 @@ no_reference:\n \t\t/* Checkout paths */\n \t\tif (opts.new_branch) {\n \t\t\tif (argc == 1) {\n-\t\t\t\tdie(\"git checkout: updating paths is incompatible with switching branches.\\nDid you intend to checkout '%s' which can not be resolved as commit?\", argv[0]);\n+\t\t\t\tdie(_(\"git checkout: updating paths is incompatible with switching branches.\\nDid you intend to checkout '%s' which can not be resolved as commit?\"), argv[0]);\n \t\t\t} else {\n-\t\t\t\tdie(\"git checkout: updating paths is incompatible with switching branches.\");\n+\t\t\t\tdie(_(\"git checkout: updating paths is incompatible with switching branches.\"));\n \t\t\t}\n \t\t}\n \n \t\tif (1 < !!opts.writeout_stage + !!opts.force + !!opts.merge)\n-\t\t\tdie(\"git checkout: --ours/--theirs, --force and --merge are incompatible when\\nchecking out of the index.\");\n+\t\t\tdie(_(\"git checkout: --ours/--theirs, --force and --merge are incompatible when\\nchecking out of the index.\"));\n \n \t\treturn checkout_paths(source_tree, pathspec, &opts);\n \t}\n@@ -905,22 +905,22 @@ no_reference:\n \tif (opts.new_branch) {\n \t\tstruct strbuf buf = STRBUF_INIT;\n \t\tif (strbuf_check_branch_ref(&buf, opts.new_branch))\n-\t\t\tdie(\"git checkout: we do not like '%s' as a branch name.\",\n+\t\t\tdie(_(\"git checkout: we do not like '%s' as a branch name.\"),\n \t\t\t    opts.new_branch);\n \t\tif (!get_sha1(buf.buf, rev)) {\n \t\t\topts.branch_exists = 1;\n \t\t\tif (!opts.new_branch_force)\n-\t\t\t\tdie(\"git checkout: branch %s already exists\",\n+\t\t\t\tdie(_(\"git checkout: branch %s already exists\"),\n \t\t\t\t    opts.new_branch);\n \t\t}\n \t\tstrbuf_release(&buf);\n \t}\n \n \tif (new.name && !new.commit) {\n-\t\tdie(\"Cannot switch branch to a non-commit.\");\n+\t\tdie(_(\"Cannot switch branch to a non-commit.\"));\n \t}\n \tif (opts.writeout_stage)\n-\t\tdie(\"--ours/--theirs is incompatible with switching branches.\");\n+\t\tdie(_(\"--ours/--theirs is incompatible with switching branches.\"));\n \n \treturn switch_branches(&opts, &new);\n }\n-- \n1.7.2.2.579.g2183d\n"},{"id":"149598","messageId":"1283373845-2022-13-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 12/13] gettextize: git-checkout describe_detached_head messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-01T20:44:04Z","receivedAt":"2010-09-01T20:44:04Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n\nThis is comparable to the basic messages, but I put it in its own\npatch mainly as a reminder to myself, this maybe needs to be split\ninto a %s format in the future.\n\n builtin/checkout.c |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin/checkout.c b/builtin/checkout.c\nindex a7033a0..79cbcef 100644\n--- a/builtin/checkout.c\n+++ b/builtin/checkout.c\n@@ -574,7 +574,7 @@ static void update_refs_for_switch(struct checkout_opts *opts,\n \t\tif (!opts->quiet) {\n \t\t\tif (old->path && advice_detached_head)\n \t\t\t\tdetach_advice(old->path, new->name);\n-\t\t\tdescribe_detached_head(\"HEAD is now at\", new->commit);\n+\t\t\tdescribe_detached_head(_(\"HEAD is now at\"), new->commit);\n \t\t}\n \t}\n \tremove_branch_state();\n@@ -616,7 +616,7 @@ static int switch_branches(struct checkout_opts *opts, struct branch_info *new)\n \t * to remind the user that it might be lost.\n \t */\n \tif (!opts->quiet && !old.path && old.commit && new->commit != old.commit)\n-\t\tdescribe_detached_head(\"Previous HEAD position was\", old.commit);\n+\t\tdescribe_detached_head(_(\"Previous HEAD position was\"), old.commit);\n \n \tupdate_refs_for_switch(opts, &old, new);\n \n-- \n1.7.2.2.579.g2183d\n"},{"id":"149601","messageId":"1283373845-2022-14-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 13/13] gettextize: git-checkout \"Switched to a .. branch\" message","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-01T20:44:05Z","receivedAt":"2010-09-01T20:44:05Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Split up the \"Switched to and reset branch\" and \"Switched to a new\nbranch\" messages to make them easier to translate.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/checkout.c |    7 ++++---\n 1 files changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/builtin/checkout.c b/builtin/checkout.c\nindex 79cbcef..8d8649a 100644\n--- a/builtin/checkout.c\n+++ b/builtin/checkout.c\n@@ -553,9 +553,10 @@ static void update_refs_for_switch(struct checkout_opts *opts,\n \t\t\t\tfprintf(stderr, _(\"Already on '%s'\\n\"),\n \t\t\t\t\tnew->name);\n \t\t\telse if (opts->new_branch)\n-\t\t\t\tfprintf(stderr, \"Switched to%s branch '%s'\\n\",\n-\t\t\t\t\topts->branch_exists ? \" and reset\" : \" a new\",\n-\t\t\t\t\tnew->name);\n+\t\t\t\tif (opts->branch_exists)\n+\t\t\t\t\tfprintf(stderr, _(\"Switched to and reset branch '%s'\\n\"), new->name);\n+\t\t\t\telse\n+\t\t\t\t\tfprintf(stderr, _(\"Switched to a new branch '%s'\\n\"), new->name);\n \t\t\telse\n \t\t\t\tfprintf(stderr, _(\"Switched to branch '%s'\\n\"),\n \t\t\t\t\tnew->name);\n-- \n1.7.2.2.579.g2183d\n"},{"id":"149616","messageId":"20100902042155.GE29713@burratino","threadId":"24943","inReplyTo":"1283373845-2022-6-git-send-email-avarab@gmail.com","subject":"Re: [PATCH 05/13] gettextize: git-add refresh_index message","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-09-02T04:21:55Z","receivedAt":"2010-09-02T04:21:55Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"On Wed, Sep 01, 2010 at 08:43:57PM +0000, Ævar Arnfjörð Bjarmason wrote:\n> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n> ---\n> \n> I can't find the command that makes this message appear\n\n$ git reset HEAD^ 2>/dev/null\n$ git add -v --refresh .\nUnstaged changes after refreshing the index:\nM\tbuiltin/apply.c\nM\tbuiltin/bundle.c\nM\tbuiltin/config.c\nM\tbuiltin/grep.c\nM\tbuiltin/index-pack.c\nM\tbuiltin/ls-remote.c\nM\tbuiltin/merge-file.c\nM\tbuiltin/shortlog.c\nM\tbuiltin/var.c\nM\tcache.h\nM\tenvironment.c\nM\tgit.c\nM\tsetup.c\nM\tt/t1501-worktree.sh\nM\tt/t7006-pager.sh\n\nDefinitely porcelain.\n"},{"id":"149674","messageId":"1283456446-22577-1-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 00/25] [CONTINUED] gettextize all C mainporcelain common commands","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T19:40:21Z","receivedAt":"2010-09-02T19:40:21Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"This series continues where \"gettextize the first 4 C mainporcelain\ncommon commands\" left off and translates all the C mainporcelain\ncommon commands (the only non-C ones left are bisect/pull/rebase).\n\nWith this Git is up to 482 translatable messages.\n\nFor reviewing all the patches that say \"basic messages\" were (mostly)\nconverted by an automated script and should be really\nstraightforward. Most of these are just plain die/error/printf calls\nwith a single message.\n\nSee further comments on individual patches below. Most comment only\napply to the patch immediately above them.\n\nÆvar Arnfjörð Bjarmason (25):\n  gettextize: git-commit basic messages\n  gettextize: git-commit formatting messages\n\nThe message you get in the editor with git add . && git-commit\n\n  gettextize: git-commit advice messages\n\nAn example of N_() and _() usage.\n\n  gettextize: git-diff basic messages\n  gettextize: git-fetch basic messages\n  gettextize: git-fetch formatting messages\n\nThe status output you get on \"git fetch\" where it's telling you what\nchanged.\n\n  gettextize: git-grep basic messages\n  gettextize: git-log basic messages\n\nThis is more than just git-log actually, e.g. git-show too.\n\n  gettextize: git-format-patch --cover-letter message\n\nI think this should be made translatable.\n\n  gettextize: git-merge basic messages\n\nThis need careful review. In many cases git-merge is writing out to\nsome .git/* file and I *don't* want to translate that, but it could\nuse a second set of eyes to see if I missed something.\n\n  gettextize: git-merge \"In-index merge\" message\n  gettextize: git-merge \"Merge made by %s.\" message\n  gettextize: git-merge remaining cmd_merge messages\n\nThese I reviewed carefully and they should be trivial.\n\n  gettextize: git-mv basic messages\n  gettextize: git-mv \"bad\" messages\n  gettextize: git-rm basic messages\n\nditto, these should all be fine.\n\n  builtin: use builtin.h in git-reset\n\nas before, this is not needed if \"builtin: use builtin.h for all\nbuiltin/ commands\" is applied. But it's here for convenience. If the\npreviously submitted builtin.h patch is applied this can be dropped.\n\n  gettextize: git-reset basic messages\n  gettextize: git-reset reset_type_names messages\n\nAnother N_() and _() patch.\n\n  gettextize: git-tag basic messages\n  gettextize: git-tag tag_template message\n\nAnother N_() and _() patch.\n\n  gettextize: git-push basic messages\n  builtin: use builtin.h in git-status\n\nThis is *not* in my previously submitted \"builtin: use builtin.h for\nall builtin/ commands\" patch.\n\n  gettextize: git-status basic messages\n\nAn old resurrected patch ...\n\n  gettextize: git-status shortstatus messages\n\n... but wt-status changed since then, so this was needed too.\n\n builtin/commit.c |  156 +++++++++++++++++++++++++++---------------------------\n builtin/diff.c   |   20 ++++----\n builtin/fetch.c  |   74 +++++++++++++-------------\n builtin/grep.c   |   34 ++++++------\n builtin/log.c    |   76 +++++++++++++-------------\n builtin/merge.c  |  136 +++++++++++++++++++++++-----------------------\n builtin/mv.c     |   32 ++++++------\n builtin/push.c   |   42 +++++++-------\n builtin/reset.c  |   44 ++++++++--------\n builtin/rm.c     |   22 ++++----\n builtin/tag.c    |   66 +++++++++++-----------\n wt-status.c      |  115 ++++++++++++++++++++--------------------\n 12 files changed, 409 insertions(+), 408 deletions(-)\n\n-- \n1.7.2.2.614.g1dc9\n"},{"id":"149676","messageId":"1283456446-22577-2-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 01/25] gettextize: git-commit basic messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T19:40:22Z","receivedAt":"2010-09-02T19:40:22Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/commit.c |  116 +++++++++++++++++++++++++++---------------------------\n 1 files changed, 58 insertions(+), 58 deletions(-)\n\ndiff --git a/builtin/commit.c b/builtin/commit.c\nindex 66fdd22..cabf6e3 100644\n--- a/builtin/commit.c\n+++ b/builtin/commit.c\n@@ -241,7 +241,7 @@ static void add_remove_files(struct string_list *list)\n \n \t\tif (!lstat(p->string, &st)) {\n \t\t\tif (add_to_cache(p->string, &st, 0))\n-\t\t\t\tdie(\"updating files failed\");\n+\t\t\t\tdie(_(\"updating files failed\"));\n \t\t} else\n \t\t\tremove_file_from_cache(p->string);\n \t}\n@@ -268,7 +268,7 @@ static void create_base_index(void)\n \topts.fn = oneway_merge;\n \ttree = parse_tree_indirect(head_sha1);\n \tif (!tree)\n-\t\tdie(\"failed to unpack HEAD tree object\");\n+\t\tdie(_(\"failed to unpack HEAD tree object\"));\n \tparse_tree(tree);\n \tinit_tree_desc(&t, tree->buffer, tree->size);\n \tif (unpack_trees(1, &t, &opts))\n@@ -296,9 +296,9 @@ static char *prepare_index(int argc, const char **argv, const char *prefix, int\n \t\trefresh_flags |= REFRESH_UNMERGED;\n \tif (interactive) {\n \t\tif (interactive_add(argc, argv, prefix) != 0)\n-\t\t\tdie(\"interactive add failed\");\n+\t\t\tdie(_(\"interactive add failed\"));\n \t\tif (read_cache_preload(NULL) < 0)\n-\t\t\tdie(\"index file corrupt\");\n+\t\t\tdie(_(\"index file corrupt\"));\n \t\tcommit_style = COMMIT_AS_IS;\n \t\treturn get_index_file();\n \t}\n@@ -307,7 +307,7 @@ static char *prepare_index(int argc, const char **argv, const char *prefix, int\n \t\tpathspec = get_pathspec(prefix, argv);\n \n \tif (read_cache_preload(pathspec) < 0)\n-\t\tdie(\"index file corrupt\");\n+\t\tdie(_(\"index file corrupt\"));\n \n \t/*\n \t * Non partial, non as-is commit.\n@@ -327,7 +327,7 @@ static char *prepare_index(int argc, const char **argv, const char *prefix, int\n \t\trefresh_cache_or_die(refresh_flags);\n \t\tif (write_cache(fd, active_cache, active_nr) ||\n \t\t    close_lock_file(&index_lock))\n-\t\t\tdie(\"unable to write new_index file\");\n+\t\t\tdie(_(\"unable to write new_index file\"));\n \t\tcommit_style = COMMIT_NORMAL;\n \t\treturn index_lock.filename;\n \t}\n@@ -347,7 +347,7 @@ static char *prepare_index(int argc, const char **argv, const char *prefix, int\n \t\tif (active_cache_changed) {\n \t\t\tif (write_cache(fd, active_cache, active_nr) ||\n \t\t\t    commit_locked_index(&index_lock))\n-\t\t\t\tdie(\"unable to write new_index file\");\n+\t\t\t\tdie(_(\"unable to write new_index file\"));\n \t\t} else {\n \t\t\trollback_lock_file(&index_lock);\n \t\t}\n@@ -377,7 +377,7 @@ static char *prepare_index(int argc, const char **argv, const char *prefix, int\n \tcommit_style = COMMIT_PARTIAL;\n \n \tif (in_merge)\n-\t\tdie(\"cannot do a partial commit during a merge.\");\n+\t\tdie(_(\"cannot do a partial commit during a merge.\"));\n \n \tmemset(&partial, 0, sizeof(partial));\n \tpartial.strdup_strings = 1;\n@@ -386,14 +386,14 @@ static char *prepare_index(int argc, const char **argv, const char *prefix, int\n \n \tdiscard_cache();\n \tif (read_cache() < 0)\n-\t\tdie(\"cannot read the index\");\n+\t\tdie(_(\"cannot read the index\"));\n \n \tfd = hold_locked_index(&index_lock, 1);\n \tadd_remove_files(&partial);\n \trefresh_cache(REFRESH_QUIET);\n \tif (write_cache(fd, active_cache, active_nr) ||\n \t    close_lock_file(&index_lock))\n-\t\tdie(\"unable to write new_index file\");\n+\t\tdie(_(\"unable to write new_index file\"));\n \n \tfd = hold_lock_file_for_update(&false_lock,\n \t\t\t\t       git_path(\"next-index-%\"PRIuMAX,\n@@ -406,7 +406,7 @@ static char *prepare_index(int argc, const char **argv, const char *prefix, int\n \n \tif (write_cache(fd, active_cache, active_nr) ||\n \t    close_lock_file(&false_lock))\n-\t\tdie(\"unable to write temporary index file\");\n+\t\tdie(_(\"unable to write temporary index file\"));\n \n \tdiscard_cache();\n \tread_cache_from(false_lock.filename);\n@@ -453,7 +453,7 @@ static int is_a_merge(const unsigned char *sha1)\n {\n \tstruct commit *commit = lookup_commit(sha1);\n \tif (!commit || parse_commit(commit))\n-\t\tdie(\"could not parse HEAD commit\");\n+\t\tdie(_(\"could not parse HEAD commit\"));\n \treturn !!(commit->parents && commit->parents->next);\n }\n \n@@ -472,13 +472,13 @@ static void determine_author_info(void)\n \n \t\ta = strstr(use_message_buffer, \"\\nauthor \");\n \t\tif (!a)\n-\t\t\tdie(\"invalid commit: %s\", use_message);\n+\t\t\tdie(_(\"invalid commit: %s\"), use_message);\n \n \t\tlb = strchrnul(a + strlen(\"\\nauthor \"), '<');\n \t\trb = strchrnul(lb, '>');\n \t\teol = strchrnul(rb, '\\n');\n \t\tif (!*lb || !*rb || !*eol)\n-\t\t\tdie(\"invalid commit: %s\", use_message);\n+\t\t\tdie(_(\"invalid commit: %s\"), use_message);\n \n \t\tif (lb == a + strlen(\"\\nauthor \"))\n \t\t\t/* \\nauthor <foo@example.com> */\n@@ -496,7 +496,7 @@ static void determine_author_info(void)\n \t\tconst char *rb = strchr(force_author, '>');\n \n \t\tif (!lb || !rb)\n-\t\t\tdie(\"malformed --author parameter\");\n+\t\t\tdie(_(\"malformed --author parameter\"));\n \t\tname = xstrndup(force_author, lb - force_author);\n \t\temail = xstrndup(lb + 2, rb - (lb + 2));\n \t}\n@@ -570,33 +570,33 @@ static int prepare_to_commit(const char *index_file, const char *prefix,\n \t\thook_arg1 = \"message\";\n \t} else if (logfile && !strcmp(logfile, \"-\")) {\n \t\tif (isatty(0))\n-\t\t\tfprintf(stderr, \"(reading log message from standard input)\\n\");\n+\t\t\tfprintf(stderr, _(\"(reading log message from standard input)\\n\"));\n \t\tif (strbuf_read(&sb, 0, 0) < 0)\n-\t\t\tdie_errno(\"could not read log from standard input\");\n+\t\t\tdie_errno(_(\"could not read log from standard input\"));\n \t\thook_arg1 = \"message\";\n \t} else if (logfile) {\n \t\tif (strbuf_read_file(&sb, logfile, 0) < 0)\n-\t\t\tdie_errno(\"could not read log file '%s'\",\n+\t\t\tdie_errno(_(\"could not read log file '%s'\"),\n \t\t\t\t  logfile);\n \t\thook_arg1 = \"message\";\n \t} else if (use_message) {\n \t\tbuffer = strstr(use_message_buffer, \"\\n\\n\");\n \t\tif (!buffer || buffer[2] == '\\0')\n-\t\t\tdie(\"commit has empty message\");\n+\t\t\tdie(_(\"commit has empty message\"));\n \t\tstrbuf_add(&sb, buffer + 2, strlen(buffer + 2));\n \t\thook_arg1 = \"commit\";\n \t\thook_arg2 = use_message;\n \t} else if (!stat(git_path(\"MERGE_MSG\"), &statbuf)) {\n \t\tif (strbuf_read_file(&sb, git_path(\"MERGE_MSG\"), 0) < 0)\n-\t\t\tdie_errno(\"could not read MERGE_MSG\");\n+\t\t\tdie_errno(_(\"could not read MERGE_MSG\"));\n \t\thook_arg1 = \"merge\";\n \t} else if (!stat(git_path(\"SQUASH_MSG\"), &statbuf)) {\n \t\tif (strbuf_read_file(&sb, git_path(\"SQUASH_MSG\"), 0) < 0)\n-\t\t\tdie_errno(\"could not read SQUASH_MSG\");\n+\t\t\tdie_errno(_(\"could not read SQUASH_MSG\"));\n \t\thook_arg1 = \"squash\";\n \t} else if (template_file && !stat(template_file, &statbuf)) {\n \t\tif (strbuf_read_file(&sb, template_file, 0) < 0)\n-\t\t\tdie_errno(\"could not read '%s'\", template_file);\n+\t\t\tdie_errno(_(\"could not read '%s'\"), template_file);\n \t\thook_arg1 = \"template\";\n \t}\n \n@@ -609,7 +609,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,\n \n \tfp = fopen(git_path(commit_editmsg), \"w\");\n \tif (fp == NULL)\n-\t\tdie_errno(\"could not open '%s'\", git_path(commit_editmsg));\n+\t\tdie_errno(_(\"could not open '%s'\"), git_path(commit_editmsg));\n \n \tif (cleanup_mode != CLEANUP_NONE)\n \t\tstripspace(&sb, 0);\n@@ -633,7 +633,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,\n \t}\n \n \tif (fwrite(sb.buf, 1, sb.len, fp) < sb.len)\n-\t\tdie_errno(\"could not write commit template\");\n+\t\tdie_errno(_(\"could not write commit template\"));\n \n \tstrbuf_release(&sb);\n \n@@ -702,7 +702,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,\n \t\tconst char *parent = \"HEAD\";\n \n \t\tif (!active_nr && read_cache() < 0)\n-\t\t\tdie(\"Cannot read index\");\n+\t\t\tdie(_(\"Cannot read index\"));\n \n \t\tif (amend)\n \t\t\tparent = \"HEAD^1\";\n@@ -734,7 +734,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,\n \t\tactive_cache_tree = cache_tree();\n \tif (cache_tree_update(active_cache_tree,\n \t\t\t      active_cache, active_nr, 0, 0) < 0) {\n-\t\terror(\"Error building trees\");\n+\t\terror(_(\"Error building trees\"));\n \t\treturn 0;\n \t}\n \n@@ -749,7 +749,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,\n \t\tsnprintf(index, sizeof(index), \"GIT_INDEX_FILE=%s\", index_file);\n \t\tif (launch_editor(git_path(commit_editmsg), NULL, env)) {\n \t\t\tfprintf(stderr,\n-\t\t\t\"Please supply the message using either -m or -F option.\\n\");\n+\t\t\t_(\"Please supply the message using either -m or -F option.\\n\"));\n \t\t\texit(1);\n \t\t}\n \t}\n@@ -829,7 +829,7 @@ static const char *find_author_by_nickname(const char *name)\n \t\tformat_commit_message(commit, \"%an <%ae>\", &buf, &ctx);\n \t\treturn strbuf_detach(&buf, NULL);\n \t}\n-\tdie(\"No existing author found with '%s'\", name);\n+\tdie(_(\"No existing author found with '%s'\"), name);\n }\n \n \n@@ -844,7 +844,7 @@ static void handle_untracked_files_arg(struct wt_status *s)\n \telse if (!strcmp(untracked_files_arg, \"all\"))\n \t\ts->show_untracked_files = SHOW_ALL_UNTRACKED_FILES;\n \telse\n-\t\tdie(\"Invalid untracked files mode '%s'\", untracked_files_arg);\n+\t\tdie(_(\"Invalid untracked files mode '%s'\"), untracked_files_arg);\n }\n \n static int parse_and_validate_options(int argc, const char *argv[],\n@@ -861,7 +861,7 @@ static int parse_and_validate_options(int argc, const char *argv[],\n \t\tforce_author = find_author_by_nickname(force_author);\n \n \tif (force_author && renew_authorship)\n-\t\tdie(\"Using both --reset-author and --author does not make sense\");\n+\t\tdie(_(\"Using both --reset-author and --author does not make sense\"));\n \n \tif (logfile || message.len || use_message)\n \t\tuse_editor = 0;\n@@ -875,9 +875,9 @@ static int parse_and_validate_options(int argc, const char *argv[],\n \n \t/* Sanity check options */\n \tif (amend && initial_commit)\n-\t\tdie(\"You have nothing to amend.\");\n+\t\tdie(_(\"You have nothing to amend.\"));\n \tif (amend && in_merge)\n-\t\tdie(\"You are in the middle of a merge -- cannot amend.\");\n+\t\tdie(_(\"You are in the middle of a merge -- cannot amend.\"));\n \n \tif (use_message)\n \t\tf++;\n@@ -886,15 +886,15 @@ static int parse_and_validate_options(int argc, const char *argv[],\n \tif (logfile)\n \t\tf++;\n \tif (f > 1)\n-\t\tdie(\"Only one of -c/-C/-F can be used.\");\n+\t\tdie(_(\"Only one of -c/-C/-F can be used.\"));\n \tif (message.len && f > 0)\n-\t\tdie(\"Option -m cannot be combined with -c/-C/-F.\");\n+\t\tdie(_(\"Option -m cannot be combined with -c/-C/-F.\"));\n \tif (edit_message)\n \t\tuse_message = edit_message;\n \tif (amend && !use_message)\n \t\tuse_message = \"HEAD\";\n \tif (!use_message && renew_authorship)\n-\t\tdie(\"--reset-author can be used only with -C, -c or --amend.\");\n+\t\tdie(_(\"--reset-author can be used only with -C, -c or --amend.\"));\n \tif (use_message) {\n \t\tunsigned char sha1[20];\n \t\tstatic char utf8[] = \"UTF-8\";\n@@ -903,10 +903,10 @@ static int parse_and_validate_options(int argc, const char *argv[],\n \t\tstruct commit *commit;\n \n \t\tif (get_sha1(use_message, sha1))\n-\t\t\tdie(\"could not lookup commit %s\", use_message);\n+\t\t\tdie(_(\"could not lookup commit %s\"), use_message);\n \t\tcommit = lookup_commit_reference(sha1);\n \t\tif (!commit || parse_commit(commit))\n-\t\t\tdie(\"could not parse commit %s\", use_message);\n+\t\t\tdie(_(\"could not parse commit %s\"), use_message);\n \n \t\tenc = strstr(commit->buffer, \"\\nencoding\");\n \t\tif (enc) {\n@@ -934,13 +934,13 @@ static int parse_and_validate_options(int argc, const char *argv[],\n \t}\n \n \tif (!!also + !!only + !!all + !!interactive > 1)\n-\t\tdie(\"Only one of --include/--only/--all/--interactive can be used.\");\n+\t\tdie(_(\"Only one of --include/--only/--all/--interactive can be used.\"));\n \tif (argc == 0 && (also || (only && !amend)))\n-\t\tdie(\"No paths with --include/--only does not make sense.\");\n+\t\tdie(_(\"No paths with --include/--only does not make sense.\"));\n \tif (argc == 0 && only && amend)\n-\t\tonly_include_assumed = \"Clever... amending the last one with dirty index.\";\n+\t\tonly_include_assumed = _(\"Clever... amending the last one with dirty index.\");\n \tif (argc > 0 && !also && !only)\n-\t\tonly_include_assumed = \"Explicit paths specified without -i nor -o; assuming --only paths...\";\n+\t\tonly_include_assumed = _(\"Explicit paths specified without -i nor -o; assuming --only paths...\");\n \tif (!cleanup_arg || !strcmp(cleanup_arg, \"default\"))\n \t\tcleanup_mode = use_editor ? CLEANUP_ALL : CLEANUP_SPACE;\n \telse if (!strcmp(cleanup_arg, \"verbatim\"))\n@@ -950,14 +950,14 @@ static int parse_and_validate_options(int argc, const char *argv[],\n \telse if (!strcmp(cleanup_arg, \"strip\"))\n \t\tcleanup_mode = CLEANUP_ALL;\n \telse\n-\t\tdie(\"Invalid cleanup mode %s\", cleanup_arg);\n+\t\tdie(_(\"Invalid cleanup mode %s\"), cleanup_arg);\n \n \thandle_untracked_files_arg(s);\n \n \tif (all && argc > 0)\n-\t\tdie(\"Paths with -a does not make sense.\");\n+\t\tdie(_(\"Paths with -a does not make sense.\"));\n \telse if (interactive && argc > 0)\n-\t\tdie(\"Paths with --interactive does not make sense.\");\n+\t\tdie(_(\"Paths with --interactive does not make sense.\"));\n \n \tif (null_termination && status_format == STATUS_FORMAT_LONG)\n \t\tstatus_format = STATUS_FORMAT_PORCELAIN;\n@@ -1036,7 +1036,7 @@ static int git_status_config(const char *k, const char *v, void *cb)\n \t\telse if (!strcmp(v, \"all\"))\n \t\t\ts->show_untracked_files = SHOW_ALL_UNTRACKED_FILES;\n \t\telse\n-\t\t\treturn error(\"Invalid untracked files mode '%s'\", v);\n+\t\t\treturn error(_(\"Invalid untracked files mode '%s'\"), v);\n \t\treturn 0;\n \t}\n \treturn git_diff_ui_config(k, v, NULL);\n@@ -1139,9 +1139,9 @@ static void print_summary(const char *prefix, const unsigned char *sha1)\n \n \tcommit = lookup_commit(sha1);\n \tif (!commit)\n-\t\tdie(\"couldn't look up newly created commit\");\n+\t\tdie(_(\"couldn't look up newly created commit\"));\n \tif (!commit || parse_commit(commit))\n-\t\tdie(\"could not parse newly created commit\");\n+\t\tdie(_(\"could not parse newly created commit\"));\n \n \tstrbuf_addstr(&format, \"format:%h] %s\");\n \n@@ -1291,7 +1291,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)\n \t\t\treflog_msg = \"commit (amend)\";\n \t\tcommit = lookup_commit(head_sha1);\n \t\tif (!commit || parse_commit(commit))\n-\t\t\tdie(\"could not parse HEAD commit\");\n+\t\t\tdie(_(\"could not parse HEAD commit\"));\n \n \t\tfor (c = commit->parents; c; c = c->next)\n \t\t\tpptr = &commit_list_insert(c->item, pptr)->next;\n@@ -1304,19 +1304,19 @@ int cmd_commit(int argc, const char **argv, const char *prefix)\n \t\tpptr = &commit_list_insert(lookup_commit(head_sha1), pptr)->next;\n \t\tfp = fopen(git_path(\"MERGE_HEAD\"), \"r\");\n \t\tif (fp == NULL)\n-\t\t\tdie_errno(\"could not open '%s' for reading\",\n+\t\t\tdie_errno(_(\"could not open '%s' for reading\"),\n \t\t\t\t  git_path(\"MERGE_HEAD\"));\n \t\twhile (strbuf_getline(&m, fp, '\\n') != EOF) {\n \t\t\tunsigned char sha1[20];\n \t\t\tif (get_sha1_hex(m.buf, sha1) < 0)\n-\t\t\t\tdie(\"Corrupt MERGE_HEAD file (%s)\", m.buf);\n+\t\t\t\tdie(_(\"Corrupt MERGE_HEAD file (%s)\"), m.buf);\n \t\t\tpptr = &commit_list_insert(lookup_commit(sha1), pptr)->next;\n \t\t}\n \t\tfclose(fp);\n \t\tstrbuf_release(&m);\n \t\tif (!stat(git_path(\"MERGE_MODE\"), &statbuf)) {\n \t\t\tif (strbuf_read_file(&sb, git_path(\"MERGE_MODE\"), 0) < 0)\n-\t\t\t\tdie_errno(\"could not read MERGE_MODE\");\n+\t\t\t\tdie_errno(_(\"could not read MERGE_MODE\"));\n \t\t\tif (!strcmp(sb.buf, \"no-ff\"))\n \t\t\t\tallow_fast_forward = 0;\n \t\t}\n@@ -1333,7 +1333,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)\n \tif (strbuf_read_file(&sb, git_path(commit_editmsg), 0) < 0) {\n \t\tint saved_errno = errno;\n \t\trollback_index_files();\n-\t\tdie(\"could not read commit message: %s\", strerror(saved_errno));\n+\t\tdie(_(\"could not read commit message: %s\"), strerror(saved_errno));\n \t}\n \n \t/* Truncate the message just before the diff, if any. */\n@@ -1347,7 +1347,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)\n \t\tstripspace(&sb, cleanup_mode == CLEANUP_ALL);\n \tif (message_is_empty(&sb) && !allow_empty_message) {\n \t\trollback_index_files();\n-\t\tfprintf(stderr, \"Aborting commit due to empty commit message.\\n\");\n+\t\tfprintf(stderr, _(\"Aborting commit due to empty commit message.\\n\"));\n \t\texit(1);\n \t}\n \n@@ -1355,7 +1355,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)\n \t\t\tfmt_ident(author_name, author_email, author_date,\n \t\t\t\tIDENT_ERROR_ON_NO_NAME))) {\n \t\trollback_index_files();\n-\t\tdie(\"failed to write commit object\");\n+\t\tdie(_(\"failed to write commit object\"));\n \t}\n \n \tref_lock = lock_any_ref_for_update(\"HEAD\",\n@@ -1372,11 +1372,11 @@ int cmd_commit(int argc, const char **argv, const char *prefix)\n \n \tif (!ref_lock) {\n \t\trollback_index_files();\n-\t\tdie(\"cannot lock HEAD ref\");\n+\t\tdie(_(\"cannot lock HEAD ref\"));\n \t}\n \tif (write_ref_sha1(ref_lock, commit_sha1, sb.buf) < 0) {\n \t\trollback_index_files();\n-\t\tdie(\"cannot update HEAD ref\");\n+\t\tdie(_(\"cannot update HEAD ref\"));\n \t}\n \n \tunlink(git_path(\"MERGE_HEAD\"));\n@@ -1385,9 +1385,9 @@ int cmd_commit(int argc, const char **argv, const char *prefix)\n \tunlink(git_path(\"SQUASH_MSG\"));\n \n \tif (commit_index_files())\n-\t\tdie (\"Repository has been updated, but unable to write\\n\"\n+\t\tdie (_(\"Repository has been updated, but unable to write\\n\"\n \t\t     \"new_index file. Check that disk is not full or quota is\\n\"\n-\t\t     \"not exceeded, and then \\\"git reset HEAD\\\" to recover.\");\n+\t\t     \"not exceeded, and then \\\"git reset HEAD\\\" to recover.\"));\n \n \trerere(0);\n \trun_hook(get_index_file(), \"post-commit\", NULL);\n-- \n1.7.2.2.614.g1dc9\n"},{"id":"149675","messageId":"1283456446-22577-3-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 02/25] gettextize: git-commit formatting messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T19:40:23Z","receivedAt":"2010-09-02T19:40:23Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/commit.c |   28 ++++++++++++++--------------\n 1 files changed, 14 insertions(+), 14 deletions(-)\n\ndiff --git a/builtin/commit.c b/builtin/commit.c\nindex cabf6e3..3fd479d 100644\n--- a/builtin/commit.c\n+++ b/builtin/commit.c\n@@ -647,28 +647,28 @@ static int prepare_to_commit(const char *index_file, const char *prefix,\n \n \t\tif (in_merge)\n \t\t\tfprintf(fp,\n-\t\t\t\t\"#\\n\"\n+\t\t\t\t_(\"#\\n\"\n \t\t\t\t\"# It looks like you may be committing a MERGE.\\n\"\n \t\t\t\t\"# If this is not correct, please remove the file\\n\"\n \t\t\t\t\"#\t%s\\n\"\n \t\t\t\t\"# and try again.\\n\"\n-\t\t\t\t\"#\\n\",\n+\t\t\t\t\"#\\n\"),\n \t\t\t\tgit_path(\"MERGE_HEAD\"));\n \n \t\tfprintf(fp,\n-\t\t\t\"\\n\"\n-\t\t\t\"# Please enter the commit message for your changes.\");\n+\t\t\t_(\"\\n\"\n+\t\t\t\"# Please enter the commit message for your changes.\"));\n \t\tif (cleanup_mode == CLEANUP_ALL)\n \t\t\tfprintf(fp,\n-\t\t\t\t\" Lines starting\\n\"\n+\t\t\t\t_(\" Lines starting\\n\"\n \t\t\t\t\"# with '#' will be ignored, and an empty\"\n-\t\t\t\t\" message aborts the commit.\\n\");\n+\t\t\t\t\" message aborts the commit.\\n\"));\n \t\telse /* CLEANUP_SPACE, that is. */\n \t\t\tfprintf(fp,\n-\t\t\t\t\" Lines starting\\n\"\n+\t\t\t\t_(\" Lines starting\\n\"\n \t\t\t\t\"# with '#' will be kept; you may remove them\"\n \t\t\t\t\" yourself if you want to.\\n\"\n-\t\t\t\t\"# An empty message aborts the commit.\\n\");\n+\t\t\t\t\"# An empty message aborts the commit.\\n\"));\n \t\tif (only_include_assumed)\n \t\t\tfprintf(fp, \"# %s\\n\", only_include_assumed);\n \n@@ -677,16 +677,16 @@ static int prepare_to_commit(const char *index_file, const char *prefix,\n \t\t\t\t\t   getenv(\"GIT_COMMITTER_EMAIL\"));\n \t\tif (strcmp(author_ident, committer_ident))\n \t\t\tfprintf(fp,\n-\t\t\t\t\"%s\"\n-\t\t\t\t\"# Author:    %s\\n\",\n+\t\t\t\t_(\"%s\"\n+\t\t\t\t\"# Author:    %s\\n\"),\n \t\t\t\tident_shown++ ? \"\" : \"#\\n\",\n \t\t\t\tauthor_ident);\n \t\tfree(author_ident);\n \n \t\tif (!user_ident_sufficiently_given())\n \t\t\tfprintf(fp,\n-\t\t\t\t\"%s\"\n-\t\t\t\t\"# Committer: %s\\n\",\n+\t\t\t\t_(\"%s\"\n+\t\t\t\t\"# Committer: %s\\n\"),\n \t\t\t\tident_shown++ ? \"\" : \"#\\n\",\n \t\t\t\tcommitter_ident);\n \n@@ -1182,9 +1182,9 @@ static void print_summary(const char *prefix, const unsigned char *sha1)\n \t\t!prefixcmp(head, \"refs/heads/\") ?\n \t\t\thead + 11 :\n \t\t\t!strcmp(head, \"HEAD\") ?\n-\t\t\t\t\"detached HEAD\" :\n+\t\t   \t\t_(\"detached HEAD\") :\n \t\t\t\thead,\n-\t\tinitial_commit ? \" (root-commit)\" : \"\");\n+\t\tinitial_commit ? _(\" (root-commit)\") : \"\");\n \n \tif (!log_tree_commit(&rev, commit)) {\n \t\trev.always_show_header = 1;\n-- \n1.7.2.2.614.g1dc9\n"},{"id":"149677","messageId":"1283456446-22577-4-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 03/25] gettextize: git-commit advice messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T19:40:24Z","receivedAt":"2010-09-02T19:40:24Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/commit.c |   12 ++++++------\n 1 files changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/builtin/commit.c b/builtin/commit.c\nindex 3fd479d..3626a8d 100644\n--- a/builtin/commit.c\n+++ b/builtin/commit.c\n@@ -38,7 +38,7 @@ static const char * const builtin_status_usage[] = {\n };\n \n static const char implicit_ident_advice[] =\n-\"Your name and email address were configured automatically based\\n\"\n+N_(\"Your name and email address were configured automatically based\\n\"\n \"on your username and hostname. Please check that they are accurate.\\n\"\n \"You can suppress this message by setting them explicitly:\\n\"\n \"\\n\"\n@@ -47,12 +47,12 @@ static const char implicit_ident_advice[] =\n \"\\n\"\n \"If the identity used for this commit is wrong, you can fix it with:\\n\"\n \"\\n\"\n-\"    git commit --amend --author='Your Name <you@example.com>'\\n\";\n+\"    git commit --amend --author='Your Name <you@example.com>'\\n\");\n \n static const char empty_amend_advice[] =\n-\"You asked to amend the most recent commit, but doing so would make\\n\"\n+N_(\"You asked to amend the most recent commit, but doing so would make\\n\"\n \"it empty. You can repeat your command with --allow-empty, or you can\\n\"\n-\"remove the commit entirely with \\\"git reset HEAD^\\\".\\n\";\n+\"remove the commit entirely with \\\"git reset HEAD^\\\".\\n\");\n \n static unsigned char head_sha1[20];\n \n@@ -719,7 +719,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,\n \t    !(amend && is_a_merge(head_sha1))) {\n \t\trun_status(stdout, index_file, prefix, 0, s);\n \t\tif (amend)\n-\t\t\tfputs(empty_amend_advice, stderr);\n+\t\t\tfputs(_(empty_amend_advice), stderr);\n \t\treturn 0;\n \t}\n \n@@ -1156,7 +1156,7 @@ static void print_summary(const char *prefix, const unsigned char *sha1)\n \t\tstrbuf_addbuf_percentquote(&format, &committer_ident);\n \t\tif (advice_implicit_identity) {\n \t\t\tstrbuf_addch(&format, '\\n');\n-\t\t\tstrbuf_addstr(&format, implicit_ident_advice);\n+\t\t\tstrbuf_addstr(&format, _(implicit_ident_advice));\n \t\t}\n \t}\n \tstrbuf_release(&author_ident);\n-- \n1.7.2.2.614.g1dc9\n"},{"id":"149678","messageId":"1283456446-22577-5-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 04/25] gettextize: git-diff basic messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T19:40:25Z","receivedAt":"2010-09-02T19:40:25Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/diff.c |   20 ++++++++++----------\n 1 files changed, 10 insertions(+), 10 deletions(-)\n\ndiff --git a/builtin/diff.c b/builtin/diff.c\nindex a43d326..3ae5715 100644\n--- a/builtin/diff.c\n+++ b/builtin/diff.c\n@@ -71,9 +71,9 @@ static int builtin_diff_b_f(struct rev_info *revs,\n \t\tusage(builtin_diff_usage);\n \n \tif (lstat(path, &st))\n-\t\tdie_errno(\"failed to stat '%s'\", path);\n+\t\tdie_errno(_(\"failed to stat '%s'\"), path);\n \tif (!(S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)))\n-\t\tdie(\"'%s': not a regular file or symlink\", path);\n+\t\tdie(_(\"'%s': not a regular file or symlink\"), path);\n \n \tdiff_set_mnemonic_prefix(&revs->diffopt, \"o/\", \"w/\");\n \n@@ -222,7 +222,7 @@ static int builtin_diff_files(struct rev_info *revs, int argc, const char **argv\n \t\telse if (!strcmp(argv[1], \"-h\"))\n \t\t\tusage(builtin_diff_usage);\n \t\telse\n-\t\t\treturn error(\"invalid option: %s\", argv[1]);\n+\t\t\treturn error(_(\"invalid option: %s\"), argv[1]);\n \t\targv++; argc--;\n \t}\n \n@@ -299,12 +299,12 @@ int cmd_diff(int argc, const char **argv, const char *prefix)\n \tDIFF_OPT_SET(&rev.diffopt, ALLOW_TEXTCONV);\n \n \tif (nongit)\n-\t\tdie(\"Not a git repository\");\n+\t\tdie(_(\"Not a git repository\"));\n \targc = setup_revisions(argc, argv, &rev, NULL);\n \tif (!rev.diffopt.output_format) {\n \t\trev.diffopt.output_format = DIFF_FORMAT_PATCH;\n \t\tif (diff_setup_done(&rev.diffopt) < 0)\n-\t\t\tdie(\"diff_setup_done failed\");\n+\t\t\tdie(_(\"diff_setup_done failed\"));\n \t}\n \n \tDIFF_OPT_SET(&rev.diffopt, RECURSIVE);\n@@ -331,7 +331,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix)\n \t\t\t\t !strcmp(arg, \"--staged\")) {\n \t\t\t\tadd_head_to_pending(&rev);\n \t\t\t\tif (!rev.pending.nr)\n-\t\t\t\t\tdie(\"No HEAD commit to compare with (yet)\");\n+\t\t\t\t\tdie(_(\"No HEAD commit to compare with (yet)\"));\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n@@ -346,12 +346,12 @@ int cmd_diff(int argc, const char **argv, const char *prefix)\n \t\t\tobj = parse_object(obj->sha1);\n \t\tobj = deref_tag(obj, NULL, 0);\n \t\tif (!obj)\n-\t\t\tdie(\"invalid object '%s' given.\", name);\n+\t\t\tdie(_(\"invalid object '%s' given.\"), name);\n \t\tif (obj->type == OBJ_COMMIT)\n \t\t\tobj = &((struct commit *)obj)->tree->object;\n \t\tif (obj->type == OBJ_TREE) {\n \t\t\tif (ARRAY_SIZE(ent) <= ents)\n-\t\t\t\tdie(\"more than %d trees given: '%s'\",\n+\t\t\t\tdie(_(\"more than %d trees given: '%s'\"),\n \t\t\t\t    (int) ARRAY_SIZE(ent), name);\n \t\t\tobj->flags |= flags;\n \t\t\tent[ents].item = obj;\n@@ -361,7 +361,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix)\n \t\t}\n \t\tif (obj->type == OBJ_BLOB) {\n \t\t\tif (2 <= blobs)\n-\t\t\t\tdie(\"more than two blobs given: '%s'\", name);\n+\t\t\t\tdie(_(\"more than two blobs given: '%s'\"), name);\n \t\t\thashcpy(blob[blobs].sha1, obj->sha1);\n \t\t\tblob[blobs].name = name;\n \t\t\tblob[blobs].mode = list->mode;\n@@ -369,7 +369,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix)\n \t\t\tcontinue;\n \n \t\t}\n-\t\tdie(\"unhandled object '%s' given.\", name);\n+\t\tdie(_(\"unhandled object '%s' given.\"), name);\n \t}\n \tif (rev.prune_data) {\n \t\tconst char **pathspec = rev.prune_data;\n-- \n1.7.2.2.614.g1dc9\n"},{"id":"149679","messageId":"1283456446-22577-6-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 05/25] gettextize: git-fetch basic messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T19:40:26Z","receivedAt":"2010-09-02T19:40:26Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/fetch.c |   46 +++++++++++++++++++++++-----------------------\n 1 files changed, 23 insertions(+), 23 deletions(-)\n\ndiff --git a/builtin/fetch.c b/builtin/fetch.c\nindex c218657..4c90fc5 100644\n--- a/builtin/fetch.c\n+++ b/builtin/fetch.c\n@@ -178,7 +178,7 @@ static struct ref *get_ref_map(struct transport *transport,\n \t\t} else {\n \t\t\tref_map = get_remote_ref(remote_refs, \"HEAD\");\n \t\t\tif (!ref_map)\n-\t\t\t\tdie(\"Couldn't find remote ref HEAD\");\n+\t\t\t\tdie(_(\"Couldn't find remote ref HEAD\"));\n \t\t\tref_map->merge = 1;\n \t\t\ttail = &ref_map->next;\n \t\t}\n@@ -231,7 +231,7 @@ static int update_local_ref(struct ref *ref,\n \t*display = 0;\n \ttype = sha1_object_info(ref->new_sha1, NULL);\n \tif (type < 0)\n-\t\tdie(\"object %s not found\", sha1_to_hex(ref->new_sha1));\n+\t\tdie(_(\"object %s not found\"), sha1_to_hex(ref->new_sha1));\n \n \tif (!hashcmp(ref->old_sha1, ref->new_sha1)) {\n \t\tif (verbosity > 0)\n@@ -331,7 +331,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,\n \n \tfp = fopen(filename, \"a\");\n \tif (!fp)\n-\t\treturn error(\"cannot open %s: %s\\n\", filename, strerror(errno));\n+\t\treturn error(_(\"cannot open %s: %s\\n\"), filename, strerror(errno));\n \n \tif (raw_url)\n \t\turl = transport_anonymize_url(raw_url);\n@@ -420,9 +420,9 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,\n \tfree(url);\n \tfclose(fp);\n \tif (rc & STORE_REF_ERROR_DF_CONFLICT)\n-\t\terror(\"some local refs could not be updated; try running\\n\"\n+\t\terror(_(\"some local refs could not be updated; try running\\n\"\n \t\t      \" 'git remote prune %s' to remove any old, conflicting \"\n-\t\t      \"branches\", remote_name);\n+\t\t      \"branches\"), remote_name);\n \treturn rc;\n }\n \n@@ -470,7 +470,7 @@ static int quickfetch(struct ref *ref_map)\n \n \terr = start_command(&revlist);\n \tif (err) {\n-\t\terror(\"could not run rev-list\");\n+\t\terror(_(\"could not run rev-list\"));\n \t\treturn err;\n \t}\n \n@@ -484,14 +484,14 @@ static int quickfetch(struct ref *ref_map)\n \t\tif (write_in_full(revlist.in, sha1_to_hex(ref->old_sha1), 40) < 0 ||\n \t\t    write_str_in_full(revlist.in, \"\\n\") < 0) {\n \t\t\tif (errno != EPIPE && errno != EINVAL)\n-\t\t\t\terror(\"failed write to rev-list: %s\", strerror(errno));\n+\t\t\t\terror(_(\"failed write to rev-list: %s\"), strerror(errno));\n \t\t\terr = -1;\n \t\t\tbreak;\n \t\t}\n \t}\n \n \tif (close(revlist.in)) {\n-\t\terror(\"failed to close rev-list's stdin: %s\", strerror(errno));\n+\t\terror(_(\"failed to close rev-list's stdin: %s\"), strerror(errno));\n \t\terr = -1;\n \t}\n \n@@ -644,8 +644,8 @@ static void check_not_current_branch(struct ref *ref_map)\n \tfor (; ref_map; ref_map = ref_map->next)\n \t\tif (ref_map->peer_ref && !strcmp(current_branch->refname,\n \t\t\t\t\tref_map->peer_ref->name))\n-\t\t\tdie(\"Refusing to fetch into current branch %s \"\n-\t\t\t    \"of non-bare repository\", current_branch->refname);\n+\t\t\tdie(_(\"Refusing to fetch into current branch %s \"\n+\t\t\t    \"of non-bare repository\"), current_branch->refname);\n }\n \n static int truncate_fetch_head(void)\n@@ -654,7 +654,7 @@ static int truncate_fetch_head(void)\n \tFILE *fp = fopen(filename, \"w\");\n \n \tif (!fp)\n-\t\treturn error(\"cannot open %s: %s\\n\", filename, strerror(errno));\n+\t\treturn error(_(\"cannot open %s: %s\\n\"), filename, strerror(errno));\n \tfclose(fp);\n \treturn 0;\n }\n@@ -678,7 +678,7 @@ static int do_fetch(struct transport *transport,\n \t}\n \n \tif (!transport->get_refs_list || !transport->fetch)\n-\t\tdie(\"Don't know how to fetch from %s\", transport->url);\n+\t\tdie(_(\"Don't know how to fetch from %s\"), transport->url);\n \n \t/* if not appending, truncate FETCH_HEAD */\n \tif (!append && !dry_run) {\n@@ -732,10 +732,10 @@ static void set_option(const char *name, const char *value)\n {\n \tint r = transport_set_option(transport, name, value);\n \tif (r < 0)\n-\t\tdie(\"Option \\\"%s\\\" value \\\"%s\\\" is not valid for %s\",\n+\t\tdie(_(\"Option \\\"%s\\\" value \\\"%s\\\" is not valid for %s\"),\n \t\t\tname, value, transport->url);\n \tif (r > 0)\n-\t\twarning(\"Option \\\"%s\\\" is ignored for %s\\n\",\n+\t\twarning(_(\"Option \\\"%s\\\" is ignored for %s\\n\"),\n \t\t\tname, transport->url);\n }\n \n@@ -824,9 +824,9 @@ static int fetch_multiple(struct string_list *list)\n \t\targv[argc] = name;\n \t\targv[argc + 1] = NULL;\n \t\tif (verbosity >= 0)\n-\t\t\tprintf(\"Fetching %s\\n\", name);\n+\t\t\tprintf(_(\"Fetching %s\\n\"), name);\n \t\tif (run_command_v_opt(argv, RUN_GIT_CMD)) {\n-\t\t\terror(\"Could not fetch %s\", name);\n+\t\t\terror(_(\"Could not fetch %s\"), name);\n \t\t\tresult = 1;\n \t\t}\n \t}\n@@ -842,8 +842,8 @@ static int fetch_one(struct remote *remote, int argc, const char **argv)\n \tint exit_code;\n \n \tif (!remote)\n-\t\tdie(\"No remote repository specified.  Please, specify either a URL or a\\n\"\n-\t\t    \"remote name from which new revisions should be fetched.\");\n+\t\tdie(_(\"No remote repository specified.  Please, specify either a URL or a\\n\"\n+\t\t    \"remote name from which new revisions should be fetched.\"));\n \n \ttransport = transport_get(remote, NULL);\n \ttransport_set_verbosity(transport, verbosity, progress);\n@@ -862,7 +862,7 @@ static int fetch_one(struct remote *remote, int argc, const char **argv)\n \t\t\t\tchar *ref;\n \t\t\t\ti++;\n \t\t\t\tif (i >= argc)\n-\t\t\t\t\tdie(\"You need to specify a tag name.\");\n+\t\t\t\t\tdie(_(\"You need to specify a tag name.\"));\n \t\t\t\tref = xmalloc(strlen(argv[i]) * 2 + 22);\n \t\t\t\tstrcpy(ref, \"refs/tags/\");\n \t\t\t\tstrcat(ref, argv[i]);\n@@ -902,9 +902,9 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)\n \n \tif (all) {\n \t\tif (argc == 1)\n-\t\t\tdie(\"fetch --all does not take a repository argument\");\n+\t\t\tdie(_(\"fetch --all does not take a repository argument\"));\n \t\telse if (argc > 1)\n-\t\t\tdie(\"fetch --all does not make sense with refspecs\");\n+\t\t\tdie(_(\"fetch --all does not make sense with refspecs\"));\n \t\t(void) for_each_remote(get_one_remote_for_fetch, &list);\n \t\tresult = fetch_multiple(&list);\n \t} else if (argc == 0) {\n@@ -915,7 +915,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)\n \t\t/* All arguments are assumed to be remotes or groups */\n \t\tfor (i = 0; i < argc; i++)\n \t\t\tif (!add_remote_or_group(argv[i], &list))\n-\t\t\t\tdie(\"No such remote or remote group: %s\", argv[i]);\n+\t\t\t\tdie(_(\"No such remote or remote group: %s\"), argv[i]);\n \t\tresult = fetch_multiple(&list);\n \t} else {\n \t\t/* Single remote or group */\n@@ -923,7 +923,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)\n \t\tif (list.nr > 1) {\n \t\t\t/* More than one remote */\n \t\t\tif (argc > 1)\n-\t\t\t\tdie(\"Fetching a group and specifying refspecs does not make sense\");\n+\t\t\t\tdie(_(\"Fetching a group and specifying refspecs does not make sense\"));\n \t\t\tresult = fetch_multiple(&list);\n \t\t} else {\n \t\t\t/* Zero or one remotes */\n-- \n1.7.2.2.614.g1dc9\n"},{"id":"149680","messageId":"1283456446-22577-7-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 06/25] gettextize: git-fetch formatting messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T19:40:27Z","receivedAt":"2010-09-02T19:40:27Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Translate some of the formatting messages that appear on git-fetch\nshowing how branches/tags etc. were updated.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/fetch.c |   28 ++++++++++++++--------------\n 1 files changed, 14 insertions(+), 14 deletions(-)\n\ndiff --git a/builtin/fetch.c b/builtin/fetch.c\nindex 4c90fc5..38bb51d 100644\n--- a/builtin/fetch.c\n+++ b/builtin/fetch.c\n@@ -236,7 +236,7 @@ static int update_local_ref(struct ref *ref,\n \tif (!hashcmp(ref->old_sha1, ref->new_sha1)) {\n \t\tif (verbosity > 0)\n \t\t\tsprintf(display, \"= %-*s %-*s -> %s\", TRANSPORT_SUMMARY_WIDTH,\n-\t\t\t\t\"[up to date]\", REFCOL_WIDTH, remote,\n+\t\t\t\t_(\"[up to date]\"), REFCOL_WIDTH, remote,\n \t\t\t\tpretty_ref);\n \t\treturn 0;\n \t}\n@@ -249,8 +249,8 @@ static int update_local_ref(struct ref *ref,\n \t\t * If this is the head, and it's not okay to update\n \t\t * the head, and the old value of the head isn't empty...\n \t\t */\n-\t\tsprintf(display, \"! %-*s %-*s -> %s  (can't fetch in current branch)\",\n-\t\t\tTRANSPORT_SUMMARY_WIDTH, \"[rejected]\", REFCOL_WIDTH, remote,\n+\t\tsprintf(display, _(\"! %-*s %-*s -> %s  (can't fetch in current branch)\"),\n+\t\t\tTRANSPORT_SUMMARY_WIDTH, _(\"[rejected]\"), REFCOL_WIDTH, remote,\n \t\t\tpretty_ref);\n \t\treturn 1;\n \t}\n@@ -260,8 +260,8 @@ static int update_local_ref(struct ref *ref,\n \t\tint r;\n \t\tr = s_update_ref(\"updating tag\", ref, 0);\n \t\tsprintf(display, \"%c %-*s %-*s -> %s%s\", r ? '!' : '-',\n-\t\t\tTRANSPORT_SUMMARY_WIDTH, \"[tag update]\", REFCOL_WIDTH, remote,\n-\t\t\tpretty_ref, r ? \"  (unable to update local ref)\" : \"\");\n+\t\t\tTRANSPORT_SUMMARY_WIDTH, _(\"[tag update]\"), REFCOL_WIDTH, remote,\n+\t\t\tpretty_ref, r ? _(\"  (unable to update local ref)\") : \"\");\n \t\treturn r;\n \t}\n \n@@ -357,15 +357,15 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,\n \t\t\twhat = \"\";\n \t\t}\n \t\telse if (!prefixcmp(rm->name, \"refs/heads/\")) {\n-\t\t\tkind = \"branch\";\n+\t\t\tkind = _(\"branch\");\n \t\t\twhat = rm->name + 11;\n \t\t}\n \t\telse if (!prefixcmp(rm->name, \"refs/tags/\")) {\n-\t\t\tkind = \"tag\";\n+\t\t\tkind = _(\"tag\");\n \t\t\twhat = rm->name + 10;\n \t\t}\n \t\telse if (!prefixcmp(rm->name, \"refs/remotes/\")) {\n-\t\t\tkind = \"remote branch\";\n+\t\t\tkind = _(\"remote branch\");\n \t\t\twhat = rm->name + 13;\n \t\t}\n \t\telse {\n@@ -405,11 +405,11 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,\n \t\t\tfree(ref);\n \t\t} else\n \t\t\tsprintf(note, \"* %-*s %-*s -> FETCH_HEAD\",\n-\t\t\t\tTRANSPORT_SUMMARY_WIDTH, *kind ? kind : \"branch\",\n+\t\t\t\tTRANSPORT_SUMMARY_WIDTH, *kind ? kind : _(\"branch\"),\n \t\t\t\t REFCOL_WIDTH, *what ? what : \"HEAD\");\n \t\tif (*note) {\n \t\t\tif (verbosity >= 0 && !shown_url) {\n-\t\t\t\tfprintf(stderr, \"From %.*s\\n\",\n+\t\t\t\tfprintf(stderr, _(\"From %.*s\\n\"),\n \t\t\t\t\t\turl_len, url);\n \t\t\t\tshown_url = 1;\n \t\t\t}\n@@ -518,16 +518,16 @@ static int prune_refs(struct transport *transport, struct ref *ref_map)\n \tint result = 0;\n \tstruct ref *ref, *stale_refs = get_stale_heads(transport->remote, ref_map);\n \tconst char *dangling_msg = dry_run\n-\t\t? \"   (%s will become dangling)\\n\"\n-\t\t: \"   (%s has become dangling)\\n\";\n+\t\t? _(\"   (%s will become dangling)\\n\")\n+\t\t: _(\"   (%s has become dangling)\\n\");\n \n \tfor (ref = stale_refs; ref; ref = ref->next) {\n \t\tif (!dry_run)\n \t\t\tresult |= delete_ref(ref->name, NULL, 0);\n \t\tif (verbosity >= 0) {\n \t\t\tfprintf(stderr, \" x %-*s %-*s -> %s\\n\",\n-\t\t\t\tTRANSPORT_SUMMARY_WIDTH, \"[deleted]\",\n-\t\t\t\tREFCOL_WIDTH, \"(none)\", prettify_refname(ref->name));\n+\t\t\t\tTRANSPORT_SUMMARY_WIDTH, _(\"[deleted]\"),\n+\t\t\t\tREFCOL_WIDTH, _(\"(none)\"), prettify_refname(ref->name));\n \t\t\twarn_dangling_symref(stderr, dangling_msg, ref->name);\n \t\t}\n \t}\n-- \n1.7.2.2.614.g1dc9\n"},{"id":"149682","messageId":"1283456446-22577-8-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 07/25] gettextize: git-grep basic messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T19:40:28Z","receivedAt":"2010-09-02T19:40:28Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/grep.c |   34 +++++++++++++++++-----------------\n 1 files changed, 17 insertions(+), 17 deletions(-)\n\ndiff --git a/builtin/grep.c b/builtin/grep.c\nindex da32f3d..af5d227 100644\n--- a/builtin/grep.c\n+++ b/builtin/grep.c\n@@ -249,7 +249,7 @@ static void start_threads(struct grep_opt *opt)\n \t\terr = pthread_create(&threads[i], NULL, run, o);\n \n \t\tif (err)\n-\t\t\tdie(\"grep: failed to create thread: %s\",\n+\t\t\tdie(_(\"grep: failed to create thread: %s\"),\n \t\t\t    strerror(err));\n \t}\n }\n@@ -454,7 +454,7 @@ static void *load_sha1(const unsigned char *sha1, unsigned long *size,\n \tvoid *data = lock_and_read_sha1_file(sha1, &type, size);\n \n \tif (!data)\n-\t\terror(\"'%s': unable to read %s\", name, sha1_to_hex(sha1));\n+\t\terror(_(\"'%s': unable to read %s\"), name, sha1_to_hex(sha1));\n \n \treturn data;\n }\n@@ -505,7 +505,7 @@ static void *load_file(const char *filename, size_t *sz)\n \tif (lstat(filename, &st) < 0) {\n \terr_ret:\n \t\tif (errno != ENOENT)\n-\t\t\terror(\"'%s': %s\", filename, strerror(errno));\n+\t\t\terror(_(\"'%s': %s\"), filename, strerror(errno));\n \t\treturn 0;\n \t}\n \tif (!S_ISREG(st.st_mode))\n@@ -516,7 +516,7 @@ static void *load_file(const char *filename, size_t *sz)\n \t\tgoto err_ret;\n \tdata = xmalloc(*sz + 1);\n \tif (st.st_size != read_in_full(i, data, *sz)) {\n-\t\terror(\"'%s': short read %s\", filename, strerror(errno));\n+\t\terror(_(\"'%s': short read %s\"), filename, strerror(errno));\n \t\tclose(i);\n \t\tfree(data);\n \t\treturn 0;\n@@ -578,7 +578,7 @@ static void run_pager(struct grep_opt *opt, const char *prefix)\n \targv[path_list->nr] = NULL;\n \n \tif (prefix && chdir(prefix))\n-\t\tdie(\"Failed to chdir: %s\", prefix);\n+\t\tdie(_(\"Failed to chdir: %s\"), prefix);\n \tstatus = run_command_v_opt(argv, RUN_USING_SHELL);\n \tif (status)\n \t\texit(status);\n@@ -668,7 +668,7 @@ static int grep_tree(struct grep_opt *opt, const char **paths,\n \n \t\t\tdata = lock_and_read_sha1_file(entry.sha1, &type, &size);\n \t\t\tif (!data)\n-\t\t\t\tdie(\"unable to read tree (%s)\",\n+\t\t\t\tdie(_(\"unable to read tree (%s)\"),\n \t\t\t\t    sha1_to_hex(entry.sha1));\n \t\t\tinit_tree_desc(&sub, data, size);\n \t\t\thit |= grep_tree(opt, paths, &sub, tree_name, down);\n@@ -694,13 +694,13 @@ static int grep_object(struct grep_opt *opt, const char **paths,\n \t\tdata = read_object_with_reference(obj->sha1, tree_type,\n \t\t\t\t\t\t  &size, NULL);\n \t\tif (!data)\n-\t\t\tdie(\"unable to read tree (%s)\", sha1_to_hex(obj->sha1));\n+\t\t\tdie(_(\"unable to read tree (%s)\"), sha1_to_hex(obj->sha1));\n \t\tinit_tree_desc(&tree, data, size);\n \t\thit = grep_tree(opt, paths, &tree, name, \"\");\n \t\tfree(data);\n \t\treturn hit;\n \t}\n-\tdie(\"unable to grep from object of type %s\", typename(obj->type));\n+\tdie(_(\"unable to grep from object of type %s\"), typename(obj->type));\n }\n \n static int grep_objects(struct grep_opt *opt, const char **paths,\n@@ -752,7 +752,7 @@ static int context_callback(const struct option *opt, const char *arg,\n \t}\n \tvalue = strtol(arg, (char **)&endp, 10);\n \tif (*endp) {\n-\t\treturn error(\"switch `%c' expects a numerical value\",\n+\t\treturn error(_(\"switch `%c' expects a numerical value\"),\n \t\t\t     opt->short_name);\n \t}\n \tgrep_opt->pre_context = grep_opt->post_context = value;\n@@ -768,7 +768,7 @@ static int file_callback(const struct option *opt, const char *arg, int unset)\n \n \tpatterns = fopen(arg, \"r\");\n \tif (!patterns)\n-\t\tdie_errno(\"cannot open '%s'\", arg);\n+\t\tdie_errno(_(\"cannot open '%s'\"), arg);\n \twhile (strbuf_getline(&sb, patterns, '\\n') == 0) {\n \t\tchar *s;\n \t\tsize_t len;\n@@ -1009,11 +1009,11 @@ int cmd_grep(int argc, const char **argv, const char *prefix)\n \t}\n \n \tif (!opt.pattern_list)\n-\t\tdie(\"no pattern given.\");\n+\t\tdie(_(\"no pattern given.\"));\n \tif (!opt.fixed && opt.ignore_case)\n \t\topt.regflags |= REG_ICASE;\n \tif ((opt.regflags != REG_NEWLINE) && opt.fixed)\n-\t\tdie(\"cannot mix --fixed-strings and regexp\");\n+\t\tdie(_(\"cannot mix --fixed-strings and regexp\"));\n \n #ifndef NO_PTHREADS\n \tif (online_cpus() == 1 || !grep_threads_ok(&opt))\n@@ -1038,7 +1038,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)\n \t\tif (!get_sha1(arg, sha1)) {\n \t\t\tstruct object *object = parse_object(sha1);\n \t\t\tif (!object)\n-\t\t\t\tdie(\"bad object %s\", arg);\n+\t\t\t\tdie(_(\"bad object %s\"), arg);\n \t\t\tadd_object_array(object, arg, &list);\n \t\t\tcontinue;\n \t\t}\n@@ -1065,7 +1065,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)\n \t}\n \n \tif (show_in_pager && (cached || list.nr))\n-\t\tdie(\"--open-files-in-pager only works on the worktree\");\n+\t\tdie(_(\"--open-files-in-pager only works on the worktree\"));\n \n \tif (show_in_pager && opt.pattern_list && !opt.pattern_list->next) {\n \t\tconst char *pager = path_list.items[0].string;\n@@ -1090,9 +1090,9 @@ int cmd_grep(int argc, const char **argv, const char *prefix)\n \n \tif (!use_index) {\n \t\tif (cached)\n-\t\t\tdie(\"--cached cannot be used with --no-index.\");\n+\t\t\tdie(_(\"--cached cannot be used with --no-index.\"));\n \t\tif (list.nr)\n-\t\t\tdie(\"--no-index cannot be used with revs.\");\n+\t\t\tdie(_(\"--no-index cannot be used with revs.\"));\n \t\thit = grep_directory(&opt, paths);\n \t} else if (!list.nr) {\n \t\tif (!cached)\n@@ -1101,7 +1101,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)\n \t\thit = grep_cache(&opt, paths, cached);\n \t} else {\n \t\tif (cached)\n-\t\t\tdie(\"both --cached and trees are given.\");\n+\t\t\tdie(_(\"both --cached and trees are given.\"));\n \t\thit = grep_objects(&opt, paths, &list);\n \t}\n \n-- \n1.7.2.2.614.g1dc9\n"},{"id":"149681","messageId":"1283456446-22577-9-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 08/25] gettextize: git-log basic messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T19:40:29Z","receivedAt":"2010-09-02T19:40:29Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/log.c |   74 ++++++++++++++++++++++++++++----------------------------\n 1 files changed, 37 insertions(+), 37 deletions(-)\n\ndiff --git a/builtin/log.c b/builtin/log.c\nindex ed8598e..460353b 100644\n--- a/builtin/log.c\n+++ b/builtin/log.c\n@@ -141,9 +141,9 @@ static void cmd_log_init(int argc, const char **argv, const char *prefix,\n \t\t\tfree((void *)fullpath);\n \t\t\tif (range->nr == 0) {\n \t\t\t\tif (range->next) {\n-\t\t\t\t\tdie(\"Path %s need a -L <range> option\\n\"\n+\t\t\t\t\tdie(_(\"Path %s need a -L <range> option\\n\"\n \t\t\t\t\t\"If you want follow the history of the whole file \"\n-\t\t\t\t\t\"use 'git log -L 1,$ <path>'\", range->spec->path);\n+\t\t\t\t\t\"use 'git log -L 1,$ <path>'\"), range->spec->path);\n \t\t\t\t} else {\n \t\t\t\t\tparse_options_next(&ctx, 1);\n \t\t\t\t\tcontinue;\n@@ -167,7 +167,7 @@ parse_done:\n \n \t/* die if '-L <range>' with no pathspec follow */\n \tif (range->nr > 0 && range->spec == NULL)\n-\t\tdie(\"Each -L should follow a path\");\n+\t\tdie(_(\"Each -L should follow a path\"));\n \t/* clear up the last range */\n \tif (range->nr == 0) {\n \t\tstruct diff_line_range *r = range->next;\n@@ -201,7 +201,7 @@ parse_done:\n \t\t\tconst char *v = skip_prefix(arg, \"--decorate=\");\n \t\t\tdecoration_style = parse_decoration_style(arg, v);\n \t\t\tif (decoration_style < 0)\n-\t\t\t\tdie(\"invalid --decorate option: %s\", arg);\n+\t\t\t\tdie(_(\"invalid --decorate option: %s\"), arg);\n \t\t\tdecoration_given = 1;\n \t\t} else if (!strcmp(arg, \"--no-decorate\")) {\n \t\t\tdecoration_style = 0;\n@@ -210,7 +210,7 @@ parse_done:\n \t\t} else if (!strcmp(arg, \"-h\")) {\n \t\t\tusage(builtin_log_usage);\n \t\t} else\n-\t\t\tdie(\"unrecognized argument: %s\", arg);\n+\t\t\tdie(_(\"unrecognized argument: %s\"), arg);\n \t}\n \n \t/*\n@@ -259,7 +259,7 @@ static void show_early_header(struct rev_info *rev, const char *stage, int nr)\n \t\tif (rev->commit_format != CMIT_FMT_ONELINE)\n \t\t\tputchar(rev->diffopt.line_termination);\n \t}\n-\tprintf(\"Final output: %d %s\\n\", nr, stage);\n+\tprintf(_(\"Final output: %d %s\\n\"), nr, stage);\n }\n \n static struct itimerval early_output_timer;\n@@ -358,7 +358,7 @@ static int cmd_log_walk(struct rev_info *rev)\n \t\tsetup_early_output(rev);\n \n \tif (prepare_revision_walk(rev))\n-\t\tdie(\"revision walk setup failed\");\n+\t\tdie(_(\"revision walk setup failed\"));\n \n \tif (rev->early_output)\n \t\tfinish_early_output(rev);\n@@ -450,7 +450,7 @@ static int show_object(const unsigned char *sha1, int show_tag_object,\n \tint offset = 0;\n \n \tif (!buf)\n-\t\treturn error(\"Could not read object %s\", sha1_to_hex(sha1));\n+\t\treturn error(_(\"Could not read object %s\"), sha1_to_hex(sha1));\n \n \tif (show_tag_object)\n \t\twhile (offset < size && buf[offset] != '\\n') {\n@@ -537,7 +537,7 @@ int cmd_show(int argc, const char **argv, const char *prefix)\n \t\t\t\tbreak;\n \t\t\to = parse_object(t->tagged->sha1);\n \t\t\tif (!o)\n-\t\t\t\tret = error(\"Could not read object %s\",\n+\t\t\t\tret = error(_(\"Could not read object %s\"),\n \t\t\t\t\t    sha1_to_hex(t->tagged->sha1));\n \t\t\tobjects[i].item = o;\n \t\t\ti--;\n@@ -561,7 +561,7 @@ int cmd_show(int argc, const char **argv, const char *prefix)\n \t\t\tret = cmd_log_walk(&rev);\n \t\t\tbreak;\n \t\tdefault:\n-\t\t\tret = error(\"Unknown type: %d\", o->type);\n+\t\t\tret = error(_(\"Unknown type: %d\"), o->type);\n \t\t}\n \t}\n \tfree(objects);\n@@ -664,7 +664,7 @@ static int git_format_config(const char *var, const char *value, void *cb)\n {\n \tif (!strcmp(var, \"format.headers\")) {\n \t\tif (!value)\n-\t\t\tdie(\"format.headers without value\");\n+\t\t\tdie(_(\"format.headers without value\"));\n \t\tadd_header(value);\n \t\treturn 0;\n \t}\n@@ -736,7 +736,7 @@ static int reopen_stdout(struct commit *commit, struct rev_info *rev)\n \t\tstrbuf_addstr(&filename, output_directory);\n \t\tif (filename.len >=\n \t\t    PATH_MAX - FORMAT_PATCH_NAME_MAX - suffix_len)\n-\t\t\treturn error(\"name of output directory is too long\");\n+\t\t\treturn error(_(\"name of output directory is too long\"));\n \t\tif (filename.buf[filename.len - 1] != '/')\n \t\t\tstrbuf_addch(&filename, '/');\n \t}\n@@ -747,7 +747,7 @@ static int reopen_stdout(struct commit *commit, struct rev_info *rev)\n \t\tfprintf(realstdout, \"%s\\n\", filename.buf + outdir_offset);\n \n \tif (freopen(filename.buf, \"w\", stdout) == NULL)\n-\t\treturn error(\"Cannot open patch file %s\", filename.buf);\n+\t\treturn error(_(\"Cannot open patch file %s\"), filename.buf);\n \n \tstrbuf_release(&filename);\n \treturn 0;\n@@ -761,7 +761,7 @@ static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids, const cha\n \tunsigned flags1, flags2;\n \n \tif (rev->pending.nr != 2)\n-\t\tdie(\"Need exactly one range.\");\n+\t\tdie(_(\"Need exactly one range.\"));\n \n \to1 = rev->pending.objects[0].item;\n \tflags1 = o1->flags;\n@@ -769,7 +769,7 @@ static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids, const cha\n \tflags2 = o2->flags;\n \n \tif ((flags1 & UNINTERESTING) == (flags2 & UNINTERESTING))\n-\t\tdie(\"Not a range.\");\n+\t\tdie(_(\"Not a range.\"));\n \n \tinit_patch_ids(ids);\n \n@@ -780,7 +780,7 @@ static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids, const cha\n \tadd_pending_object(&check_rev, o1, \"o1\");\n \tadd_pending_object(&check_rev, o2, \"o2\");\n \tif (prepare_revision_walk(&check_rev))\n-\t\tdie(\"revision walk setup failed\");\n+\t\tdie(_(\"revision walk setup failed\"));\n \n \twhile ((commit = get_revision(&check_rev)) != NULL) {\n \t\t/* ignore merges */\n@@ -806,7 +806,7 @@ static void gen_message_id(struct rev_info *info, char *base)\n \tconst char *email_end = strrchr(committer, '>');\n \tstruct strbuf buf = STRBUF_INIT;\n \tif (!email_start || !email_end || email_start > email_end - 1)\n-\t\tdie(\"Could not extract email from committer identity.\");\n+\t\tdie(_(\"Could not extract email from committer identity.\"));\n \tstrbuf_addf(&buf, \"%s.%lu.git.%.*s\", base,\n \t\t    (unsigned long) time(NULL),\n \t\t    (int)(email_end - email_start - 1), email_start + 1);\n@@ -838,7 +838,7 @@ static void make_cover_letter(struct rev_info *rev, int use_stdout,\n \tstruct commit *commit = NULL;\n \n \tif (rev->commit_format != CMIT_FMT_EMAIL)\n-\t\tdie(\"Cover letter needs email format\");\n+\t\tdie(_(\"Cover letter needs email format\"));\n \n \tcommitter = git_committer_info(0);\n \n@@ -931,7 +931,7 @@ static const char *clean_message_id(const char *msg_id)\n \t\tm++;\n \t}\n \tif (!z)\n-\t\tdie(\"insane in-reply-to: %s\", msg_id);\n+\t\tdie(_(\"insane in-reply-to: %s\"), msg_id);\n \tif (++z == m)\n \t\treturn a;\n \treturn xmemdupz(a, z - a);\n@@ -1004,7 +1004,7 @@ static int output_directory_callback(const struct option *opt, const char *arg,\n {\n \tconst char **dir = (const char **)opt->value;\n \tif (*dir)\n-\t\tdie(\"Two output directories?\");\n+\t\tdie(_(\"Two output directories?\"));\n \t*dir = arg;\n \treturn 0;\n }\n@@ -1192,7 +1192,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)\n \t\tcommitter = git_committer_info(IDENT_ERROR_ON_NO_NAME);\n \t\tendpos = strchr(committer, '>');\n \t\tif (!endpos)\n-\t\t\tdie(\"bogus committer info %s\", committer);\n+\t\t\tdie(_(\"bogus committer info %s\"), committer);\n \t\tadd_signoff = xmemdupz(committer, endpos - committer + 1);\n \t}\n \n@@ -1237,20 +1237,20 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)\n \t\tnumbered = 0;\n \n \tif (numbered && keep_subject)\n-\t\tdie (\"-n and -k are mutually exclusive.\");\n+\t\tdie (_(\"-n and -k are mutually exclusive.\"));\n \tif (keep_subject && subject_prefix)\n-\t\tdie (\"--subject-prefix and -k are mutually exclusive.\");\n+\t\tdie (_(\"--subject-prefix and -k are mutually exclusive.\"));\n \n \targc = setup_revisions(argc, argv, &rev, &s_r_opt);\n \tif (argc > 1)\n-\t\tdie (\"unrecognized argument: %s\", argv[1]);\n+\t\tdie (_(\"unrecognized argument: %s\"), argv[1]);\n \n \tif (rev.diffopt.output_format & DIFF_FORMAT_NAME)\n-\t\tdie(\"--name-only does not make sense\");\n+\t\tdie(_(\"--name-only does not make sense\"));\n \tif (rev.diffopt.output_format & DIFF_FORMAT_NAME_STATUS)\n-\t\tdie(\"--name-status does not make sense\");\n+\t\tdie(_(\"--name-status does not make sense\"));\n \tif (rev.diffopt.output_format & DIFF_FORMAT_CHECKDIFF)\n-\t\tdie(\"--check does not make sense\");\n+\t\tdie(_(\"--check does not make sense\"));\n \n \tif (!use_patch_format &&\n \t\t(!rev.diffopt.output_format ||\n@@ -1271,9 +1271,9 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)\n \n \tif (output_directory) {\n \t\tif (use_stdout)\n-\t\t\tdie(\"standard output, or directory, which one?\");\n+\t\t\tdie(_(\"standard output, or directory, which one?\"));\n \t\tif (mkdir(output_directory, 0777) < 0 && errno != EEXIST)\n-\t\t\tdie_errno(\"Could not create directory '%s'\",\n+\t\t\tdie_errno(_(\"Could not create directory '%s'\"),\n \t\t\t\t  output_directory);\n \t}\n \n@@ -1327,7 +1327,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)\n \t\trealstdout = xfdopen(xdup(1), \"w\");\n \n \tif (prepare_revision_walk(&rev))\n-\t\tdie(\"revision walk setup failed\");\n+\t\tdie(_(\"revision walk setup failed\"));\n \trev.boundary = 1;\n \twhile ((commit = get_revision(&rev)) != NULL) {\n \t\tif (commit->object.flags & BOUNDARY) {\n@@ -1408,7 +1408,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)\n \n \t\tif (!use_stdout && reopen_stdout(numbered_files ? NULL : commit,\n \t\t\t\t\t\t &rev))\n-\t\t\tdie(\"Failed to create output files\");\n+\t\t\tdie(_(\"Failed to create output files\"));\n \t\tshown = log_tree_commit(&rev, commit);\n \t\tfree(commit->buffer);\n \t\tcommit->buffer = NULL;\n@@ -1495,9 +1495,9 @@ int cmd_cherry(int argc, const char **argv, const char *prefix)\n \t\tif (!current_branch || !current_branch->merge\n \t\t\t\t\t|| !current_branch->merge[0]\n \t\t\t\t\t|| !current_branch->merge[0]->dst) {\n-\t\t\tfprintf(stderr, \"Could not find a tracked\"\n+\t\t\tfprintf(stderr, _(\"Could not find a tracked\"\n \t\t\t\t\t\" remote branch, please\"\n-\t\t\t\t\t\" specify <upstream> manually.\\n\");\n+\t\t\t\t\t\" specify <upstream> manually.\\n\"));\n \t\t\tusage_with_options(cherry_usage, options);\n \t\t}\n \n@@ -1511,9 +1511,9 @@ int cmd_cherry(int argc, const char **argv, const char *prefix)\n \tDIFF_OPT_SET(&revs.diffopt, RECURSIVE);\n \n \tif (add_pending_commit(head, &revs, 0))\n-\t\tdie(\"Unknown commit %s\", head);\n+\t\tdie(_(\"Unknown commit %s\"), head);\n \tif (add_pending_commit(upstream, &revs, UNINTERESTING))\n-\t\tdie(\"Unknown commit %s\", upstream);\n+\t\tdie(_(\"Unknown commit %s\"), upstream);\n \n \t/* Don't say anything if head and upstream are the same. */\n \tif (revs.pending.nr == 2) {\n@@ -1525,11 +1525,11 @@ int cmd_cherry(int argc, const char **argv, const char *prefix)\n \tget_patch_ids(&revs, &ids, prefix);\n \n \tif (limit && add_pending_commit(limit, &revs, UNINTERESTING))\n-\t\tdie(\"Unknown commit %s\", limit);\n+\t\tdie(_(\"Unknown commit %s\"), limit);\n \n \t/* reverse the list of commits */\n \tif (prepare_revision_walk(&revs))\n-\t\tdie(\"revision walk setup failed\");\n+\t\tdie(_(\"revision walk setup failed\"));\n \twhile ((commit = get_revision(&revs)) != NULL) {\n \t\t/* ignore merges */\n \t\tif (commit->parents && commit->parents->next)\n-- \n1.7.2.2.614.g1dc9\n"},{"id":"149683","messageId":"1283456446-22577-10-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 09/25] gettextize: git-format-patch --cover-letter message","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T19:40:30Z","receivedAt":"2010-09-02T19:40:30Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Make the \"SUBJECT HERE\" and \"BLURB HERE\" output in git-format-patch\ntranslatable. This is going to be edited by a human anyway.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/log.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin/log.c b/builtin/log.c\nindex 460353b..6a4a8f7 100644\n--- a/builtin/log.c\n+++ b/builtin/log.c\n@@ -826,7 +826,7 @@ static void make_cover_letter(struct rev_info *rev, int use_stdout,\n {\n \tconst char *committer;\n \tconst char *subject_start = NULL;\n-\tconst char *body = \"*** SUBJECT HERE ***\\n\\n*** BLURB HERE ***\\n\";\n+\tconst char *body = _(\"*** SUBJECT HERE ***\\n\\n*** BLURB HERE ***\\n\");\n \tconst char *msg;\n \tconst char *extra_headers = rev->extra_headers;\n \tstruct shortlog log;\n-- \n1.7.2.2.614.g1dc9\n"},{"id":"149685","messageId":"1283456446-22577-11-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 10/25] gettextize: git-merge basic messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T19:40:31Z","receivedAt":"2010-09-02T19:40:31Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/merge.c |  124 +++++++++++++++++++++++++++---------------------------\n 1 files changed, 62 insertions(+), 62 deletions(-)\n\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex a7e3313..bf3b313 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -79,7 +79,7 @@ static int option_parse_message(const struct option *opt,\n \t\tstrbuf_addf(buf, \"%s%s\", buf->len ? \"\\n\\n\" : \"\", arg);\n \t\thave_message = 1;\n \t} else\n-\t\treturn error(\"switch `m' requires a value\");\n+\t\treturn error(_(\"switch `m' requires a value\"));\n \treturn 0;\n }\n \n@@ -116,13 +116,13 @@ static struct strategy *get_strategy(const char *name)\n \t\texclude_cmds(&main_cmds, &not_strategies);\n \t}\n \tif (!is_in_cmdlist(&main_cmds, name) && !is_in_cmdlist(&other_cmds, name)) {\n-\t\tfprintf(stderr, \"Could not find merge strategy '%s'.\\n\", name);\n-\t\tfprintf(stderr, \"Available strategies are:\");\n+\t\tfprintf(stderr, _(\"Could not find merge strategy '%s'.\\n\"), name);\n+\t\tfprintf(stderr, _(\"Available strategies are:\"));\n \t\tfor (i = 0; i < main_cmds.cnt; i++)\n \t\t\tfprintf(stderr, \" %s\", main_cmds.names[i]->name);\n \t\tfprintf(stderr, \".\\n\");\n \t\tif (other_cmds.cnt) {\n-\t\t\tfprintf(stderr, \"Available custom strategies are:\");\n+\t\t\tfprintf(stderr, _(\"Available custom strategies are:\"));\n \t\t\tfor (i = 0; i < other_cmds.cnt; i++)\n \t\t\t\tfprintf(stderr, \" %s\", other_cmds.names[i]->name);\n \t\t\tfprintf(stderr, \".\\n\");\n@@ -223,17 +223,17 @@ static void save_state(void)\n \tcp.git_cmd = 1;\n \n \tif (start_command(&cp))\n-\t\tdie(\"could not run stash.\");\n+\t\tdie(_(\"could not run stash.\"));\n \tlen = strbuf_read(&buffer, cp.out, 1024);\n \tclose(cp.out);\n \n \tif (finish_command(&cp) || len < 0)\n-\t\tdie(\"stash failed\");\n+\t\tdie(_(\"stash failed\"));\n \telse if (!len)\n \t\treturn;\n \tstrbuf_setlen(&buffer, buffer.len-1);\n \tif (get_sha1(buffer.buf, stash))\n-\t\tdie(\"not a valid object: %s\", buffer.buf);\n+\t\tdie(_(\"not a valid object: %s\"), buffer.buf);\n }\n \n static void reset_hard(unsigned const char *sha1, int verbose)\n@@ -250,7 +250,7 @@ static void reset_hard(unsigned const char *sha1, int verbose)\n \targs[i] = NULL;\n \n \tif (run_command_v_opt(args, RUN_GIT_CMD))\n-\t\tdie(\"read-tree failed\");\n+\t\tdie(_(\"read-tree failed\"));\n }\n \n static void restore_state(void)\n@@ -279,7 +279,7 @@ static void restore_state(void)\n static void finish_up_to_date(const char *msg)\n {\n \tif (verbosity >= 0)\n-\t\tprintf(\"%s%s\\n\", squash ? \" (nothing to squash)\" : \"\", msg);\n+\t\tprintf(\"%s%s\\n\", squash ? _(\" (nothing to squash)\") : \"\", msg);\n \tdrop_save();\n }\n \n@@ -292,10 +292,10 @@ static void squash_message(void)\n \tint fd;\n \tstruct pretty_print_context ctx = {0};\n \n-\tprintf(\"Squash commit -- not updating HEAD\\n\");\n+\tprintf(_(\"Squash commit -- not updating HEAD\\n\"));\n \tfd = open(git_path(\"SQUASH_MSG\"), O_WRONLY | O_CREAT, 0666);\n \tif (fd < 0)\n-\t\tdie_errno(\"Could not write to '%s'\", git_path(\"SQUASH_MSG\"));\n+\t\tdie_errno(_(\"Could not write to '%s'\"), git_path(\"SQUASH_MSG\"));\n \n \tinit_revisions(&rev, NULL);\n \trev.ignore_merges = 1;\n@@ -310,7 +310,7 @@ static void squash_message(void)\n \n \tsetup_revisions(0, NULL, &rev, NULL);\n \tif (prepare_revision_walk(&rev))\n-\t\tdie(\"revision walk setup failed\");\n+\t\tdie(_(\"revision walk setup failed\"));\n \n \tctx.abbrev = rev.abbrev;\n \tctx.date_mode = rev.date_mode;\n@@ -323,9 +323,9 @@ static void squash_message(void)\n \t\tpretty_print_commit(rev.commit_format, commit, &out, &ctx);\n \t}\n \tif (write(fd, out.buf, out.len) < 0)\n-\t\tdie_errno(\"Writing SQUASH_MSG\");\n+\t\tdie_errno(_(\"Writing SQUASH_MSG\"));\n \tif (close(fd))\n-\t\tdie_errno(\"Finishing SQUASH_MSG\");\n+\t\tdie_errno(_(\"Finishing SQUASH_MSG\"));\n \tstrbuf_release(&out);\n }\n \n@@ -345,7 +345,7 @@ static void finish(const unsigned char *new_head, const char *msg)\n \t\tsquash_message();\n \t} else {\n \t\tif (verbosity >= 0 && !merge_msg.len)\n-\t\t\tprintf(\"No merge message -- not updating HEAD\\n\");\n+\t\t\tprintf(_(\"No merge message -- not updating HEAD\\n\"));\n \t\telse {\n \t\t\tconst char *argv_gc_auto[] = { \"gc\", \"--auto\", NULL };\n \t\t\tupdate_ref(reflog_message.buf, \"HEAD\",\n@@ -367,7 +367,7 @@ static void finish(const unsigned char *new_head, const char *msg)\n \t\tif (diff_use_color_default > 0)\n \t\t\tDIFF_OPT_SET(&opts, COLOR_DIFF);\n \t\tif (diff_setup_done(&opts) < 0)\n-\t\t\tdie(\"diff_setup_done failed\");\n+\t\t\tdie(_(\"diff_setup_done failed\"));\n \t\tdiff_tree_sha1(head, new_head, \"\", &opts);\n \t\tdiffcore_std(&opts);\n \t\tdiff_flush(&opts);\n@@ -396,7 +396,7 @@ static void merge_name(const char *remote, struct strbuf *msg)\n \tmemset(branch_head, 0, sizeof(branch_head));\n \tremote_head = peel_to_type(remote, 0, NULL, OBJ_COMMIT);\n \tif (!remote_head)\n-\t\tdie(\"'%s' does not point to a commit\", remote);\n+\t\tdie(_(\"'%s' does not point to a commit\"), remote);\n \n \tif (dwim_ref(remote, strlen(remote), branch_head, &found_ref) > 0) {\n \t\tif (!prefixcmp(found_ref, \"refs/heads/\")) {\n@@ -461,7 +461,7 @@ static void merge_name(const char *remote, struct strbuf *msg)\n \n \t\tfp = fopen(git_path(\"FETCH_HEAD\"), \"r\");\n \t\tif (!fp)\n-\t\t\tdie_errno(\"could not open '%s' for reading\",\n+\t\t\tdie_errno(_(\"could not open '%s' for reading\"),\n \t\t\t\t  git_path(\"FETCH_HEAD\"));\n \t\tstrbuf_getline(&line, fp, '\\n');\n \t\tfclose(fp);\n@@ -491,7 +491,7 @@ static int git_merge_config(const char *k, const char *v, void *cb)\n \t\tbuf = xstrdup(v);\n \t\targc = split_cmdline(buf, &argv);\n \t\tif (argc < 0)\n-\t\t\tdie(\"Bad branch.%s.mergeoptions string: %s\", branch,\n+\t\t\tdie(_(\"Bad branch.%s.mergeoptions string: %s\"), branch,\n \t\t\t    split_cmdline_strerror(argc));\n \t\targv = xrealloc(argv, sizeof(*argv) * (argc + 2));\n \t\tmemmove(argv + 1, argv, sizeof(*argv) * (argc + 1));\n@@ -513,7 +513,7 @@ static int git_merge_config(const char *k, const char *v, void *cb)\n \t\tint is_bool;\n \t\tshortlog_len = git_config_bool_or_int(k, v, &is_bool);\n \t\tif (!is_bool && shortlog_len < 0)\n-\t\t\treturn error(\"%s: negative length %s???\", k, v);\n+\t\t\treturn error(_(\"%s: negative length %s???\"), k, v);\n \t\tif ((is_bool && shortlog_len) || shortlog_len < 0)\n \t\t\tshortlog_len = DEFAULT_MERGE_LOG_LEN;\n \t\treturn 0;\n@@ -560,7 +560,7 @@ static int read_tree_trivial(unsigned char *common, unsigned char *head,\n static void write_tree_trivial(unsigned char *sha1)\n {\n \tif (write_cache_as_tree(sha1, 0, NULL))\n-\t\tdie(\"git write-tree failed to write a tree\");\n+\t\tdie(_(\"git write-tree failed to write a tree\"));\n }\n \n int try_merge_command(const char *strategy, struct commit_list *common,\n@@ -601,7 +601,7 @@ int try_merge_command(const char *strategy, struct commit_list *common,\n \tfree(args);\n \tdiscard_cache();\n \tif (read_cache() < 0)\n-\t\tdie(\"failed to read the cache\");\n+\t\tdie(_(\"failed to read the cache\"));\n \tresolve_undo_clear();\n \n \treturn ret;\n@@ -618,7 +618,7 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,\n \tif (active_cache_changed &&\n \t\t\t(write_cache(index_fd, active_cache, active_nr) ||\n \t\t\t commit_locked_index(lock)))\n-\t\treturn error(\"Unable to write index.\");\n+\t\treturn error(_(\"Unable to write index.\"));\n \trollback_lock_file(lock);\n \n \tif (!strcmp(strategy, \"recursive\") || !strcmp(strategy, \"subtree\")) {\n@@ -631,7 +631,7 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,\n \t\tstruct commit_list *j;\n \n \t\tif (remoteheads->next) {\n-\t\t\terror(\"Not handling anything other than two heads merge.\");\n+\t\t\terror(_(\"Not handling anything other than two heads merge.\"));\n \t\t\treturn 2;\n \t\t}\n \n@@ -643,7 +643,7 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,\n \n \t\tfor (x = 0; x < xopts_nr; x++)\n \t\t\tif (parse_merge_opt(&o, xopts[x]))\n-\t\t\t\tdie(\"Unknown option for merge-recursive: -X%s\", xopts[x]);\n+\t\t\t\tdie(_(\"Unknown option for merge-recursive: -X%s\"), xopts[x]);\n \n \t\to.branch1 = head_arg;\n \t\to.branch2 = remoteheads->item->util;\n@@ -657,7 +657,7 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,\n \t\tif (active_cache_changed &&\n \t\t\t\t(write_cache(index_fd, active_cache, active_nr) ||\n \t\t\t\t commit_locked_index(lock)))\n-\t\t\tdie (\"unable to write %s\", get_index_file());\n+\t\t\tdie (_(\"unable to write %s\"), get_index_file());\n \t\trollback_lock_file(lock);\n \t\treturn clean ? 0 : 1;\n \t} else {\n@@ -731,7 +731,7 @@ int checkout_fast_forward(const unsigned char *head, const unsigned char *remote\n \t\treturn -1;\n \tif (write_cache(fd, active_cache, active_nr) ||\n \t\tcommit_locked_index(lock_file))\n-\t\tdie(\"unable to write new index file\");\n+\t\tdie(_(\"unable to write new index file\"));\n \treturn 0;\n }\n \n@@ -785,7 +785,7 @@ static int merge_trivial(void)\n \tstruct commit_list *parent = xmalloc(sizeof(*parent));\n \n \twrite_tree_trivial(result_tree);\n-\tprintf(\"Wonderful.\\n\");\n+\tprintf(_(\"Wonderful.\\n\"));\n \tparent->item = lookup_commit(head);\n \tparent->next = xmalloc(sizeof(*parent->next));\n \tparent->next->item = remoteheads->item;\n@@ -834,7 +834,7 @@ static int suggest_conflicts(int renormalizing)\n \n \tfp = fopen(git_path(\"MERGE_MSG\"), \"a\");\n \tif (!fp)\n-\t\tdie_errno(\"Could not open '%s' for writing\",\n+\t\tdie_errno(_(\"Could not open '%s' for writing\"),\n \t\t\t  git_path(\"MERGE_MSG\"));\n \tfprintf(fp, \"\\nConflicts:\\n\");\n \tfor (pos = 0; pos < active_nr; pos++) {\n@@ -850,8 +850,8 @@ static int suggest_conflicts(int renormalizing)\n \t}\n \tfclose(fp);\n \trerere(allow_rerere_auto);\n-\tprintf(\"Automatic merge failed; \"\n-\t\t\t\"fix conflicts and then commit the result.\\n\");\n+\tprintf(_(\"Automatic merge failed; \"\n+\t\t\t\"fix conflicts and then commit the result.\\n\"));\n \treturn 1;\n }\n \n@@ -865,7 +865,7 @@ static struct commit *is_old_style_invocation(int argc, const char **argv)\n \t\t\treturn NULL;\n \t\tsecond_token = lookup_commit_reference_gently(second_sha1, 0);\n \t\tif (!second_token)\n-\t\t\tdie(\"'%s' is not a commit\", argv[1]);\n+\t\t\tdie(_(\"'%s' is not a commit\"), argv[1]);\n \t\tif (hashcmp(second_token->object.sha1, head))\n \t\t\treturn NULL;\n \t}\n@@ -915,10 +915,10 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\t * add/rm <file>', just 'git commit'.\n \t\t */\n \t\tif (advice_resolve_conflict)\n-\t\t\tdie(\"You have not concluded your merge (MERGE_HEAD exists).\\n\"\n-\t\t\t    \"Please, commit your changes before you can merge.\");\n+\t\t\tdie(_(\"You have not concluded your merge (MERGE_HEAD exists).\\n\"\n+\t\t\t    \"Please, commit your changes before you can merge.\"));\n \t\telse\n-\t\t\tdie(\"You have not concluded your merge (MERGE_HEAD exists).\");\n+\t\t\tdie(_(\"You have not concluded your merge (MERGE_HEAD exists).\"));\n \t}\n \n \tresolve_undo_clear();\n@@ -945,12 +945,12 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \n \tif (squash) {\n \t\tif (!allow_fast_forward)\n-\t\t\tdie(\"You cannot combine --squash with --no-ff.\");\n+\t\t\tdie(_(\"You cannot combine --squash with --no-ff.\"));\n \t\toption_commit = 0;\n \t}\n \n \tif (!allow_fast_forward && fast_forward_only)\n-\t\tdie(\"You cannot combine --no-ff with --ff-only.\");\n+\t\tdie(_(\"You cannot combine --no-ff with --ff-only.\"));\n \n \tif (!argc)\n \t\tusage_with_options(builtin_merge_usage,\n@@ -978,16 +978,16 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\t * We do the same for \"git pull\".\n \t\t */\n \t\tif (argc != 1)\n-\t\t\tdie(\"Can merge only exactly one commit into \"\n-\t\t\t\t\"empty head\");\n+\t\t\tdie(_(\"Can merge only exactly one commit into \"\n+\t\t\t\t\"empty head\"));\n \t\tif (squash)\n-\t\t\tdie(\"Squash commit into empty head not supported yet\");\n+\t\t\tdie(_(\"Squash commit into empty head not supported yet\"));\n \t\tif (!allow_fast_forward)\n-\t\t\tdie(\"Non-fast-forward commit does not make sense into \"\n-\t\t\t    \"an empty head\");\n+\t\t\tdie(_(\"Non-fast-forward commit does not make sense into \"\n+\t\t\t    \"an empty head\"));\n \t\tremote_head = peel_to_type(argv[0], 0, NULL, OBJ_COMMIT);\n \t\tif (!remote_head)\n-\t\t\tdie(\"%s - not something we can merge\", argv[0]);\n+\t\t\tdie(_(\"%s - not something we can merge\"), argv[0]);\n \t\tupdate_ref(\"initial pull\", \"HEAD\", remote_head->sha1, NULL, 0,\n \t\t\t\tDIE_ON_ERR);\n \t\treset_hard(remote_head->sha1, 0);\n@@ -1033,7 +1033,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \n \t\to = peel_to_type(argv[i], 0, NULL, OBJ_COMMIT);\n \t\tif (!o)\n-\t\t\tdie(\"%s - not something we can merge\", argv[i]);\n+\t\t\tdie(_(\"%s - not something we can merge\"), argv[i]);\n \t\tcommit = lookup_commit(o->sha1);\n \t\tcommit->util = (void *)argv[i];\n \t\tremotes = &commit_list_insert(commit, remotes)->next;\n@@ -1091,7 +1091,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\tstrcpy(hex, find_unique_abbrev(head, DEFAULT_ABBREV));\n \n \t\tif (verbosity >= 0)\n-\t\t\tprintf(\"Updating %s..%s\\n\",\n+\t\t\tprintf(_(\"Updating %s..%s\\n\"),\n \t\t\t\thex,\n \t\t\t\tfind_unique_abbrev(remoteheads->item->object.sha1,\n \t\t\t\tDEFAULT_ABBREV));\n@@ -1125,11 +1125,11 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\tif (allow_trivial && !fast_forward_only) {\n \t\t\t/* See if it is really trivial. */\n \t\t\tgit_committer_info(IDENT_ERROR_ON_NO_NAME);\n-\t\t\tprintf(\"Trying really trivial in-index merge...\\n\");\n+\t\t\tprintf(_(\"Trying really trivial in-index merge...\\n\"));\n \t\t\tif (!read_tree_trivial(common->item->object.sha1,\n \t\t\t\t\thead, remoteheads->item->object.sha1))\n \t\t\t\treturn merge_trivial();\n-\t\t\tprintf(\"Nope.\\n\");\n+\t\t\tprintf(_(\"Nope.\\n\"));\n \t\t}\n \t} else {\n \t\t/*\n@@ -1162,7 +1162,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t}\n \n \tif (fast_forward_only)\n-\t\tdie(\"Not possible to fast-forward, aborting.\");\n+\t\tdie(_(\"Not possible to fast-forward, aborting.\"));\n \n \t/* We are going to make a new commit. */\n \tgit_committer_info(IDENT_ERROR_ON_NO_NAME);\n@@ -1188,11 +1188,11 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \tfor (i = 0; i < use_strategies_nr; i++) {\n \t\tint ret;\n \t\tif (i) {\n-\t\t\tprintf(\"Rewinding the tree to pristine...\\n\");\n+\t\t\tprintf(_(\"Rewinding the tree to pristine...\\n\"));\n \t\t\trestore_state();\n \t\t}\n \t\tif (use_strategies_nr != 1)\n-\t\t\tprintf(\"Trying merge strategy %s...\\n\",\n+\t\t\tprintf(_(\"Trying merge strategy %s...\\n\"),\n \t\t\t\tuse_strategies[i]->name);\n \t\t/*\n \t\t * Remember which strategy left the state in the working\n@@ -1253,17 +1253,17 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\trestore_state();\n \t\tif (use_strategies_nr > 1)\n \t\t\tfprintf(stderr,\n-\t\t\t\t\"No merge strategy handled the merge.\\n\");\n+\t\t\t\t_(\"No merge strategy handled the merge.\\n\"));\n \t\telse\n-\t\t\tfprintf(stderr, \"Merge with strategy %s failed.\\n\",\n+\t\t\tfprintf(stderr, _(\"Merge with strategy %s failed.\\n\"),\n \t\t\t\tuse_strategies[0]->name);\n \t\treturn 2;\n \t} else if (best_strategy == wt_strategy)\n \t\t; /* We already have its result in the working tree. */\n \telse {\n-\t\tprintf(\"Rewinding the tree to pristine...\\n\");\n+\t\tprintf(_(\"Rewinding the tree to pristine...\\n\"));\n \t\trestore_state();\n-\t\tprintf(\"Using the %s to prepare resolving by hand.\\n\",\n+\t\tprintf(_(\"Using the %s to prepare resolving by hand.\\n\"),\n \t\t\tbest_strategy);\n \t\ttry_merge_strategy(best_strategy, common, head_arg);\n \t}\n@@ -1279,35 +1279,35 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\t\t\tsha1_to_hex(j->item->object.sha1));\n \t\tfd = open(git_path(\"MERGE_HEAD\"), O_WRONLY | O_CREAT, 0666);\n \t\tif (fd < 0)\n-\t\t\tdie_errno(\"Could not open '%s' for writing\",\n+\t\t\tdie_errno(_(\"Could not open '%s' for writing\"),\n \t\t\t\t  git_path(\"MERGE_HEAD\"));\n \t\tif (write_in_full(fd, buf.buf, buf.len) != buf.len)\n-\t\t\tdie_errno(\"Could not write to '%s'\", git_path(\"MERGE_HEAD\"));\n+\t\t\tdie_errno(_(\"Could not write to '%s'\"), git_path(\"MERGE_HEAD\"));\n \t\tclose(fd);\n \t\tstrbuf_addch(&merge_msg, '\\n');\n \t\tfd = open(git_path(\"MERGE_MSG\"), O_WRONLY | O_CREAT, 0666);\n \t\tif (fd < 0)\n-\t\t\tdie_errno(\"Could not open '%s' for writing\",\n+\t\t\tdie_errno(_(\"Could not open '%s' for writing\"),\n \t\t\t\t  git_path(\"MERGE_MSG\"));\n \t\tif (write_in_full(fd, merge_msg.buf, merge_msg.len) !=\n \t\t\tmerge_msg.len)\n-\t\t\tdie_errno(\"Could not write to '%s'\", git_path(\"MERGE_MSG\"));\n+\t\t\tdie_errno(_(\"Could not write to '%s'\"), git_path(\"MERGE_MSG\"));\n \t\tclose(fd);\n \t\tfd = open(git_path(\"MERGE_MODE\"), O_WRONLY | O_CREAT | O_TRUNC, 0666);\n \t\tif (fd < 0)\n-\t\t\tdie_errno(\"Could not open '%s' for writing\",\n+\t\t\tdie_errno(_(\"Could not open '%s' for writing\"),\n \t\t\t\t  git_path(\"MERGE_MODE\"));\n \t\tstrbuf_reset(&buf);\n \t\tif (!allow_fast_forward)\n \t\t\tstrbuf_addf(&buf, \"no-ff\");\n \t\tif (write_in_full(fd, buf.buf, buf.len) != buf.len)\n-\t\t\tdie_errno(\"Could not write to '%s'\", git_path(\"MERGE_MODE\"));\n+\t\t\tdie_errno(_(\"Could not write to '%s'\"), git_path(\"MERGE_MODE\"));\n \t\tclose(fd);\n \t}\n \n \tif (merge_was_ok) {\n-\t\tfprintf(stderr, \"Automatic merge went well; \"\n-\t\t\t\"stopped before committing as requested\\n\");\n+\t\tfprintf(stderr, _(\"Automatic merge went well; \"\n+\t\t\t\"stopped before committing as requested\\n\"));\n \t\treturn 0;\n \t} else\n \t\treturn suggest_conflicts(option_renormalize);\n-- \n1.7.2.2.614.g1dc9\n"},{"id":"149684","messageId":"1283456446-22577-12-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 11/25] gettextize: git-merge \"In-index merge\" message","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T19:40:32Z","receivedAt":"2010-09-02T19:40:32Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Make the \"In-index merge\" message translatable. This just emits to\nstdout via finish(), so translating it should be fine.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/merge.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex bf3b313..956ce14 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -791,7 +791,7 @@ static int merge_trivial(void)\n \tparent->next->item = remoteheads->item;\n \tparent->next->next = NULL;\n \tcommit_tree(merge_msg.buf, result_tree, parent, result_commit, NULL);\n-\tfinish(result_commit, \"In-index merge\");\n+\tfinish(result_commit, _(\"In-index merge\"));\n \tdrop_save();\n \treturn 0;\n }\n-- \n1.7.2.2.614.g1dc9\n"},{"id":"149687","messageId":"1283456446-22577-13-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 12/25] gettextize: git-merge \"Merge made by %s.\" message","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T19:40:33Z","receivedAt":"2010-09-02T19:40:33Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Like the \"In-index merge\" message \"Merge made by %s.\" emits to stdout\nvia finish(), so translating it should be fine.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/merge.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex 956ce14..9121c7b 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -820,7 +820,7 @@ static int finish_automerge(struct commit_list *common,\n \tfree_commit_list(remoteheads);\n \tstrbuf_addch(&merge_msg, '\\n');\n \tcommit_tree(merge_msg.buf, result_tree, parents, result_commit, NULL);\n-\tstrbuf_addf(&buf, \"Merge made by %s.\", wt_strategy);\n+\tstrbuf_addf(&buf, _(\"Merge made by %s.\"), wt_strategy);\n \tfinish(result_commit, buf.buf);\n \tstrbuf_release(&buf);\n \tdrop_save();\n-- \n1.7.2.2.614.g1dc9\n"},{"id":"149694","messageId":"1283456446-22577-14-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 13/25] gettextize: git-merge remaining cmd_merge messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T19:40:34Z","receivedAt":"2010-09-02T19:40:34Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Translate \"Already up-to-date.\", \"Fast-forward\", \"no commit created\"\nand other cmd_merge() messages.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/merge.c |    8 ++++----\n 1 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex 9121c7b..ce831bf 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -1078,7 +1078,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\t * If head can reach all the merge then we are up to date.\n \t\t * but first the most common case of merging one remote.\n \t\t */\n-\t\tfinish_up_to_date(\"Already up-to-date.\");\n+\t\tfinish_up_to_date(_(\"Already up-to-date.\"));\n \t\treturn 0;\n \t} else if (allow_fast_forward && !remoteheads->next &&\n \t\t\t!common->next &&\n@@ -1095,10 +1095,10 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\t\t\thex,\n \t\t\t\tfind_unique_abbrev(remoteheads->item->object.sha1,\n \t\t\t\tDEFAULT_ABBREV));\n-\t\tstrbuf_addstr(&msg, \"Fast-forward\");\n+\t\tstrbuf_addstr(&msg, _(\"Fast-forward\"));\n \t\tif (have_message)\n \t\t\tstrbuf_addstr(&msg,\n-\t\t\t\t\" (no commit created; -m option ignored)\");\n+\t\t\t\t_(\" (no commit created; -m option ignored)\"));\n \t\to = peel_to_type(sha1_to_hex(remoteheads->item->object.sha1),\n \t\t\t0, NULL, OBJ_COMMIT);\n \t\tif (!o)\n@@ -1156,7 +1156,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\t\t}\n \t\t}\n \t\tif (up_to_date) {\n-\t\t\tfinish_up_to_date(\"Already up-to-date. Yeeah!\");\n+\t\t\tfinish_up_to_date(_(\"Already up-to-date. Yeeah!\"));\n \t\t\treturn 0;\n \t\t}\n \t}\n-- \n1.7.2.2.614.g1dc9\n"},{"id":"149686","messageId":"1283456446-22577-15-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 14/25] gettextize: git-mv basic messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T19:40:35Z","receivedAt":"2010-09-02T19:40:35Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/mv.c |   16 ++++++++--------\n 1 files changed, 8 insertions(+), 8 deletions(-)\n\ndiff --git a/builtin/mv.c b/builtin/mv.c\nindex cdbb094..5d99973 100644\n--- a/builtin/mv.c\n+++ b/builtin/mv.c\n@@ -74,7 +74,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)\n \n \tnewfd = hold_locked_index(&lock_file, 1);\n \tif (read_cache() < 0)\n-\t\tdie(\"index file corrupt\");\n+\t\tdie(_(\"index file corrupt\"));\n \n \tsource = copy_pathspec(prefix, argv, argc, 0);\n \tmodes = xcalloc(argc, sizeof(enum update_mode));\n@@ -100,7 +100,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)\n \t\tconst char *bad = NULL;\n \n \t\tif (show_only)\n-\t\t\tprintf(\"Checking rename of '%s' to '%s'\\n\", src, dst);\n+\t\t\tprintf(_(\"Checking rename of '%s' to '%s'\\n\"), src, dst);\n \n \t\tlength = strlen(src);\n \t\tif (lstat(src, &st) < 0)\n@@ -120,7 +120,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)\n \n \t\t\tfirst = cache_name_pos(src_w_slash, len_w_slash);\n \t\t\tif (first >= 0)\n-\t\t\t\tdie (\"Huh? %.*s is in index?\",\n+\t\t\t\tdie (_(\"Huh? %.*s is in index?\"),\n \t\t\t\t\t\tlen_w_slash, src_w_slash);\n \n \t\t\tfirst = -1 - first;\n@@ -172,7 +172,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)\n \t\t\t\t * check both source and destination\n \t\t\t\t */\n \t\t\t\tif (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) {\n-\t\t\t\t\twarning(\"%s; will overwrite!\", bad);\n+\t\t\t\t\twarning(_(\"%s; will overwrite!\"), bad);\n \t\t\t\t\tbad = NULL;\n \t\t\t\t} else\n \t\t\t\t\tbad = \"Cannot overwrite\";\n@@ -193,7 +193,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)\n \t\t\t\t\ti--;\n \t\t\t\t}\n \t\t\t} else\n-\t\t\t\tdie (\"%s, source=%s, destination=%s\",\n+\t\t\t\tdie (_(\"%s, source=%s, destination=%s\"),\n \t\t\t\t     bad, src, dst);\n \t\t}\n \t}\n@@ -203,10 +203,10 @@ int cmd_mv(int argc, const char **argv, const char *prefix)\n \t\tenum update_mode mode = modes[i];\n \t\tint pos;\n \t\tif (show_only || verbose)\n-\t\t\tprintf(\"Renaming %s to %s\\n\", src, dst);\n+\t\t\tprintf(_(\"Renaming %s to %s\\n\"), src, dst);\n \t\tif (!show_only && mode != INDEX &&\n \t\t\t\trename(src, dst) < 0 && !ignore_errors)\n-\t\t\tdie_errno (\"renaming '%s' failed\", src);\n+\t\t\tdie_errno (_(\"renaming '%s' failed\"), src);\n \n \t\tif (mode == WORKING_DIRECTORY)\n \t\t\tcontinue;\n@@ -220,7 +220,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)\n \tif (active_cache_changed) {\n \t\tif (write_cache(newfd, active_cache, active_nr) ||\n \t\t    commit_locked_index(&lock_file))\n-\t\t\tdie(\"Unable to write new index file\");\n+\t\t\tdie(_(\"Unable to write new index file\"));\n \t}\n \n \treturn 0;\n-- \n1.7.2.2.614.g1dc9\n"},{"id":"149691","messageId":"1283456446-22577-16-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 15/25] gettextize: git-mv \"bad\" messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T19:40:36Z","receivedAt":"2010-09-02T19:40:36Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Translate messages made by assigning to the \"bad\" char* variable.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/mv.c |   16 ++++++++--------\n 1 files changed, 8 insertions(+), 8 deletions(-)\n\ndiff --git a/builtin/mv.c b/builtin/mv.c\nindex 5d99973..8c13096 100644\n--- a/builtin/mv.c\n+++ b/builtin/mv.c\n@@ -104,13 +104,13 @@ int cmd_mv(int argc, const char **argv, const char *prefix)\n \n \t\tlength = strlen(src);\n \t\tif (lstat(src, &st) < 0)\n-\t\t\tbad = \"bad source\";\n+\t\t\tbad = _(\"bad source\");\n \t\telse if (!strncmp(src, dst, length) &&\n \t\t\t\t(dst[length] == 0 || dst[length] == '/')) {\n-\t\t\tbad = \"can not move directory into itself\";\n+\t\t\tbad = _(\"can not move directory into itself\");\n \t\t} else if ((src_is_dir = S_ISDIR(st.st_mode))\n \t\t\t\t&& lstat(dst, &st) == 0)\n-\t\t\tbad = \"cannot move directory over file\";\n+\t\t\tbad = _(\"cannot move directory over file\");\n \t\telse if (src_is_dir) {\n \t\t\tconst char *src_w_slash = add_slash(src);\n \t\t\tint len_w_slash = length + 1;\n@@ -132,7 +132,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)\n \t\t\tfree((char *)src_w_slash);\n \n \t\t\tif (last - first < 1)\n-\t\t\t\tbad = \"source directory is empty\";\n+\t\t\t\tbad = _(\"source directory is empty\");\n \t\t\telse {\n \t\t\t\tint j, dst_len;\n \n@@ -163,9 +163,9 @@ int cmd_mv(int argc, const char **argv, const char *prefix)\n \t\t\t\targc += last - first;\n \t\t\t}\n \t\t} else if (cache_name_pos(src, length) < 0)\n-\t\t\tbad = \"not under version control\";\n+\t\t\tbad = _(\"not under version control\");\n \t\telse if (lstat(dst, &st) == 0) {\n-\t\t\tbad = \"destination exists\";\n+\t\t\tbad = _(\"destination exists\");\n \t\t\tif (force) {\n \t\t\t\t/*\n \t\t\t\t * only files can overwrite each other:\n@@ -175,10 +175,10 @@ int cmd_mv(int argc, const char **argv, const char *prefix)\n \t\t\t\t\twarning(_(\"%s; will overwrite!\"), bad);\n \t\t\t\t\tbad = NULL;\n \t\t\t\t} else\n-\t\t\t\t\tbad = \"Cannot overwrite\";\n+\t\t\t\t\tbad = _(\"Cannot overwrite\");\n \t\t\t}\n \t\t} else if (string_list_has_string(&src_for_dst, dst))\n-\t\t\tbad = \"multiple sources for the same target\";\n+\t\t\tbad = _(\"multiple sources for the same target\");\n \t\telse\n \t\t\tstring_list_insert(&src_for_dst, dst);\n \n-- \n1.7.2.2.614.g1dc9\n"},{"id":"149692","messageId":"1283456446-22577-17-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 16/25] gettextize: git-rm basic messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T19:40:37Z","receivedAt":"2010-09-02T19:40:37Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Make the basic git-mv messages translatable, but skip things like \"rm\n'%s'\\n\" and \"git rm '%s'\\n\" for now.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/rm.c |   22 +++++++++++-----------\n 1 files changed, 11 insertions(+), 11 deletions(-)\n\ndiff --git a/builtin/rm.c b/builtin/rm.c\nindex f3772c8..68656f3 100644\n--- a/builtin/rm.c\n+++ b/builtin/rm.c\n@@ -115,19 +115,19 @@ static int check_local_mod(unsigned char *head, int index_only)\n \t\t */\n \t\tif (local_changes && staged_changes) {\n \t\t\tif (!index_only || !(ce->ce_flags & CE_INTENT_TO_ADD))\n-\t\t\t\terrs = error(\"'%s' has staged content different \"\n+\t\t\t\terrs = error(_(\"'%s' has staged content different \"\n \t\t\t\t\t     \"from both the file and the HEAD\\n\"\n-\t\t\t\t\t     \"(use -f to force removal)\", name);\n+\t\t\t\t\t     \"(use -f to force removal)\"), name);\n \t\t}\n \t\telse if (!index_only) {\n \t\t\tif (staged_changes)\n-\t\t\t\terrs = error(\"'%s' has changes staged in the index\\n\"\n+\t\t\t\terrs = error(_(\"'%s' has changes staged in the index\\n\"\n \t\t\t\t\t     \"(use --cached to keep the file, \"\n-\t\t\t\t\t     \"or -f to force removal)\", name);\n+\t\t\t\t\t     \"or -f to force removal)\"), name);\n \t\t\tif (local_changes)\n-\t\t\t\terrs = error(\"'%s' has local modifications\\n\"\n+\t\t\t\terrs = error(_(\"'%s' has local modifications\\n\"\n \t\t\t\t\t     \"(use --cached to keep the file, \"\n-\t\t\t\t\t     \"or -f to force removal)\", name);\n+\t\t\t\t\t     \"or -f to force removal)\"), name);\n \t\t}\n \t}\n \treturn errs;\n@@ -168,7 +168,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)\n \tnewfd = hold_locked_index(&lock_file, 1);\n \n \tif (read_cache() < 0)\n-\t\tdie(\"index file corrupt\");\n+\t\tdie(_(\"index file corrupt\"));\n \n \tpathspec = get_pathspec(prefix, argv);\n \trefresh_index(&the_index, REFRESH_QUIET, pathspec, NULL, NULL);\n@@ -191,7 +191,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)\n \t\tfor (i = 0; (match = pathspec[i]) != NULL ; i++) {\n \t\t\tif (!seen[i]) {\n \t\t\t\tif (!ignore_unmatch) {\n-\t\t\t\t\tdie(\"pathspec '%s' did not match any files\",\n+\t\t\t\t\tdie(_(\"pathspec '%s' did not match any files\"),\n \t\t\t\t\t    match);\n \t\t\t\t}\n \t\t\t}\n@@ -199,7 +199,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)\n \t\t\t\tseen_any = 1;\n \t\t\t}\n \t\t\tif (!recursive && seen[i] == MATCHED_RECURSIVELY)\n-\t\t\t\tdie(\"not removing '%s' recursively without -r\",\n+\t\t\t\tdie(_(\"not removing '%s' recursively without -r\"),\n \t\t\t\t    *match ? match : \".\");\n \t\t}\n \n@@ -235,7 +235,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)\n \t\t\tprintf(\"rm '%s'\\n\", path);\n \n \t\tif (remove_file_from_cache(path))\n-\t\t\tdie(\"git rm: unable to remove %s\", path);\n+\t\t\tdie(_(\"git rm: unable to remove %s\"), path);\n \t}\n \n \tif (show_only)\n@@ -265,7 +265,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)\n \tif (active_cache_changed) {\n \t\tif (write_cache(newfd, active_cache, active_nr) ||\n \t\t    commit_locked_index(&lock_file))\n-\t\t\tdie(\"Unable to write new index file\");\n+\t\t\tdie(_(\"Unable to write new index file\"));\n \t}\n \n \treturn 0;\n-- \n1.7.2.2.614.g1dc9\n"},{"id":"149688","messageId":"1283456446-22577-18-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 17/25] builtin: use builtin.h in git-reset","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T19:40:38Z","receivedAt":"2010-09-02T19:40:38Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"---\n builtin/reset.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin/reset.c b/builtin/reset.c\nindex 0037be4..c198b8e 100644\n--- a/builtin/reset.c\n+++ b/builtin/reset.c\n@@ -7,7 +7,7 @@\n  *\n  * Copyright (c) 2005, 2006 Linus Torvalds and Junio C Hamano\n  */\n-#include \"cache.h\"\n+#include \"builtin.h\"\n #include \"tag.h\"\n #include \"object.h\"\n #include \"commit.h\"\n-- \n1.7.2.2.614.g1dc9\n"},{"id":"149689","messageId":"1283456446-22577-19-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 18/25] gettextize: git-reset basic messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T19:40:39Z","receivedAt":"2010-09-02T19:40:39Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/reset.c |   30 +++++++++++++++---------------\n 1 files changed, 15 insertions(+), 15 deletions(-)\n\ndiff --git a/builtin/reset.c b/builtin/reset.c\nindex c198b8e..bf69444 100644\n--- a/builtin/reset.c\n+++ b/builtin/reset.c\n@@ -92,20 +92,20 @@ static int reset_index_file(const unsigned char *sha1, int reset_type, int quiet\n \tif (reset_type == KEEP) {\n \t\tunsigned char head_sha1[20];\n \t\tif (get_sha1(\"HEAD\", head_sha1))\n-\t\t\treturn error(\"You do not have a valid HEAD.\");\n+\t\t\treturn error(_(\"You do not have a valid HEAD.\"));\n \t\tif (!fill_tree_descriptor(desc, head_sha1))\n-\t\t\treturn error(\"Failed to find tree of HEAD.\");\n+\t\t\treturn error(_(\"Failed to find tree of HEAD.\"));\n \t\tnr++;\n \t\topts.fn = twoway_merge;\n \t}\n \n \tif (!fill_tree_descriptor(desc + nr - 1, sha1))\n-\t\treturn error(\"Failed to find tree of %s.\", sha1_to_hex(sha1));\n+\t\treturn error(_(\"Failed to find tree of %s.\"), sha1_to_hex(sha1));\n \tif (unpack_trees(nr, desc, &opts))\n \t\treturn -1;\n \tif (write_cache(newfd, active_cache, active_nr) ||\n \t    commit_locked_index(lock))\n-\t\treturn error(\"Could not write new index file.\");\n+\t\treturn error(_(\"Could not write new index file.\"));\n \n \treturn 0;\n }\n@@ -115,7 +115,7 @@ static void print_new_head_line(struct commit *commit)\n \tconst char *hex, *body;\n \n \thex = find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV);\n-\tprintf(\"HEAD is now at %s\", hex);\n+\tprintf(_(\"HEAD is now at %s\"), hex);\n \tbody = strstr(commit->buffer, \"\\n\\n\");\n \tif (body) {\n \t\tconst char *eol;\n@@ -139,10 +139,10 @@ static int update_index_refresh(int fd, struct lock_file *index_lock, int flags)\n \t}\n \n \tif (read_cache() < 0)\n-\t\treturn error(\"Could not read index\");\n+\t\treturn error(_(\"Could not read index\"));\n \n \tresult = refresh_index(&the_index, (flags), NULL, NULL,\n-\t\t\t       \"Unstaged changes after reset:\") ? 1 : 0;\n+\t\t\t       _(\"Unstaged changes after reset:\")) ? 1 : 0;\n \tif (write_cache(fd, active_cache, active_nr) ||\n \t\t\tcommit_locked_index(index_lock))\n \t\treturn error (\"Could not refresh index\");\n@@ -167,7 +167,7 @@ static void update_index_from_diff(struct diff_queue_struct *q,\n \t\t\tce = make_cache_entry(one->mode, one->sha1, one->path,\n \t\t\t\t0, 0);\n \t\t\tif (!ce)\n-\t\t\t\tdie(\"make_cache_entry failed for path '%s'\",\n+\t\t\t\tdie(_(\"make_cache_entry failed for path '%s'\"),\n \t\t\t\t    one->path);\n \t\t\tadd_cache_entry(ce, ADD_CACHE_OK_TO_ADD |\n \t\t\t\tADD_CACHE_OK_TO_REPLACE);\n@@ -222,7 +222,7 @@ static void prepend_reflog_action(const char *action, char *buf, size_t size)\n \tif (!rla)\n \t\trla = sep = \"\";\n \tif (snprintf(buf, size, \"%s%s%s\", rla, sep, action) >= size)\n-\t\twarning(\"Reflog action message too long: %.*s...\", 50, buf);\n+\t\twarning(_(\"Reflog action message too long: %.*s...\"), 50, buf);\n }\n \n static void die_if_unmerged_cache(int reset_type)\n@@ -300,16 +300,16 @@ int cmd_reset(int argc, const char **argv, const char *prefix)\n \t}\n \n \tif (get_sha1(rev, sha1))\n-\t\tdie(\"Failed to resolve '%s' as a valid ref.\", rev);\n+\t\tdie(_(\"Failed to resolve '%s' as a valid ref.\"), rev);\n \n \tcommit = lookup_commit_reference(sha1);\n \tif (!commit)\n-\t\tdie(\"Could not parse object '%s'.\", rev);\n+\t\tdie(_(\"Could not parse object '%s'.\"), rev);\n \thashcpy(sha1, commit->object.sha1);\n \n \tif (patch_mode) {\n \t\tif (reset_type != NONE)\n-\t\t\tdie(\"--patch is incompatible with --{hard,mixed,soft}\");\n+\t\t\tdie(_(\"--patch is incompatible with --{hard,mixed,soft}\"));\n \t\treturn interactive_reset(rev, argv + i, prefix);\n \t}\n \n@@ -318,9 +318,9 @@ int cmd_reset(int argc, const char **argv, const char *prefix)\n \t * affecting the working tree nor HEAD. */\n \tif (i < argc) {\n \t\tif (reset_type == MIXED)\n-\t\t\twarning(\"--mixed with paths is deprecated; use 'git reset -- <paths>' instead.\");\n+\t\t\twarning(_(\"--mixed with paths is deprecated; use 'git reset -- <paths>' instead.\"));\n \t\telse if (reset_type != NONE)\n-\t\t\tdie(\"Cannot do %s reset with paths.\",\n+\t\t\tdie(\"Cannot do %s reset with paths.\"\n \t\t\t\t\treset_type_names[reset_type]);\n \t\treturn read_from_tree(prefix, argv + i, sha1,\n \t\t\t\tquiet ? REFRESH_QUIET : REFRESH_IN_PORCELAIN);\n@@ -348,7 +348,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)\n \t\tif (reset_type == KEEP)\n \t\t\terr = err || reset_index_file(sha1, MIXED, quiet);\n \t\tif (err)\n-\t\t\tdie(\"Could not reset index file to revision '%s'.\", rev);\n+\t\t\tdie(_(\"Could not reset index file to revision '%s'.\"), rev);\n \t}\n \n \t/* Any resets update HEAD to the head being switched to,\n-- \n1.7.2.2.614.g1dc9\n"},{"id":"149693","messageId":"1283456446-22577-20-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 19/25] gettextize: git-reset reset_type_names messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T19:40:40Z","receivedAt":"2010-09-02T19:40:40Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Make the messages in git-reset that use the reset_type_names static\narray to be translatable by marking the array items with N_() and\nusing _() later.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/reset.c |   14 +++++++-------\n 1 files changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/builtin/reset.c b/builtin/reset.c\nindex bf69444..0557688 100644\n--- a/builtin/reset.c\n+++ b/builtin/reset.c\n@@ -30,7 +30,7 @@ static const char * const git_reset_usage[] = {\n \n enum reset_type { MIXED, SOFT, HARD, MERGE, KEEP, NONE };\n static const char *reset_type_names[] = {\n-\t\"mixed\", \"soft\", \"hard\", \"merge\", \"keep\", NULL\n+\tN_(\"mixed\"), N_(\"soft\"), N_(\"hard\"), N_(\"merge\"), N_(\"keep\"), NULL\n };\n \n static char *args_to_str(const char **argv)\n@@ -228,8 +228,8 @@ static void prepend_reflog_action(const char *action, char *buf, size_t size)\n static void die_if_unmerged_cache(int reset_type)\n {\n \tif (is_merge() || read_cache() < 0 || unmerged_cache())\n-\t\tdie(\"Cannot do a %s reset in the middle of a merge.\",\n-\t\t    reset_type_names[reset_type]);\n+\t\tdie(_(\"Cannot do a %s reset in the middle of a merge.\"),\n+\t\t    _(reset_type_names[reset_type]));\n \n }\n \n@@ -320,8 +320,8 @@ int cmd_reset(int argc, const char **argv, const char *prefix)\n \t\tif (reset_type == MIXED)\n \t\t\twarning(_(\"--mixed with paths is deprecated; use 'git reset -- <paths>' instead.\"));\n \t\telse if (reset_type != NONE)\n-\t\t\tdie(\"Cannot do %s reset with paths.\"\n-\t\t\t\t\treset_type_names[reset_type]);\n+\t\t\tdie(_(\"Cannot do %s reset with paths.\"),\n+\t\t\t\t\t_(reset_type_names[reset_type]));\n \t\treturn read_from_tree(prefix, argv + i, sha1,\n \t\t\t\tquiet ? REFRESH_QUIET : REFRESH_IN_PORCELAIN);\n \t}\n@@ -332,8 +332,8 @@ int cmd_reset(int argc, const char **argv, const char *prefix)\n \t\tsetup_work_tree();\n \n \tif (reset_type == MIXED && is_bare_repository())\n-\t\tdie(\"%s reset is not allowed in a bare repository\",\n-\t\t    reset_type_names[reset_type]);\n+\t\tdie(_(\"%s reset is not allowed in a bare repository\"),\n+\t\t    _(reset_type_names[reset_type]));\n \n \t/* Soft reset does not touch the index file nor the working tree\n \t * at all, but requires them in a good order.  Other resets reset\n-- \n1.7.2.2.614.g1dc9\n"},{"id":"149699","messageId":"1283456446-22577-21-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 20/25] gettextize: git-tag basic messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T19:40:41Z","receivedAt":"2010-09-02T19:40:41Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/tag.c |   60 ++++++++++++++++++++++++++++----------------------------\n 1 files changed, 30 insertions(+), 30 deletions(-)\n\ndiff --git a/builtin/tag.c b/builtin/tag.c\nindex c200e1e..7870d87 100644\n--- a/builtin/tag.c\n+++ b/builtin/tag.c\n@@ -120,12 +120,12 @@ static int for_each_tag_name(const char **argv, each_tag_name_fn fn)\n \tfor (p = argv; *p; p++) {\n \t\tif (snprintf(ref, sizeof(ref), \"refs/tags/%s\", *p)\n \t\t\t\t\t>= sizeof(ref)) {\n-\t\t\terror(\"tag name too long: %.*s...\", 50, *p);\n+\t\t\terror(_(\"tag name too long: %.*s...\"), 50, *p);\n \t\t\thad_error = 1;\n \t\t\tcontinue;\n \t\t}\n \t\tif (!resolve_ref(ref, sha1, 1, NULL)) {\n-\t\t\terror(\"tag '%s' not found.\", *p);\n+\t\t\terror(_(\"tag '%s' not found.\"), *p);\n \t\t\thad_error = 1;\n \t\t\tcontinue;\n \t\t}\n@@ -140,7 +140,7 @@ static int delete_tag(const char *name, const char *ref,\n {\n \tif (delete_ref(ref, sha1, 0))\n \t\treturn 1;\n-\tprintf(\"Deleted tag '%s' (was %s)\\n\", name, find_unique_abbrev(sha1, DEFAULT_ABBREV));\n+\tprintf(_(\"Deleted tag '%s' (was %s)\\n\"), name, find_unique_abbrev(sha1, DEFAULT_ABBREV));\n \treturn 0;\n }\n \n@@ -152,7 +152,7 @@ static int verify_tag(const char *name, const char *ref,\n \targv_verify_tag[2] = sha1_to_hex(sha1);\n \n \tif (run_command_v_opt(argv_verify_tag, RUN_GIT_CMD))\n-\t\treturn error(\"could not verify the tag '%s'\", name);\n+\t\treturn error(_(\"could not verify the tag '%s'\"), name);\n \treturn 0;\n }\n \n@@ -167,7 +167,7 @@ static int do_sign(struct strbuf *buffer)\n \tif (!*signingkey) {\n \t\tif (strlcpy(signingkey, git_committer_info(IDENT_ERROR_ON_NO_NAME),\n \t\t\t\tsizeof(signingkey)) > sizeof(signingkey) - 1)\n-\t\t\treturn error(\"committer info too long.\");\n+\t\t\treturn error(_(\"committer info too long.\"));\n \t\tbracket = strchr(signingkey, '>');\n \t\tif (bracket)\n \t\t\tbracket[1] = '\\0';\n@@ -187,20 +187,20 @@ static int do_sign(struct strbuf *buffer)\n \targs[3] = NULL;\n \n \tif (start_command(&gpg))\n-\t\treturn error(\"could not run gpg.\");\n+\t\treturn error(_(\"could not run gpg.\"));\n \n \tif (write_in_full(gpg.in, buffer->buf, buffer->len) != buffer->len) {\n \t\tclose(gpg.in);\n \t\tclose(gpg.out);\n \t\tfinish_command(&gpg);\n-\t\treturn error(\"gpg did not accept the tag data\");\n+\t\treturn error(_(\"gpg did not accept the tag data\"));\n \t}\n \tclose(gpg.in);\n \tlen = strbuf_read(buffer, gpg.out, 1024);\n \tclose(gpg.out);\n \n \tif (finish_command(&gpg) || !len || len < 0)\n-\t\treturn error(\"gpg failed to sign the tag\");\n+\t\treturn error(_(\"gpg failed to sign the tag\"));\n \n \t/* Strip CR from the line endings, in case we are on Windows. */\n \tfor (i = j = 0; i < buffer->len; i++)\n@@ -223,7 +223,7 @@ static const char tag_template[] =\n static void set_signingkey(const char *value)\n {\n \tif (strlcpy(signingkey, value, sizeof(signingkey)) >= sizeof(signingkey))\n-\t\tdie(\"signing key value too long (%.10s...)\", value);\n+\t\tdie(_(\"signing key value too long (%.10s...)\"), value);\n }\n \n static int git_tag_config(const char *var, const char *value, void *cb)\n@@ -269,9 +269,9 @@ static void write_tag_body(int fd, const unsigned char *sha1)\n static int build_tag_object(struct strbuf *buf, int sign, unsigned char *result)\n {\n \tif (sign && do_sign(buf) < 0)\n-\t\treturn error(\"unable to sign the tag\");\n+\t\treturn error(_(\"unable to sign the tag\"));\n \tif (write_sha1_file(buf->buf, buf->len, tag_type, result) < 0)\n-\t\treturn error(\"unable to write tag file\");\n+\t\treturn error(_(\"unable to write tag file\"));\n \treturn 0;\n }\n \n@@ -286,7 +286,7 @@ static void create_tag(const unsigned char *object, const char *tag,\n \n \ttype = sha1_object_info(object, NULL);\n \tif (type <= OBJ_NONE)\n-\t    die(\"bad object type.\");\n+\t    die(_(\"bad object type.\"));\n \n \theader_len = snprintf(header_buf, sizeof(header_buf),\n \t\t\t  \"object %s\\n\"\n@@ -299,7 +299,7 @@ static void create_tag(const unsigned char *object, const char *tag,\n \t\t\t  git_committer_info(IDENT_ERROR_ON_NO_NAME));\n \n \tif (header_len > sizeof(header_buf) - 1)\n-\t\tdie(\"tag header too big.\");\n+\t\tdie(_(\"tag header too big.\"));\n \n \tif (!message) {\n \t\tint fd;\n@@ -308,7 +308,7 @@ static void create_tag(const unsigned char *object, const char *tag,\n \t\tpath = git_pathdup(\"TAG_EDITMSG\");\n \t\tfd = open(path, O_CREAT | O_TRUNC | O_WRONLY, 0600);\n \t\tif (fd < 0)\n-\t\t\tdie_errno(\"could not create file '%s'\", path);\n+\t\t\tdie_errno(_(\"could not create file '%s'\"), path);\n \n \t\tif (!is_null_sha1(prev))\n \t\t\twrite_tag_body(fd, prev);\n@@ -318,7 +318,7 @@ static void create_tag(const unsigned char *object, const char *tag,\n \n \t\tif (launch_editor(path, buf, NULL)) {\n \t\t\tfprintf(stderr,\n-\t\t\t\"Please supply the message using either -m or -F option.\\n\");\n+\t\t\t_(\"Please supply the message using either -m or -F option.\\n\"));\n \t\t\texit(1);\n \t\t}\n \t}\n@@ -326,13 +326,13 @@ static void create_tag(const unsigned char *object, const char *tag,\n \tstripspace(buf, 1);\n \n \tif (!message && !buf->len)\n-\t\tdie(\"no tag message?\");\n+\t\tdie(_(\"no tag message?\"));\n \n \tstrbuf_insert(buf, 0, header_buf, header_len);\n \n \tif (build_tag_object(buf, sign, result) < 0) {\n \t\tif (path)\n-\t\t\tfprintf(stderr, \"The tag message has been left in %s\\n\",\n+\t\t\tfprintf(stderr, _(\"The tag message has been left in %s\\n\"),\n \t\t\t\tpath);\n \t\texit(128);\n \t}\n@@ -425,9 +425,9 @@ int cmd_tag(int argc, const char **argv, const char *prefix)\n \t\treturn list_tags(argv[0], lines == -1 ? 0 : lines,\n \t\t\t\t with_commit);\n \tif (lines != -1)\n-\t\tdie(\"-n option is only allowed with -l.\");\n+\t\tdie(_(\"-n option is only allowed with -l.\"));\n \tif (with_commit)\n-\t\tdie(\"--contains option is only allowed with -l.\");\n+\t\tdie(_(\"--contains option is only allowed with -l.\"));\n \tif (delete)\n \t\treturn for_each_tag_name(argv, delete_tag);\n \tif (verify)\n@@ -435,17 +435,17 @@ int cmd_tag(int argc, const char **argv, const char *prefix)\n \n \tif (msg.given || msgfile) {\n \t\tif (msg.given && msgfile)\n-\t\t\tdie(\"only one -F or -m option is allowed.\");\n+\t\t\tdie(_(\"only one -F or -m option is allowed.\"));\n \t\tannotate = 1;\n \t\tif (msg.given)\n \t\t\tstrbuf_addbuf(&buf, &(msg.buf));\n \t\telse {\n \t\t\tif (!strcmp(msgfile, \"-\")) {\n \t\t\t\tif (strbuf_read(&buf, 0, 1024) < 0)\n-\t\t\t\t\tdie_errno(\"cannot read '%s'\", msgfile);\n+\t\t\t\t\tdie_errno(_(\"cannot read '%s'\"), msgfile);\n \t\t\t} else {\n \t\t\t\tif (strbuf_read_file(&buf, msgfile, 1024) < 0)\n-\t\t\t\t\tdie_errno(\"could not open or read '%s'\",\n+\t\t\t\t\tdie_errno(_(\"could not open or read '%s'\"),\n \t\t\t\t\t\tmsgfile);\n \t\t\t}\n \t\t}\n@@ -455,20 +455,20 @@ int cmd_tag(int argc, const char **argv, const char *prefix)\n \n \tobject_ref = argc == 2 ? argv[1] : \"HEAD\";\n \tif (argc > 2)\n-\t\tdie(\"too many params\");\n+\t\tdie(_(\"too many params\"));\n \n \tif (get_sha1(object_ref, object))\n-\t\tdie(\"Failed to resolve '%s' as a valid ref.\", object_ref);\n+\t\tdie(_(\"Failed to resolve '%s' as a valid ref.\"), object_ref);\n \n \tif (snprintf(ref, sizeof(ref), \"refs/tags/%s\", tag) > sizeof(ref) - 1)\n-\t\tdie(\"tag name too long: %.*s...\", 50, tag);\n+\t\tdie(_(\"tag name too long: %.*s...\"), 50, tag);\n \tif (check_ref_format(ref))\n-\t\tdie(\"'%s' is not a valid tag name.\", tag);\n+\t\tdie(_(\"'%s' is not a valid tag name.\"), tag);\n \n \tif (!resolve_ref(ref, prev, 1, NULL))\n \t\thashclr(prev);\n \telse if (!force)\n-\t\tdie(\"tag '%s' already exists\", tag);\n+\t\tdie(_(\"tag '%s' already exists\"), tag);\n \n \tif (annotate)\n \t\tcreate_tag(object, tag, &buf, msg.given || msgfile,\n@@ -476,11 +476,11 @@ int cmd_tag(int argc, const char **argv, const char *prefix)\n \n \tlock = lock_any_ref_for_update(ref, prev, 0);\n \tif (!lock)\n-\t\tdie(\"%s: cannot lock the ref\", ref);\n+\t\tdie(_(\"%s: cannot lock the ref\"), ref);\n \tif (write_ref_sha1(lock, object, NULL) < 0)\n-\t\tdie(\"%s: cannot update the ref\", ref);\n+\t\tdie(_(\"%s: cannot update the ref\"), ref);\n \tif (force && hashcmp(prev, object))\n-\t\tprintf(\"Updated tag '%s' (was %s)\\n\", tag, find_unique_abbrev(prev, DEFAULT_ABBREV));\n+\t\tprintf(_(\"Updated tag '%s' (was %s)\\n\"), tag, find_unique_abbrev(prev, DEFAULT_ABBREV));\n \n \tstrbuf_release(&buf);\n \treturn 0;\n-- \n1.7.2.2.614.g1dc9\n"},{"id":"149695","messageId":"1283456446-22577-22-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 21/25] gettextize: git-tag tag_template message","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T19:40:42Z","receivedAt":"2010-09-02T19:40:42Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Mark the tag_template message as translatable with N_() and then use\nit later with _().\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/tag.c |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/builtin/tag.c b/builtin/tag.c\nindex 7870d87..4841621 100644\n--- a/builtin/tag.c\n+++ b/builtin/tag.c\n@@ -215,10 +215,10 @@ static int do_sign(struct strbuf *buffer)\n }\n \n static const char tag_template[] =\n-\t\"\\n\"\n+\tN_(\"\\n\"\n \t\"#\\n\"\n \t\"# Write a tag message\\n\"\n-\t\"#\\n\";\n+\t\"#\\n\");\n \n static void set_signingkey(const char *value)\n {\n@@ -313,7 +313,7 @@ static void create_tag(const unsigned char *object, const char *tag,\n \t\tif (!is_null_sha1(prev))\n \t\t\twrite_tag_body(fd, prev);\n \t\telse\n-\t\t\twrite_or_die(fd, tag_template, strlen(tag_template));\n+\t\t\twrite_or_die(fd, _(tag_template), strlen(_(tag_template)));\n \t\tclose(fd);\n \n \t\tif (launch_editor(path, buf, NULL)) {\n-- \n1.7.2.2.614.g1dc9\n"},{"id":"149696","messageId":"1283456446-22577-23-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 22/25] gettextize: git-push basic messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T19:40:43Z","receivedAt":"2010-09-02T19:40:43Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/push.c |   42 +++++++++++++++++++++---------------------\n 1 files changed, 21 insertions(+), 21 deletions(-)\n\ndiff --git a/builtin/push.c b/builtin/push.c\nindex e655eb7..8c8d8c7 100644\n--- a/builtin/push.c\n+++ b/builtin/push.c\n@@ -40,7 +40,7 @@ static void set_refspecs(const char **refs, int nr)\n \t\t\tchar *tag;\n \t\t\tint len;\n \t\t\tif (nr <= ++i)\n-\t\t\t\tdie(\"tag shorthand without <tag>\");\n+\t\t\t\tdie(_(\"tag shorthand without <tag>\"));\n \t\t\tlen = strlen(refs[i]) + 11;\n \t\t\tif (deleterefs) {\n \t\t\t\ttag = xmalloc(len+1);\n@@ -59,7 +59,7 @@ static void set_refspecs(const char **refs, int nr)\n \t\t\tstrcat(delref, ref);\n \t\t\tref = delref;\n \t\t} else if (deleterefs)\n-\t\t\tdie(\"--delete only accepts plain target ref names\");\n+\t\t\tdie(_(\"--delete only accepts plain target ref names\"));\n \t\tadd_refspec(ref);\n \t}\n }\n@@ -69,13 +69,13 @@ static void setup_push_tracking(void)\n \tstruct strbuf refspec = STRBUF_INIT;\n \tstruct branch *branch = branch_get(NULL);\n \tif (!branch)\n-\t\tdie(\"You are not currently on a branch.\");\n+\t\tdie(_(\"You are not currently on a branch.\"));\n \tif (!branch->merge_nr || !branch->merge)\n-\t\tdie(\"The current branch %s is not tracking anything.\",\n+\t\tdie(_(\"The current branch %s is not tracking anything.\"),\n \t\t    branch->name);\n \tif (branch->merge_nr != 1)\n-\t\tdie(\"The current branch %s is tracking multiple branches, \"\n-\t\t    \"refusing to push.\", branch->name);\n+\t\tdie(_(\"The current branch %s is tracking multiple branches, \"\n+\t\t    \"refusing to push.\"), branch->name);\n \tstrbuf_addf(&refspec, \"%s:%s\", branch->name, branch->merge[0]->src);\n \tadd_refspec(refspec.buf);\n }\n@@ -97,8 +97,8 @@ static void setup_default_push_refspecs(void)\n \t\tbreak;\n \n \tcase PUSH_DEFAULT_NOTHING:\n-\t\tdie(\"You didn't specify any refspecs to push, and \"\n-\t\t    \"push.default is \\\"nothing\\\".\");\n+\t\tdie(_(\"You didn't specify any refspecs to push, and \"\n+\t\t    \"push.default is \\\"nothing\\\".\"));\n \t\tbreak;\n \t}\n }\n@@ -117,11 +117,11 @@ static int push_with_options(struct transport *transport, int flags)\n \t\ttransport_set_option(transport, TRANS_OPT_THIN, \"yes\");\n \n \tif (verbosity > 0)\n-\t\tfprintf(stderr, \"Pushing to %s\\n\", transport->url);\n+\t\tfprintf(stderr, _(\"Pushing to %s\\n\"), transport->url);\n \terr = transport_push(transport, refspec_nr, refspec, flags,\n \t\t\t     &nonfastforward);\n \tif (err != 0)\n-\t\terror(\"failed to push some refs to '%s'\", transport->url);\n+\t\terror(_(\"failed to push some refs to '%s'\"), transport->url);\n \n \terr |= transport_disconnect(transport);\n \n@@ -129,9 +129,9 @@ static int push_with_options(struct transport *transport, int flags)\n \t\treturn 0;\n \n \tif (nonfastforward && advice_push_nonfastforward) {\n-\t\tfprintf(stderr, \"To prevent you from losing history, non-fast-forward updates were rejected\\n\"\n+\t\tfprintf(stderr, _(\"To prevent you from losing history, non-fast-forward updates were rejected\\n\"\n \t\t\t\t\"Merge the remote changes (e.g. 'git pull') before pushing again.  See the\\n\"\n-\t\t\t\t\"'Note about fast-forwards' section of 'git push --help' for details.\\n\");\n+\t\t\t\t\"'Note about fast-forwards' section of 'git push --help' for details.\\n\"));\n \t}\n \n \treturn 1;\n@@ -146,8 +146,8 @@ static int do_push(const char *repo, int flags)\n \n \tif (!remote) {\n \t\tif (repo)\n-\t\t\tdie(\"bad repository '%s'\", repo);\n-\t\tdie(\"No destination configured to push to.\");\n+\t\t\tdie(_(\"bad repository '%s'\"), repo);\n+\t\tdie(_(\"No destination configured to push to.\"));\n \t}\n \n \tif (remote->mirror)\n@@ -155,19 +155,19 @@ static int do_push(const char *repo, int flags)\n \n \tif ((flags & TRANSPORT_PUSH_ALL) && refspec) {\n \t\tif (!strcmp(*refspec, \"refs/tags/*\"))\n-\t\t\treturn error(\"--all and --tags are incompatible\");\n-\t\treturn error(\"--all can't be combined with refspecs\");\n+\t\t\treturn error(_(\"--all and --tags are incompatible\"));\n+\t\treturn error(_(\"--all can't be combined with refspecs\"));\n \t}\n \n \tif ((flags & TRANSPORT_PUSH_MIRROR) && refspec) {\n \t\tif (!strcmp(*refspec, \"refs/tags/*\"))\n-\t\t\treturn error(\"--mirror and --tags are incompatible\");\n-\t\treturn error(\"--mirror can't be combined with refspecs\");\n+\t\t\treturn error(_(\"--mirror and --tags are incompatible\"));\n+\t\treturn error(_(\"--mirror can't be combined with refspecs\"));\n \t}\n \n \tif ((flags & (TRANSPORT_PUSH_ALL|TRANSPORT_PUSH_MIRROR)) ==\n \t\t\t\t(TRANSPORT_PUSH_ALL|TRANSPORT_PUSH_MIRROR)) {\n-\t\treturn error(\"--all and --mirror are incompatible\");\n+\t\treturn error(_(\"--all and --mirror are incompatible\"));\n \t}\n \n \tif (!refspec && !(flags & TRANSPORT_PUSH_ALL)) {\n@@ -232,9 +232,9 @@ int cmd_push(int argc, const char **argv, const char *prefix)\n \targc = parse_options(argc, argv, prefix, options, push_usage, 0);\n \n \tif (deleterefs && (tags || (flags & (TRANSPORT_PUSH_ALL | TRANSPORT_PUSH_MIRROR))))\n-\t\tdie(\"--delete is incompatible with --all, --mirror and --tags\");\n+\t\tdie(_(\"--delete is incompatible with --all, --mirror and --tags\"));\n \tif (deleterefs && argc < 2)\n-\t\tdie(\"--delete doesn't make sense without any refs\");\n+\t\tdie(_(\"--delete doesn't make sense without any refs\"));\n \n \tif (tags)\n \t\tadd_refspec(\"refs/tags/*\");\n-- \n1.7.2.2.614.g1dc9\n"},{"id":"149698","messageId":"1283456446-22577-24-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 23/25] builtin: use builtin.h in git-status","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T19:40:44Z","receivedAt":"2010-09-02T19:40:44Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Change wt-status.c to include gettext.h via builtin.h. This is needed\nto be able to mark messages for translation.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n wt-status.c |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/wt-status.c b/wt-status.c\nindex 54b6b03..7716dd9 100644\n--- a/wt-status.c\n+++ b/wt-status.c\n@@ -1,3 +1,4 @@\n+#include \"builtin.h\"\n #include \"cache.h\"\n #include \"wt-status.h\"\n #include \"object.h\"\n-- \n1.7.2.2.614.g1dc9\n"},{"id":"149697","messageId":"1283456446-22577-25-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 24/25] gettextize: git-status basic messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T19:40:45Z","receivedAt":"2010-09-02T19:40:45Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Ripped out as-is from the \"Add initial C, Shell and Perl gettext\ntranslations\" patch that was part of the gettext RFC for a long time\nand has already been reviewed by a lot of eyeballs.\n\nThe only change is the removal of two messages that didn't really\nbelong: _(\"#\\t\") and _(\"%-20s%s\\n\").\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n wt-status.c |  102 +++++++++++++++++++++++++++++-----------------------------\n 1 files changed, 51 insertions(+), 51 deletions(-)\n\ndiff --git a/wt-status.c b/wt-status.c\nindex 7716dd9..1c1a575 100644\n--- a/wt-status.c\n+++ b/wt-status.c\n@@ -54,16 +54,16 @@ static void wt_status_print_unmerged_header(struct wt_status *s)\n {\n \tconst char *c = color(WT_STATUS_HEADER, s);\n \n-\tcolor_fprintf_ln(s->fp, c, \"# Unmerged paths:\");\n+\tcolor_fprintf_ln(s->fp, c, _(\"# Unmerged paths:\"));\n \tif (!advice_status_hints)\n \t\treturn;\n \tif (s->in_merge)\n \t\t;\n \telse if (!s->is_initial)\n-\t\tcolor_fprintf_ln(s->fp, c, \"#   (use \\\"git reset %s <file>...\\\" to unstage)\", s->reference);\n+\t\tcolor_fprintf_ln(s->fp, c, _(\"#   (use \\\"git reset %s <file>...\\\" to unstage)\"), s->reference);\n \telse\n-\t\tcolor_fprintf_ln(s->fp, c, \"#   (use \\\"git rm --cached <file>...\\\" to unstage)\");\n-\tcolor_fprintf_ln(s->fp, c, \"#   (use \\\"git add/rm <file>...\\\" as appropriate to mark resolution)\");\n+\t\tcolor_fprintf_ln(s->fp, c, _(\"#   (use \\\"git rm --cached <file>...\\\" to unstage)\"));\n+\tcolor_fprintf_ln(s->fp, c, _(\"#   (use \\\"git add/rm <file>...\\\" as appropriate to mark resolution)\"));\n \tcolor_fprintf_ln(s->fp, c, \"#\");\n }\n \n@@ -71,15 +71,15 @@ static void wt_status_print_cached_header(struct wt_status *s)\n {\n \tconst char *c = color(WT_STATUS_HEADER, s);\n \n-\tcolor_fprintf_ln(s->fp, c, \"# Changes to be committed:\");\n+\tcolor_fprintf_ln(s->fp, c, _(\"# Changes to be committed:\"));\n \tif (!advice_status_hints)\n \t\treturn;\n \tif (s->in_merge)\n \t\t; /* NEEDSWORK: use \"git reset --unresolve\"??? */\n \telse if (!s->is_initial)\n-\t\tcolor_fprintf_ln(s->fp, c, \"#   (use \\\"git reset %s <file>...\\\" to unstage)\", s->reference);\n+\t\tcolor_fprintf_ln(s->fp, c, _(\"#   (use \\\"git reset %s <file>...\\\" to unstage)\"), s->reference);\n \telse\n-\t\tcolor_fprintf_ln(s->fp, c, \"#   (use \\\"git rm --cached <file>...\\\" to unstage)\");\n+\t\tcolor_fprintf_ln(s->fp, c, _(\"#   (use \\\"git rm --cached <file>...\\\" to unstage)\"));\n \tcolor_fprintf_ln(s->fp, c, \"#\");\n }\n \n@@ -89,16 +89,16 @@ static void wt_status_print_dirty_header(struct wt_status *s,\n {\n \tconst char *c = color(WT_STATUS_HEADER, s);\n \n-\tcolor_fprintf_ln(s->fp, c, \"# Changed but not updated:\");\n+\tcolor_fprintf_ln(s->fp, c, _(\"# Changed but not updated:\"));\n \tif (!advice_status_hints)\n \t\treturn;\n \tif (!has_deleted)\n-\t\tcolor_fprintf_ln(s->fp, c, \"#   (use \\\"git add <file>...\\\" to update what will be committed)\");\n+\t\tcolor_fprintf_ln(s->fp, c, _(\"#   (use \\\"git add <file>...\\\" to update what will be committed)\"));\n \telse\n-\t\tcolor_fprintf_ln(s->fp, c, \"#   (use \\\"git add/rm <file>...\\\" to update what will be committed)\");\n-\tcolor_fprintf_ln(s->fp, c, \"#   (use \\\"git checkout -- <file>...\\\" to discard changes in working directory)\");\n+\t\tcolor_fprintf_ln(s->fp, c, _(\"#   (use \\\"git add/rm <file>...\\\" to update what will be committed)\"));\n+\tcolor_fprintf_ln(s->fp, c, _(\"#   (use \\\"git checkout -- <file>...\\\" to discard changes in working directory)\"));\n \tif (has_dirty_submodules)\n-\t\tcolor_fprintf_ln(s->fp, c, \"#   (commit or discard the untracked or modified content in submodules)\");\n+\t\tcolor_fprintf_ln(s->fp, c, _(\"#   (commit or discard the untracked or modified content in submodules)\"));\n \tcolor_fprintf_ln(s->fp, c, \"#\");\n }\n \n@@ -107,10 +107,10 @@ static void wt_status_print_other_header(struct wt_status *s,\n \t\t\t\t\t const char *how)\n {\n \tconst char *c = color(WT_STATUS_HEADER, s);\n-\tcolor_fprintf_ln(s->fp, c, \"# %s files:\", what);\n+\tcolor_fprintf_ln(s->fp, c, _(\"# %s files:\"), what);\n \tif (!advice_status_hints)\n \t\treturn;\n-\tcolor_fprintf_ln(s->fp, c, \"#   (use \\\"git %s <file>...\\\" to include in what will be committed)\", how);\n+\tcolor_fprintf_ln(s->fp, c, _(\"#   (use \\\"git %s <file>...\\\" to include in what will be committed)\"), how);\n \tcolor_fprintf_ln(s->fp, c, \"#\");\n }\n \n@@ -127,18 +127,18 @@ static void wt_status_print_unmerged_data(struct wt_status *s,\n \tconst char *c = color(WT_STATUS_UNMERGED, s);\n \tstruct wt_status_change_data *d = it->util;\n \tstruct strbuf onebuf = STRBUF_INIT;\n-\tconst char *one, *how = \"bug\";\n+\tconst char *one, *how = _(\"bug\");\n \n \tone = quote_path(it->string, -1, &onebuf, s->prefix);\n \tcolor_fprintf(s->fp, color(WT_STATUS_HEADER, s), \"#\\t\");\n \tswitch (d->stagemask) {\n-\tcase 1: how = \"both deleted:\"; break;\n-\tcase 2: how = \"added by us:\"; break;\n-\tcase 3: how = \"deleted by them:\"; break;\n-\tcase 4: how = \"added by them:\"; break;\n-\tcase 5: how = \"deleted by us:\"; break;\n-\tcase 6: how = \"both added:\"; break;\n-\tcase 7: how = \"both modified:\"; break;\n+\tcase 1: how = _(\"both deleted:\"); break;\n+\tcase 2: how = _(\"added by us:\"); break;\n+\tcase 3: how = _(\"deleted by them:\"); break;\n+\tcase 4: how = _(\"added by them:\"); break;\n+\tcase 5: how = _(\"deleted by us:\"); break;\n+\tcase 6: how = _(\"both added:\"); break;\n+\tcase 7: how = _(\"both modified:\"); break;\n \t}\n \tcolor_fprintf(s->fp, c, \"%-20s%s\\n\", how, one);\n \tstrbuf_release(&onebuf);\n@@ -168,11 +168,11 @@ static void wt_status_print_change_data(struct wt_status *s,\n \t\tif (d->new_submodule_commits || d->dirty_submodule) {\n \t\t\tstrbuf_addstr(&extra, \" (\");\n \t\t\tif (d->new_submodule_commits)\n-\t\t\t\tstrbuf_addf(&extra, \"new commits, \");\n+\t\t\t\tstrbuf_addf(&extra, _(\"new commits, \"));\n \t\t\tif (d->dirty_submodule & DIRTY_SUBMODULE_MODIFIED)\n-\t\t\t\tstrbuf_addf(&extra, \"modified content, \");\n+\t\t\t\tstrbuf_addf(&extra, _(\"modified content, \"));\n \t\t\tif (d->dirty_submodule & DIRTY_SUBMODULE_UNTRACKED)\n-\t\t\t\tstrbuf_addf(&extra, \"untracked content, \");\n+\t\t\t\tstrbuf_addf(&extra, _(\"untracked content, \"));\n \t\t\tstrbuf_setlen(&extra, extra.len - 2);\n \t\t\tstrbuf_addch(&extra, ')');\n \t\t}\n@@ -186,31 +186,31 @@ static void wt_status_print_change_data(struct wt_status *s,\n \tcolor_fprintf(s->fp, color(WT_STATUS_HEADER, s), \"#\\t\");\n \tswitch (status) {\n \tcase DIFF_STATUS_ADDED:\n-\t\tcolor_fprintf(s->fp, c, \"new file:   %s\", one);\n+\t\tcolor_fprintf(s->fp, c, _(\"new file:   %s\"), one);\n \t\tbreak;\n \tcase DIFF_STATUS_COPIED:\n-\t\tcolor_fprintf(s->fp, c, \"copied:     %s -> %s\", one, two);\n+\t\tcolor_fprintf(s->fp, c, _(\"copied:     %s -> %s\"), one, two);\n \t\tbreak;\n \tcase DIFF_STATUS_DELETED:\n-\t\tcolor_fprintf(s->fp, c, \"deleted:    %s\", one);\n+\t\tcolor_fprintf(s->fp, c, _(\"deleted:    %s\"), one);\n \t\tbreak;\n \tcase DIFF_STATUS_MODIFIED:\n-\t\tcolor_fprintf(s->fp, c, \"modified:   %s\", one);\n+\t\tcolor_fprintf(s->fp, c, _(\"modified:   %s\"), one);\n \t\tbreak;\n \tcase DIFF_STATUS_RENAMED:\n-\t\tcolor_fprintf(s->fp, c, \"renamed:    %s -> %s\", one, two);\n+\t\tcolor_fprintf(s->fp, c, _(\"renamed:    %s -> %s\"), one, two);\n \t\tbreak;\n \tcase DIFF_STATUS_TYPE_CHANGED:\n-\t\tcolor_fprintf(s->fp, c, \"typechange: %s\", one);\n+\t\tcolor_fprintf(s->fp, c, _(\"typechange: %s\"), one);\n \t\tbreak;\n \tcase DIFF_STATUS_UNKNOWN:\n-\t\tcolor_fprintf(s->fp, c, \"unknown:    %s\", one);\n+\t\tcolor_fprintf(s->fp, c, _(\"unknown:    %s\"), one);\n \t\tbreak;\n \tcase DIFF_STATUS_UNMERGED:\n-\t\tcolor_fprintf(s->fp, c, \"unmerged:   %s\", one);\n+\t\tcolor_fprintf(s->fp, c, _(\"unmerged:   %s\"), one);\n \t\tbreak;\n \tdefault:\n-\t\tdie(\"bug: unhandled diff status %c\", status);\n+\t\tdie(_(\"bug: unhandled diff status %c\"), status);\n \t}\n \tif (extra.len) {\n \t\tcolor_fprintf(s->fp, color(WT_STATUS_HEADER, s), \"%s\", extra.buf);\n@@ -633,14 +633,14 @@ void wt_status_print(struct wt_status *s)\n \tconst char *branch_color = color(WT_STATUS_HEADER, s);\n \n \tif (s->branch) {\n-\t\tconst char *on_what = \"On branch \";\n+\t\tconst char *on_what = _(\"On branch \");\n \t\tconst char *branch_name = s->branch;\n \t\tif (!prefixcmp(branch_name, \"refs/heads/\"))\n \t\t\tbranch_name += 11;\n \t\telse if (!strcmp(branch_name, \"HEAD\")) {\n \t\t\tbranch_name = \"\";\n \t\t\tbranch_color = color(WT_STATUS_NOBRANCH, s);\n-\t\t\ton_what = \"Not currently on any branch.\";\n+\t\t\ton_what = _(\"Not currently on any branch.\");\n \t\t}\n \t\tcolor_fprintf(s->fp, color(WT_STATUS_HEADER, s), \"# \");\n \t\tcolor_fprintf_ln(s->fp, branch_color, \"%s%s\", on_what, branch_name);\n@@ -650,7 +650,7 @@ void wt_status_print(struct wt_status *s)\n \n \tif (s->is_initial) {\n \t\tcolor_fprintf_ln(s->fp, color(WT_STATUS_HEADER, s), \"#\");\n-\t\tcolor_fprintf_ln(s->fp, color(WT_STATUS_HEADER, s), \"# Initial commit\");\n+\t\tcolor_fprintf_ln(s->fp, color(WT_STATUS_HEADER, s), _(\"# Initial commit\"));\n \t\tcolor_fprintf_ln(s->fp, color(WT_STATUS_HEADER, s), \"#\");\n \t}\n \n@@ -664,38 +664,38 @@ void wt_status_print(struct wt_status *s)\n \t\twt_status_print_submodule_summary(s, 1);  /* unstaged */\n \t}\n \tif (s->show_untracked_files) {\n-\t\twt_status_print_other(s, &s->untracked, \"Untracked\", \"add\");\n+\t\twt_status_print_other(s, &s->untracked, _(\"Untracked\"), _(\"add\"));\n \t\tif (s->show_ignored_files)\n-\t\t\twt_status_print_other(s, &s->ignored, \"Ignored\", \"add -f\");\n+\t\t\twt_status_print_other(s, &s->ignored, _(\"Ignored\"), _(\"add -f\"));\n \t} else if (s->commitable)\n-\t\tfprintf(s->fp, \"# Untracked files not listed%s\\n\",\n+\t\tfprintf(s->fp, _(\"# Untracked files not listed%s\\n\"),\n \t\t\tadvice_status_hints\n-\t\t\t? \" (use -u option to show untracked files)\" : \"\");\n+\t\t\t? _(\" (use -u option to show untracked files)\") : \"\");\n \n \tif (s->verbose)\n \t\twt_status_print_verbose(s);\n \tif (!s->commitable) {\n \t\tif (s->amend)\n-\t\t\tfprintf(s->fp, \"# No changes\\n\");\n+\t\t\tfprintf(s->fp, _(\"# No changes\\n\"));\n \t\telse if (s->nowarn)\n \t\t\t; /* nothing */\n \t\telse if (s->workdir_dirty)\n-\t\t\tprintf(\"no changes added to commit%s\\n\",\n+\t\t\tprintf(_(\"no changes added to commit%s\\n\"),\n \t\t\t\tadvice_status_hints\n-\t\t\t\t? \" (use \\\"git add\\\" and/or \\\"git commit -a\\\")\" : \"\");\n+\t\t\t\t? _(\" (use \\\"git add\\\" and/or \\\"git commit -a\\\")\") : \"\");\n \t\telse if (s->untracked.nr)\n-\t\t\tprintf(\"nothing added to commit but untracked files present%s\\n\",\n+\t\t\tprintf(_(\"nothing added to commit but untracked files present%s\\n\"),\n \t\t\t\tadvice_status_hints\n-\t\t\t\t? \" (use \\\"git add\\\" to track)\" : \"\");\n+\t\t\t\t? _(\" (use \\\"git add\\\" to track)\") : \"\");\n \t\telse if (s->is_initial)\n \t\t\tprintf(\"nothing to commit%s\\n\", advice_status_hints\n-\t\t\t\t? \" (create/copy files and use \\\"git add\\\" to track)\" : \"\");\n+\t\t\t\t? _(\" (create/copy files and use \\\"git add\\\" to track)\") : \"\");\n \t\telse if (!s->show_untracked_files)\n-\t\t\tprintf(\"nothing to commit%s\\n\", advice_status_hints\n-\t\t\t\t? \" (use -u to show untracked files)\" : \"\");\n+\t\t\tprintf(_(\"nothing to commit%s\\n\"), advice_status_hints\n+\t\t\t\t? _(\" (use -u to show untracked files)\") : \"\");\n \t\telse\n-\t\t\tprintf(\"nothing to commit%s\\n\", advice_status_hints\n-\t\t\t\t? \" (working directory clean)\" : \"\");\n+\t\t\tprintf(_(\"nothing to commit%s\\n\"), advice_status_hints\n+\t\t\t\t? _(\" (working directory clean)\") : \"\");\n \t}\n }\n \n-- \n1.7.2.2.614.g1dc9\n"},{"id":"149700","messageId":"1283456446-22577-26-git-send-email-avarab@gmail.com","threadId":"24943","inReplyTo":"1283373845-2022-1-git-send-email-avarab@gmail.com","subject":"[PATCH 25/25] gettextize: git-status shortstatus messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T19:40:46Z","receivedAt":"2010-09-02T19:40:46Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Make the messages added in v1.7.2-rc0~54^2~1 translatable. Some of\nthese could use the to be implemented plural support in the gettext\nlibrary.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n wt-status.c |   12 ++++++------\n 1 files changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/wt-status.c b/wt-status.c\nindex 1c1a575..fc377f3 100644\n--- a/wt-status.c\n+++ b/wt-status.c\n@@ -793,13 +793,13 @@ static void wt_shortstatus_print_tracking(struct wt_status *s)\n \tif (!prefixcmp(branch_name, \"refs/heads/\"))\n \t\tbranch_name += 11;\n \telse if (!strcmp(branch_name, \"HEAD\")) {\n-\t\tbranch_name = \"HEAD (no branch)\";\n+\t\tbranch_name = _(\"HEAD (no branch)\");\n \t\tbranch_color_local = color(WT_STATUS_NOBRANCH, s);\n \t}\n \n \tbranch = branch_get(s->branch + 11);\n \tif (s->is_initial)\n-\t\tcolor_fprintf(s->fp, header_color, \"Initial commit on \");\n+\t\tcolor_fprintf(s->fp, header_color, _(\"Initial commit on \"));\n \tif (!stat_tracking_info(branch, &num_ours, &num_theirs)) {\n \t\tcolor_fprintf_ln(s->fp, branch_color_local,\n \t\t\t\"%s\", branch_name);\n@@ -814,15 +814,15 @@ static void wt_shortstatus_print_tracking(struct wt_status *s)\n \n \tcolor_fprintf(s->fp, header_color, \" [\");\n \tif (!num_ours) {\n-\t\tcolor_fprintf(s->fp, header_color, \"behind \");\n+\t\tcolor_fprintf(s->fp, header_color, _(\"behind \"));\n \t\tcolor_fprintf(s->fp, branch_color_remote, \"%d\", num_theirs);\n \t} else if (!num_theirs) {\n-\t\tcolor_fprintf(s->fp, header_color, \"ahead \");\n+\t\tcolor_fprintf(s->fp, header_color, _(\"ahead \"));\n \t\tcolor_fprintf(s->fp, branch_color_local, \"%d\", num_ours);\n \t} else {\n-\t\tcolor_fprintf(s->fp, header_color, \"ahead \");\n+\t\tcolor_fprintf(s->fp, header_color, _(\"ahead \"));\n \t\tcolor_fprintf(s->fp, branch_color_local, \"%d\", num_ours);\n-\t\tcolor_fprintf(s->fp, header_color, \", behind \");\n+\t\tcolor_fprintf(s->fp, header_color, _(\", behind \"));\n \t\tcolor_fprintf(s->fp, branch_color_remote, \"%d\", num_theirs);\n \t}\n \n-- \n1.7.2.2.614.g1dc9\n"},{"id":"149703","messageId":"20100902195936.GA2531@burratino","threadId":"24943","inReplyTo":"1283456446-22577-7-git-send-email-avarab@gmail.com","subject":"Re: [PATCH 06/25] gettextize: git-fetch formatting messages","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-09-02T19:59:37Z","receivedAt":"2010-09-02T19:59:37Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"(+cc: some fetch ui authors, just as a heads up)\n\nÆvar Arnfjörð Bjarmason wrote:\n\n> --- a/builtin/fetch.c\n> +++ b/builtin/fetch.c\n> @@ -236,7 +236,7 @@ static int update_local_ref(struct ref *ref,\n>  \tif (!hashcmp(ref->old_sha1, ref->new_sha1)) {\n>  \t\tif (verbosity > 0)\n>  \t\t\tsprintf(display, \"= %-*s %-*s -> %s\", TRANSPORT_SUMMARY_WIDTH,\n> -\t\t\t\t\"[up to date]\", REFCOL_WIDTH, remote,\n> +\t\t\t\t_(\"[up to date]\"), REFCOL_WIDTH, remote,\n>  \t\t\t\tpretty_ref);\n\nLonger-term question: do people like to translate this kind of thing\n(with the arrows and so on) differently for right-to-left languages or\nis that considered overkill?\n\n> @@ -249,8 +249,8 @@ static int update_local_ref(struct ref *ref,\n>  \t\t * If this is the head, and it's not okay to update\n>  \t\t * the head, and the old value of the head isn't empty...\n>  \t\t */\n> -\t\tsprintf(display, \"! %-*s %-*s -> %s  (can't fetch in current branch)\",\n> -\t\t\tTRANSPORT_SUMMARY_WIDTH, \"[rejected]\", REFCOL_WIDTH, remote,\n> +\t\tsprintf(display, _(\"! %-*s %-*s -> %s  (can't fetch in current branch)\"),\n> +\t\t\tTRANSPORT_SUMMARY_WIDTH, _(\"[rejected]\"), REFCOL_WIDTH, remote,\n\nRegardless of the answer, we should probably be either consistently\ntranslating or not translating it within this patch.  e.g. for not\ntranslating (though I suspect translating is the better choice):\n\n\t\tsprintf(display, \"! %-*s %-*s -> %s  %s\",\n\t\t\tTRANSPORT_SUMMARY_WIDTH, \"[rejected]\", REFCOL_WIDTH, remote,\n\t\t\tpretty_ref, _(\"(can't fetch in current branch)\"));\n\n> @@ -260,8 +260,8 @@ static int update_local_ref(struct ref *ref,\n>  \t\tint r;\n>  \t\tr = s_update_ref(\"updating tag\", ref, 0);\n>  \t\tsprintf(display, \"%c %-*s %-*s -> %s%s\", r ? '!' : '-',\n> -\t\t\tTRANSPORT_SUMMARY_WIDTH, \"[tag update]\", REFCOL_WIDTH, remote,\n> -\t\t\tpretty_ref, r ? \"  (unable to update local ref)\" : \"\");\n> +\t\t\tTRANSPORT_SUMMARY_WIDTH, _(\"[tag update]\"), REFCOL_WIDTH, remote,\n> +\t\t\tpretty_ref, r ? _(\"  (unable to update local ref)\") : \"\");\n\nMaybe we could stick to \"%c %-*s %-*s -> %s%s\", to make consistent\ntranslation easier.\n"},{"id":"149705","messageId":"20100902200940.GB2531@burratino","threadId":"24943","inReplyTo":"1283456446-22577-11-git-send-email-avarab@gmail.com","subject":"Re: [PATCH 10/25] gettextize: git-merge basic messages","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-09-02T20:09:40Z","receivedAt":"2010-09-02T20:09:40Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Ævar Arnfjörð Bjarmason wrote:\n\n> --- a/builtin/merge.c\n> +++ b/builtin/merge.c\n> @@ -116,13 +116,13 @@ static struct strategy *get_strategy(const char *name)\n>  \t\texclude_cmds(&main_cmds, &not_strategies);\n>  \t}\n>  \tif (!is_in_cmdlist(&main_cmds, name) && !is_in_cmdlist(&other_cmds, name)) {\n> -\t\tfprintf(stderr, \"Could not find merge strategy '%s'.\\n\", name);\n> -\t\tfprintf(stderr, \"Available strategies are:\");\n> +\t\tfprintf(stderr, _(\"Could not find merge strategy '%s'.\\n\"), name);\n> +\t\tfprintf(stderr, _(\"Available strategies are:\"));\n\nAnother basic question (sorry for my ignorance): do translators prefer\nwhole paragraphs or line-by-line messages like this?  (Of course that\nis not a topic for this patch; I am just curious.)\n\n> @@ -513,7 +513,7 @@ static int git_merge_config(const char *k, const char *v, void *cb)\n>  \t\tint is_bool;\n>  \t\tshortlog_len = git_config_bool_or_int(k, v, &is_bool);\n>  \t\tif (!is_bool && shortlog_len < 0)\n> -\t\t\treturn error(\"%s: negative length %s???\", k, v);\n> +\t\t\treturn error(_(\"%s: negative length %s???\"), k, v);\n\nWhat branch are you translating?  I am hoping the omgwtfbbq??! message\ngets a chance to be tweaked before release.\n"},{"id":"149706","messageId":"AANLkTi=K5-BtqtXSkiJ=BGa7hs4AEp-DtJm2_bUhctyi@mail.gmail.com","threadId":"24943","inReplyTo":"20100902195936.GA2531@burratino","subject":"Re: [PATCH 06/25] gettextize: git-fetch formatting messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T20:13:19Z","receivedAt":"2010-09-02T20:13:19Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Thu, Sep 2, 2010 at 19:59, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> (+cc: some fetch ui authors, just as a heads up)\n>\n> Ævar Arnfjörð Bjarmason wrote:\n>\n>> --- a/builtin/fetch.c\n>> +++ b/builtin/fetch.c\n>> @@ -236,7 +236,7 @@ static int update_local_ref(struct ref *ref,\n>>       if (!hashcmp(ref->old_sha1, ref->new_sha1)) {\n>>               if (verbosity > 0)\n>>                       sprintf(display, \"= %-*s %-*s -> %s\", TRANSPORT_SUMMARY_WIDTH,\n>> -                             \"[up to date]\", REFCOL_WIDTH, remote,\n>> +                             _(\"[up to date]\"), REFCOL_WIDTH, remote,\n>>                               pretty_ref);\n>\n> Longer-term question: do people like to translate this kind of thing\n> (with the arrows and so on) differently for right-to-left languages or\n> is that considered overkill?\n\nThey do, on a RTL language the arrows are pointing the wrong way\nround. But for now I'm not trying to solve RTL issues (or indeed, word\norder or plural issues), just getting something basic going.\n\n>> @@ -249,8 +249,8 @@ static int update_local_ref(struct ref *ref,\n>>                * If this is the head, and it's not okay to update\n>>                * the head, and the old value of the head isn't empty...\n>>                */\n>> -             sprintf(display, \"! %-*s %-*s -> %s  (can't fetch in current branch)\",\n>> -                     TRANSPORT_SUMMARY_WIDTH, \"[rejected]\", REFCOL_WIDTH, remote,\n>> +             sprintf(display, _(\"! %-*s %-*s -> %s  (can't fetch in current branch)\"),\n>> +                     TRANSPORT_SUMMARY_WIDTH, _(\"[rejected]\"), REFCOL_WIDTH, remote,\n>\n> Regardless of the answer, we should probably be either consistently\n> translating or not translating it within this patch.  e.g. for not\n> translating (though I suspect translating is the better choice):\n\nI added a _() there because there's English language text in the\nmessage. I wouldn't have marked it if it was just \"! %-*s %-*s -> %s\".\n\nAnd I haven't split up \"! %-*s %-*s -> %s\" and \" (can't fetch in\ncurrent branch)\" because I'm trying to make minimal changes so that\nthis can get through in a timely manner, before I have a mountain of\nmerge conflicts on my hands.\n\nBut yeah, we want to fix that in the future.\n\n>                sprintf(display, \"! %-*s %-*s -> %s  %s\",\n>                        TRANSPORT_SUMMARY_WIDTH, \"[rejected]\", REFCOL_WIDTH, remote,\n>                        pretty_ref, _(\"(can't fetch in current branch)\"));\n>\n>> @@ -260,8 +260,8 @@ static int update_local_ref(struct ref *ref,\n>>               int r;\n>>               r = s_update_ref(\"updating tag\", ref, 0);\n>>               sprintf(display, \"%c %-*s %-*s -> %s%s\", r ? '!' : '-',\n>> -                     TRANSPORT_SUMMARY_WIDTH, \"[tag update]\", REFCOL_WIDTH, remote,\n>> -                     pretty_ref, r ? \"  (unable to update local ref)\" : \"\");\n>> +                     TRANSPORT_SUMMARY_WIDTH, _(\"[tag update]\"), REFCOL_WIDTH, remote,\n>> +                     pretty_ref, r ? _(\"  (unable to update local ref)\") : \"\");\n>\n> Maybe we could stick to \"%c %-*s %-*s -> %s%s\", to make consistent\n> translation easier.\n\nYeah, maybe. That's pretty much the only part of this series that\ndeals with issues like that. So it's probably worth a fixup.\n\n(I.e. ignore what I said earlier :)\n"},{"id":"149707","messageId":"20100902202537.GC2531@burratino","threadId":"24943","inReplyTo":"1283456446-22577-26-git-send-email-avarab@gmail.com","subject":"Re: [PATCH 25/25] gettextize: git-status shortstatus messages","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-09-02T20:25:37Z","receivedAt":"2010-09-02T20:25:37Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Ævar Arnfjörð Bjarmason wrote:\n> --- a/wt-status.c\n> +++ b/wt-status.c\n> @@ -814,15 +814,15 @@ static void wt_shortstatus_print_tracking(struct wt_status *s)\n[...]\n>  \t} else {\n> -\t\tcolor_fprintf(s->fp, header_color, \"ahead \");\n> +\t\tcolor_fprintf(s->fp, header_color, _(\"ahead \"));\n>  \t\tcolor_fprintf(s->fp, branch_color_local, \"%d\", num_ours);\n> -\t\tcolor_fprintf(s->fp, header_color, \", behind \");\n> +\t\tcolor_fprintf(s->fp, header_color, _(\", behind \"));\n>  \t\tcolor_fprintf(s->fp, branch_color_remote, \"%d\", num_theirs);\n\nWhat we make those translators suffer through. :)  Would it be possible to\n(eventually) introduce an interface vaguely like\n\n\tcolor_fprintf2(s->fp, \"%C(ahead )%C(%d)%C(, behind )%C( %d)\",\n\t\t\t\theader_color,\n\t\t\t\tbranch_color_local, num_ours,\n\t\t\t\theader_color,\n\t\t\t\tbranch_color_remote, num_theirs);\n\n?  I guess this would require using strbuf_expand instead of vsnprintf\nfor %d et al.\n"},{"id":"149708","messageId":"20100902202816.GA20362@sigill.intra.peff.net","threadId":"24943","inReplyTo":"20100902195936.GA2531@burratino","subject":"Re: [PATCH 06/25] gettextize: git-fetch formatting messages","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-09-02T20:28:16Z","receivedAt":"2010-09-02T20:28:16Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Sep 02, 2010 at 02:59:37PM -0500, Jonathan Nieder wrote:\n\n> (+cc: some fetch ui authors, just as a heads up)\n\nThanks. I think Nico actually did the fetch code, though, and I more or\nless copied it for push.\n\n> > @@ -249,8 +249,8 @@ static int update_local_ref(struct ref *ref,\n> >  \t\t * If this is the head, and it's not okay to update\n> >  \t\t * the head, and the old value of the head isn't empty...\n> >  \t\t */\n> > -\t\tsprintf(display, \"! %-*s %-*s -> %s  (can't fetch in current branch)\",\n> > -\t\t\tTRANSPORT_SUMMARY_WIDTH, \"[rejected]\", REFCOL_WIDTH, remote,\n> > +\t\tsprintf(display, _(\"! %-*s %-*s -> %s  (can't fetch in current branch)\"),\n> > +\t\t\tTRANSPORT_SUMMARY_WIDTH, _(\"[rejected]\"), REFCOL_WIDTH, remote,\n> \n> Regardless of the answer, we should probably be either consistently\n> translating or not translating it within this patch.  e.g. for not\n> translating (though I suspect translating is the better choice):\n> \n> \t\tsprintf(display, \"! %-*s %-*s -> %s  %s\",\n> \t\t\tTRANSPORT_SUMMARY_WIDTH, \"[rejected]\", REFCOL_WIDTH, remote,\n> \t\t\tpretty_ref, _(\"(can't fetch in current branch)\"));\n\nI think you can translate \"[rejected]\" here, too.\n\nHowever, do be aware of the --porcelain output for git-push. It was\ntacked on much later, and I fear it may use some of the same strings.\nSome of them are perhaps OK to translate (the human readable bit at the\nend, e.g.), but others maybe not. I haven't looked closely.\n\n-Peff\n"},{"id":"149710","messageId":"20100902202846.GD2531@burratino","threadId":"24943","inReplyTo":"1283456446-22577-25-git-send-email-avarab@gmail.com","subject":"Re: [PATCH 24/25] gettextize: git-status basic messages","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-09-02T20:28:46Z","receivedAt":"2010-09-02T20:28:46Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Ævar Arnfjörð Bjarmason wrote:\n\n> The only change is the removal of two messages that didn't really\n> belong: _(\"#\\t\") and _(\"%-20s%s\\n\").\n\nHmm, isn't it better to let translators tweak the output format to fit\ntheir constraints?  Especially 20 characters might not be enough to\nhold the \"deleted by them\" et al messages in some language.\n"},{"id":"149711","messageId":"AANLkTiksZykH4zDbdDReYYgJZk7gmZ_2g0v=9X_MP73p@mail.gmail.com","threadId":"24943","inReplyTo":"20100902200940.GB2531@burratino","subject":"Re: [PATCH 10/25] gettextize: git-merge basic messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T20:30:46Z","receivedAt":"2010-09-02T20:30:46Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Thu, Sep 2, 2010 at 20:09, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> Ævar Arnfjörð Bjarmason wrote:\n>\n>> --- a/builtin/merge.c\n>> +++ b/builtin/merge.c\n>> @@ -116,13 +116,13 @@ static struct strategy *get_strategy(const char *name)\n>>               exclude_cmds(&main_cmds, &not_strategies);\n>>       }\n>>       if (!is_in_cmdlist(&main_cmds, name) && !is_in_cmdlist(&other_cmds, name)) {\n>> -             fprintf(stderr, \"Could not find merge strategy '%s'.\\n\", name);\n>> -             fprintf(stderr, \"Available strategies are:\");\n>> +             fprintf(stderr, _(\"Could not find merge strategy '%s'.\\n\"), name);\n>> +             fprintf(stderr, _(\"Available strategies are:\"));\n>\n> Another basic question (sorry for my ignorance): do translators prefer\n> whole paragraphs or line-by-line messages like this?  (Of course that\n> is not a topic for this patch; I am just curious.)\n\n  _(\"We want whole paragraphs\"\n    \" for stuff like this where\"\n    \" the message actually is a\"\n    \" single paragraph of text\")\n\nHowever, in this case the message is a stand-alone error message\nfollowed by what's effectively new sentence (a header above\nstrategies) followed by a listing of strategies.\n\nThat sort of thing isn't a problem, because fortunately we only have\nleft-to-right languages, not bottom-to-top. At least it hasn't been an\nissue in MediaWiki (whose i18n I've worked on) which is translated to\nover 200 languages now.\n\n>> @@ -513,7 +513,7 @@ static int git_merge_config(const char *k, const char *v, void *cb)\n>>               int is_bool;\n>>               shortlog_len = git_config_bool_or_int(k, v, &is_bool);\n>>               if (!is_bool && shortlog_len < 0)\n>> -                     return error(\"%s: negative length %s???\", k, v);\n>> +                     return error(_(\"%s: negative length %s???\"), k, v);\n>\n> What branch are you translating?  I am hoping the omgwtfbbq??! message\n> gets a chance to be tweaked before release.\n\nIt's on top of pu, I've actually lost an up-to-date tip where gettext\nwas applied to a branch below that, and haven't worked my way back.\n\nMaybe this'll be a problem for this series. Here's the builtin/*.c\nchanges between next and pu:\n\n     builtin/checkout.c        |   14 ++-\n     builtin/fetch.c           |   21 ++++-\n     builtin/fmt-merge-msg.c   |   60 ++++++-----\n     builtin/init-db.c         |   56 +++++-----\n     builtin/log.c             |    7 +-\n     builtin/mailinfo.c        |   10 ++-\n     builtin/merge-recursive.c |   15 +---\n     builtin/merge.c           |   62 +++++------\n     builtin/notes.c           |   14 ++-\n     builtin/remote-ext.c      |  257\n+++++++++++++++++++++++++++++++++++++++++++++\n     builtin/remote-fd.c       |   83 +++++++++++++++\n     builtin/skew.c            |   50 +++++++++\n     builtin/tag.c             |    2 +-\n     builtin/version.c         |    7 ++\n     14 files changed, 537 insertions(+), 121 deletions(-)\n\nSome of these affect this series. But I was hoping that this would\nmake it into pu and after next gets released Any Day Now most of those\nother tips in pu would be folded into next along with gettext, or at\nleast the merge conflicts wouldn't be too painful.\n"},{"id":"149712","messageId":"AANLkTikALp-JtWSnvG2qvQ3h06AZpXg1DOnMs9Pp6EoO@mail.gmail.com","threadId":"24943","inReplyTo":"20100902202537.GC2531@burratino","subject":"Re: [PATCH 25/25] gettextize: git-status shortstatus messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T20:34:45Z","receivedAt":"2010-09-02T20:34:45Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Thu, Sep 2, 2010 at 20:25, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> Ævar Arnfjörð Bjarmason wrote:\n>> --- a/wt-status.c\n>> +++ b/wt-status.c\n>> @@ -814,15 +814,15 @@ static void wt_shortstatus_print_tracking(struct wt_status *s)\n> [...]\n>>       } else {\n>> -             color_fprintf(s->fp, header_color, \"ahead \");\n>> +             color_fprintf(s->fp, header_color, _(\"ahead \"));\n>>               color_fprintf(s->fp, branch_color_local, \"%d\", num_ours);\n>> -             color_fprintf(s->fp, header_color, \", behind \");\n>> +             color_fprintf(s->fp, header_color, _(\", behind \"));\n>>               color_fprintf(s->fp, branch_color_remote, \"%d\", num_theirs);\n>\n> What we make those translators suffer through. :)  Would it be possible to\n> (eventually) introduce an interface vaguely like\n>\n>        color_fprintf2(s->fp, \"%C(ahead )%C(%d)%C(, behind )%C( %d)\",\n>                                header_color,\n>                                branch_color_local, num_ours,\n>                                header_color,\n>                                branch_color_remote, num_theirs);\n>\n> ?  I guess this would require using strbuf_expand instead of vsnprintf\n> for %d et al.\n\nYeah, that's my eventual master plan. This color_printf() interface\nreally needs something like that so we can reasonably translate\ngit-status et al.\n\nAside from gettext that'd make using color_fprintf() much\nnicer. Assembling messages like this bit-by-bit is really hard to\nfollow.\n"},{"id":"149713","messageId":"20100902203711.GE2531@burratino","threadId":"24943","inReplyTo":"AANLkTiksZykH4zDbdDReYYgJZk7gmZ_2g0v=9X_MP73p@mail.gmail.com","subject":"Re: [PATCH 10/25] gettextize: git-merge basic messages","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-09-02T20:37:11Z","receivedAt":"2010-09-02T20:37:11Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Ævar Arnfjörð Bjarmason wrote:\n\n> It's on top of pu,\n[...]\n> But I was hoping that this would\n> make it into pu and after next gets released Any Day Now most of those\n> other tips in pu would be folded into next along with gettext, or at\n> least the merge conflicts wouldn't be too painful.\n\nHmm.  That really constrains people trying to merge this series.\n\nAs SubmittingPatches explains:\n\n - In the exceptional case that a new feature depends on several topics\n   not in 'master', start working on 'next' or 'pu' privately and send\n   out patches for discussion. Before the final merge, you may have to\n   wait until some of the dependent topics graduate to 'master', and\n   rebase your work.\n\nso this is fine for discussion, but for merging, having to pull in\n_all_ topics from pu (or all topics from next for that matter) for\nthe patches to apply really is a problem.\n\nBoth next and pu get rewound from time to time.  They are not meant\nto be a stable basis for patches.\n\nAlso worth mentioning is that topics in \"next\" are not guaranteed to\nbe included in the next release.  The \"next\" branch has content\nmatching the \"jch\" branch which I think has a better name: it is\njust the version of git that Junio uses for ordinary tasks (and\nhence topics in it cannot be completely broken for long).\n"},{"id":"149714","messageId":"AANLkTin1ew1nXLwEoyMqMRkZpr6xq2rebRDmVVgA2BLr@mail.gmail.com","threadId":"24943","inReplyTo":"20100902202846.GD2531@burratino","subject":"Re: [PATCH 24/25] gettextize: git-status basic messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T20:41:10Z","receivedAt":"2010-09-02T20:41:10Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Thu, Sep 2, 2010 at 20:28, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> Ævar Arnfjörð Bjarmason wrote:\n>\n>> The only change is the removal of two messages that didn't really\n>> belong: _(\"#\\t\") and _(\"%-20s%s\\n\").\n>\n> Hmm, isn't it better to let translators tweak the output format to fit\n> their constraints?  Especially 20 characters might not be enough to\n> hold the \"deleted by them\" et al messages in some language.\n\nMaybe, but my current mode of operation is \"do it really simple and\nstupid now, solicit complaints later\".\n\nEventually I'd rather just eliminate the need for tweaking stuff like\nthat by having some va_args function that spews out \"16\" for that\ngiven a bunch of arguments, i.e. (pseudocode):\n\n    int width = gimme_longest(\n        _(\"both deleted:\"),\n        _(\"added by us:\"),\n        _(\"deleted by them:\"),\n        _(\"added by them:\"),\n        _(\"deleted by us:\"),\n        _(\"both added:\"),\n        _(\"both modified:\")\n    );\n\n    char *fmt = concat(\"%-\", width + 4, \"s%s\\n\");\n    printf(fmt, ...)\n"},{"id":"149718","messageId":"20100902204721.GF2531@burratino","threadId":"24943","inReplyTo":"AANLkTin1ew1nXLwEoyMqMRkZpr6xq2rebRDmVVgA2BLr@mail.gmail.com","subject":"Re: [PATCH 24/25] gettextize: git-status basic messages","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-09-02T20:47:21Z","receivedAt":"2010-09-02T20:47:21Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Ævar Arnfjörð Bjarmason wrote:\n\n> Maybe, but my current mode of operation is \"do it really simple and\n> stupid now, solicit complaints later\".\n> \n> Eventually I'd rather just eliminate the need for tweaking stuff like\n> that by having some va_args function that spews out \"16\" for that\n> given a bunch of arguments, i.e. (pseudocode):\n> \n>     int width = gimme_longest(\n>         _(\"both deleted:\"),\n>         _(\"added by us:\"),\n>         _(\"deleted by them:\"),\n>         _(\"added by them:\"),\n>         _(\"deleted by us:\"),\n>         _(\"both added:\"),\n>         _(\"both modified:\")\n>     );\n> \n>     char *fmt = concat(\"%-\", width + 4, \"s%s\\n\");\n>     printf(fmt, ...)\n\nUsing %-*s%s like that does sound nice, but then I have to wonder\nabout the 4.  Maybe the space-constrained translator would want to\ndecrease the margin to 2.\n\nWhich is why \"when the output is intended for humans, let translators\ndo whatever they want\" seems to me like the simplest principle to\nfollow.  But you're right that it doesn't matter much and we can\nalways wait for bug reports.\n"},{"id":"149717","messageId":"AANLkTinZnaJDfhpec2UM-qVkQDc5Opif-GnUfnzP8f8Y@mail.gmail.com","threadId":"24943","inReplyTo":"20100902202816.GA20362@sigill.intra.peff.net","subject":"Re: [PATCH 06/25] gettextize: git-fetch formatting messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T20:48:47Z","receivedAt":"2010-09-02T20:48:47Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Thu, Sep 2, 2010 at 20:28, Jeff King <peff@peff.net> wrote:\n> On Thu, Sep 02, 2010 at 02:59:37PM -0500, Jonathan Nieder wrote:\n>\n>> (+cc: some fetch ui authors, just as a heads up)\n>\n> Thanks. I think Nico actually did the fetch code, though, and I more or\n> less copied it for push.\n>\n>> > @@ -249,8 +249,8 @@ static int update_local_ref(struct ref *ref,\n>> >              * If this is the head, and it's not okay to update\n>> >              * the head, and the old value of the head isn't empty...\n>> >              */\n>> > -           sprintf(display, \"! %-*s %-*s -> %s  (can't fetch in current branch)\",\n>> > -                   TRANSPORT_SUMMARY_WIDTH, \"[rejected]\", REFCOL_WIDTH, remote,\n>> > +           sprintf(display, _(\"! %-*s %-*s -> %s  (can't fetch in current branch)\"),\n>> > +                   TRANSPORT_SUMMARY_WIDTH, _(\"[rejected]\"), REFCOL_WIDTH, remote,\n>>\n>> Regardless of the answer, we should probably be either consistently\n>> translating or not translating it within this patch.  e.g. for not\n>> translating (though I suspect translating is the better choice):\n>>\n>>               sprintf(display, \"! %-*s %-*s -> %s  %s\",\n>>                       TRANSPORT_SUMMARY_WIDTH, \"[rejected]\", REFCOL_WIDTH, remote,\n>>                       pretty_ref, _(\"(can't fetch in current branch)\"));\n>\n> I think you can translate \"[rejected]\" here, too.\n\nThanks. I missed that one.\n\n> However, do be aware of the --porcelain output for git-push. It was\n> tacked on much later, and I fear it may use some of the same strings.\n> Some of them are perhaps OK to translate (the human readable bit at the\n> end, e.g.), but others maybe not. I haven't looked closely.\n\nThere's probably more potential issues like that because I didn't know\nthe code well, but hopefully not too many.\n"},{"id":"149719","messageId":"AANLkTi=ZQAjA9SN1A3WDr-L2rFA6v-XH0mZAkhuUgdAg@mail.gmail.com","threadId":"24943","inReplyTo":"20100902203711.GE2531@burratino","subject":"Re: [PATCH 10/25] gettextize: git-merge basic messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T20:54:52Z","receivedAt":"2010-09-02T20:54:52Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Thu, Sep 2, 2010 at 20:37, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> Ævar Arnfjörð Bjarmason wrote:\n>\n>> It's on top of pu,\n> [...]\n>> But I was hoping that this would\n>> make it into pu and after next gets released Any Day Now most of those\n>> other tips in pu would be folded into next along with gettext, or at\n>> least the merge conflicts wouldn't be too painful.\n>\n> Hmm.  That really constrains people trying to merge this series.\n>\n> As SubmittingPatches explains:\n>\n>  - In the exceptional case that a new feature depends on several topics\n>   not in 'master', start working on 'next' or 'pu' privately and send\n>   out patches for discussion. Before the final merge, you may have to\n>   wait until some of the dependent topics graduate to 'master', and\n>   rebase your work.\n>\n> so this is fine for discussion, but for merging, having to pull in\n> _all_ topics from pu (or all topics from next for that matter) for\n> the patches to apply really is a problem.\n>\n> Both next and pu get rewound from time to time.  They are not meant\n> to be a stable basis for patches.\n>\n> Also worth mentioning is that topics in \"next\" are not guaranteed to\n> be included in the next release.  The \"next\" branch has content\n> matching the \"jch\" branch which I think has a better name: it is\n> just the version of git that Junio uses for ordinary tasks (and\n> hence topics in it cannot be completely broken for long).\n\nYeah, I was just hoping I could get away with it :)\n\nHaving whatever Junio is using these days as ab/i18n would be\nconvenient (since I've lost it), although I suppose I could start at\nmaster and cherry-pick my way forward.\n\nI'll also wait for comment from Junio about what he wants done with it\nand what his plans are for it. But I can rebase it if need be.\n"},{"id":"149722","messageId":"20100902211339.GA2801@burratino","threadId":"24943","inReplyTo":"AANLkTi=ZQAjA9SN1A3WDr-L2rFA6v-XH0mZAkhuUgdAg@mail.gmail.com","subject":"Re: [PATCH 10/25] gettextize: git-merge basic messages","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-09-02T21:13:39Z","receivedAt":"2010-09-02T21:13:39Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Ævar Arnfjörð Bjarmason wrote:\n\n> Yeah, I was just hoping I could get away with it :)\n\nTo be clear, I think you made a reasonable choice at this stage of\ndevelopment.\n\nAside: maybe for translation (though not for gettextizing) the idea of\npatches that get applied to the development tree is more trouble than\nit's worth.  GNU sed and some similar projects do not include\ntranslations in the development tree but fetch them from\ntranslationproject.org as part of the \"bootstrap\" procedure when\nbuilding a source tarball or binaries.\n\nSee autoboot in git://git.sv.gnu.org/sed.git for example.\n"},{"id":"149731","messageId":"AANLkTinvvZ9eVxQXafYBDfSe8ay11mFz4s1=mDozbs14@mail.gmail.com","threadId":"24943","inReplyTo":"20100902211339.GA2801@burratino","subject":"Re: [PATCH 10/25] gettextize: git-merge basic messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-02T22:45:22Z","receivedAt":"2010-09-02T22:45:22Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Thu, Sep 2, 2010 at 21:13, Jonathan Nieder <jrnieder@gmail.com> wrote:\n\n> Aside: maybe for translation (though not for gettextizing) the idea of\n> patches that get applied to the development tree is more trouble than\n> it's worth.  GNU sed and some similar projects do not include\n> translations in the development tree but fetch them from\n> translationproject.org as part of the \"bootstrap\" procedure when\n> building a source tarball or binaries.\n>\n> See autoboot in git://git.sv.gnu.org/sed.git for example.\n\nI'd prefer to be able to submit translations directly to git.git, and\nbuild a localized git with \"make\" and no network access. Most programs\nthat use gettext do this, sed seems to be an exception, and actually\nI've never seen anyone do it like that. Some maintain their\ntranslations in some web interface, but I haven't seen a project that\ndoesn't commit them *at all*.\n\nI can't see why translations in the tree (in po/) should be any\ntrouble at all for us. What sort of issues do you see that the sed.git\nmodel might solve?\n"},{"id":"149734","messageId":"20100902230410.GA4850@burratino","threadId":"24943","inReplyTo":"AANLkTinvvZ9eVxQXafYBDfSe8ay11mFz4s1=mDozbs14@mail.gmail.com","subject":"Re: [PATCH 10/25] gettextize: git-merge basic messages","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-09-02T23:04:10Z","receivedAt":"2010-09-02T23:04:10Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Ævar Arnfjörð Bjarmason wrote:\n\n> I can't see why translations in the tree (in po/) should be any\n> trouble at all for us. What sort of issues do you see that the sed.git\n> model might solve?\n\nOnly two: log noise and the problem of what to base patches on.\n\nAs you noticed while gettextizing (which is pretty much a one-time\nthing), it is not much fun to do work on strings that aren't even\ngoing to be used.  So translators might want to work against \"next\",\nor at least \"master\".  How do the translations get back to \"maint\"?\nSomeone has to backport them.  What happens when we merge back to\n\"master\"?\n\nNow multiply that by the number of translations.  Making messages\nmerge up nicely with git tools as they drift from topic to topic if\ntranslators want to keep both \"maint\" and \"master\" translated would\nrequire at least a nice custom merge driver.  \n\nAs we noticed before, the .po files are partially automatically\ngenerated anyway.  Merging them as text makes about as much sense\nas merging Word-generated .rtf files as text.  To avoid wasting time,\none wants to be able to work with their _content_.\n\nWhat is that content?\n\nIt is a set of key/value pairs: for each string that appears in\nthe codebase (maybe together with disambiguating translators' notes),\nwhat the translation is for it.  Merging that between branches of the\ncode base is utterly trivial: take the union.  Actually \"merging\" as\nan operation here does not make sense.  It is not tied to the\ndevelopment history at all!\n\nImagine v6.0.0 of git has message \"foo\".  v6.0.1 changes it to \"bar\"\nbecause \"foo\" is not actually true yet, v6.1.0 changes it back to\n\"foo\".  Imagine a linear development history.  Do we want translation\ndiffs like this:\n\n commit v6.0.0\n\n +\"foo\" is \"hello\" in language X\n\n commit v6.0.1\n\n -\"foo\" is \"hello\" in language X\n +\"bar\" is \"goodbye\" in language X\n\n commit v6.1\n\n -\"bar\" is \"goodbye\" in language X\n +\"foo\" is \"hello\" in language X\n\n?  But what really happened is this:\n\n - add foo:hello to translation database\n - add bar:goodbye to translation database\n\nI have been thinking about how to write a merge driver for .po files\n(and avoid the tedious merge problems that e.g. the dpkg project runs\ninto periodically) but the idea of avoiding that altogether is very\nappealing to me.\n"},{"id":"149758","messageId":"AANLkTimBbSz5TF5CBa0us5oLQ-t=S9HNdBSVifUUSiqt@mail.gmail.com","threadId":"24943","inReplyTo":"20100902230410.GA4850@burratino","subject":"Re: [PATCH 10/25] gettextize: git-merge basic messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-03T12:13:54Z","receivedAt":"2010-09-03T12:13:54Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Thu, Sep 2, 2010 at 23:04, Jonathan Nieder <jrnieder@gmail.com> wrote:\n>> I can't see why translations in the tree (in po/) should be any\n>> trouble at all for us. What sort of issues do you see that the sed.git\n>> model might solve?\n>\n> Only two: log noise and the problem of what to base patches on.\n>\n> As you noticed while gettextizing (which is pretty much a one-time\n> thing), it is not much fun to do work on strings that aren't even\n> going to be used.  So translators might want to work against \"next\",\n> or at least \"master\".  How do the translations get back to \"maint\"?\n> Someone has to backport them.  What happens when we merge back to\n> \"master\"?\n>\n> Now multiply that by the number of translations.  Making messages\n> merge up nicely with git tools as they drift from topic to topic if\n> translators want to keep both \"maint\" and \"master\" translated would\n> require at least a nice custom merge driver.\n>\n> As we noticed before, the .po files are partially automatically\n> generated anyway.  Merging them as text makes about as much sense\n> as merging Word-generated .rtf files as text.  To avoid wasting time,\n> one wants to be able to work with their _content_.\n>\n> What is that content?\n>\n> It is a set of key/value pairs: for each string that appears in\n> the codebase (maybe together with disambiguating translators' notes),\n> what the translation is for it.  Merging that between branches of the\n> code base is utterly trivial: take the union.  Actually \"merging\" as\n> an operation here does not make sense.  It is not tied to the\n> development history at all!\n>\n> Imagine v6.0.0 of git has message \"foo\".  v6.0.1 changes it to \"bar\"\n> because \"foo\" is not actually true yet, v6.1.0 changes it back to\n> \"foo\".  Imagine a linear development history.  Do we want translation\n> diffs like this:\n>\n>  commit v6.0.0\n>\n>  +\"foo\" is \"hello\" in language X\n>\n>  commit v6.0.1\n>\n>  -\"foo\" is \"hello\" in language X\n>  +\"bar\" is \"goodbye\" in language X\n>\n>  commit v6.1\n>\n>  -\"bar\" is \"goodbye\" in language X\n>  +\"foo\" is \"hello\" in language X\n>\n> ?  But what really happened is this:\n>\n>  - add foo:hello to translation database\n>  - add bar:goodbye to translation database\n>\n> I have been thinking about how to write a merge driver for .po files\n> (and avoid the tedious merge problems that e.g. the dpkg project runs\n> into periodically) but the idea of avoiding that altogether is very\n> appealing to me.\n\nThose issues might be a bit hard, but I still can't really see how\nmanaging these files outside of git.git would make things easier.\n\nYou'd still need to do the merging of e.g. master -> maint\ntranslations, you'd just have to do them outside of git.git, so you\nwouldn't be able to do that using the normal merge facilities.\n\nMaybe we can have a custom msgmerge merge driver (someone posted one\nin #git-devel, but I've misplaced it), or maybe we should just use\nmsgmerge with --no-location.\n\nBut I'd like to coordinate things on this mailing list, and in\ngit.git, without some external service being mandatory.\n"},{"id":"149759","messageId":"AANLkTi=5MrU-JyeQ3UVNbVwzn-8FbstUXafgcQaLWXDB@mail.gmail.com","threadId":"24943","inReplyTo":"20100902203711.GE2531@burratino","subject":"Re: [PATCH 10/25] gettextize: git-merge basic messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-03T13:01:02Z","receivedAt":"2010-09-03T13:01:02Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Thu, Sep 2, 2010 at 20:37, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> Ævar Arnfjörð Bjarmason wrote:\n>\n>> It's on top of pu,\n> [...]\n>> But I was hoping that this would\n>> make it into pu and after next gets released Any Day Now most of those\n>> other tips in pu would be folded into next along with gettext, or at\n>> least the merge conflicts wouldn't be too painful.\n>\n> Hmm.  That really constrains people trying to merge this series.\n>\n> As SubmittingPatches explains:\n>\n>  - In the exceptional case that a new feature depends on several topics\n>   not in 'master', start working on 'next' or 'pu' privately and send\n>   out patches for discussion. Before the final merge, you may have to\n>   wait until some of the dependent topics graduate to 'master', and\n>   rebase your work.\n>\n> so this is fine for discussion, but for merging, having to pull in\n> _all_ topics from pu (or all topics from next for that matter) for\n> the patches to apply really is a problem.\n>\n> Both next and pu get rewound from time to time.  They are not meant\n> to be a stable basis for patches.\n\nJunio: I've started work to rebase this whole thing on master, when\nI'm done the result should be able to replace the existing ab/i18n\nseries you have, i.e. it won't have the Conflicts your \"Merge branch\n'ab/i18n'\" commits have.\n\nAlso, I'm going to add a special POISON mode to Git so that we can\ncheck if changing these messages breaks anything in the test suite,\nbasically:\n\n    make GETTEXT_POISON=YesPlease\n\nWhich enables this in gettext.h:\n\n    #ifdef GETTEXT_POISON\n    #define _(s) \"GETTEXT POISON\"\n    #else\n    #define _(s) gettext(s)\n    #endif\n\nWhich in my preliminary tests makes a bunch of tests fail, most of it\nis stuff like this in t0001-init.sh:\n\n    #               grep \"Initialized empty\" again/out1 &&\n    #               grep \"Reinitialized existing\" again/out2 &&\n    #               >again/empty &&\n    #               test_cmp again/empty again/err1 &&\n    #               test_cmp again/empty again/err2\n\nI.e. just something using the porcelain messages that are OK to\ntranslate. I'm going to add a new NO_GETTEXT_POISON test prereq to all\nof these, anything that remains would then indicate plumbing messages\nthat shouldn't be translated.\n\nUnfortunately we *don't* have complete test coverage so these sort of\ntests may miss something. But it should make this series a lot more\nrobust.\n"},{"id":"149768","messageId":"20100903175142.GA2341@burratino","threadId":"24943","inReplyTo":"AANLkTimBbSz5TF5CBa0us5oLQ-t=S9HNdBSVifUUSiqt@mail.gmail.com","subject":"Re: [PATCH 10/25] gettextize: git-merge basic messages","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-09-03T17:51:42Z","receivedAt":"2010-09-03T17:51:42Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Ævar Arnfjörð Bjarmason wrote:\n\n> Those issues might be a bit hard, but I still can't really see how\n> managing these files outside of git.git would make things easier.\n\nThe translationproject.org thing was a red herring.  As you noticed,\nthe relevant thing is \"outside of git.git\".\n\nSo imagine there is a git-translations.git project, perhaps.  My\nonly point was that versioning of translations and versioning of\ncode can beneficially (in my opinion) be decoupled: with time,\nthe translations for even _old_ versions of git improve, too.\n\n> maybe we should just use\n> msgmerge with --no-location.\n\nThat would partially alleviate my concerns, and I think we might be\nable to get the --add-location output back in actual checkouts with\na \"smudge\" filter.\n\nBut still there is noise from reordering messages, adding them and\nremoving them, and so on.  It just never seemed like a great fit for\nthe usual version control model to me.\n\n> But I'd like to coordinate things on this mailing list\n[...]\n> without some external service being mandatory.\n\nNo objection here. :)\n\nOf course, what is convenient for translators and maintainers (i.e.,\nnot me) takes precedence anyway; I am just throwing out ideas.\n\nThanks for your thoughtfulness.\n"},{"id":"149769","messageId":"AANLkTimCZwLg6KvQKc5bhTkLRP_FAYd3TsJbf-S02ug6@mail.gmail.com","threadId":"24943","inReplyTo":"20100903175142.GA2341@burratino","subject":"Re: [PATCH 10/25] gettextize: git-merge basic messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-03T18:06:50Z","receivedAt":"2010-09-03T18:06:50Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Fri, Sep 3, 2010 at 17:51, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> Ævar Arnfjörð Bjarmason wrote:\n>\n>> Those issues might be a bit hard, but I still can't really see how\n>> managing these files outside of git.git would make things easier.\n>\n> The translationproject.org thing was a red herring.  As you noticed,\n> the relevant thing is \"outside of git.git\".\n>\n> So imagine there is a git-translations.git project, perhaps.  My\n> only point was that versioning of translations and versioning of\n> code can beneficially (in my opinion) be decoupled: with time,\n> the translations for even _old_ versions of git improve, too.\n>\n>> maybe we should just use\n>> msgmerge with --no-location.\n>\n> That would partially alleviate my concerns, and I think we might be\n> able to get the --add-location output back in actual checkouts with\n> a \"smudge\" filter.\n\nAfter looking at this all closer I found that these line messages\nreally aren't that important to gettext's operation. So I'm in the\nprocess of removing them from the ab/i18n series.\n\nI documented the new process:\nhttp://github.com/avar/git/raw/ab/i18n/po/README\n\n>> But I'd like to coordinate things on this mailing list\n> [...]\n>> without some external service being mandatory.\n>\n> No objection here. :)\n>\n> Of course, what is convenient for translators and maintainers (i.e.,\n> not me) takes precedence anyway; I am just throwing out ideas.\n>\n> Thanks for your thoughtfulness.\n\nSure, thanks for consistently commenting on all of this. It's great to\nget feedback like this.\n"},{"id":"150731","messageId":"alpine.DEB.2.00.1009151216000.11791@ds9.cixit.se","threadId":"24943","inReplyTo":"1283456446-22577-20-git-send-email-avarab@gmail.com","subject":"Re: [PATCH 19/25] gettextize: git-reset reset_type_names messages","fromName":"Peter Krefting","fromEmail":"peter@softwolves.pp.se","sentAt":"2010-09-15T11:17:56Z","receivedAt":"2010-09-15T11:17:56Z","isPatch":true,"sender":{"key":"peter@softwolves.pp.se","avatar":"https://avatars.githubusercontent.com/u/990764?v=4"},"body":"Ævar Arnfjörð Bjarmason:\n\n> Make the messages in git-reset that use the reset_type_names static\n> array to be translatable by marking the array items with N_() and\n> using _() later.\n\nThis is untranslatable for several languages. For Swedish it would suffice \nto move the \" reset\" part into the array:\n\n> -\t\"mixed\", \"soft\", \"hard\", \"merge\", \"keep\", NULL\n> +\tN_(\"mixed\"), N_(\"soft\"), N_(\"hard\"), N_(\"merge\"), N_(\"keep\"), NULL\n> };\n\nchanging it to\n\nN_(\"mixed reset\"), N_(\"soft reset\"), ...\n\nand changing this\n\n> -\t\tdie(\"Cannot do a %s reset in the middle of a merge.\",\n> -\t\t    reset_type_names[reset_type]);\n> +\t\tdie(_(\"Cannot do a %s reset in the middle of a merge.\"),\n> +\t\t    _(reset_type_names[reset_type]));\n\ninto \"... do a %s in ..\", with similar changes for the others.\n\n-- \n\\\\// Peter - http://www.softwolves.pp.se/\n"},{"id":"150739","messageId":"201009151750.00882.trast@student.ethz.ch","threadId":"24943","inReplyTo":"alpine.DEB.2.00.1009151216000.11791@ds9.cixit.se","subject":"Re: [PATCH 19/25] gettextize: git-reset reset_type_names messages","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2010-09-15T15:50:00Z","receivedAt":"2010-09-15T15:50:00Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Peter Krefting wrote:\n> This is untranslatable for several languages. For Swedish it would suffice \n> to move the \" reset\" part into the array:\n> \n> > -\t\"mixed\", \"soft\", \"hard\", \"merge\", \"keep\", NULL\n> > +\tN_(\"mixed\"), N_(\"soft\"), N_(\"hard\"), N_(\"merge\"), N_(\"keep\"), NULL\n> > };\n> \n> changing it to\n> \n> N_(\"mixed reset\"), N_(\"soft reset\"), ...\n> \n> and changing this\n> \n> > -\t\tdie(\"Cannot do a %s reset in the middle of a merge.\",\n> > -\t\t    reset_type_names[reset_type]);\n> > +\t\tdie(_(\"Cannot do a %s reset in the middle of a merge.\"),\n> > +\t\t    _(reset_type_names[reset_type]));\n> \n> into \"... do a %s in ..\", with similar changes for the others.\n\nThis would still break even in English(!) if we ever introduced an\narduous or extreme reset...\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"}]}