Merge pull request 'fix: rename Gna! in emails' (#60) from fix-rename-gna-in-emails into master

Reviewed-on: https://gitea.gna.org/Hostea/dashboard/pulls/60
wip-gitea
Loïc Dachary 2022-09-12 08:36:17 -04:00
commit 0ab82fe0b4
12 changed files with 30 additions and 29 deletions

View File

@ -2,7 +2,7 @@ Hello {{ username }},
You have a new password!
Your password for signing in to Hostea was recently changed. If you made this change, then we're all set.
Your password for signing in to Gna! was recently changed. If you made this change, then we're all set.
If you did not make this change, please reset your password to secure your account.
@ -11,4 +11,4 @@ If you did not make this change, please reset your password to secure your accou
Either way, feel free to reach out with any questions you might have. We're here to help.
Cheers,
Hostea team
Gna! team

View File

@ -6,4 +6,4 @@ Please click on the link below to reset your password:
If you don't recognise this activity, please delete this mail.
Cheers,
Hostea team
Gna! team

View File

@ -6,4 +6,4 @@ Please click on the link below to verify your email.
If you don't recognise this activity, please delete this mail.
Cheers,
Hostea team
Gna! team

View File

@ -45,9 +45,9 @@ def send_password_changed_email(request):
sender = settings.DEFAULT_FROM_EMAIL
send_mail(
subject="[Hostea] Password changed",
subject="[Gna!] Password changed",
message=body,
from_email=f"No reply Hostea<{sender}>",
from_email=f"No reply Gna!<{sender}>",
recipient_list=[email],
)
@ -72,9 +72,9 @@ def send_password_reset_email(request, challenge):
sender = settings.DEFAULT_FROM_EMAIL
send_mail(
subject="[Hostea] Password reset link",
subject="[Gna!] Password reset link",
message=body,
from_email=f"No reply Hostea<{sender}>",
from_email=f"No reply Gna!<{sender}>",
recipient_list=[email],
)
@ -99,9 +99,9 @@ def send_verification_email(request, challenge):
sender = settings.DEFAULT_FROM_EMAIL
send_mail(
subject="[Hostea] Please confirm your email address",
subject="[Gna!] Please confirm your email address",
message=body,
from_email=f"No reply Hostea<{sender}>",
from_email=f"No reply Gna!<{sender}>",
recipient_list=[email],
)

View File

@ -1,6 +1,6 @@
Hello {{ username }}!
An invoice is generated for your Hostea VM {{ payment.instance_name }}.
An invoice is generated for your Gna! VM {{ payment.instance_name }}.
- Configuration: {{payment.instance_configuration_id.name}}
- Invoice generated on: {{payment.date.month}}/{{payment.date.day}}/{{payment.date.year}}
@ -11,4 +11,4 @@ To pay, please click the link below:
{{ link }}
Cheers,
Hostea team
Gna! team

View File

@ -1,11 +1,11 @@
Hello {{ username }}!
This is a receipt for your latest Hostea payment.
This is a receipt for your latest Gna! payment.
-----------------------------------------------------
Hostea Receipt - {{payment.date.month}}/{{payment.date.day}}/{{payment.date.year}}
Gna! Receipt - {{payment.date.month}}/{{payment.date.day}}/{{payment.date.year}}
- Instance Name: {{ payment.instance_name }}
- Configuration: {{payment.instance_configuration_id.name}}
@ -19,4 +19,4 @@ To view the receipt online, please see the following link:
We appreciate your business!
Cheers,
Hostea team
Gna! team

View File

@ -98,11 +98,12 @@ class BillingTest(TestCase):
# and then the Gitea instance credentials notification followed by the
# invoice generation email.
receipt_mail = mail.outbox.pop()
print(receipt_mail.body)
self.assertEqual(
all(
[
receipt_mail.to[0] == self.email,
"This is a receipt for your latest Hostea payment"
"This is a receipt for your latest Gna! payment"
in receipt_mail.body,
]
),
@ -114,7 +115,7 @@ class BillingTest(TestCase):
all(
[
instance_notificaiton.to[0] == self.email,
"Congratulations on your new Hostea instance!"
"Congratulations on your new Gna! instance!"
in instance_notificaiton.body,
]
),

View File

@ -128,9 +128,9 @@ def payment_success(request, payment_public_id):
sender = settings.DEFAULT_FROM_EMAIL
send_mail(
subject="[Hostea] Payment receipt your Hostea VM",
subject="[Gna!] Payment receipt your Hostea VM",
message=body,
from_email=f"No reply Hostea<{sender}>", # TODO read from settings.py
from_email=f"No reply Gna!<{sender}>", # TODO read from settings.py
recipient_list=[email],
)

View File

@ -1,12 +1,12 @@
Hello {{ username }},
Congratulations on your new Hostea instance!
Congratulations on your new Gna! instance!
Your Hostea instance is being prepared, you will receive an email
Your Gna! instance is being prepared, you will receive an email
notification when it is ready.
You can use the following credentials to log into an admin account on
your new Hostea Gitea instance. Great powers come with great
your new Gna! Gitea instance. Great powers come with great
responsibilities, so use the admin credentials wisely. When in doubt,
consult the Gitea docs or contact support!
@ -15,4 +15,4 @@ consult the Gitea docs or contact support!
- Gitea {{ gitea_uri }}
Cheers,
Hostea team
Gna! team

View File

@ -1,6 +1,6 @@
Hello {{ username }}!,
The deployment job has run to completion and your Hostea instance is now online!
The deployment job has run to completion and your Gna! instance is now online!
Credentials to admin account was sent in an earlier email, please contact
support if didn't receive it.
@ -8,4 +8,4 @@ Gitea: {{ gitea_uri }}
Woodpecker CI: {{ woodpecker_uri }}
Cheers,
Hostea team
Gna! team

View File

@ -71,9 +71,9 @@ class Worker(Thread):
sender = settings.DEFAULT_FROM_EMAIL
send_mail(
subject="[Hostea] Your Hostea instance is now online!",
subject="[Gna!] Your Gna! instance is now online!",
message=body,
from_email=f"No reply Hostea<{sender}>", # TODO read from settings.py
from_email=f"No reply Gna!<{sender}>", # TODO read from settings.py
recipient_list=[email],
)
job.delete()

View File

@ -69,9 +69,9 @@ def create_instance(request, instance_name: str):
sender = settings.DEFAULT_FROM_EMAIL
send_mail(
subject="[Hostea] Gitea admin credentials",
subject="[Gna!] Gitea admin credentials",
message=body,
from_email=f"No reply Hostea<{sender}>", # TODO read from settings.py
from_email=f"No reply Gna!<{sender}>", # TODO read from settings.py
recipient_list=[request.user.email],
)