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.
--
Ticket URL: <https://code.djangoproject.com/ticket/31914>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* Attachment "without_locales_path_set.png" added.
Without locales path set
* Attachment "with_locales_path_set.png" added.
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.
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
--
--
Ticket URL: <https://code.djangoproject.com/ticket/31914#comment:1>
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>
* status: new => closed
* resolution: => fixed
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
>
> cat ./../venv/pyvenv.cfg
> home = /usr/bin
> include-system-site-packages = false
> version = 3.8.3
New description:
Update: Kinda resolved, see my comment.
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
--
Comment:
As @felix pointed on irc.freenode.org #django-dev, the behaviour is
documented.
But I still think this is kinda bug, or at least inconsistent, because,
where is the point to be able to gather messages/compile them, but they
stay unusable in the system, because the var is not set.
I think, that ./managepy compilemessages should throw a warning at least.
--
Ticket URL: <https://code.djangoproject.com/ticket/31914#comment:3>
* resolution: fixed => invalid
--
Ticket URL: <https://code.djangoproject.com/ticket/31914#comment:4>