Skip to content

Instantly share code, notes, and snippets.

@pierreboissinot
Created November 23, 2018 11:03
Show Gist options
  • Save pierreboissinot/87efcf1769c59b975107b6458b952d94 to your computer and use it in GitHub Desktop.
Save pierreboissinot/87efcf1769c59b975107b6458b952d94 to your computer and use it in GitHub Desktop.
Check missing translation in symfony project with translation component
#!/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