#23584 closed Bug (needsinfo)
makemessages only looks in the current folder
Reported by: | Eduard Luca | Owned by: | nobody |
---|---|---|---|
Component: | Translations | Version: | 1.7 |
Severity: | Normal | Keywords: | localization |
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 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.
Change History (2)
comment:1 by , 10 years ago
Resolution: | → needsinfo |
---|---|
Status: | new → closed |
comment:2 by , 10 years ago
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.
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?