Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#19718 closed Bug (invalid) makemessages anlalyses lib/python in virtualenv

Reported by: g1234@… Owned by: nobody
Component: Core (Management commands) Version: master
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


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

python 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 ./ 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 Changed 6 years ago by Simon Charette

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 Changed 6 years ago by Aymeric Augustin

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