#31914: Django does not pick up .mo files when LOCALE_PATHS is unset
-------------------------------------+-------------------------------------
     Reporter:  Ondřej Kolín         |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:                       |                  Version:  3.1
  Internationalization               |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Description changed by Ondřej Kolín:

Old 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.
>
> Basic dir structure
> .
> ├── db.sqlite3
> ├── locale
> ├── manage.py
> ├── safecloud
> ├── secshare
> └── static

New 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.

 Basic dir structure
 .
 ├── db.sqlite3
 ├── locale
 ├── manage.py
 ├── safecloud
 ├── secshare
 └── static

 cat ./../venv/pyvenv.cfg
 home = /usr/bin
 include-system-site-packages = false
 version = 3.8.3

--

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.6463c63d189ef1b818a2fb271e86f8bc%40djangoproject.com.

Reply via email to