Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translated displays don't work with OrderedDict dict_class #45

Open
spapanik opened this issue Feb 22, 2018 · 1 comment
Open

Translated displays don't work with OrderedDict dict_class #45

spapanik opened this issue Feb 22, 2018 · 1 comment
Labels

Comments

@spapanik
Copy link

Steps to reproduce:

>>> from collections import OrderedDict
>>> from django.utils import translation
>>> from django.utils.translation import gettext_lazy as _
>>> from extended_choices import Choices
>>> STATES = Choices(
...     ('ONLINE',  1, _('Online')),
...     ('OFFLINE', 2, _('Offline')),
...     dict_class=OrderedDict,
... )
>>> translation.activate('fr')
>>> STATES.displays
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/code.py", line 91, in runcode
    exec(code, self.locals)
  File "<console>", line 1, in <module>
KeyError: 'En ligne'
@twidi
Copy link
Owner

twidi commented Feb 22, 2018

Thanks for your report. I guess this one won't be easy.

I don't have time right now, but won't forget to look at this as soon as I can.

@twidi twidi added the bug label Feb 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants