  from __future__ import unicode_literals
  import base64
  from django.contrib.auth import authenticate
  from django.middleware.csrf import CsrfViewMiddleware
  from rest_framework import exceptions, HTTP_HEADER_ENCODING
  from rest_framework.authtoken.models import Token
  
  
  def get_authorization_header(request):
 
</s> remove # raise serializers.ValidationError('Value was invalid')
 </s> add # raise serializers.ValidationError("Value was invalid") </s> remove             msg = 'Invalid basic header. Credentials not correctly base64 encoded'
 </s> add             msg = _("Invalid basic header. Credentials not correctly base64 encoded.") </s> remove             msg = 'Invalid token header. Token string should not contain spaces.'
 </s> add             msg = _("Invalid token header. Token string should not contain spaces.") </s> remove             msg = 'Invalid token header. No credentials provided.'
 </s> add             msg = _("Invalid token header. No credentials provided.") </s> remove         'invalid': _('Enter a valid email address.')
 </s> add         'invalid': _("Enter a valid email address.")
from django.utils.translation import ugettext_lazy as _
  from __future__ import unicode_literals
  import base64
  from django.contrib.auth import authenticate
  from django.middleware.csrf import CsrfViewMiddleware
from django.utils.translation import ugettext_lazy as _
  from rest_framework import exceptions, HTTP_HEADER_ENCODING
  from rest_framework.authtoken.models import Token
  
  
  def get_authorization_header(request):
keep keep keep add keep keep keep keep keep
 use double quotes for user visible strings; end user visible strings in full stops; add some missing translation tags 
rest_framework/authentication.py