Re: [PATCH v2 1/2] object.[ch]: mark object type names for translation
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Oct 4, 2021, 18:54 UTC
- Message-ID
- <CAPig+cQYU+kgJrtP_Y5ZH8NpZywChxkaYjnm8OFrj8VbFWLR1w@mail.gmail.com>
- In-Reply-To
- <patch-v2-1.2-55bde16aa23-20211004T142523Z-avarab@gmail.com>
On Mon, Oct 4, 2021 at 10:27 AM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 5 quoted lines
> Mark the "commit", "tree", "blob" and "tag" types for translation, and > add an extern "unknown type" string for the OBJ_NONE case. > > It is usually bad practice to translate individual words like this, > but for e.g. the list list output emitted by the "short object ID dead
"list list"?
Show 8 quoted lines
> is ambiguous" advice it makes sense. > > A subsequent commit will make that output translatable, and use these > translation markings to do so. Well, we won't use "commit", but let's > mark it up anyway for consistency. It'll probably come in handy sooner > than later to have it already be translated, and it's to much of a > burden to place on translators if they're translating the other three > object types anyway.
At first I thought you meant s/to much/too much/, but that doesn't seem to make sense (unless I'm misunderstanding), so perhaps you mean s/to/not/.
Show 12 quoted lines
> Aside: I think it would probably make sense to change the "NULL" entry > for type_name() to be the "unknown type". I've ran into cases where > type_name() was unconditionally interpolated in e.g. an sprintf() > format, but let's leave that for #leftoverbits as that would be > changing the behavior of the type_name() function. > > All of these will be new in the git.pot file, except "blob" which will > be shared with a "cat-file" command-line option, see > 7bcf3414535 (cat-file --textconv/--filters: allow specifying the path > separately, 2016-09-09) for its introduction. > > Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>