diff --git a/401.spt b/401.spt index 0b2d0e1320..e3773fe2e1 100644 --- a/401.spt +++ b/401.spt @@ -4,7 +4,8 @@ banner = "401" [---] text/html via jinja2 {% extends "templates/base.html" %} {% block content %} -Please {% include "templates/sign-in-using.html" %} to continue. +
{{ _('Please sign in to continue.') }}
+{{ sign_in_using() }}
{% endblock %} [---] application/json via stdlib_percent { "error_code": 401 diff --git a/410.spt b/410.spt index 833b2dbcd7..7b4b7738a3 100644 --- a/410.spt +++ b/410.spt @@ -8,7 +8,8 @@ title = _('Closed') if 'username' in request.path else '410'{{ _("The account owner has closed this account.") }}
{% if user.ANON %}{% include "templates/sign-in-using.html" %} {{ _("to reopen your account.") }}
+{{ _("You may reopen your account by signing in.") }}
+{{ sign_in_using() }}
{% endif %} {% else %}{{ status_strings[410] }}
diff --git a/defaults.env b/defaults.env index 54925d4325..9955681575 100644 --- a/defaults.env +++ b/defaults.env @@ -96,11 +96,11 @@ ASPEN_WWW_ROOT=www/ # https://github.com/benoitc/gunicorn/issues/186 GUNICORN_OPTS="--workers=1 --timeout=99999999" -# For testing Team review ticket posting +# For testing project review ticket posting # Set your own username and an access token in local.env -TEAM_REVIEW_REPO=gratipay/test-gremlin -TEAM_REVIEW_USERNAME= -TEAM_REVIEW_TOKEN= +PROJECT_REVIEW_REPO= +PROJECT_REVIEW_USERNAME= +PROJECT_REVIEW_TOKEN= RAISE_SIGNIN_NOTIFICATIONS=no diff --git a/emails/verification-notice.spt b/emails/verification-notice.spt new file mode 100644 index 0000000000..d6675cb568 --- /dev/null +++ b/emails/verification-notice.spt @@ -0,0 +1,72 @@ +{{ _("New activity on your account") }} + +[---] text/html +{% if new_email_verified %} +{{ ngettext( "We are connecting the {package_name} npm package to the {username} account on " + "Gratipay. This is a notification sent to {email_address} because that is the " + "primary email address we have on file." + , "We are connecting {n} npm packages to the {username} account on Gratipay. This is " + "a notification sent to {email_address} because that is the primary email address " + "we have on file." + , n=npackages + , package_name=('{}'|safe).format(package_name) + , username=('{0}'|safe).format(username) + , email_address=('{}'|safe).format(email) + ) }} +{% elif npackages > 0 %} +{{ ngettext( "We are connecting {email_address} and the {package_name} npm package to the " + "{username} account on Gratipay. This is a notification sent to {email_address_2} " + "because that is the primary email address we have on file." + , "We are connecting {email_address} and {n} npm packages to the {username} account on " + "Gratipay. This is a notification sent to {email_address_2} because that is the " + "primary email address we have on file." + , n=npackages + , package_name=('{}'|safe).format(package_name) + , username=('{0}'|safe).format(username) + , email_address=('{}'|safe).format(new_email) + , email_address_2=('{}'|safe).format(email) + ) }} +{% else %} +{{ _( "We are connecting {email_address} to the {username} account on Gratipay. This is a " + "notification sent to {email_address_2} because that is the primary email address we have " + "on file." + , username=('{0}'|safe).format(username) + , email_address=('{}'|safe).format(new_email) + , email_address_2=('{}'|safe).format(email) + ) }} + {% endif %} +[---] text/plain +{% if new_email_verified %} +{{ ngettext( "We are connecting the {package_name} npm package to the {username} account on " + "Gratipay. This is a notification sent to {email_address} because that is the " + "primary email address we have on file." + , "We are connecting {n} npm packages to the {username} account on Gratipay. This is " + "a notification sent to {email_address} because that is the primary email address " + "we have on file." + , n=npackages + , package_name=package_name + , username=username + , email_address=email + ) }} +{% elif npackages > 0 %} +{{ ngettext( "We are connecting {email_address} and the {package_name} npm package to the " + "{username} account on Gratipay. This is a notification sent to {email_address_2} " + "because that is the primary email address we have on file." + , "We are connecting {email_address} and {n} npm packages to the {username} account on " + "Gratipay. This is a notification sent to {email_address_2} because that is the " + "primary email address we have on file." + , n=npackages + , package_name=package_name + , username=username + , email_address=new_email + , email_address_2=email + ) }} +{% else %} +{{ _( "We are connecting {email_address} to the {username} account on Gratipay. This is a " + "notification sent to {email_address_2} because that is the primary email address we have " + "on file." + , username=username + , email_address=new_email + , email_address_2=email + ) }} + {% endif %} diff --git a/emails/verification.spt b/emails/verification.spt index 906c24a505..bdbc60c90a 100644 --- a/emails/verification.spt +++ b/emails/verification.spt @@ -1,17 +1,64 @@ {{ _("Connect to {0} on Gratipay?", username) }} [---] text/html -{{ _("We've received a request to connect {0} to the {1} account on Gratipay. Sound familiar?", - ('%s'|safe) % email, - ('{0}'|safe).format(username)) }} +{% if new_email_verified %} +{{ ngettext( "We've received a request to connect the {package_name} npm package to the " + "{username} account on Gratipay. Sound familiar?" + , "We've received a request to connect {n} npm packages to the {username} account " + "on Gratipay. Sound familiar?" + , n=npackages + , package_name=('{}'|safe).format(package_name) + , username=('{0}'|safe).format(username) + ) }} +{% elif npackages > 0 %} +{{ ngettext( "We've received a request to connect {email_address} and the {package_name} npm " + "package to the {username} account on Gratipay. Sound familiar?" + , "We've received a request to connect {email_address} and {n} npm packages to the " + "{username} account on Gratipay. Sound familiar?" + , n=npackages + , package_name=('{}'|safe).format(package_name) + , email_address=('{}'|safe).format(new_email) + , username=('{0}'|safe).format(username) + ) }} +{% else %} +{{ _( "We've received a request to connect {email_address} to the {username} account on Gratipay. " + "Sound familiar?" + , email_address=('{}'|safe).format(new_email) + , username=('{0}'|safe).format(username) + ) }} +{% endif %}{{ _('Is this yours? You can claim it on Gratipay with a couple clicks:') }}
- {% include "templates/sign-in-using.html" %} -{{ _('Gratipay helps companies and others pay for open source.') }} - {{ _("Learn more") }}
+{% if package.description %} +{{ package.description }}
+{% else %} +{{ _("No description available.") }}
+{% endif %} + ++ {{ _( 'Apply to accept payments for the {package_link} npm package:' + , package_link=('' + package_name + '')|safe + ) }} +
+ +{% if user.ANON %} + {% else %} -{{ _( 'Is this yours? You can claim it on Gratipay using any email address {a}on file{_a} in the maintainers field in the npm registry.' - , a=('')|safe - , _a=''|safe - ) }} - {% if len(package.emails) == 0 %} -
{{ _("Sorry, we didn't find any email addresses on file.") }}
+ {% if len(emails) == 0 %} +{{ _("No email addresses on file.") }}
{% else %} -{{ _( 'Addresses are from {a}{code}maintainers{_code}{_a}.'
+ , a=('')|safe
+ , _a=''|safe
+ , code=''|safe
+ , _code='
'|safe
+ ) }}
{{ _( 'Out of date? Update {a}at npm{_a} and refresh.' + , a=('')|safe + , _a=''|safe + ) }}
{% endif %} {% endblock %} diff --git a/www/search.spt b/www/search.spt index 7e6ed84b6b..4890736a7d 100644 --- a/www/search.spt +++ b/www/search.spt @@ -149,7 +149,7 @@ zip = zip {% from 'templates/list-participants.html' import list_participants with context %} {% block content %} -{{ last_bill_result }}