Fix translation-of-non-string errors

This commit is contained in:
Ned Batchelder
2016-07-31 09:02:00 -04:00
parent 0c8fcf6af0
commit 9e6a63b68e
2 changed files with 2 additions and 1 deletions

View File

@@ -496,7 +496,7 @@ def shib_login(request):
http://www.incommonfederation.org/attributesummary.html#eduPersonPrincipal
but the configuration is in the shibboleth software.
"""
shib_error_msg = _(dedent(
shib_error_msg = dedent(_(
"""
Your university identity server did not return your ID information to us.
Please try logging in again. (You may need to restart your browser.)

View File

@@ -369,6 +369,7 @@ def validate_user_preference_serializer(serializer, preference_key, preference_v
PreferenceValidationError: the supplied key and/or value for a user preference are invalid.
"""
if preference_value is None or unicode(preference_value).strip() == '':
# pylint: disable=translation-of-non-string
format_string = ugettext_noop(u"Preference '{preference_key}' cannot be set to an empty value.")
raise PreferenceValidationError({
preference_key: {