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

docs: move checktransupdate.py to tools/docs

The checktranslate.py tool currently languishes in scripts/; move it to
tools/docs and update references accordingly.

Cc: Alex Shi <alexs@kernel.org>
Cc: Yanteng Si <si.yanteng@linux.dev>
Cc: Dongliang Mu <dzm91@hust.edu.cn>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

+11 -12
+3 -3
Documentation/doc-guide/checktransupdate.rst
··· 27 27 28 28 :: 29 29 30 - ./scripts/checktransupdate.py --help 30 + tools/docs/checktransupdate.py --help 31 31 32 32 Please refer to the output of argument parser for usage details. 33 33 34 34 Samples 35 35 36 - - ``./scripts/checktransupdate.py -l zh_CN`` 36 + - ``tools/docs/checktransupdate.py -l zh_CN`` 37 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`` 38 + - ``tools/docs/checktransupdate.py Documentation/translations/zh_CN/dev-tools/testing-overview.rst`` 39 39 This will only print the status of the specified file. 40 40 41 41 Then the output is something like:
+3 -3
Documentation/translations/zh_CN/doc-guide/checktransupdate.rst
··· 28 28 29 29 :: 30 30 31 - ./scripts/checktransupdate.py --help 31 + tools/docs/checktransupdate.py --help 32 32 33 33 具体用法请参考参数解析器的输出 34 34 35 35 示例 36 36 37 - - ``./scripts/checktransupdate.py -l zh_CN`` 37 + - ``tools/docs/checktransupdate.py -l zh_CN`` 38 38 这将打印 zh_CN 语言中需要更新的所有文件。 39 - - ``./scripts/checktransupdate.py Documentation/translations/zh_CN/dev-tools/testing-overview.rst`` 39 + - ``tools/docs/checktransupdate.py Documentation/translations/zh_CN/dev-tools/testing-overview.rst`` 40 40 这将只打印指定文件的状态。 41 41 42 42 然后输出类似如下的内容:
+1 -1
Documentation/translations/zh_CN/how-to.rst
··· 437 437 对于首次参与 Linux 内核中文文档翻译的新手,建议您在 linux 目录中运行以下命令: 438 438 :: 439 439 440 - ./script/checktransupdate.py -l zh_CN`` 440 + tools/docs/checktransupdate.py -l zh_CN`` 441 441 442 442 该命令会列出需要翻译或更新的英文文档,结果同时保存在 checktransupdate.log 中。 443 443
-1
MAINTAINERS
··· 7411 7411 P: Documentation/doc-guide/maintainer-profile.rst 7412 7412 T: git git://git.lwn.net/linux.git docs-next 7413 7413 F: Documentation/ 7414 - F: scripts/checktransupdate.py 7415 7414 F: scripts/documentation-file-ref-check 7416 7415 F: scripts/get_abi.py 7417 7416 F: scripts/kernel-doc*
+4 -4
scripts/checktransupdate.py tools/docs/checktransupdate.py
··· 9 9 differences occur, report the file and commits that need to be updated. 10 10 11 11 The usage is as follows: 12 - - ./scripts/checktransupdate.py -l zh_CN 12 + - tools/docs/checktransupdate.py -l zh_CN 13 13 This will print all the files that need to be updated or translated in the zh_CN locale. 14 - - ./scripts/checktransupdate.py Documentation/translations/zh_CN/dev-tools/testing-overview.rst 14 + - tools/docs/checktransupdate.py Documentation/translations/zh_CN/dev-tools/testing-overview.rst 15 15 This will only print the status of the specified file. 16 16 17 17 The output is something like: ··· 168 168 def valid_locales(locale): 169 169 """Check if the locale is valid or not""" 170 170 script_path = os.path.dirname(os.path.abspath(__file__)) 171 - linux_path = os.path.join(script_path, "..") 171 + linux_path = os.path.join(script_path, "../..") 172 172 if not os.path.isdir(f"{linux_path}/Documentation/translations/{locale}"): 173 173 raise ArgumentTypeError("Invalid locale: {locale}") 174 174 return locale ··· 232 232 def main(): 233 233 """Main function of the script""" 234 234 script_path = os.path.dirname(os.path.abspath(__file__)) 235 - linux_path = os.path.join(script_path, "..") 235 + linux_path = os.path.join(script_path, "../..") 236 236 237 237 parser = ArgumentParser(description="Check the translation update") 238 238 parser.add_argument(