diff --git a/passbook/sources/oauth/forms.py b/passbook/sources/oauth/forms.py index 0f9dfefde..04be391ec 100644 --- a/passbook/sources/oauth/forms.py +++ b/passbook/sources/oauth/forms.py @@ -38,12 +38,6 @@ class OAuthSourceForm(forms.ModelForm): "provider_type": forms.Select(choices=MANAGER.get_name_tuple()), "policies": FilteredSelectMultiple(_("policies"), False), } - labels = { - "request_token_url": _("Request Token URL"), - "authorization_url": _("Authorization URL"), - "access_token_url": _("Access Token URL"), - "profile_url": _("Profile URL"), - } class GitHubOAuthSourceForm(OAuthSourceForm): diff --git a/passbook/sources/oauth/models.py b/passbook/sources/oauth/models.py index 165f24321..40d070df6 100644 --- a/passbook/sources/oauth/models.py +++ b/passbook/sources/oauth/models.py @@ -2,7 +2,7 @@ from django.db import models from django.urls import reverse, reverse_lazy -from django.utils.translation import gettext as _ +from django.utils.translation import gettext_lazy as _ from passbook.core.models import Source, UserSettings, UserSourceConnection from passbook.sources.oauth.clients import get_client @@ -12,10 +12,16 @@ class OAuthSource(Source): """Configuration for OAuth provider.""" provider_type = models.CharField(max_length=255) - request_token_url = models.CharField(blank=True, max_length=255) - authorization_url = models.CharField(max_length=255) - access_token_url = models.CharField(max_length=255) - profile_url = models.CharField(max_length=255) + request_token_url = models.CharField( + blank=True, max_length=255, verbose_name=_("Request Token URL") + ) + authorization_url = models.CharField( + max_length=255, verbose_name=_("Authorization URL") + ) + access_token_url = models.CharField( + max_length=255, verbose_name=_("Access Token URL") + ) + profile_url = models.CharField(max_length=255, verbose_name=_("Profile URL")) consumer_key = models.TextField() consumer_secret = models.TextField()