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 Initial Version

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

  1. Set LANGUAGE_CODE and LANGUAGES in settings.py
  2. You are able to makemessages and compilemessages
  3. Django is not picking up the translated messages
  4. Set the LOCALE_PATHS variable in the settings.py
  5. 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.

Change History (2)

by Ondřej Kolín, 4 years ago

Without locales path set

by Ondřej Kolín, 4 years ago

Attachment: with_locales_path_set.png added
Note: See TracTickets for help on using tickets.
Back to Top