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

German translation for min_value field error message references max_value. #2645

Closed
fabianbuechler opened this issue Mar 6, 2015 · 9 comments
Labels
Milestone

Comments

@fabianbuechler
Copy link
Contributor

The German translation for the min_value error message in IntegerField,FloatField and DecimalField, which is:

'min_value': _('Ensure this value is greater than or equal to {min_value}.'),

references max_value, which leads to errors when .format()-ing this string.

See:
https://github.com/tomchristie/django-rest-framework/blob/master/rest_framework/locale/de/LC_MESSAGES/django.po#L150

#: fields.py:659 fields.py:693 fields.py:726
msgid "Ensure this value is greater than or equal to {min_value}."
msgstr "Stelle sicher, dass dieser Wert größer oder gleich {max_value} ist."

The relevant part of the error is:

  File "###/.virtualenvs/bk/lib/python3.4/site-packages/rest_framework/fields.py", line 755, in __init__
    message = self.error_messages['min_value'].format(min_value=self.min_value)
  File "###/.virtualenvs/bk/lib/python3.4/site-packages/django/utils/functional.py", line 135, in __wrapper__
    return self.__dispatch[t][funcname](res, *args, **kw)
KeyError: 'max_value'
@tomchristie tomchristie added the Bug label Mar 6, 2015
@tomchristie tomchristie modified the milestone: 3.1.1 Release Mar 6, 2015
@fabianbuechler
Copy link
Contributor Author

Good response time, Tom 👍

@tomchristie
Copy link
Member

Well, ain't fixed it yet, but hey it's a start!
You can sign up to the translation team here if you wanted to help get it resolved... https://www.transifex.com/projects/p/django-rest-framework/

@fabianbuechler
Copy link
Contributor Author

Signed up.

@cwirz
Copy link

cwirz commented Mar 7, 2015

Same problem here using the PositiveIntegerField.

@fabianbuechler
Copy link
Contributor Author

Just submitted a fix for the translation in transiflex. No idea what the next step is, since I never used transiflex before.

@tomchristie
Copy link
Member

@fabianbuechler Thank you! You don't need to do anything more - we'll pull in the latest translations and release with 3.1.1.

I'll leave this ticket open until we've pull the latest translations.

@tomchristie
Copy link
Member

Resolved by c573e7b

@cwirz
Copy link

cwirz commented Mar 17, 2015

Thanks!

@tomchristie
Copy link
Member

Welcome - release should be coming soon.

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

3 participants