Skip to content

Instantly share code, notes, and snippets.

@ikks
Created April 7, 2014 13:28
Show Gist options
  • Save ikks/10020316 to your computer and use it in GitHub Desktop.
Save ikks/10020316 to your computer and use it in GitHub Desktop.
compile translation messages of all translatable django applications
#!/bin/bash
# This script will compile the translation messages of all translatable django applications
# Author: AxiaCore S.A.S. http://axiacore.com
langs="es"
a=`ls -l | grep ^d | awk '{print $9}'`;
curdir=`pwd`
for i in $a
do
filename=$curdir'/'$i'/locale/es/LC_MESSAGES/django.po'
if [ -f $filename ]
then
cd $i
django-admin.py compilemessages -l $langs
cd ..
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment