Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

doc-guide: add help documentation checktransupdate.rst

This commit adds help documents - doc-guide/checktransupdate.rst
and zh_CN/doc-guide/checktransupdate.rst for scripts/checktransupdate.py
, including English and Chinese versions

Signed-off-by: Dongliang Mu <dzm91@hust.edu.cn>
Reviewed-by: Yanteng Si <siyanteng@loongson.cn>
[jc: fixed missing title problem in the new file]
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20240719041400.3909775-3-dzm91@hust.edu.cn

authored by

Dongliang Mu and committed by
Jonathan Corbet
d4098135 63e96ce0

+111
+54
Documentation/doc-guide/checktransupdate.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + Checking for needed translation updates 4 + ======================================= 5 + 6 + This script helps track the translation status of the documentation in 7 + different locales, i.e., whether the documentation is up-to-date with 8 + the English counterpart. 9 + 10 + How it works 11 + ------------ 12 + 13 + It uses ``git log`` command to track the latest English commit from the 14 + translation commit (order by author date) and the latest English commits 15 + from HEAD. If any differences occur, the file is considered as out-of-date, 16 + then commits that need to be updated will be collected and reported. 17 + 18 + Features implemented 19 + 20 + - check all files in a certain locale 21 + - check a single file or a set of files 22 + - provide options to change output format 23 + - track the translation status of files that have no translation 24 + 25 + Usage 26 + ----- 27 + 28 + :: 29 + 30 + ./scripts/checktransupdate.py --help 31 + 32 + Please refer to the output of argument parser for usage details. 33 + 34 + Samples 35 + 36 + - ``./scripts/checktransupdate.py -l zh_CN`` 37 + This will print all the files that need to be updated in the zh_CN locale. 38 + - ``./scripts/checktransupdate.py Documentation/translations/zh_CN/dev-tools/testing-overview.rst`` 39 + This will only print the status of the specified file. 40 + 41 + Then the output is something like: 42 + 43 + :: 44 + 45 + Documentation/dev-tools/kfence.rst 46 + No translation in the locale of zh_CN 47 + 48 + Documentation/translations/zh_CN/dev-tools/testing-overview.rst 49 + commit 42fb9cfd5b18 ("Documentation: dev-tools: Add link to RV docs") 50 + 1 commits needs resolving in total 51 + 52 + Features to be implemented 53 + 54 + - files can be a folder instead of only a file
+1
Documentation/doc-guide/index.rst
··· 12 12 parse-headers 13 13 contributing 14 14 maintainer-profile 15 + checktransupdate 15 16 16 17 .. only:: subproject and html 17 18
+55
Documentation/translations/zh_CN/doc-guide/checktransupdate.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + .. include:: ../disclaimer-zh_CN.rst 4 + 5 + :Original: Documentation/doc-guide/checktransupdate.rst 6 + 7 + :译者: 慕冬亮 Dongliang Mu <dzm91@hust.edu.cn> 8 + 9 + 检查翻译更新 10 + 11 + 这个脚本帮助跟踪不同语言的文档翻译状态,即文档是否与对应的英文版本保持更新。 12 + 13 + 工作原理 14 + ------------ 15 + 16 + 它使用 ``git log`` 命令来跟踪翻译提交的最新英文提交(按作者日期排序)和英文文档的 17 + 最新提交。如果有任何差异,则该文件被认为是过期的,然后需要更新的提交将被收集并报告。 18 + 19 + 实现的功能 20 + 21 + - 检查特定语言中的所有文件 22 + - 检查单个文件或一组文件 23 + - 提供更改输出格式的选项 24 + - 跟踪没有翻译过的文件的翻译状态 25 + 26 + 用法 27 + ----- 28 + 29 + :: 30 + 31 + ./scripts/checktransupdate.py --help 32 + 33 + 具体用法请参考参数解析器的输出 34 + 35 + 示例 36 + 37 + - ``./scripts/checktransupdate.py -l zh_CN`` 38 + 这将打印 zh_CN 语言中需要更新的所有文件。 39 + - ``./scripts/checktransupdate.py Documentation/translations/zh_CN/dev-tools/testing-overview.rst`` 40 + 这将只打印指定文件的状态。 41 + 42 + 然后输出类似如下的内容: 43 + 44 + :: 45 + 46 + Documentation/dev-tools/kfence.rst 47 + No translation in the locale of zh_CN 48 + 49 + Documentation/translations/zh_CN/dev-tools/testing-overview.rst 50 + commit 42fb9cfd5b18 ("Documentation: dev-tools: Add link to RV docs") 51 + 1 commits needs resolving in total 52 + 53 + 待实现的功能 54 + 55 + - 文件参数可以是文件夹而不仅仅是单个文件
+1
Documentation/translations/zh_CN/doc-guide/index.rst
··· 18 18 parse-headers 19 19 contributing 20 20 maintainer-profile 21 + checktransupdate 21 22 22 23 .. only:: subproject and html 23 24