{"thread":{"id":"30368","subject":"[PATCH 0/5] i18n: TRANSLATORS commends and LEGO--","startedAt":"2012-04-30T15:33:09Z","lastAt":"2012-04-30T17:54:52Z","messageCount":12,"participants":["Ævar Arnfjörð Bjarmason","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"190303","messageId":"1335799995-7667-1-git-send-email-avarab@gmail.com","threadId":"30368","inReplyTo":null,"subject":"[PATCH 0/5] i18n: TRANSLATORS commends and LEGO--","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2012-04-30T15:33:09Z","receivedAt":"2012-04-30T15:33:09Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"This series fixes/adds some TRANSLATORS commends and removes lego from\nsome branch/commit messages.\n\nÆvar Arnfjörð Bjarmason (5):\n  diff: move TRANSLATORS comments so they're picked up\n  i18n: Add more TRANSLATORS comments\n  git-branch: remove lego in i18n messages\n  git-commit: remove lego in i18n messages\n  git-commit: remove lego in i18n messages\n\n advice.c         |    3 +++\n builtin/branch.c |   24 ++++++++++++--------\n builtin/commit.c |   66 ++++++++++++++++++++++++------------------------------\n bundle.c         |    5 +++++\n commit.c         |    4 ++++\n connected.c      |    3 +++\n diff.c           |   17 +++++++-------\n remote.c         |   10 +++++++++\n sequencer.c      |   10 +++++++++\n 9 files changed, 88 insertions(+), 54 deletions(-)\n\n-- \n1.7.10.546.gbaa1a.dirty\n"},{"id":"190304","messageId":"1335799995-7667-2-git-send-email-avarab@gmail.com","threadId":"30368","inReplyTo":"1335799995-7667-1-git-send-email-avarab@gmail.com","subject":"[PATCH 1/5] diff: move TRANSLATORS comments so they're picked up","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2012-04-30T15:33:10Z","receivedAt":"2012-04-30T15:33:10Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"These TRANSLATORS comments weren't actually picked up by xgettext, the\ncomment needs to be right before the Q_() function call, evidently it\nisn't picked up if that call is wrapped in another function call.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n diff.c |   16 ++++++++--------\n 1 file changed, 8 insertions(+), 8 deletions(-)\n\ndiff --git a/diff.c b/diff.c\nindex 7da16c9..5d06375 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -1413,22 +1413,22 @@ int print_stat_summary(FILE *fp, int files, int insertions, int deletions)\n \t * but nothing about added/removed lines? Is this a bug in Git?\").\n \t */\n \tif (insertions || deletions == 0) {\n-\t\t/*\n-\t\t * TRANSLATORS: \"+\" in (+) is a line addition marker;\n-\t\t * do not translate it.\n-\t\t */\n \t\tstrbuf_addf(&sb,\n+\t\t\t    /*\n+\t\t\t     * TRANSLATORS: \"+\" in (+) is a line addition marker;\n+\t\t\t     * do not translate it.\n+\t\t\t     */\n \t\t\t    Q_(\", %d insertion(+)\", \", %d insertions(+)\",\n \t\t\t       insertions),\n \t\t\t    insertions);\n \t}\n \n \tif (deletions || insertions == 0) {\n-\t\t/*\n-\t\t * TRANSLATORS: \"-\" in (-) is a line removal marker;\n-\t\t * do not translate it.\n-\t\t */\n \t\tstrbuf_addf(&sb,\n+\t\t\t    /*\n+\t\t\t     * TRANSLATORS: \"-\" in (-) is a line removal marker;\n+\t\t\t     * do not translate it.\n+\t\t\t     */\n \t\t\t    Q_(\", %d deletion(-)\", \", %d deletions(-)\",\n \t\t\t       deletions),\n \t\t\t    deletions);\n-- \n1.7.10.546.gbaa1a.dirty\n"},{"id":"190308","messageId":"1335799995-7667-3-git-send-email-avarab@gmail.com","threadId":"30368","inReplyTo":"1335799995-7667-1-git-send-email-avarab@gmail.com","subject":"[PATCH 2/5] i18n: Add more TRANSLATORS comments","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2012-04-30T15:33:11Z","receivedAt":"2012-04-30T15:33:11Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"I took a pass through git.pot and added comments to various messages\nthat could use one, comments still need to be added to a lot of other\nthings, but you have to start somewhere.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n advice.c    |    3 +++\n bundle.c    |    5 +++++\n commit.c    |    4 ++++\n connected.c |    3 +++\n diff.c      |    1 +\n remote.c    |   10 ++++++++++\n sequencer.c |   10 ++++++++++\n 7 files changed, 36 insertions(+)\n\ndiff --git a/advice.c b/advice.c\nindex a492eea..5944abb 100644\n--- a/advice.c\n+++ b/advice.c\n@@ -37,6 +37,9 @@ void advise(const char *advice, ...)\n \n \tfor (cp = buf.buf; *cp; cp = np) {\n \t\tnp = strchrnul(cp, '\\n');\n+\t\t/* TRANSLATORS: This will be used to prefix each line of an\n+\t\t * advice message, with the format string being the line\n+\t\t */\n \t\tfprintf(stderr,\t_(\"hint: %.*s\\n\"), (int)(np - cp), cp);\n \t\tif (*np)\n \t\t\tnp++;\ndiff --git a/bundle.c b/bundle.c\nindex 8d31b98..f24999e 100644\n--- a/bundle.c\n+++ b/bundle.c\n@@ -86,6 +86,7 @@ int read_bundle_header(const char *path, struct bundle_header *header)\n \tint fd = open(path, O_RDONLY);\n \n \tif (fd < 0)\n+\t\t/* TRANSLATORS: The argument is a path that can't be opened */\n \t\treturn error(_(\"could not open '%s'\"), path);\n \treturn parse_bundle_header(fd, header, path);\n }\n@@ -137,6 +138,9 @@ int verify_bundle(struct bundle_header *header, int verbose)\n \tstruct object_array refs;\n \tstruct commit *commit;\n \tint i, ret = 0, req_nr;\n+\t/* TRANSLATORS: This is a heading that'll precede a list of commit\n+\t * hashes and reference names\n+\t */\n \tconst char *message = _(\"Repository lacks these prerequisite commits:\");\n \n \tinit_revisions(&revs, NULL);\n@@ -412,6 +416,7 @@ int create_bundle(struct bundle_header *header, const char *path,\n \t\treturn error(_(\"pack-objects died\"));\n \tif (!bundle_to_stdout) {\n \t\tif (commit_lock_file(&lock))\n+\t\t\t/* TRANSLATORS: The argument is a path we can't create */\n \t\t\tdie_errno(_(\"cannot create '%s'\"), path);\n \t}\n \treturn 0;\ndiff --git a/commit.c b/commit.c\nindex 9ed36c7..a4ee4b7 100644\n--- a/commit.c\n+++ b/commit.c\n@@ -45,8 +45,12 @@ struct commit *lookup_commit_or_die(const unsigned char *sha1, const char *ref_n\n {\n \tstruct commit *c = lookup_commit_reference(sha1);\n \tif (!c)\n+\t\t/* TRANSLATORS: The argument is a reference name */\n \t\tdie(_(\"could not parse %s\"), ref_name);\n \tif (hashcmp(sha1, c->object.sha1)) {\n+\t\t/* TRANSLATORS: The first argument is a refname, the second is\n+\t\t * a commit hash\n+\t\t */\n \t\twarning(_(\"%s %s is not a commit!\"),\n \t\t\tref_name, sha1_to_hex(sha1));\n \t}\ndiff --git a/connected.c b/connected.c\nindex 1e89c1c..cdd9813 100644\n--- a/connected.c\n+++ b/connected.c\n@@ -45,6 +45,9 @@ int check_everything_connected(sha1_iterate_fn fn, int quiet, void *cb_data)\n \t\tmemcpy(commit, sha1_to_hex(sha1), 40);\n \t\tif (write_in_full(rev_list.in, commit, 41) < 0) {\n \t\t\tif (errno != EPIPE && errno != EINVAL)\n+\t\t\t\t/* TRANSLATORS: The argument is a strerror()\n+\t\t\t\t * message\n+\t\t\t\t */\n \t\t\t\terror(_(\"failed write to rev-list: %s\"),\n \t\t\t\t      strerror(errno));\n \t\t\terr = -1;\ndiff --git a/diff.c b/diff.c\nindex 5d06375..0d4534a 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -3436,6 +3436,7 @@ static int parse_dirstat_opt(struct diff_options *options, const char *params)\n {\n \tstruct strbuf errmsg = STRBUF_INIT;\n \tif (parse_dirstat_params(options, params, &errmsg))\n+\t\t/* TRANSLATORS: The argument is an error message */\n \t\tdie(_(\"Failed to parse --dirstat/-X option parameter:\\n%s\"),\n \t\t    errmsg.buf);\n \tstrbuf_release(&errmsg);\ndiff --git a/remote.c b/remote.c\nindex b296d17..14e7332 100644\n--- a/remote.c\n+++ b/remote.c\n@@ -1604,12 +1604,18 @@ int format_tracking_info(struct branch *branch, struct strbuf *sb)\n \tbase = shorten_unambiguous_ref(base, 0);\n \tif (!num_theirs)\n \t\tstrbuf_addf(sb,\n+\t\t\t/* TRANSLATORS: the first argument is a branch name, the\n+\t\t\t * second is a count of how many commits we're ahead of it\n+\t\t\t */\n \t\t\tQ_(\"Your branch is ahead of '%s' by %d commit.\\n\",\n \t\t\t   \"Your branch is ahead of '%s' by %d commits.\\n\",\n \t\t\t   num_ours),\n \t\t\tbase, num_ours);\n \telse if (!num_ours)\n \t\tstrbuf_addf(sb,\n+\t\t\t/* TRANSLATORS: the first argument is a branch name, the\n+\t\t\t * second is a count of how many commits we're behind it\n+\t\t\t */\n \t\t\tQ_(\"Your branch is behind '%s' by %d commit, \"\n \t\t\t       \"and can be fast-forwarded.\\n\",\n \t\t\t   \"Your branch is behind '%s' by %d commits, \"\n@@ -1618,6 +1624,10 @@ int format_tracking_info(struct branch *branch, struct strbuf *sb)\n \t\t\tbase, num_theirs);\n \telse\n \t\tstrbuf_addf(sb,\n+\t\t\t/* TRANSLATORS: the first argument is a branch name, the\n+\t\t\t * second and third arguments are counts of how many\n+\t\t\t * commits they've diverged by\n+\t\t\t */\n \t\t\tQ_(\"Your branch and '%s' have diverged,\\n\"\n \t\t\t       \"and have %d and %d different commit each, \"\n \t\t\t       \"respectively.\\n\",\ndiff --git a/sequencer.c b/sequencer.c\nindex f83cdfd..b284cf8 100644\n--- a/sequencer.c\n+++ b/sequencer.c\n@@ -118,8 +118,14 @@ static void write_cherry_pick_head(struct commit *commit, const char *pseudoref)\n \tfilename = git_path(\"%s\", pseudoref);\n \tfd = open(filename, O_WRONLY | O_CREAT, 0666);\n \tif (fd < 0)\n+\t\t/* TRANSLATORS: The argument is a filename that can't be\n+\t\t * opened for writing\n+\t\t */\n \t\tdie_errno(_(\"Could not open '%s' for writing\"), filename);\n \tif (write_in_full(fd, buf.buf, buf.len) != buf.len || close(fd))\n+\t\t/* TRANSLATORS: The argument is a filename that can't be\n+\t\t * opened for writing\n+\t\t */\n \t\tdie_errno(_(\"Could not write to '%s'\"), filename);\n \tstrbuf_release(&buf);\n }\n@@ -157,6 +163,9 @@ static void write_message(struct strbuf *msgbuf, const char *filename)\n \tint msg_fd = hold_lock_file_for_update(&msg_file, filename,\n \t\t\t\t\t       LOCK_DIE_ON_ERROR);\n \tif (write_in_full(msg_fd, msgbuf->buf, msgbuf->len) < 0)\n+\t\t/* TRANSLATORS: The argument is a filename that can't be\n+\t\t * written to\n+\t\t */\n \t\tdie_errno(_(\"Could not write to %s\"), filename);\n \tstrbuf_release(msgbuf);\n \tif (commit_lock_file(&msg_file) < 0)\n@@ -365,6 +374,7 @@ static int do_pick_commit(struct commit *commit, struct replay_opts *opts)\n \t\tstruct commit_list *p;\n \n \t\tif (!opts->mainline)\n+\t\t\t/* TRANSLATORS: The argument is a commit digest */\n \t\t\treturn error(_(\"Commit %s is a merge but no -m option was given.\"),\n \t\t\t\tsha1_to_hex(commit->object.sha1));\n \n-- \n1.7.10.546.gbaa1a.dirty\n"},{"id":"190306","messageId":"1335799995-7667-4-git-send-email-avarab@gmail.com","threadId":"30368","inReplyTo":"1335799995-7667-1-git-send-email-avarab@gmail.com","subject":"[PATCH 3/5] git-branch: remove lego in i18n messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2012-04-30T15:33:12Z","receivedAt":"2012-04-30T15:33:12Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Instead of making translators translate \"remote \" and then using\n\"%sbranch\" where \"%s\" is either \"remote \" or \"\" just split the two up\ninto separate messages. This makes the translation of this section of\ngit-branch much less confusing.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/branch.c |   24 +++++++++++++++---------\n 1 file changed, 15 insertions(+), 9 deletions(-)\n\ndiff --git a/builtin/branch.c b/builtin/branch.c\nindex 5f150b4..8813d2e 100644\n--- a/builtin/branch.c\n+++ b/builtin/branch.c\n@@ -152,21 +152,22 @@ static int delete_branches(int argc, const char **argv, int force, int kinds,\n \tstruct commit *rev, *head_rev = NULL;\n \tunsigned char sha1[20];\n \tchar *name = NULL;\n-\tconst char *fmt, *remote;\n+\tconst char *fmt;\n \tint i;\n \tint ret = 0;\n+\tint remote_branch = 0;\n \tstruct strbuf bname = STRBUF_INIT;\n \n \tswitch (kinds) {\n \tcase REF_REMOTE_BRANCH:\n \t\tfmt = \"refs/remotes/%s\";\n-\t\t/* TRANSLATORS: This is \"remote \" in \"remote branch '%s' not found\" */\n-\t\tremote = _(\"remote \");\n+\t\t/* For subsequent UI messages */\n+\t\tremote_branch = 1;\n+\n \t\tforce = 1;\n \t\tbreak;\n \tcase REF_LOCAL_BRANCH:\n \t\tfmt = \"refs/heads/%s\";\n-\t\tremote = \"\";\n \t\tbreak;\n \tdefault:\n \t\tdie(_(\"cannot use -a with -d\"));\n@@ -190,8 +191,9 @@ 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 (read_ref(name, sha1)) {\n-\t\t\terror(_(\"%sbranch '%s' not found.\"),\n-\t\t\t\t\tremote, bname.buf);\n+\t\t\terror(remote_branch\n+\t\t\t      ? _(\"remote branch '%s' not found.\")\n+\t\t\t      : _(\"branch '%s' not found.\"), bname.buf);\n \t\t\tret = 1;\n \t\t\tcontinue;\n \t\t}\n@@ -212,14 +214,18 @@ static int delete_branches(int argc, const char **argv, int force, int kinds,\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(remote_branch\n+\t\t\t      ? _(\"Error deleting remote branch '%s'\")\n+\t\t\t      : _(\"Error deleting branch '%s'\"),\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\tif (!quiet)\n-\t\t\t\tprintf(_(\"Deleted %sbranch %s (was %s).\\n\"),\n-\t\t\t\t       remote, bname.buf,\n+\t\t\t\tprintf(remote_branch\n+\t\t\t\t       ? _(\"Deleted remote branch %s (was %s).\\n\")\n+\t\t\t\t       : _(\"Deleted branch %s (was %s).\\n\"),\n+\t\t\t\t       bname.buf,\n \t\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-- \n1.7.10.546.gbaa1a.dirty\n"},{"id":"190305","messageId":"1335799995-7667-5-git-send-email-avarab@gmail.com","threadId":"30368","inReplyTo":"1335799995-7667-1-git-send-email-avarab@gmail.com","subject":"[PATCH 4/5] git-commit: remove lego in i18n messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2012-04-30T15:33:13Z","receivedAt":"2012-04-30T15:33:13Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Remove the whence_s() function and messages that dependen on it in\nfavor of messages that use either \"merge\" or \"cherry-pick\" directly.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/commit.c |   52 +++++++++++++++++++++++-----------------------------\n 1 file changed, 23 insertions(+), 29 deletions(-)\n\ndiff --git a/builtin/commit.c b/builtin/commit.c\nindex b257ae8..c7c491e 100644\n--- a/builtin/commit.c\n+++ b/builtin/commit.c\n@@ -194,24 +194,6 @@ static void determine_whence(struct wt_status *s)\n \t\ts->whence = whence;\n }\n \n-static const char *whence_s(void)\n-{\n-\tconst char *s = \"\";\n-\n-\tswitch (whence) {\n-\tcase FROM_COMMIT:\n-\t\tbreak;\n-\tcase FROM_MERGE:\n-\t\ts = _(\"merge\");\n-\t\tbreak;\n-\tcase FROM_CHERRY_PICK:\n-\t\ts = _(\"cherry-pick\");\n-\t\tbreak;\n-\t}\n-\n-\treturn s;\n-}\n-\n static void rollback_index_files(void)\n {\n \tswitch (commit_style) {\n@@ -453,8 +435,12 @@ static char *prepare_index(int argc, const char **argv, const char *prefix,\n \t */\n \tcommit_style = COMMIT_PARTIAL;\n \n-\tif (whence != FROM_COMMIT)\n-\t\tdie(_(\"cannot do a partial commit during a %s.\"), whence_s());\n+\tif (whence != FROM_COMMIT) {\n+\t\tif (whence == FROM_MERGE)\n+\t\t\tdie(_(\"cannot do a partial commit during a merge.\"));\n+\t\telse if (whence == FROM_CHERRY_PICK)\n+\t\t\tdie(_(\"cannot do a partial commit during a cherry-pick.\"));\n+\t}\n \n \tmemset(&partial, 0, sizeof(partial));\n \tpartial.strdup_strings = 1;\n@@ -796,13 +782,17 @@ static int prepare_to_commit(const char *index_file, const char *prefix,\n \t\tchar *ai_tmp, *ci_tmp;\n \t\tif (whence != FROM_COMMIT)\n \t\t\tstatus_printf_ln(s, GIT_COLOR_NORMAL,\n-\t\t\t\t_(\"\\n\"\n-\t\t\t\t\"It looks like you may be committing a %s.\\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-\t\t\t\twhence_s(),\n+\t\t\t    whence == FROM_MERGE\n+\t\t\t\t? _(\"\\n\"\n+\t\t\t\t\t\"It looks like you may be committing a merge.\\n\"\n+\t\t\t\t\t\"If this is not correct, please remove the file\\n\"\n+\t\t\t\t\t\"\t%s\\n\"\n+\t\t\t\t\t\"and try again.\\n\")\n+\t\t\t\t: _(\"\\n\"\n+\t\t\t\t\t\"It looks like you may be committing a cherry-pick.\\n\"\n+\t\t\t\t\t\"If this is not correct, please remove the file\\n\"\n+\t\t\t\t\t\"\t%s\\n\"\n+\t\t\t\t\t\"and try again.\\n\"),\n \t\t\t\tgit_path(whence == FROM_MERGE\n \t\t\t\t\t ? \"MERGE_HEAD\"\n \t\t\t\t\t : \"CHERRY_PICK_HEAD\"));\n@@ -1072,8 +1062,12 @@ static int parse_and_validate_options(int argc, const char *argv[],\n \t/* Sanity check options */\n \tif (amend && !current_head)\n \t\tdie(_(\"You have nothing to amend.\"));\n-\tif (amend && whence != FROM_COMMIT)\n-\t\tdie(_(\"You are in the middle of a %s -- cannot amend.\"), whence_s());\n+\tif (amend && whence != FROM_COMMIT) {\n+\t\tif (whence == FROM_MERGE)\n+\t\t\tdie(_(\"You are in the middle of a merge -- cannot amend.\"));\n+\t\telse if (whence == FROM_CHERRY_PICK)\n+\t\t\tdie(_(\"You are in the middle of a cherry-pick -- cannot amend.\"));\n+\t}\n \tif (fixup_message && squash_message)\n \t\tdie(_(\"Options --squash and --fixup cannot be used together\"));\n \tif (use_message)\n-- \n1.7.10.546.gbaa1a.dirty\n"},{"id":"190307","messageId":"1335799995-7667-6-git-send-email-avarab@gmail.com","threadId":"30368","inReplyTo":"1335799995-7667-1-git-send-email-avarab@gmail.com","subject":"[PATCH 5/5] git-commit: remove lego in i18n messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2012-04-30T15:33:14Z","receivedAt":"2012-04-30T15:33:14Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Change the \"Please enter the commit message for your changes.\" and the\nsubsequent blurb of text not to be split up. This makes translating it\nmuch easier.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/commit.c |   14 ++++++--------\n 1 file changed, 6 insertions(+), 8 deletions(-)\n\ndiff --git a/builtin/commit.c b/builtin/commit.c\nindex c7c491e..438f257 100644\n--- a/builtin/commit.c\n+++ b/builtin/commit.c\n@@ -798,17 +798,15 @@ static int prepare_to_commit(const char *index_file, const char *prefix,\n \t\t\t\t\t : \"CHERRY_PICK_HEAD\"));\n \n \t\tfprintf(s->fp, \"\\n\");\n-\t\tstatus_printf(s, GIT_COLOR_NORMAL,\n-\t\t\t_(\"Please enter the commit message for your changes.\"));\n \t\tif (cleanup_mode == CLEANUP_ALL)\n-\t\t\tstatus_printf_more(s, GIT_COLOR_NORMAL,\n-\t\t\t\t_(\" Lines starting\\n\"\n-\t\t\t\t\"with '#' will be ignored, and an empty\"\n+\t\t\tstatus_printf(s, GIT_COLOR_NORMAL,\n+\t\t\t\t_(\"Please enter the commit message for your changes.\"\n+\t\t\t\t\" Lines starting\\nwith '#' will be ignored, and an empty\"\n \t\t\t\t\" message aborts the commit.\\n\"));\n \t\telse /* CLEANUP_SPACE, that is. */\n-\t\t\tstatus_printf_more(s, GIT_COLOR_NORMAL,\n-\t\t\t\t_(\" Lines starting\\n\"\n-\t\t\t\t\"with '#' will be kept; you may remove them\"\n+\t\t\tstatus_printf(s, GIT_COLOR_NORMAL,\n+\t\t\t\t_(\"Please enter the commit message for your changes.\"\n+\t\t\t\t\" Lines starting\\nwith '#' 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\tif (only_include_assumed)\n-- \n1.7.10.546.gbaa1a.dirty\n"},{"id":"190309","messageId":"CACBZZX55eOr8sK_951SanA=d1O5AcaUESqphhLEkGguz-=65Dw@mail.gmail.com","threadId":"30368","inReplyTo":"1335799995-7667-1-git-send-email-avarab@gmail.com","subject":"Re: [PATCH 0/5] i18n: TRANSLATORS commends and LEGO--","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2012-04-30T15:34:20Z","receivedAt":"2012-04-30T15:34:20Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Mon, Apr 30, 2012 at 17:33, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:\n> This series fixes/adds some TRANSLATORS commends and removes lego from\n> some branch/commit messages.\n\nOh and of course I forgot this: This is based on next.\n"},{"id":"190319","messageId":"7v8vhdgma7.fsf@alter.siamese.dyndns.org","threadId":"30368","inReplyTo":"1335799995-7667-2-git-send-email-avarab@gmail.com","subject":"Re: [PATCH 1/5] diff: move TRANSLATORS comments so they're picked up","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-04-30T17:30:24Z","receivedAt":"2012-04-30T17:30:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:\n\n> These TRANSLATORS comments weren't actually picked up by xgettext, the\n> comment needs to be right before the Q_() function call, evidently it\n> isn't picked up if that call is wrapped in another function call.\n>\n> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n\nThe patch makes sense as an advice to people who update sources where to\nplace the \"TRANSLATORS:\" comment, but I am unsure about what this\nparticular one says. Are we assuming that translators do not know what the\nsentence they are translating refers to?\n\n>  \t\tstrbuf_addf(&sb,\n> +\t\t\t    /*\n> +\t\t\t     * TRANSLATORS: \"+\" in (+) is a line addition marker;\n> +\t\t\t     * do not translate it.\n> +\t\t\t     */\n>  \t\t\t    Q_(\", %d insertion(+)\", \", %d insertions(+)\",\n>  \t\t\t       insertions),\n\nWhat I am getting at is that this may be simply being unnecessarily noisy\nby trying to be helpful, and I am not sure if you are drawing the line at\nthe right level.  For example, \"insertion\" has many meanings and in the\ncontext of this sentence it means lines added to the old material---should\nwe mention that here, and tell translators to use the word that conveys\nthat particular meaning?\n\nFor this particular one, I'd be happier if the TRANSLATORS comment told\nthem to check if \"diffstat\" (which we borrowed this from) has a l10n of\nthis message for the language they are translating to, and make sure they\nuse the same format here.\n"},{"id":"190320","messageId":"7v4ns1glxt.fsf@alter.siamese.dyndns.org","threadId":"30368","inReplyTo":"1335799995-7667-3-git-send-email-avarab@gmail.com","subject":"Re: [PATCH 2/5] i18n: Add more TRANSLATORS comments","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-04-30T17:37:50Z","receivedAt":"2012-04-30T17:37:50Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:\n\n> I took a pass through git.pot and added comments to various messages\n> that could use one, comments still need to be added to a lot of other\n> things, but you have to start somewhere.\n>\n> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n> ---\n>  advice.c    |    3 +++\n>  bundle.c    |    5 +++++\n>  commit.c    |    4 ++++\n>  connected.c |    3 +++\n>  diff.c      |    1 +\n>  remote.c    |   10 ++++++++++\n>  sequencer.c |   10 ++++++++++\n>  7 files changed, 36 insertions(+)\n>\n> diff --git a/advice.c b/advice.c\n> index a492eea..5944abb 100644\n> --- a/advice.c\n> +++ b/advice.c\n> @@ -37,6 +37,9 @@ void advise(const char *advice, ...)\n>  \n>  \tfor (cp = buf.buf; *cp; cp = np) {\n>  \t\tnp = strchrnul(cp, '\\n');\n> +\t\t/* TRANSLATORS: This will be used to prefix each line of an\n> +\t\t * advice message, with the format string being the line\n> +\t\t */\n\n\t/*\n         * Our multi-line comments are formatted like\n         * this (many other places in the patch).\n         */\n\nAlso end the sentence with a full-stop, please (many other places in the\npatch).\n\nIt is unclear what \"with the format string being the line\" means here, at\nleast to me, even though I think I wrote this code.\n\n>  \t\tfprintf(stderr,\t_(\"hint: %.*s\\n\"), (int)(np - cp), cp);\n>  \t\tif (*np)\n>  \t\t\tnp++;\n> diff --git a/bundle.c b/bundle.c\n> index 8d31b98..f24999e 100644\n> --- a/bundle.c\n> +++ b/bundle.c\n> @@ -86,6 +86,7 @@ int read_bundle_header(const char *path, struct bundle_header *header)\n>  \tint fd = open(path, O_RDONLY);\n>  \n>  \tif (fd < 0)\n> +\t\t/* TRANSLATORS: The argument is a path that can't be opened */\n>  \t\treturn error(_(\"could not open '%s'\"), path);\n\nThat does not add much information.  \"path to the file we tried to read\nthe bundle data from but failed\"?\n\n> @@ -137,6 +138,9 @@ int verify_bundle(struct bundle_header *header, int verbose)\n>  \tstruct object_array refs;\n>  \tstruct commit *commit;\n>  \tint i, ret = 0, req_nr;\n> +\t/* TRANSLATORS: This is a heading that'll precede a list of commit\n> +\t * hashes and reference names\n> +\t */\n\nPlease say \"commit object names\" (many other places in the patch).\n\n>  \tconst char *message = _(\"Repository lacks these prerequisite commits:\");\n>  \n>  \tinit_revisions(&revs, NULL);\n> @@ -412,6 +416,7 @@ int create_bundle(struct bundle_header *header, const char *path,\n>  \t\treturn error(_(\"pack-objects died\"));\n>  \tif (!bundle_to_stdout) {\n>  \t\tif (commit_lock_file(&lock))\n> +\t\t\t/* TRANSLATORS: The argument is a path we can't create */\n>  \t\t\tdie_errno(_(\"cannot create '%s'\"), path);\n\nThat does not add much information.  \"path to the file we tried to write\nthe bundle data to but failed\"?\n\n> @@ -365,6 +374,7 @@ static int do_pick_commit(struct commit *commit, struct replay_opts *opts)\n>  \t\tstruct commit_list *p;\n>  \n>  \t\tif (!opts->mainline)\n> +\t\t\t/* TRANSLATORS: The argument is a commit digest */\n\nPlease consistently say \"commit object name\".\n\n>  \t\t\treturn error(_(\"Commit %s is a merge but no -m option was given.\"),\n>  \t\t\t\tsha1_to_hex(commit->object.sha1));\n"},{"id":"190321","messageId":"7vzk9tf7bt.fsf@alter.siamese.dyndns.org","threadId":"30368","inReplyTo":"1335799995-7667-4-git-send-email-avarab@gmail.com","subject":"Re: [PATCH 3/5] git-branch: remove lego in i18n messages","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-04-30T17:38:46Z","receivedAt":"2012-04-30T17:38:46Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:\n\n> Instead of making translators translate \"remote \" and then using\n> \"%sbranch\" where \"%s\" is either \"remote \" or \"\" just split the two up\n> into separate messages. This makes the translation of this section of\n> git-branch much less confusing.\n>\n> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n> ---\n\nLooks good.\n"},{"id":"190322","messageId":"CACBZZX7H-g836PwBA+zn8V+1TRhf36R3DA6qGmbFw9ybD62vKQ@mail.gmail.com","threadId":"30368","inReplyTo":"7v8vhdgma7.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 1/5] diff: move TRANSLATORS comments so they're picked up","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2012-04-30T17:54:06Z","receivedAt":"2012-04-30T17:54:06Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Mon, Apr 30, 2012 at 19:30, Junio C Hamano <gitster@pobox.com> wrote:\n> Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:\n>\n>> These TRANSLATORS comments weren't actually picked up by xgettext, the\n>> comment needs to be right before the Q_() function call, evidently it\n>> isn't picked up if that call is wrapped in another function call.\n>>\n>> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n>\n> The patch makes sense as an advice to people who update sources where to\n> place the \"TRANSLATORS:\" comment, but I am unsure about what this\n> particular one says. Are we assuming that translators do not know what the\n> sentence they are translating refers to?\n\nThey'd know if they looked at the source, but the reason for moving\nthis is that at the previous location the comment wasn't getting\npicked up by xgettext.\n\nI.e. before there would be no comment in git.pot and the derived PO\nfile, now there would be, in practice that means that most translators\nwill actually see it.\n\n>>               strbuf_addf(&sb,\n>> +                         /*\n>> +                          * TRANSLATORS: \"+\" in (+) is a line addition marker;\n>> +                          * do not translate it.\n>> +                          */\n>>                           Q_(\", %d insertion(+)\", \", %d insertions(+)\",\n>>                              insertions),\n>\n> What I am getting at is that this may be simply being unnecessarily noisy\n> by trying to be helpful, and I am not sure if you are drawing the line at\n> the right level.  For example, \"insertion\" has many meanings and in the\n> context of this sentence it means lines added to the old material---should\n> we mention that here, and tell translators to use the word that conveys\n> that particular meaning?\n>\n> For this particular one, I'd be happier if the TRANSLATORS comment told\n> them to check if \"diffstat\" (which we borrowed this from) has a l10n of\n> this message for the language they are translating to, and make sure they\n> use the same format here.\n\nThat makes sense. But for this patch I just wanted to fix things up so\nthat it was placed in the PO file.\n"},{"id":"190323","messageId":"7vvckhf6kz.fsf@alter.siamese.dyndns.org","threadId":"30368","inReplyTo":"1335799995-7667-6-git-send-email-avarab@gmail.com","subject":"Re: [PATCH 5/5] git-commit: remove lego in i18n messages","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-04-30T17:54:52Z","receivedAt":"2012-04-30T17:54:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"3, 4 and 5 looked all great.  Will queue them.\n"}]}