Subject: Re: [PATCH 0/9] Incremental po/git.pot update and new l10n workflow

From: Junio C Hamano <[email-masked]>
Date: Wed, 04 May 2022 07:35:34 -0700

Jiang Xin <[email-masked]> writes:

> From: Jiang Xin <[email-masked]>
>
> Ævar and I started discussing this topic (incremental po/git.pot update
> and new l10n workflow) on a GitHub issue[^1] a month ago. There are
> several improvements to the l10n workflow:
>
> * Variable "LOCALIZED_C" is not stable, that cause the "po/git.pot" file
>   generated by different user may have different number of entries.
>   This issues is fixed in patch 2/9.

Allowing translators to pick a random point in the history and run
the tool to generate .pot file locally creates that problem for us.
It also means that various .po files would correspond to slightly
different versions of the source tree.

The "only the coordinator updates .pot, everybody works off of that
file" was one way to ensure that you do not have to worry about these
two problems.

So, if you are moving to the "no .pot file committed in-tree,
translators generate .pot for themselves" model, you do need to make
sure you have consistent set of files to localize.  So [2/9] does
try to fix an issue worth solving (assuming that the new model is
what i18n/l10n team members want).

I am not sure what your plans are to make sure everybody works off
of the same version, though.  Even if you scrape the source tree for
source files that may not be relevant to your build, if you do not
start off of the same version, your set of sources may be a bit off
compared to the other translators'.

> * Generate "po/git.pot" in an incremental way, so we do not need to munge
>   source files in-place, do not need a clean checkout, and do not need
>   "reset --hard". See patch 3/9.

That may be a worthwhile thing to do.  I have no strong opinions.

> * Remove file "po/git.pot" from tree. It can be generated at runtime.
>   See patch 5/9, 6/9.

Another reason, IIRC, why we adopted "the coordinator prepares pot"
model, in addition to the stability of the source and .pot file
across languages, was because we wanted to reduce the load on
language team.  It also may be handy to be able to view "git log -p"
on the file, as long as we somehow reduce the patch noise (perhaps
by stripping the line numbers that are constantly changing).

Again, assuming that i18n/l10n team members are OK with this, I have
no complaints.

> * L10n contributors can update theire "po/XX.pot" using:
>   "make po-update PO_FILE=po/XX.po". See patch 7/9.
>
> * L10n contributors for new language can initialize "po/XX.pot" using:
>   "make po-init PO_FILE=po/XX.po". See patch 8/9.
>
> * L10n contributors can start translations at any time, even before the
>   l10n announcing l10n window open. We must have a new l10n workflow,
>   see patch 9/9.

Is it truly OK for the language packs for Git 2.36 to be prepared
from v2.36.0~27 for French while German are done using v2.36.0~12?
Again, if there is no practical downside for doing so that worries
the i18n/l10n team members, I have no real complaints, but this is
the one that worries me the most, actually, in the whole thing.

Thanks for working on this topic, both of you.