checktransupdate.rst 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. .. SPDX-License-Identifier: GPL-2.0
  2. Checking for needed translation updates
  3. =======================================
  4. This script helps track the translation status of the documentation in
  5. different locales, i.e., whether the documentation is up-to-date with
  6. the English counterpart.
  7. How it works
  8. ------------
  9. It uses ``git log`` command to track the latest English commit from the
  10. translation commit (order by author date) and the latest English commits
  11. from HEAD. If any differences occur, the file is considered as out-of-date,
  12. then commits that need to be updated will be collected and reported.
  13. Features implemented
  14. - check all files in a certain locale
  15. - check a single file or a set of files
  16. - provide options to change output format
  17. - track the translation status of files that have no translation
  18. Usage
  19. -----
  20. ::
  21. ./scripts/checktransupdate.py --help
  22. Please refer to the output of argument parser for usage details.
  23. Samples
  24. - ``./scripts/checktransupdate.py -l zh_CN``
  25. This will print all the files that need to be updated in the zh_CN locale.
  26. - ``./scripts/checktransupdate.py Documentation/translations/zh_CN/dev-tools/testing-overview.rst``
  27. This will only print the status of the specified file.
  28. Then the output is something like:
  29. ::
  30. Documentation/dev-tools/kfence.rst
  31. No translation in the locale of zh_CN
  32. Documentation/translations/zh_CN/dev-tools/testing-overview.rst
  33. commit 42fb9cfd5b18 ("Documentation: dev-tools: Add link to RV docs")
  34. 1 commits needs resolving in total
  35. Features to be implemented
  36. - files can be a folder instead of only a file