mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Unused lang tool
This commit is contained in:
parent
b93be29a30
commit
608532746a
2 changed files with 32 additions and 0 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -122,3 +122,6 @@ debian/ppsspp/
|
|||
|
||||
# CMake stuff
|
||||
CMakeFiles
|
||||
|
||||
# Clangd
|
||||
.cache/
|
29
Tools/langtool/unused-euristic.sh
Executable file
29
Tools/langtool/unused-euristic.sh
Executable 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
|
Loading…
Add table
Reference in a new issue