diff options
Diffstat (limited to 'docs')
| -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 | ||
