Skip to content

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

@fabianbuechler

Description

@fabianbuechler

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy