Opened 4 years ago
Last modified 4 years ago
#31914 closed Bug
Django does not pick up .mo files when LOCALE_PATHS is unset — at Version 1
Reported by: | Ondřej Kolín | Owned by: | nobody |
---|---|---|---|
Component: | Internationalization | Version: | 3.1 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
- Set LANGUAGE_CODE and LANGUAGES in settings.py
- You are able to makemessages and compilemessages
- Django is not picking up the translated messages
- Set the LOCALE_PATHS variable in the settings.py
- django now picks the messages
Fragment of settings.py
LANGUAGE_CODE = 'en' LANGUAGES =[ ('en', _('English')), ('cs', _('Czech')) ] LOCALE_PATHS = ( os.path.join(BASE_DIR, 'locale'), )
If this is intended, I think that makemessages/compile messages should fail as well. If not, the discovery should work as well.
Basic dir structure
.
├── db.sqlite3
├── locale
├── manage.py
├── safecloud
├── secshare
└── static
Change History (3)
by , 4 years ago
Attachment: | without_locales_path_set.png added |
---|
by , 4 years ago
Attachment: | with_locales_path_set.png added |
---|
comment:1 by , 4 years ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.
Without locales path set