Closed vkurup closed 9 years ago
make makemessages
doesn't work out of the box because the locale directories aren't there. Should we go ahead and create the directories? (We might need to put a .gitkeep
file or something in them, since git doesn't store directories as such.)
Hmmm... it created the directories for me:
(rescue_id)vkurup@caktus014:~/dev/rescue_id(develop) $ ls -al locale
ls: cannot access locale: No such file or directory
(rescue_id)vkurup@caktus014:~/dev/rescue_id(develop) $ make makemessages
# Extract English messages from our source code
python manage.py makemessages --ignore 'conf/*' --ignore 'docs/*' --ignore 'requirements/*' \
--no-location --no-obsolete -l en
processing locale en
(rescue_id)vkurup@caktus014:~/dev/rescue_id(develop) $ ls locale
en
Hmm:
$ make makemessages
# Extract English messages from our source code
python manage.py makemessages --ignore 'conf/*' --ignore 'docs/*' --ignore 'requirements/*' \
--no-location --no-obsolete -l en
CommandError: Unable to find a locale path to store translations for file manage.py
make: *** [makemessages] Error 1
then:
$ mkdir locale
$ make makemessages
# Extract English messages from our source code
python manage.py makemessages --ignore 'conf/*' --ignore 'docs/*' --ignore 'requirements/*' \
--no-location --no-obsolete -l en
processing locale en
$
I've added the 'gitkeep-ed' folder and also added the Locale middleware.
:+1:
Thanks to @dpoirier for most of this, as well as to @mlavin for https://www.caktusgroup.com/blog/2013/04/25/managing-django-translations-transifex/
Closes #209