Re: [PATCH 1/3] docs/zh_CN: add process/applying-patches Chinese translation

From: Weijie Yuan

Date: Sun Jul 26 2026 - 03:12:39 EST


+cc Chen-Yu

Hi Alex,

On Sat, Jul 25, 2026 at 07:59:37AM +0800, Alex Shi wrote:
> On 2026/7/18 00:43, Weijie Yuan wrote:
> > On Fri, Jul 17, 2026 at 08:07:42PM +0800, Weijie Yuan wrote:
> > > Translate .../process/applying-patches.rst into Chinese.
> > >
> > > Update the translation through commit fa04150b8ef7
>
> Is it the original meaning: translation updated to commit xxxx?

My bad. I might misunderstand "update through" and "update to".

I originally thought that "update through" could only mean that this
current Chinese commit only updated the specific content from that
previous English commit.

Thanks to Chen-Yu, he taught me a lot:

In tools/docs/checktransupdate.py, the function
get_origin_from_trans_smartly() uses two regular expressions to extract
the reference point:

update to commit <12bits-hash>
Update the translation through commit <12bits-hash>

So both of them works.

But later he mentioned a few potential gotchas which perhaps would be
worth leaving a note here.

1. The regex does not enable IGNORECASE, so "update to commit" must be
written in lowercase. If it is written as "Update to commit" with an
uppercase U, the script will not recognize it and will fall back to
using the author date to guess the base commit.

This is particularly subtle because the script does not report an
error; it simply produces an incorrect result silently.

2. The script only checks how many commits the translation is behind
relative to the hash you specified. It does not verify whether that
hash is actually the latest commit touching the corresponding English
file.

As a result, if you accidentally specify an older hash, the script
may instead report that the translation is "up to date." Before
sending his latest series, Chen-Yu manually checked every file with:
git log -1 -- <English file>

3. valid_commit() skips merge commits, so a merge commit cannot be used
as the base.

Sorry I have not yet dug into the script in detail. So if any of the
points above are already documented there, I apologize for having
overlooked them. If they are not, we could add them to howto.rst, or
take a look at how the script might be improved when time permits.

Thanks!