Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#19718 closed Bug (invalid)

manage.py makemessages anlalyses lib/python in virtualenv

Reported by: g1234@… Owned by: nobody
Component: Core (Management commands) Version: dev
Severity: Normal Keywords: makemessages virtualenv
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When working with virtualenv to develop django application there is the lib subdirectory under the project root with the whole django installation.

python manage.py makemessages --all

will recurse into all subdirectories under the project root and also into the lib subdirectory. Because of this it will try to generate .po files for all messages in the whole django installation, not only in the project or app developed.

It takes very long to generate all those messages, even worse it breaks the run because of errormesseges from makemessages. Also it makes very big .po files with alot of messages to translate.

It at least should be optional to scan apps outside the project.

Workaround: Move the lib and the local subdirectories out of the way before running ./manage.py makemessages. For example mv lib ..; mv local ..; But then the hole django installation is not working any more. This workaround is working only if the developing computer has also a python and django installation in the /usr path which than can do the makemessages. Probably that is a different version of python and/or django than the one in the virtualenv.

Change History (2)

comment:1 by Simon Charette, 12 years ago

Resolution: invalid
Status: newclosed

There's an --ignore option just for that.

Please use support channels prior to report a bug next time.

By the way you should maybe consider moving re-thinking project layout, you can probably get insights on #django.

comment:2 by Aymeric Augustin, 12 years ago

Yes, you shouldn't be running makemessages for within your virtualenv; it isn't an appropriate location for your application code.

Note: See TracTickets for help on using tickets.
Back to Top