Ensure translations are updated

This commit is contained in:
southerntofu 2020-12-01 18:18:06 +01:00
parent 711a04d378
commit ddfb5ff36c
1 changed files with 7 additions and 5 deletions

View File

@ -16,15 +16,17 @@ fi
# Copy the translations to ~/.local/share/forgebuild
FORGEBUILD_DATA=$HOME/.local/share/forgebuild
if [ ! -f $FORGEBUILD_DATA/i18n/en.json ]; then
if [ ! -d $FORGEBUILD_DATA ]; then
if ! mkdir -p $FORGEBUILD_DATA; then
echo "Failed to create folder $FORGEBUILD_DATA to store translations"
exit 2
fi
if ! cp -r spec/i18n $FORGEBUILD_DATA; then
echo "Failed to copy translations to $FORGEBUILD_DATA"
exit 3
fi
fi
if ! cp -r spec/i18n $FORGEBUILD_DATA; then
echo "Failed to copy translations to $FORGEBUILD_DATA"
exit 3
else
echo "Successfully updated translations in $FORGEBUILD_DATA"
fi
I18N_FOLDER=$FORGEBUILD_DATA/i18n