Re: [PATCH 20/22] sha1-file.c: mark more strings for translation
From: Eric Sunshine <hidden>
Date: 2018-06-03 08:14:00
On Sat, Jun 2, 2018 at 12:32 AM, Nguyễn Thái Ngọc Duy [off-list ref] wrote:
quoted hunk ↗ jump to hunk
Signed-off-by: Nguyễn Thái Ngọc Duy <redacted> ---diff --git a/sha1-file.c b/sha1-file.c@@ -71,17 +71,17 @@ static void git_hash_sha1_final(unsigned char *hash, git_hash_ctx *ctx) static void git_hash_unknown_init(git_hash_ctx *ctx) { - die("trying to init unknown hash"); + die(_("trying to init unknown hash")); } static void git_hash_unknown_update(git_hash_ctx *ctx, const void *data, size_t len) { - die("trying to update unknown hash"); + die(_("trying to update unknown hash")); } static void git_hash_unknown_final(unsigned char *hash, git_hash_ctx *ctx) { - die("trying to finalize unknown hash"); + die(_("trying to finalize unknown hash")); }
The above three are indicative of programmer error, aren't they? If so, they ought not be translated (and perhaps changed to BUG at some point).
quoted hunk ↗ jump to hunk
const struct git_hash_algo hash_algos[GIT_HASH_NALGOS] = {@@ -378,8 +378,8 @@ static int alt_odb_usable(struct raw_object_store *o, /* Detect cases where alternate disappeared */ if (!is_directory(path->buf)) { - error("object directory %s does not exist; " - "check .git/objects/info/alternates.", + error(_("object directory %s does not exist; " + "check .git/objects/info/alternates."),
Perhaps drop the trailing period as you did in other cases.
path->buf);
return 0;
}