Skip to content

Commit

Permalink
Merge pull request #96 from City-of-Helsinki/feature/js-free-logout-w…
Browse files Browse the repository at this point in the history
…arning

Implement new logout screen
  • Loading branch information
vikoivun authored Apr 8, 2020
2 parents 5f4b882 + 92e0a51 commit 59ebcf7
Show file tree
Hide file tree
Showing 15 changed files with 630 additions and 196 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ before_install:

install: 'pip install codecov -r requirements.txt -r requirements-dev.txt'

before_script: 'python manage.py compilemessages'

script:
# Run the tests
- flake8
Expand Down
12 changes: 12 additions & 0 deletions auth_backends/facebook.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from django.utils.translation import gettext, pgettext
from social_core.backends.facebook import FacebookOAuth2


class Facebook(FacebookOAuth2):
user_facing_url = 'https://www.facebook.com'
name_baseform = gettext('Facebook')
name_access = pgettext('access to []', 'Facebook')
name_genetive = pgettext('genetive form', 'Facebook')
name_logged_in_to = pgettext('logged in to []', 'Facebook')
name_logout_from = pgettext('log out from []', 'Facebook')
name_goto = pgettext('go to []', 'Facebook')
12 changes: 12 additions & 0 deletions auth_backends/github.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from django.utils.translation import gettext, pgettext
from social_core.backends.github import GithubOAuth2


class Github(GithubOAuth2):
user_facing_url = 'https://github.com'
name_baseform = gettext('GitHub')
name_access = pgettext('access to []', 'GitHub')
name_genetive = pgettext('genetive form', 'GitHub')
name_logged_in_to = pgettext('logged in to []', 'GitHub')
name_logout_from = pgettext('log out from []', 'GitHub')
name_goto = pgettext('go to []', 'GitHub')
8 changes: 8 additions & 0 deletions auth_backends/google.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
from django.utils.translation import gettext, pgettext
from social_core.backends.google import GoogleOAuth2


class GoogleOAuth2CustomName(GoogleOAuth2):
name = 'google'
user_facing_url = 'https://myaccount.google.com/'
name_baseform = gettext('Google')
name_access = pgettext('access to []', 'Google')
name_genetive = pgettext('genetive form', 'Google')
name_logged_in_to = pgettext('logged in to []', 'Google')
name_logout_from = pgettext('log out from []', 'Google')
name_goto = pgettext('go to []', 'Google')
Loading

0 comments on commit 59ebcf7

Please sign in to comment.