kopia lustrzana https://github.com/OpenDroneMap/WebODM
26 wiersze
1.0 KiB
Bash
Executable File
26 wiersze
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
LOCALES="fr es it de tr"
|
|
|
|
if [[ "$1" == "extract" ]]; then
|
|
echo "Extracting .po files from Django/React"
|
|
locale_param=""
|
|
for lang in $LOCALES
|
|
do
|
|
locale_param="--locale=$lang $locale_param"
|
|
done
|
|
|
|
mkdir -p locale
|
|
|
|
python3 app/scripts/extract_potree_strings.py app/static/app/js/vendor/potree/build/potree/resources/lang/en/translation.json app/static/app/js/translations/potree_autogenerated.js
|
|
python3 app/scripts/extract_odm_strings.py https://raw.githubusercontent.com/OpenDroneMap/ODM/master/opendm/config.py app/static/app/js/translations/odm_autogenerated.js
|
|
|
|
django-admin makemessages --keep-pot $locale_param --ignore=build --ignore=app/templates/app/registration/*
|
|
python manage.py makemessages_djangojs --keep-pot $locale_param -d djangojs --extension jsx --extension js --ignore=build --ignore app/static/app/js/vendor --ignore app/static/app/bundles --ignore node_modules --language Python
|
|
fi
|
|
|
|
if [[ "$1" == "build" ]]; then
|
|
echo "Building .po files into .mo"
|
|
django-admin compilemessages
|
|
fi
|