Skip to content

Commit d37366c

Browse files
author
Jonathan Corbet
committed
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>
1 parent 909597f commit d37366c

5 files changed

Lines changed: 11 additions & 12 deletions

File tree

Documentation/doc-guide/checktransupdate.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ Usage
2727

2828
::
2929

30-
./scripts/checktransupdate.py --help
30+
tools/docs/checktransupdate.py --help
3131

3232
Please refer to the output of argument parser for usage details.
3333

3434
Samples
3535

36-
- ``./scripts/checktransupdate.py -l zh_CN``
36+
- ``tools/docs/checktransupdate.py -l zh_CN``
3737
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``
3939
This will only print the status of the specified file.
4040

4141
Then the output is something like:

Documentation/translations/zh_CN/doc-guide/checktransupdate.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@
2828

2929
::
3030

31-
./scripts/checktransupdate.py --help
31+
tools/docs/checktransupdate.py --help
3232

3333
具体用法请参考参数解析器的输出
3434

3535
示例
3636

37-
- ``./scripts/checktransupdate.py -l zh_CN``
37+
- ``tools/docs/checktransupdate.py -l zh_CN``
3838
这将打印 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``
4040
这将只打印指定文件的状态。
4141

4242
然后输出类似如下的内容:

Documentation/translations/zh_CN/how-to.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ git email 默认会抄送给您一份,所以您可以切换为审阅者的角
437437
对于首次参与 Linux 内核中文文档翻译的新手,建议您在 linux 目录中运行以下命令:
438438
::
439439

440-
./script/checktransupdate.py -l zh_CN``
440+
tools/docs/checktransupdate.py -l zh_CN``
441441

442442
该命令会列出需要翻译或更新的英文文档,结果同时保存在 checktransupdate.log 中。
443443

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7411,7 +7411,6 @@ S: Maintained
74117411
P: Documentation/doc-guide/maintainer-profile.rst
74127412
T: git git://git.lwn.net/linux.git docs-next
74137413
F: Documentation/
7414-
F: scripts/checktransupdate.py
74157414
F: scripts/documentation-file-ref-check
74167415
F: scripts/get_abi.py
74177416
F: scripts/kernel-doc*
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
differences occur, report the file and commits that need to be updated.
1010
1111
The usage is as follows:
12-
- ./scripts/checktransupdate.py -l zh_CN
12+
- tools/docs/checktransupdate.py -l zh_CN
1313
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
1515
This will only print the status of the specified file.
1616
1717
The output is something like:
@@ -168,7 +168,7 @@ def check_per_file(file_path):
168168
def valid_locales(locale):
169169
"""Check if the locale is valid or not"""
170170
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, "../..")
172172
if not os.path.isdir(f"{linux_path}/Documentation/translations/{locale}"):
173173
raise ArgumentTypeError("Invalid locale: {locale}")
174174
return locale
@@ -232,7 +232,7 @@ def config_logging(log_level, log_file="checktransupdate.log"):
232232
def main():
233233
"""Main function of the script"""
234234
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, "../..")
236236

237237
parser = ArgumentParser(description="Check the translation update")
238238
parser.add_argument(

0 commit comments

Comments
 (0)