From 58ec7669aed9ebd58fd6095c6a6437bf9f3cf7f1 Mon Sep 17 00:00:00 2001 From: Craig Blaszczyk Date: Wed, 7 Jan 2015 18:22:30 +0000 Subject: [PATCH] swap backticks for double quotes --- rest_framework/exceptions.py | 2 +- rest_framework/fields.py | 12 ++++++------ rest_framework/locale/en_US/LC_MESSAGES/django.po | 8 ++++---- rest_framework/serializers.py | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/rest_framework/exceptions.py b/rest_framework/exceptions.py index f62c9fe39..f954c13e5 100644 --- a/rest_framework/exceptions.py +++ b/rest_framework/exceptions.py @@ -52,7 +52,7 @@ class APIException(Exception): # built in `ValidationError`. For example: # # from rest_framework import serializers -# raise serializers.ValidationError("Value was invalid") +# raise serializers.ValidationError('Value was invalid') class ValidationError(APIException): status_code = status.HTTP_400_BAD_REQUEST diff --git a/rest_framework/fields.py b/rest_framework/fields.py index 76101608e..b80dea603 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -477,7 +477,7 @@ class Field(object): class BooleanField(Field): default_error_messages = { - 'invalid': _('`{input}` is not a valid boolean.') + 'invalid': _('"{input}" is not a valid boolean.') } default_empty_html = False initial = False @@ -505,7 +505,7 @@ class BooleanField(Field): class NullBooleanField(Field): default_error_messages = { - 'invalid': _('`{input}` is not a valid boolean.') + 'invalid': _('"{input}" is not a valid boolean.') } initial = None TRUE_VALUES = set(('t', 'T', 'true', 'True', 'TRUE', '1', 1, True)) @@ -972,7 +972,7 @@ class TimeField(Field): class ChoiceField(Field): default_error_messages = { - 'invalid_choice': _('`{input}` is not a valid choice.') + 'invalid_choice': _('"{input}" is not a valid choice.') } def __init__(self, choices, **kwargs): @@ -1016,8 +1016,8 @@ class ChoiceField(Field): class MultipleChoiceField(ChoiceField): default_error_messages = { - 'invalid_choice': _('`{input}` is not a valid choice.'), - 'not_a_list': _('Expected a list of items but got type `{input_type}`.') + 'invalid_choice': _('"{input}" is not a valid choice.'), + 'not_a_list': _('Expected a list of items but got type "{input_type}".') } default_empty_html = [] @@ -1118,7 +1118,7 @@ class ListField(Field): child = None initial = [] default_error_messages = { - 'not_a_list': _('Expected a list of items but got type `{input_type}`.') + 'not_a_list': _('Expected a list of items but got type "{input_type}".') } def __init__(self, *args, **kwargs): diff --git a/rest_framework/locale/en_US/LC_MESSAGES/django.po b/rest_framework/locale/en_US/LC_MESSAGES/django.po index c8fc7f4d7..d98225ce9 100644 --- a/rest_framework/locale/en_US/LC_MESSAGES/django.po +++ b/rest_framework/locale/en_US/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-01-07 12:28+0000\n" +"POT-Creation-Date: 2015-01-07 18:21+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -111,7 +111,7 @@ msgid "This field may not be null." msgstr "" #: fields.py:480 fields.py:508 -msgid "`{input}` is not a valid boolean." +msgid "\"{input}\" is not a valid boolean." msgstr "" #: fields.py:543 @@ -199,11 +199,11 @@ msgid "Time has wrong format. Use one of these formats instead: {format}." msgstr "" #: fields.py:975 fields.py:1019 -msgid "`{input}` is not a valid choice." +msgid "\"{input}\" is not a valid choice." msgstr "" #: fields.py:1020 fields.py:1121 serializers.py:476 -msgid "Expected a list of items but got type `{input_type}`." +msgid "Expected a list of items but got type \"{input_type}\"." msgstr "" #: fields.py:1050 diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py index 623ed5865..5bfbd2351 100644 --- a/rest_framework/serializers.py +++ b/rest_framework/serializers.py @@ -473,7 +473,7 @@ class ListSerializer(BaseSerializer): many = True default_error_messages = { - 'not_a_list': _('Expected a list of items but got type `{input_type}`.') + 'not_a_list': _('Expected a list of items but got type "{input_type}".') } def __init__(self, *args, **kwargs):