Created
August 24, 2015 18:33
-
-
Save mike-bourgeous/1049a76806aba4fef5f8 to your computer and use it in GitHub Desktop.
Shell command to help find possibly unused translations in a Rails app
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
#!/bin/sh | |
for f in `grep -o '[^ ]\+:' config/locales/en.yml | sed -e 's/:$//' | sed -e 's/^/:/'`; do | |
printf "\033[1m$f\033[0m\n" | |
grep -R "\.t(.*$f" || printf "\033[1;33mNONE FOR $f\033[0m\n" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment