From: Emilie Date: Wed, 16 Aug 2017 09:00:15 +0000 (+0200) Subject: [Translations] : add bash script to build all messages of all apps / lib X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=dc8bc0023aef48f5f05b6d5f9007cdc3e83fe5b6;p=docker-django-scripts.git [Translations] : add bash script to build all messages of all apps / lib --- diff --git a/build_messages.sh b/build_messages.sh index 822e254..c47133b 100755 --- a/build_messages.sh +++ b/build_messages.sh @@ -1,4 +1,3 @@ #!/bin/sh -docker-compose run app python manage.py makemessages -a -docker-compose run app python manage.py compilemessages +docker-compose run app bash /srv/bin/translations/messages.sh diff --git a/translations/messages.sh b/translations/messages.sh new file mode 100755 index 0000000..aeb2a36 --- /dev/null +++ b/translations/messages.sh @@ -0,0 +1,10 @@ +# docker-compose run app python manage.py compilemessages +cd /srv + +find $(pwd) -type d -name 'locale' -print | while read f; do + cd "$f" && cd .. + echo $(pwd) + django-admin makemessages -l fr + django-admin makemessages -l en + django-admin compilemessages +done