英語

檢查所需的翻譯更新

此指令碼有助於跟蹤不同語言環境中文件的翻譯狀態,即文件是否與英文版本保持同步。

工作原理

它使用 git log 命令來跟蹤從翻譯提交(按作者日期排序)到最新的英文提交,以及從 HEAD 到最新的英文提交。 如果發生任何差異,則該檔案將被視為已過期,然後將收集並報告需要更新的提交。

已實現的功能

  • 檢查特定語言環境中的所有檔案

  • 檢查單個檔案或一組檔案

  • 提供更改輸出格式的選項

  • 跟蹤沒有翻譯的檔案的翻譯狀態

用法

./scripts/checktransupdate.py --help

有關用法詳情,請參考引數解析器的輸出。

示例

  • ./scripts/checktransupdate.py -l zh_CN 這將列印 zh_CN 語言環境中所有需要更新的檔案。

  • ./scripts/checktransupdate.py Documentation/translations/zh_CN/dev-tools/testing-overview.rst 這將僅列印指定檔案的狀態。

然後輸出類似如下:

Documentation/dev-tools/kfence.rst
No translation in the locale of zh_CN

Documentation/translations/zh_CN/dev-tools/testing-overview.rst
commit 42fb9cfd5b18 ("Documentation: dev-tools: Add link to RV docs")
1 commits needs resolving in total

待實現的功能

  • 檔案可以是資料夾,而不僅僅是檔案