diff --git a/tools/remove-unused-trans.sh b/tools/remove-unused-trans.sh new file mode 100755 index 000000000..7c6e49007 --- /dev/null +++ b/tools/remove-unused-trans.sh @@ -0,0 +1,9 @@ +#!/bin/bash -x + +# Remove extra translations + +lint . --quiet --check ExtraTranslation --nolines | \ + sed -n 's/.*Error: "\([^"]*\)" is translated here but not found in default locale.*/\1/p' | \ + while read name; do + sed -i "/name=\"$name\"/d" res/values-*/strings.xml + done