Created
November 23, 2018 11:03
-
-
Save pierreboissinot/87efcf1769c59b975107b6458b952d94 to your computer and use it in GitHub Desktop.
Check missing translation in symfony project with translation component
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
#!/usr/bin/env bash | |
IFS=',' read -r -a locales <<< "$1" | |
bundle=$2 | |
echo "Check missing translation for locales $locales in $bundle" | |
for locale in $locales ; do | |
if ./bin/console debug:translation $locale $bundle | grep missing | |
then | |
(>&2 echo "Translations are missing for locale $locale") | |
exit 1 | |
else | |
echo "No missing translation for locale $locale" | |
exit 0 | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment