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 # Copy the translations to ~/.local/share/forgebuild
FORGEBUILD_DATA=$HOME/.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 if ! mkdir -p $FORGEBUILD_DATA; then
echo "Failed to create folder $FORGEBUILD_DATA to store translations" echo "Failed to create folder $FORGEBUILD_DATA to store translations"
exit 2 exit 2
fi fi
if ! cp -r spec/i18n $FORGEBUILD_DATA; then fi
echo "Failed to copy translations to $FORGEBUILD_DATA" if ! cp -r spec/i18n $FORGEBUILD_DATA; then
exit 3 echo "Failed to copy translations to $FORGEBUILD_DATA"
fi exit 3
else
echo "Successfully updated translations in $FORGEBUILD_DATA"
fi fi
I18N_FOLDER=$FORGEBUILD_DATA/i18n I18N_FOLDER=$FORGEBUILD_DATA/i18n