You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
911 B

  1. #! /bin/sh
  2. #
  3. # Script to display Simplified Chinese translation status of documents
  4. # Copied from the japanese one
  5. #
  6. if [ ! -d docs/zh-cn ]; then
  7. echo "'docs/zh-cn' not found."
  8. echo "do:"
  9. echo " cd \$(QMK_TOP)"
  10. echo " ./docs/zh-cn/zh-cn_doc_status.sh"
  11. exit 1
  12. fi
  13. en_docs=`cd docs;ls -1 [a-z]*.md`
  14. zh_cn_docs=`cd docs/zh-cn;ls -1 [a-z]*.md`
  15. en_count=`echo $en_docs | wc -w`
  16. zh_cn_count=`echo $zh_cn_docs | wc -w`
  17. echo "English documents $en_count files."
  18. echo "Simplified Chinese documents $zh_cn_count files."
  19. echo "Files that have not been translated yet:"
  20. for docfile in $en_docs
  21. do
  22. if [ ! -f docs/zh-cn/$docfile ]; then
  23. wc docs/$docfile
  24. fi
  25. done | sort
  26. echo "Files that have not been updated yet:"
  27. grep --no-filename "^[ ]*git diff" docs/zh-cn/*.md | while read cmd
  28. do
  29. cline=`echo $cmd | sh | wc -l`
  30. if [ $cline -gt 0 ]; then
  31. echo "$cline $cmd"
  32. fi
  33. done | sort