From 691ed1bb3a54bbf76542b905171a0f2a151a8f1f Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Jul 24 2023 21:47:12 +0000 Subject: fix: grammar of "log in" "Login" is a noun or adjective. The verb is "log in". This becomes obvious when one attempts present continuous: "I'm logging in", and not "I'm loginning". I also adjusted grammar in surrounding context when I noticed something obvious. I had a few fesco tickets open today without being logged in and the wrong form was hurting me a little every time ;) --- diff --git a/README.rst b/README.rst index 58a3acc..48f2a5e 100644 --- a/README.rst +++ b/README.rst @@ -59,7 +59,7 @@ container with test data and create a new account :: $ docker-compose -f dev/docker-compose.yml exec web python3 dev-data.py --all -You can then login with any of the created users, by example: +You can then log in with any of the created users, by example: - username: pingou - password: testing123 diff --git a/dev/ansible/roles/pagure-dev/files/pagure.cfg b/dev/ansible/roles/pagure-dev/files/pagure.cfg index 2a40a7a..c839a93 100644 --- a/dev/ansible/roles/pagure-dev/files/pagure.cfg +++ b/dev/ansible/roles/pagure-dev/files/pagure.cfg @@ -6,7 +6,7 @@ from pagure.mail_logging import ContextInjector ### Set the time after which the admin session expires # There are two sessions on pagure, login that holds for 31 days and -# the session defined here after which an user has to re-login. +# the session defined here after which an user has to log in again. # This session is used when accessing all administrative parts of pagure # (ie: changing a project's or a user's settings) ADMIN_SESSION_LIFETIME = timedelta(minutes=20000000) diff --git a/doc/configuration.rst b/doc/configuration.rst index 9b6020b..181b077 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -1747,9 +1747,9 @@ ADMIN_SESSION_LIFETIME ~~~~~~~~~~~~~~~~~~~~~~ This configuration key allows specifying the lifetime of the session during -which the user won't have to re-login for admin actions. +which the user won't have to log in again for admin actions. In other words, the maximum time between which an user can access a project's -settings page without re-login. +settings page without a re-login. Defaults to: ``timedelta(minutes=20)`` diff --git a/doc/usage/first_steps.rst b/doc/usage/first_steps.rst index 8a4f3d4..d3d5ec8 100644 --- a/doc/usage/first_steps.rst +++ b/doc/usage/first_steps.rst @@ -6,8 +6,8 @@ First Steps on pagure When coming to pagure for the first time there are a few things one should do or check to ensure all works as desired. -Login to pagure or create your account --------------------------------------- +Log in to pagure or create your account +--------------------------------------- Pagure has its own user account system. @@ -16,7 +16,7 @@ where the authentication is delegated to a third party (in the case of pagure.io, the Fedora Account System) via OpenID, the local user account is created upon login. -This means, you cannot be added to a group or a project before you login for +This means, you cannot be added to a group or a project before you log in for the first time as the system will simply not know you. If you run your own pagure instance which uses the local authentication @@ -54,7 +54,7 @@ the public key that can be uploaded on pagure to give you ssh access. To upload your public key onto pagure: -1. Login into pagure and click on the user icon on +1. Log in to pagure and click on the user icon on the top right corner, there, select ``My settings``. .. image:: _static/pagure_my_settings.png diff --git a/files/pagure.cfg.sample b/files/pagure.cfg.sample index 5789953..26dff0d 100644 --- a/files/pagure.cfg.sample +++ b/files/pagure.cfg.sample @@ -3,7 +3,7 @@ from datetime import timedelta ### Set the time after which the admin session expires # There are two sessions on pagure, login that holds for 31 days and -# the session defined here after which an user has to re-login. +# the session defined here after which an user has to log in again. # This session is used when accessing all administrative parts of pagure # (ie: changing a project's or a user's settings) ADMIN_SESSION_LIFETIME = timedelta(minutes=20) diff --git a/pagure/doc/api.rst b/pagure/doc/api.rst index f4fe072..e5aa536 100644 --- a/pagure/doc/api.rst +++ b/pagure/doc/api.rst @@ -1,7 +1,7 @@ Authentication ~~~~~~~~~~~~~~ -To access some endpoints, you need to login to Pagure using API token. You +To access some endpoints, you need to log in to Pagure using an API token. You can generate one in the project setting page. When sending HTTP request, include an ``Authorization`` field in the header diff --git a/pagure/hooks/rtd.py b/pagure/hooks/rtd.py index 7946613..e313d2b 100644 --- a/pagure/hooks/rtd.py +++ b/pagure/hooks/rtd.py @@ -89,7 +89,7 @@ when a commit is pushed to the repository. If you specify one or more branches (using commas `,` to separate them) only pushes made to these branches will trigger a new build of the documentation. -To set up this hook, you will need to login to https://readthedocs.org/ +To set up this hook, you will need to log in to https://readthedocs.org/ Go to your project's admin settings, and in the ``Integrations`` section add a new ``Generic API incoming webhook``. diff --git a/pagure/templates/issue.html b/pagure/templates/issue.html index ca8f20e..56802e7 100644 --- a/pagure/templates/issue.html +++ b/pagure/templates/issue.html @@ -263,7 +263,7 @@ namespace=repo.namespace, repo=repo.name, issueid=issueid)

