-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tooling for checking translation files
- Loading branch information
1 parent
b284fb0
commit 9973ccd
Showing
2 changed files
with
25 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
make -f help.makefile | ||
if [[ $? -ne 0 ]] ; then | ||
exit 1 | ||
fi | ||
|
||
set -e | ||
for xml in strings.xml help_strings.xml; do | ||
echo "Checking $xml .." | ||
find app/src/main/res/ -name "$xml" | grep -E "/values-[a-z]*/" | while read txml ; do | ||
set +e | ||
echo ".. against '${txml##*/res/}'" | ||
python3 tools/verify-translation-file.py "app/src/main/res/values/$xml" "${txml}" > output.txt | ||
errorcode=$? | ||
cat output.txt | while read line ; do | ||
echo " $line" | ||
done | ||
if [[ $errorcode -ne 0 ]] ; then | ||
exit 1 | ||
fi | ||
done | ||
done | ||
|