[Django] #23584: makemessages only looks in the current folder

8 views
Skip to first unread message

Django

unread,
Oct 2, 2014, 8:53:38 AM10/2/14
to django-...@googlegroups.com
#23584: makemessages only looks in the current folder
------------------------------+--------------------------
Reporter: edu2004eu | Owner: nobody
Type: Bug | Status: new
Component: Translations | Version: 1.7
Severity: Normal | Keywords: localization
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+--------------------------
When running `django-admin.py makemessages` (with the appropriate
arguments), it doesn't generate po files for Javascript files which use
`gettext`. As far as I can tell, it's because in
`core/management/commands/makemessages.py` at line 304, there's `file_list
= self.find_files(".")`, which means it only looks in the current
directory (and subdirs), meaning it won't ever look in either
`STATIC_ROOT` or `STATICFILES_DIRS` (still a bit fuzzy which one is
which).

Unless there's an obvious thing I'm missing here, I'd treat this as either
one of the following:
- a bug, because it should look in JS files too
- a feature request to add a --lookup_path argument

The current workaround is to run manage.py from whatever folder you want
it to look in.

--
Ticket URL: <https://code.djangoproject.com/ticket/23584>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 2, 2014, 12:13:48 PM10/2/14
to django-...@googlegroups.com
#23584: makemessages only looks in the current folder
------------------------------+--------------------------------------
Reporter: edu2004eu | Owner: nobody
Type: Bug | Status: closed
Component: Translations | Version: 1.7
Severity: Normal | Resolution: needsinfo

Keywords: localization | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------------+--------------------------------------
Changes (by claudep):

* status: new => closed
* needs_docs: => 0
* resolution: => needsinfo
* needs_tests: => 0
* needs_better_patch: => 0


Comment:

If your `STATIC_ROOT` setting is pointing to some files actually in your
source tree, you're doing it wrong, see #23583.
Now if the above doesn't explain your issue entirely, could you please
make a sample project where we could reproduce the problem?

--
Ticket URL: <https://code.djangoproject.com/ticket/23584#comment:1>

Django

unread,
Oct 7, 2014, 10:56:37 AM10/7/14
to django-...@googlegroups.com
#23584: makemessages only looks in the current folder
------------------------------+--------------------------------------
Reporter: edu2004eu | Owner: nobody
Type: Bug | Status: closed
Component: Translations | Version: 1.7
Severity: Normal | Resolution: needsinfo

Keywords: localization | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------------+--------------------------------------

Comment (by edu2004eu):

I did see that issue, and corrected my mistake, however the result was
still the same. I also printed `self.ignore_patterns` and it doesn't
contain the folder with my static files.

I still believe it's to do with the line I originally posted, but I will
try to create a minimal sample project with this issue and re-open.

--
Ticket URL: <https://code.djangoproject.com/ticket/23584#comment:2>

Reply all
Reply to author
Forward
0 new messages