diff options
| author | Tom Christie | 2014-12-08 15:13:59 +0000 | 
|---|---|---|
| committer | Tom Christie | 2014-12-08 15:13:59 +0000 | 
| commit | 403479338380fd4853128f11b5f7055e925125a5 (patch) | |
| tree | 8a9220d8218a68bf5201e8f12fef435d2703baef /rest_framework | |
| parent | 62cca1eec74d42d46c759a39da606a12ac969027 (diff) | |
| download | django-rest-framework-403479338380fd4853128f11b5f7055e925125a5.tar.bz2 | |
Added missing translation markers in realtions.py. Closes #2231.
Diffstat (limited to 'rest_framework')
| -rw-r--r-- | rest_framework/relations.py | 16 | 
1 files changed, 8 insertions, 8 deletions
| diff --git a/rest_framework/relations.py b/rest_framework/relations.py index 178a8e2b..75d68204 100644 --- a/rest_framework/relations.py +++ b/rest_framework/relations.py @@ -115,9 +115,9 @@ class StringRelatedField(RelatedField):  class PrimaryKeyRelatedField(RelatedField):      default_error_messages = { -        'required': 'This field is required.', -        'does_not_exist': "Invalid pk '{pk_value}' - object does not exist.", -        'incorrect_type': 'Incorrect type. Expected pk value, received {data_type}.', +        'required': _('This field is required.'), +        'does_not_exist': _("Invalid pk '{pk_value}' - object does not exist."), +        'incorrect_type': _('Incorrect type. Expected pk value, received {data_type}.'),      }      def to_internal_value(self, data): @@ -162,11 +162,11 @@ class HyperlinkedRelatedField(RelatedField):      lookup_field = 'pk'      default_error_messages = { -        'required': 'This field is required.', -        'no_match': 'Invalid hyperlink - No URL match', -        'incorrect_match': 'Invalid hyperlink - Incorrect URL match.', -        'does_not_exist': 'Invalid hyperlink - Object does not exist.', -        'incorrect_type': 'Incorrect type. Expected URL string, received {data_type}.', +        'required': _('This field is required.'), +        'no_match': _('Invalid hyperlink - No URL match'), +        'incorrect_match': _('Invalid hyperlink - Incorrect URL match.'), +        'does_not_exist': _('Invalid hyperlink - Object does not exist.'), +        'incorrect_type': _('Incorrect type. Expected URL string, received {data_type}.'),      }      def __init__(self, view_name=None, **kwargs): | 
