Unused lang tool

This commit is contained in:
iota97 2022-05-12 08:42:41 +02:00
parent b93be29a30
commit 608532746a
2 changed files with 32 additions and 0 deletions

3
.gitignore vendored
View file

@ -122,3 +122,6 @@ debian/ppsspp/
# CMake stuff
CMakeFiles
# Clangd
.cache/

View file

@ -0,0 +1,29 @@
#!/bin/bash
langfile='../../assets/lang/en_US.ini'
folders=('../../UI/' '../../Core/' '../../Common/' '../../Windows/' '../../assets/shaders' '../../assets/themes')
# reading each line
while read line; do
# skip empty line, section and comment
if [[ ! -z "$line" && ${line::1} != "[" && ${line::1} != "#" ]]; then
# get everything before the = sign
value=${line/ =*/}
found=0
for folder in ${folders[@]}; do
# use recursive grep on the folder
grep -r "$value" $folder > /dev/null
# check return value
ret=$?
if [ $ret -eq 0 ]; then
found=1
fi
done
# print if not found
if [ $found -eq 0 ]; then
echo $value
fi
fi
done < $langfile