Modify bump-translations.bash script
- Rename download-translations.bash to bump-translations.bash
- Add git-commit command to the script
- Skip README.md file in empty translations check
Change-Id: Id323cbe0871d565f8b10a1b578e2f52311bdfa10
diff --git a/tools/i18n/download-translations.bash b/tools/i18n/bump-translations.bash
similarity index 67%
rename from tools/i18n/download-translations.bash
rename to tools/i18n/bump-translations.bash
index 075aee0..85c4b39 100644
--- a/tools/i18n/download-translations.bash
+++ b/tools/i18n/bump-translations.bash
@@ -10,9 +10,18 @@
cd ../../src/_locales
+# Delete empty translations
for lang in *; do
+ if [[ "$lang" == "README.md" ]]; then
+ continue
+ fi
if [ "x$emptyTranslationFile" = "x$(cat $lang/messages.json)" ]; then
echo "$lang has an empty translation. Deleting folder..."
rm -rf $lang
+ else
+ git add $lang/messages.json
fi
done
+
+# Commit new translations
+git commit -m "Updating i18n files from Crowdin"