All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: rsbecker@nexbridge.com
Cc: "'Jean-Noël Avila'" <avila.jn@gmail.com>, git@vger.kernel.org
Subject: Re: [Question] Translation Dictionary
Date: Thu, 03 Feb 2022 19:06:32 +0100	[thread overview]
Message-ID: <220203.86y22r4y70.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <02f101d81901$c1ac8400$45058c00$@nexbridge.com>


On Thu, Feb 03 2022, rsbecker@nexbridge.com wrote:

> On February 3, 2022 4:55 AM, Ævar Arnfjörð Bjarmason wrote:
>> On Thu, Feb 03 2022, Jean-Noël Avila wrote:
>> > I guess not all git translators are subscribed to the mailing list, as
>> > they mostly interact with Jiang. I put them in cc.
>> >
>> > For French, I try to maintain a glossary of terms in the header of the
>> > `fr.po` file, available here:
>> > https://github.com/git/git/blob/master/po/fr.po
>> 
>> I started trying to come up with something similar for the Icelandic translation I
>> plan on getting to any day now (for ~11 years and counting).
>> 
>> I think it would be a really good addition to git to move this list into a built-in or an
>> option for "git help", something like:
>> 
>>     git i18n-terms
>> 
>> Or:
>> 
>>     git help --common-terms
>> 
>> It would help users that use a non-English a lot, since they could use it as a
>> reliable cheatsheet, and it would clearly help translators, since it could be one of
>> the first things they'd translate, to anchor themselves when it comes to
>> translating blob/tree/commit/tag etc.
>> 
>> If you're interested I can help you come up with that. Basically it would be some
>> "static" array with that table as C code with strings marked with N_(). We could
>> then add optional explanations as in
>> gitglossary(7) (and even eventually generate that documentation from that
>> code).
>
> Yes, I would like to investigate doing this. I have some experience
> with different translation approaches, so it does make sense to
> me. The question is where to start. From a framework standpoint, it
> would be nice to have the terms externalized and searchable (as in git
> glossary [term]... or perhaps more completely git glossary --grep=term
> --language=fr --iso=fr_CA [term]...). I can also see some provisioning
> for phrases, "upstream remote" comes to mind as one that gave me a
> headache earlier in the week, and potentially usage - in Jean-Noël
> list, prefacing "to" to a term implies it is a verb rather than a noun
> but we might want to consider a more normalized approach to managing
> usage, bearing in mind that this is a very large "rabbit hole". I
> would even suggest that gitglossary(7) might ultimately be deprecated
> particularly on systems without 'man(1)'.
>
> Help would definitely be appreciated in getting this started. I have a topic branch at github where I am planning on keeping this stuff visible.

If you do:

    make command-list.h

We end up with something similar to what I have in mind. That one
happens to be generated, but we could just stick this in help.c for
now. I.e.:

	struct i18n_term {
	        const char *term;;
	};

	static struct i18n_term i18n_terms[] = {
		{ N_("3-way merge") },
		{ N_("#NN") },
		{ N_("a commit") },
		[...],
		NULL,
	};

I.e. just a copy of the list at
https://github.com/git/git/blob/master/po/fr.po. The help.c library has
some examples that should be easy to follow e.g. how "git help --guides"
calls list_guides_help(), which iterates a similar variable.

For --language=* etc. you can do that with just LANGUAGE=<...> (i.e. via
standard libintl) features. I think for this we could just stick with
that.

And instead of --grep you can pipe to grep(1) :)

This can always be made fancier later, and we can expand "struct
i18n_term" with some category labels or whatever, e.g. for core data
types (blob, tree, tag, commit) v.s. core concepts (merge, rebase,
commit, pull, push) etc.

  reply	other threads:[~2022-02-03 18:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-29 19:35 [Question] Translation Dictionary rsbecker
2022-02-03  9:37 ` Jean-Noël Avila
2022-02-03  9:54   ` Ævar Arnfjörð Bjarmason
2022-02-03 13:27     ` rsbecker
2022-02-03 18:06       ` Ævar Arnfjörð Bjarmason [this message]
2022-02-03 18:15       ` Junio C Hamano
2022-02-03 19:59         ` Jean-Noël AVILA
2022-02-03 21:33           ` Junio C Hamano
2022-02-03 23:45             ` rsbecker
2022-02-03 12:58   ` rsbecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=220203.86y22r4y70.gmgdl@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=avila.jn@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=rsbecker@nexbridge.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.