From: Weijie Yuan <wy@wyuan.org>
To: Alex Shi <seakeel@gmail.com>
Cc: Chen-Yu Yeh <chenyou910331@gmail.com>,
Yanteng Si <si.yanteng@linux.dev>,
Dongliang Mu <dzm91@hust.edu.cn>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] docs/zh_CN: add process/applying-patches Chinese translation
Date: Sun, 26 Jul 2026 15:11:17 +0800 [thread overview]
Message-ID: <amWzFbquJmSgNQey@wyuan.org> (raw)
In-Reply-To: <babde62f-9669-4f0d-b240-c79f450bbef1@gmail.com>
+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!
next prev parent reply other threads:[~2026-07-26 7:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 12:06 [PATCH 0/3] docs/zh_CN: translate process/applying-patches.rst into Chinese Weijie Yuan
2026-07-17 12:06 ` [PATCH 1/3] docs/zh_CN: add process/applying-patches Chinese translation Weijie Yuan
2026-07-17 16:43 ` Weijie Yuan
2026-07-24 23:59 ` Alex Shi
2026-07-26 7:11 ` Weijie Yuan [this message]
2026-07-26 7:32 ` Weijie Yuan
2026-07-17 12:08 ` [PATCH 2/3] docs/zh_CN: add applying-patches to process index Weijie Yuan
2026-07-17 12:10 ` [PATCH 3/3] docs/zh_CN: link to Chinese applying-patches translation Weijie Yuan
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=amWzFbquJmSgNQey@wyuan.org \
--to=wy@wyuan.org \
--cc=chenyou910331@gmail.com \
--cc=corbet@lwn.net \
--cc=dzm91@hust.edu.cn \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=seakeel@gmail.com \
--cc=si.yanteng@linux.dev \
--cc=skhan@linuxfoundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®