Re: [PATCH 02/22] builtin/blame.c: mark strings for translation
Duy Nguyenwrites: > On Mon, Feb 29, 2016 at 1:57 AM, Junio C Hamano wrote: >> Nguyễn Thái Ngọc Duy writes: >> >>> Signed-off-by: Nguyễn Thái Ngọc Duy >>> --- >>> builtin/blame.c | 58 >>> - >>> 1 file changed, 29 insertions(+), 29 deletions(-) >> >> I think most of the strings we see here are not new ones introduced >> in this cycle. I doubt it is a good idea to disturb the codebase, >> distract ourselves and adding last-minute workload to translators >> with this during the pre-release period. > > Yes, it's ok to consider this series a new topic, to be graduated after 2.8.0. I wasn't talking about the whole topic, but 02/22 did not look suitable for the pre-release fix. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 02/22] builtin/blame.c: mark strings for translation
Nguyễn Thái Ngọc Duywrites: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > builtin/blame.c | 58 > - > 1 file changed, 29 insertions(+), 29 deletions(-) I think most of the strings we see here are not new ones introduced in this cycle. I doubt it is a good idea to disturb the codebase, distract ourselves and adding last-minute workload to translators with this during the pre-release period. > > diff --git a/builtin/blame.c b/builtin/blame.c > index e982fb8..988a38a 100644 > --- a/builtin/blame.c > +++ b/builtin/blame.c > @@ -196,7 +196,7 @@ static void fill_origin_blob(struct diff_options *opt, > file->size = file_size; > > if (!file->ptr) > - die("Cannot read blob %s for path %s", > + die(_("Cannot read blob %s for path %s"), > sha1_to_hex(o->blob_sha1), > o->path); > o->file = *file; > @@ -981,7 +981,7 @@ static void pass_blame_to_parent(struct scoreboard *sb, > num_get_patch++; > > if (diff_hunks(_p, _o, 0, blame_chunk_cb, )) > - die("unable to generate diff (%s -> %s)", > + die(_("unable to generate diff (%s -> %s)"), > oid_to_hex(>commit->object.oid), > oid_to_hex(>commit->object.oid)); > /* The rest are the same as the parent */ > @@ -1130,7 +1130,7 @@ static void find_copy_in_blob(struct scoreboard *sb, >*/ > memset(split, 0, sizeof(struct blame_entry [3])); > if (diff_hunks(file_p, _o, 1, handle_split_cb, )) > - die("unable to generate diff (%s)", > + die(_("unable to generate diff (%s)"), > oid_to_hex(>commit->object.oid)); > /* remainder, if any, all match the preimage */ > handle_split(sb, ent, d.tlno, d.plno, ent->num_lines, parent, split); > @@ -2240,7 +2240,7 @@ static void verify_working_tree_path(struct commit > *work_tree, const char *path) > sha1_object_info(blob_sha1, NULL) == OBJ_BLOB) > return; > } > - die("no such path '%s' in HEAD", path); > + die(_("no such path '%s' in HEAD"), path); > } > > static struct commit_list **append_parent(struct commit_list **tail, const > unsigned char *sha1) > @@ -2249,7 +2249,7 @@ static struct commit_list **append_parent(struct > commit_list **tail, const unsig > > parent = lookup_commit_reference(sha1); > if (!parent) > - die("no such commit %s", sha1_to_hex(sha1)); > + die(_("no such commit %s"), sha1_to_hex(sha1)); > return _list_insert(parent, tail)->next; > } > > @@ -2262,13 +2262,13 @@ static void append_merge_parents(struct commit_list > **tail) > if (merge_head < 0) { > if (errno == ENOENT) > return; > - die("cannot open '%s' for reading", git_path_merge_head()); > + die(_("cannot open '%s' for reading"), git_path_merge_head()); > } > > while (!strbuf_getwholeline_fd(, merge_head, '\n')) { > unsigned char sha1[20]; > if (line.len < 40 || get_sha1_hex(line.buf, sha1)) > - die("unknown line in '%s': %s", git_path_merge_head(), > line.buf); > + die(_("unknown line in '%s': %s"), > git_path_merge_head(), line.buf); > tail = append_parent(tail, sha1); > } > close(merge_head); > @@ -2314,7 +2314,7 @@ static struct commit *fake_working_tree_commit(struct > diff_options *opt, > parent_tail = >parents; > > if (!resolve_ref_unsafe("HEAD", RESOLVE_REF_READING, head_sha1, NULL)) > - die("no such ref: HEAD"); > + die(_("no such ref: HEAD")); > > parent_tail = append_parent(parent_tail, head_sha1); > append_merge_parents(parent_tail); > @@ -2344,12 +2344,12 @@ static struct commit *fake_working_tree_commit(struct > diff_options *opt, > > if (contents_from) { > if (stat(contents_from, ) < 0) > - die_errno("Cannot stat '%s'", contents_from); > + die_errno(_("Cannot stat '%s'"), contents_from); > read_from = contents_from; > } > else { > if (lstat(path, ) < 0) > - die_errno("Cannot lstat '%s'", path); > + die_errno(_("Cannot lstat '%s'"), path); > read_from = path; > } > mode = canon_mode(st.st_mode); > @@ -2360,21 +2360,21 @@ static struct commit *fake_working_tree_commit(struct > diff_options *opt, > textconv_object(read_from, mode, null_sha1, 0, > _ptr, _len)) > strbuf_attach(, buf_ptr, buf_len, buf_len + > 1);
[PATCH 02/22] builtin/blame.c: mark strings for translation
Signed-off-by: Nguyễn Thái Ngọc Duy--- builtin/blame.c | 58 - 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/builtin/blame.c b/builtin/blame.c index e982fb8..988a38a 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -196,7 +196,7 @@ static void fill_origin_blob(struct diff_options *opt, file->size = file_size; if (!file->ptr) - die("Cannot read blob %s for path %s", + die(_("Cannot read blob %s for path %s"), sha1_to_hex(o->blob_sha1), o->path); o->file = *file; @@ -981,7 +981,7 @@ static void pass_blame_to_parent(struct scoreboard *sb, num_get_patch++; if (diff_hunks(_p, _o, 0, blame_chunk_cb, )) - die("unable to generate diff (%s -> %s)", + die(_("unable to generate diff (%s -> %s)"), oid_to_hex(>commit->object.oid), oid_to_hex(>commit->object.oid)); /* The rest are the same as the parent */ @@ -1130,7 +1130,7 @@ static void find_copy_in_blob(struct scoreboard *sb, */ memset(split, 0, sizeof(struct blame_entry [3])); if (diff_hunks(file_p, _o, 1, handle_split_cb, )) - die("unable to generate diff (%s)", + die(_("unable to generate diff (%s)"), oid_to_hex(>commit->object.oid)); /* remainder, if any, all match the preimage */ handle_split(sb, ent, d.tlno, d.plno, ent->num_lines, parent, split); @@ -2240,7 +2240,7 @@ static void verify_working_tree_path(struct commit *work_tree, const char *path) sha1_object_info(blob_sha1, NULL) == OBJ_BLOB) return; } - die("no such path '%s' in HEAD", path); + die(_("no such path '%s' in HEAD"), path); } static struct commit_list **append_parent(struct commit_list **tail, const unsigned char *sha1) @@ -2249,7 +2249,7 @@ static struct commit_list **append_parent(struct commit_list **tail, const unsig parent = lookup_commit_reference(sha1); if (!parent) - die("no such commit %s", sha1_to_hex(sha1)); + die(_("no such commit %s"), sha1_to_hex(sha1)); return _list_insert(parent, tail)->next; } @@ -2262,13 +2262,13 @@ static void append_merge_parents(struct commit_list **tail) if (merge_head < 0) { if (errno == ENOENT) return; - die("cannot open '%s' for reading", git_path_merge_head()); + die(_("cannot open '%s' for reading"), git_path_merge_head()); } while (!strbuf_getwholeline_fd(, merge_head, '\n')) { unsigned char sha1[20]; if (line.len < 40 || get_sha1_hex(line.buf, sha1)) - die("unknown line in '%s': %s", git_path_merge_head(), line.buf); + die(_("unknown line in '%s': %s"), git_path_merge_head(), line.buf); tail = append_parent(tail, sha1); } close(merge_head); @@ -2314,7 +2314,7 @@ static struct commit *fake_working_tree_commit(struct diff_options *opt, parent_tail = >parents; if (!resolve_ref_unsafe("HEAD", RESOLVE_REF_READING, head_sha1, NULL)) - die("no such ref: HEAD"); + die(_("no such ref: HEAD")); parent_tail = append_parent(parent_tail, head_sha1); append_merge_parents(parent_tail); @@ -2344,12 +2344,12 @@ static struct commit *fake_working_tree_commit(struct diff_options *opt, if (contents_from) { if (stat(contents_from, ) < 0) - die_errno("Cannot stat '%s'", contents_from); + die_errno(_("Cannot stat '%s'"), contents_from); read_from = contents_from; } else { if (lstat(path, ) < 0) - die_errno("Cannot lstat '%s'", path); + die_errno(_("Cannot lstat '%s'"), path); read_from = path; } mode = canon_mode(st.st_mode); @@ -2360,21 +2360,21 @@ static struct commit *fake_working_tree_commit(struct diff_options *opt, textconv_object(read_from, mode, null_sha1, 0, _ptr, _len)) strbuf_attach(, buf_ptr, buf_len, buf_len + 1); else if (strbuf_read_file(, read_from, st.st_size) != st.st_size) - die_errno("cannot open or read '%s'", read_from); + die_errno(_("cannot open or read '%s'"), read_from); break; case S_IFLNK: if (strbuf_readlink(, read_from,