Last active
September 15, 2020 06:00
-
-
Save rakeshpatra/6db8f1a8a0812347c937b728024e10fd to your computer and use it in GitHub Desktop.
i18n-tasks normalize in pre-commit
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
# using ruby gem "i18n-tasks" | |
locale_changed=$(git diff --name-only --staged | grep "locales/en.yml") | |
if [ -n "$locale_changed" ]; then | |
echo "Locale changed, running i18n-task normalize" | |
i18n-tasks normalize | |
git add config/locales/ | |
echo "Done" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment