diff options
| author | Takeshi ISHII <2170248+mtei@users.noreply.github.com> | 2021-10-16 17:31:09 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-16 17:31:09 +0900 |
| commit | eddb206369e78ee0c34fab8ce64f5d3bab9e1b13 (patch) | |
| tree | c333ec8ffb5510bbaedbc500d9a7666a1c9b79f6 | |
| parent | 9e2e7737823e86612c3a90b485650e349cd251ea (diff) | |
| download | qmk_firmware-eddb206369e78ee0c34fab8ce64f5d3bab9e1b13.tar.gz qmk_firmware-eddb206369e78ee0c34fab8ce64f5d3bab9e1b13.zip | |
add docs/ja/ja_doc_status.sh (#14402)
| -rw-r--r-- | docs/ja/ja_doc_status.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/docs/ja/ja_doc_status.sh b/docs/ja/ja_doc_status.sh new file mode 100644 index 000000000..3dfbbd2bc --- /dev/null +++ b/docs/ja/ja_doc_status.sh | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | #! /bin/sh | ||
| 2 | # | ||
| 3 | # Script to display the Japanese translation status of documents | ||
| 4 | # | ||
| 5 | if [ ! -d docs/ja ]; then | ||
| 6 | echo "'docs/ja' not found." | ||
| 7 | echo "do:" | ||
| 8 | echo " cd \$(QMK_TOP)" | ||
| 9 | echo " ./docs/ja/ja_doc_status.sh" | ||
| 10 | exit 1 | ||
| 11 | fi | ||
| 12 | |||
| 13 | en_docs=`cd docs;ls -1 [a-z]*.md` | ||
| 14 | ja_docs=`cd docs/ja;ls -1 [a-z]*.md` | ||
| 15 | en_count=`echo $en_docs | wc -w` | ||
| 16 | ja_count=`echo $ja_docs | wc -w` | ||
| 17 | echo "English documents $en_count files." | ||
| 18 | echo "Japanese documents $ja_count files." | ||
| 19 | |||
| 20 | echo "Files that have not been translated yet:" | ||
| 21 | for docfile in $en_docs | ||
| 22 | do | ||
| 23 | if [ ! -f docs/ja/$docfile ]; then | ||
| 24 | wc docs/$docfile | ||
| 25 | fi | ||
| 26 | done | sort | ||
| 27 | echo "Files that have not been updated yet:" | ||
| 28 | grep --no-filename "^[ ]*git diff" docs/ja/*.md | while read cmd | ||
| 29 | do | ||
| 30 | cline=`echo $cmd | sh | wc -l` | ||
| 31 | if [ $cline -gt 0 ]; then | ||
| 32 | echo "$cline $cmd" | ||
| 33 | fi | ||
| 34 | done | sort | ||
