Re: [PATCH] scripts: add `check-trans-update.py`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




在 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@xxxxxxxxxxx>
---
  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





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux