Re: [PATCH 20/22] sha1-file.c: mark more strings for translation
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Jun 3, 2018, 08:13 UTC
- Message-ID
- <CAPig+cSmbxUiy6q-xAkxqjpcmSE0QqeCbBri8kghopf=_ZUnoA@mail.gmail.com>
- In-Reply-To
- <20180602043241.9941-21-pclouds@gmail.com>
On Sat, Jun 2, 2018 at 12:32 AM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
Show 21 quoted lines
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
> 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).
Show 9 quoted lines
> 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; > }