| 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 <[email protected]> |
| 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 |
tools/docs/checktransupdate.py --help |
| 32 |
|
| 33 |
具体用法请参考参数解析器的输出 |
| 34 |
|
| 35 |
示例 |
| 36 |
|
| 37 |
- ``tools/docs/checktransupdate.py -l zh_CN`` |
| 38 |
这将打印 zh_CN 语言中需要更新的所有文件。 |
| 39 |
- ``tools/docs/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 |
- 文件参数可以是文件夹而不仅仅是单个文件 |