{% else %}

- Login + Log in to comment on this ticket.

{% endif %} diff --git a/pagure/templates/pull_request_comment.html b/pagure/templates/pull_request_comment.html index c33dd6b..e013a4d 100644 --- a/pagure/templates/pull_request_comment.html +++ b/pagure/templates/pull_request_comment.html @@ -35,5 +35,5 @@ {% else %} -

Login to comment on this ticket.

+

Log in to comment on this ticket.

{% endif %} diff --git a/pagure/templates/unauthorized.html b/pagure/templates/unauthorized.html index 43ce0cf..629f8fe 100644 --- a/pagure/templates/unauthorized.html +++ b/pagure/templates/unauthorized.html @@ -15,7 +15,7 @@

{{ error.description }}

{% endif %} -

If you're not logged in, try to login; if you're already done, +

If you're not logged in, try to log in; if you've already done so, that probably means you do not have sufficient access.

diff --git a/tests/test_pagure_flask_ui_issues.py b/tests/test_pagure_flask_ui_issues.py index 0af9975..6d763cf 100644 --- a/tests/test_pagure_flask_ui_issues.py +++ b/tests/test_pagure_flask_ui_issues.py @@ -1316,7 +1316,7 @@ class PagureFlaskIssuestests(tests.Modeltests): ) self.assertIn( '' - "Login\n to comment on this ticket.", + "Log in\n to comment on this ticket.", output_text, ) @@ -1359,7 +1359,7 @@ class PagureFlaskIssuestests(tests.Modeltests): ) self.assertIn( '' - "Login\n to comment on this ticket.", + "Log in\n to comment on this ticket.", output_text, ) @@ -1380,7 +1380,7 @@ class PagureFlaskIssuestests(tests.Modeltests): output_text, ) self.assertFalse( - 'Login to comment on this ticket.' + 'Log in to comment on this ticket.' in output_text ) # Not author nor admin = No take @@ -1503,7 +1503,7 @@ class PagureFlaskIssuestests(tests.Modeltests): ) self.assertIn( '' - "Login\n to comment on this ticket.", + "Log in\n to comment on this ticket.", output_text, ) @@ -1530,7 +1530,7 @@ class PagureFlaskIssuestests(tests.Modeltests): output_text, ) self.assertFalse( - 'Login to comment on this ticket.' + 'Log in to comment on this ticket.' in output_text ) # author admin = take @@ -1577,7 +1577,7 @@ class PagureFlaskIssuestests(tests.Modeltests): ) self.assertTrue( '' - "Login\n to comment on this ticket." in output_text + "Log in\n to comment on this ticket." in output_text ) # Create issues to play with @@ -1607,7 +1607,7 @@ class PagureFlaskIssuestests(tests.Modeltests): output_text, ) self.assertFalse( - 'Login to comment on this ticket.' + 'Log in to comment on this ticket.' in output_text ) # user has ticket = take ok @@ -1718,7 +1718,7 @@ class PagureFlaskIssuestests(tests.Modeltests): output_text, ) self.assertNotIn( - 'Login to comment on this ticket.', + 'Log in to comment on this ticket.', output_text, ) # user has ticket = take ok diff --git a/tests/test_pagure_flask_ui_issues_acl_checks.py b/tests/test_pagure_flask_ui_issues_acl_checks.py index 4f890ab..b8af162 100644 --- a/tests/test_pagure_flask_ui_issues_acl_checks.py +++ b/tests/test_pagure_flask_ui_issues_acl_checks.py @@ -110,7 +110,7 @@ class PagureFlaskIssuesACLtests(tests.Modeltests): ) self.assertTrue( '' - "Login\n to comment on this ticket." + "Log in\n to comment on this ticket." in output.get_data(as_text=True) ) @@ -139,7 +139,7 @@ class PagureFlaskIssuesACLtests(tests.Modeltests): output_text, ) self.assertNotIn( - 'Login to comment on this ticket.', + 'Log in to comment on this ticket.', output_text, ) @@ -203,7 +203,7 @@ class PagureFlaskIssuesACLtests(tests.Modeltests): output_text, ) self.assertNotIn( - 'Login to comment on this ticket.', + 'Log in to comment on this ticket.', output_text, ) @@ -373,7 +373,7 @@ class PagureFlaskIssuesACLtests(tests.Modeltests): ) self.assertIn( '' - "Login\n to comment on this ticket.", + "Log in\n to comment on this ticket.", output_text, ) @@ -402,7 +402,7 @@ class PagureFlaskIssuesACLtests(tests.Modeltests): output_text, ) self.assertNotIn( - 'Login to comment on this ticket.', + 'Log in to comment on this ticket.', output_text, ) @@ -628,7 +628,7 @@ class PagureFlaskIssuesACLtests(tests.Modeltests): ) self.assertTrue( '' - "Login\n to comment on this ticket.", + "Log in\n to comment on this ticket.", output_text, ) @@ -657,7 +657,7 @@ class PagureFlaskIssuesACLtests(tests.Modeltests): output_text, ) self.assertNotIn( - 'Login to comment on this ticket.', + 'Log in to comment on this ticket.', output_text, ) @@ -881,7 +881,7 @@ class PagureFlaskIssuesACLtests(tests.Modeltests): ) self.assertTrue( '' - "Login\n to comment on this ticket." + "Log in\n to comment on this ticket." in output.get_data(as_text=True) ) @@ -910,7 +910,7 @@ class PagureFlaskIssuesACLtests(tests.Modeltests): output_text, ) self.assertNotIn( - 'Login to comment on this ticket.', + 'Log in to comment on this ticket.', output_text, ) diff --git a/tests/test_pagure_flask_ui_issues_open_access.py b/tests/test_pagure_flask_ui_issues_open_access.py index 4fa6ff7..6975564 100644 --- a/tests/test_pagure_flask_ui_issues_open_access.py +++ b/tests/test_pagure_flask_ui_issues_open_access.py @@ -214,7 +214,7 @@ class PagureFlaskIssuesOpenAccesstests(tests.Modeltests): ) self.assertIn( '' - "Login\n to comment on this ticket.", + "Log in\n to comment on this ticket.", output_text, ) @@ -235,7 +235,7 @@ class PagureFlaskIssuesOpenAccesstests(tests.Modeltests): output_text, ) self.assertFalse( - 'Login to comment on this ticket.' + 'Log in to comment on this ticket.' in output_text ) # Not author nor admin but open_access = take @@ -314,7 +314,7 @@ class PagureFlaskIssuesOpenAccesstests(tests.Modeltests): ) self.assertTrue( '' - "Login\n to comment on this ticket." in output_text + "Log in\n to comment on this ticket." in output_text ) # Create issues to play with @@ -344,7 +344,7 @@ class PagureFlaskIssuesOpenAccesstests(tests.Modeltests): output_text, ) self.assertFalse( - 'Login to comment on this ticket.' + 'Log in to comment on this ticket.' in output_text ) # user has ticket = take ok @@ -446,7 +446,7 @@ class PagureFlaskIssuesOpenAccesstests(tests.Modeltests): output_text, ) self.assertNotIn( - 'Login to comment on this ticket.', + 'Log in to comment on this ticket.', output_text, ) # user has ticket = take ok diff --git a/tests/test_pagure_flask_ui_login.py b/tests/test_pagure_flask_ui_login.py index 5927cb0..ea6ac99 100644 --- a/tests/test_pagure_flask_ui_login.py +++ b/tests/test_pagure_flask_ui_login.py @@ -297,8 +297,8 @@ class PagureFlaskLogintests(tests.SimplePagureTest): self.assertEqual(item.user, "foouser") self.assertEqual(item.token, None) - # Login but cannot save the session to the DB due to the missing IP - # address in the flask request + # Login works but cannot save the session to the DB due to the missing + # IP address in the flask request data["password"] = "barpass" output = self.app.post("/dologin", data=data, follow_redirects=True) self.assertEqual(output.status_code, 200) @@ -522,7 +522,7 @@ class PagureFlaskLogintests(tests.SimplePagureTest): @patch.dict("pagure.config.config", {"PAGURE_AUTH": "local"}) @patch("pagure.lib.notify.send_email", MagicMock(return_value=True)) def test_non_ascii_password(self): - """Test login and create user functionality when the password is + """Test login and user creation functionality when the password is non-ascii. """