manage.py makemessages doesn't create .po files

1,206 views
Skip to first unread message

skazhy

unread,
Jan 6, 2011, 10:48:22 AM1/6/11
to Django users
Hi!

I tried running "manage.py makemessages -l lv" in the project root
dir. At first I got the following error:

Error: This script should be run from the Django SVN tree or your
project or app tree. If you did indeed run it from the SVN checkout or
your project or application, maybe you are just missing the conf/
locale (in the django tree) or locale (for project and application)
directory? It is not created automatically, you have to create it by
hand if you want to enable i18n for your project or application.

Then I created the locale folder in the project root dir manually and
ran the command again. It created folders locale>lv>LC_MESSAGES. But
there were no files in the LC folder. I have all my translation
strings in templates (with {% trans abc %} syntax). I tried making
the .po file manually like msgid "abc" msgstr "Some local
translation", I compiled them, but they didn't appear in the browser.
I've got the following questions:

1. If I create .po files manually, what I should write after the # in
the first line (I had no # line in my .po file)?
2. What could be wrong with the makemessages that it doesn't work?

I am using the 1.2.4 version on Arch Linux

Thanks in advance,
Karlis

Shawn Milochik

unread,
Jan 6, 2011, 11:30:38 AM1/6/11
to django...@googlegroups.com
It appears that 'makemessages' is meant to be run with django-admin.py,
not manage.py.

http://docs.djangoproject.com/en/dev/topics/i18n/localization/

Shawn

skazhy

unread,
Jan 6, 2011, 11:45:59 AM1/6/11
to Django users
I tried running it with the djang-admin.py, same errors as with
manage.py.

Karlis

maclin kallat

unread,
Jan 6, 2011, 12:00:25 PM1/6/11
to django...@googlegroups.com
Try using the -e option for adding the extensions.

django-admin.py makemessages -l=lv -e=html,htm


From: skazhy <ska...@gmail.com>
To: Django users <django...@googlegroups.com>
Sent: Thu, 6 January, 2011 16:45:59
Subject: Re: manage.py makemessages doesn't create .po files
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsub...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.


skazhy

unread,
Jan 6, 2011, 12:50:24 PM1/6/11
to Django users
Nope, the same as above, no .po files.

On 6 Janv., 19:00, maclin kallat <maclinkal...@yahoo.co.uk> wrote:
> Try using the -e option for adding the extensions.
>
> django-admin.py makemessages -l=lv -e=html,htm
>
> ________________________________
> From: skazhy <ska...@gmail.com>
> To: Django users <django...@googlegroups.com>
> Sent: Thu, 6 January, 2011 16:45:59
> Subject: Re: manage.py makemessages doesn't create .po files
>
> I tried running it with the djang-admin.py, same errors as with
> manage.py.
>
> Karlis
>
> On 6 Janv., 18:30, Shawn Milochik <sh...@milochik.com> wrote:
>
> > It appears that 'makemessages' is meant to be run with django-admin.py,
> > not manage.py.
>
> >http://docs.djangoproject.com/en/dev/topics/i18n/localization/
>
> > Shawn
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages