From: Jonathan Corbet <corbet@lwn.net>
To: Haoyang LIU <tttturtleruss@gmail.com>,
Dongliang Mu <dzm91@hust.edu.cn>,
Yanteng Si <si.yanteng@linux.dev>, Alex Shi <alexs@kernel.org>,
Shuah Khan <skhan@linuxfoundation.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>
Cc: Haoyang LIU <tttturtleruss@gmail.com>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev
Subject: Re: [PATCH] tools/docs/checktransupdate.py: add support for scanning directory
Date: Mon, 09 Mar 2026 10:07:26 -0600 [thread overview]
Message-ID: <87zf4hvvep.fsf@trenco.lwn.net> (raw)
In-Reply-To: <20260308111314.27333-1-tttturtleruss@gmail.com>
Haoyang LIU <tttturtleruss@gmail.com> writes:
> Origin script can only accept a file as parameter, this commit enables
> it to scan a directory.
>
> Usage example:
> ./scripts/checktransupdate.py Documentation/translations/zh_CN/dev-tools
I've applied this, with one tweak:
> + else:
> + # check if the files are directories or files
> + new_files = []
> + for file in files:
> + if os.path.isfile(file):
> + new_files.append(file)
> + elif os.path.isdir(file):
> + # for directories, list all files in the directory and its subfolders
> + new_files.extend(list_files_with_excluding_folders(
> + file, [], "rst"))
There's no reason to break that line there, so I took the liberty of
joining it back together.
Thanks,
jon
next prev parent reply other threads:[~2026-03-09 16:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-08 11:13 Haoyang LIU
2026-03-09 16:07 ` Jonathan Corbet [this message]
2026-03-09 16:32 ` Haoyang Liu
2026-03-09 16:39 ` Jonathan Corbet
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=87zf4hvvep.fsf@trenco.lwn.net \
--to=corbet@lwn.net \
--cc=alexs@kernel.org \
--cc=dzm91@hust.edu.cn \
--cc=justinstitt@google.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=nick.desaulniers+lkml@gmail.com \
--cc=si.yanteng@linux.dev \
--cc=skhan@linuxfoundation.org \
--cc=tttturtleruss@gmail.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 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®