LKML Archive mirror
 help / color / mirror / Atom feed
From: Yanteng Si <siyanteng@loongson.cn>
To: Cheng Ziqiu <chengziqiu@hust.edu.cn>, Alex Shi <alexs@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>
Cc: Dongliang Mu <dzm91@hust.edu.cn>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	hust-os-kernel-patches@googlegroups.com
Subject: Re: [PATCH] scripts: add `check-trans-update.py`
Date: Sat, 27 Apr 2024 18:44:53 +0800	[thread overview]
Message-ID: <4ef9835e-b3dd-4b05-b09a-047f941a0870@loongson.cn> (raw)
In-Reply-To: <20240422065822.1441611-1-chengziqiu@hust.edu.cn>


在 2024/4/22 14:58, Cheng Ziqiu 写道:
> The `check-trans-update.py` scripts check whether a translated version
> of a documentation is up-to-date with the english version.
>
> The scripts use `git log` commit to find the latest english commit from
> the translation commit (order by author date) and the latest english
> commits from HEAD. If differences occurs, report the file and commits
> need to be updated.
>
> Signed-off-by: Cheng Ziqiu <chengziqiu@hust.edu.cn>
> ---
>   scripts/check-trans-update.py | 176 ++++++++++++++++++++++++++++++++++

Because we'll be typing its name a lot, it's important to consider 
tabulating the

name. If it's easy to understand, choose a name that will slow down the tab

button's wear.


I gave your script a quick test and got the following output:

[siyanteng@kernelserver linux-next]$ ./scripts/check-trans-update.py 
Documentation/translations/zh_CN/process/1.Intro.rst 
[siyanteng@kernelserver linux-next]$

It seems that your script can't handle documents that never get updated. 
You need to print a warning or hint.

[siyanteng@kernelserver linux-next]$ ./scripts/check-trans-update.py 
Documentation/translations/zh_CN/rust/arch-support.rst 
Documentation/translations/zh_CN/rust/arch-support.rst (8 commits) 
2f4fe71fdd25ebb4e41aee3b467b54fbef332643

This seems to be just a merge, try to drop it?

81889e8523e63395b388f285c77ff0c98ea04556 
01848eee20c6396e5a96cfbc9061dc37481e06fd 
724a75ac9542fe1f8aaa587da4d3863d8ea292fc 
90868ff9cadecd46fa2a4f5501c66bfea8ade9b7 
e5e86572e3f20222b5d308df9ae986c06f229321 
04df97e150c83d4640540008e95d0229cb188135 
0438aadfa69a345136f5ba4f582e0f769450ee0d

Hmmm, How about printing it this way?

We need to update the following commits.

commit 81889e8523e6 ("RISC-V: enable building 64-bit kernels with rust support")
commit 01848eee20c6 ("docs: rust: fix improper rendering in Arch Supportpage")
commit 724a75ac9542 ("arm64: rust: Enable Rust support for AArch64")
commit 90868ff9cade ("LoongArch: Enable initial Rust support")
commit e5e86572e3f2 ("rust: sort uml documentation arch support table")
commit 04df97e150c8 ("Documentation: rust: Fix arch support table")
commit 0438aadfa69a ("rust: arch/um: Add support for CONFIG_RUST under x86_64 UML")


Thanks,
Yanteng


      parent reply	other threads:[~2024-04-27 10:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22  6:58 [PATCH] scripts: add `check-trans-update.py` Cheng Ziqiu
2024-04-22 13:20 ` Jonathan Corbet
2024-04-27 10:18   ` Yanteng Si
2024-04-27 10:44 ` Yanteng Si [this message]

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=4ef9835e-b3dd-4b05-b09a-047f941a0870@loongson.cn \
    --to=siyanteng@loongson.cn \
    --cc=alexs@kernel.org \
    --cc=chengziqiu@hust.edu.cn \
    --cc=corbet@lwn.net \
    --cc=dzm91@hust.edu.cn \
    --cc=hust-os-kernel-patches@googlegroups.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).