blob: 6dddcedba5c725f7bc38982d19da056df68a726a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/bin/bash
stale=0
clearline='\033[K'
echo "Checking keys..."
for i in `cat locale-en.json | awk '/^[[:blank:]]*"k/ {print $1}' | sed s/\"//g`
do
t=`grep $i ../templates/*.html ../js/*.js 2>/dev/null | wc -l`
echo -en "\r${clearline}${i}..."
if [ "$t" -eq "0" ]; then
((stale++))
echo
echo $i occurs $t times
fi
done
echo -e "\r${clearline}All Done!"
echo
echo "========= TOTAL: ${stale} stale keys ========";
echo
|