You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
session-desktop/tools/localization/crowdInPostImport.sh

24 lines
618 B
Bash

#!/bin/sh
echo 'Cleaning up CrowdIn import'
SORT_JSON_FILE=$PWD/tools/util/sortJson.py
GENERATE_LOCALES_FILE=$PWD/tools/localization/generateLocales.py
# Sort all the messages.json files
for dir in $PWD/_locales/*/
do
dir=${dir%*/}
file="${dir}/messages.json"
if [ -f "$file" ]
then
python $SORT_JSON_FILE "$file"
else
echo "$file not found."
fi
done
# Generate Types and find problems if the python script exists with a non-zero exit code then the build will fail
python3 $GENERATE_LOCALES_FILE --print-problems --error-on-problems --error-old-dynamic-variables --print-old-dynamic-variables