Code

Opened 18 months ago

Closed 18 months ago

Last modified 18 months ago

#19718 closed Bug (invalid)

manage.py 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

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.

Attachments (0)

Change History (2)

comment:1 Changed 18 months ago by charettes

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

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 18 months ago by aaugustin

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.