Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Domain email grammar fixes (#3690)

Marcus Farrell764930998a3d
diff --git a/packages/email/src/templates/domain-expired.tsx b/packages/email/src/templates/domain-expired.tsx
index 9a2df12738..d17417de22 100644
--- a/packages/email/src/templates/domain-expired.tsx
+++ b/packages/email/src/templates/domain-expired.tsx
@@ -43,6 +43,8 @@ export default function DomainExpired({
expiresAt: Date;
}[];
}) {
+ const hasSingleDomain = domains.length === 1;
+
return (
<Html>
<Head />
@@ -59,8 +61,10 @@ export default function DomainExpired({
</Heading>
<Text className="text-sm leading-6 text-neutral-600">
- The following {pluralize("domain", domains.length)} have expired
- and are no longer available to use with your workspace{" "}
+ The following {pluralize("domain", domains.length)}{" "}
+ {hasSingleDomain ? "has" : "have"} expired and{" "}
+ {hasSingleDomain ? "is" : "are"} no longer available to use with
+ your workspace{" "}
<span className="font-semibold text-black">{workspace.name}</span>
.
</Text>
@@ -103,9 +107,12 @@ export default function DomainExpired({
</Section>
<Text className="text-sm leading-6 text-neutral-600">
- If you own any of these {pluralize("domain", domains.length)}{" "}
- again in the future, you can add them to your workspace anytime in
- the{" "}
+ If you own{" "}
+ {hasSingleDomain
+ ? "this domain"
+ : `any of these ${pluralize("domain", domains.length)}`}{" "}
+ again in the future, you can add {hasSingleDomain ? "it" : "them"}{" "}
+ to your workspace anytime in the{" "}
<Link
href={`https://app.dub.co/${workspace.slug}/links/domains`}
className="font-semibold text-black underline"
diff --git a/packages/email/src/templates/domain-renewal-failed.tsx b/packages/email/src/templates/domain-renewal-failed.tsx
index 5370daae29..0e6163dcfb 100644
--- a/packages/email/src/templates/domain-renewal-failed.tsx
+++ b/packages/email/src/templates/domain-renewal-failed.tsx
@@ -42,6 +42,8 @@ export default function DomainRenewalFailed({
expiresAt: Date;
}[];
}) {
+ const hasSingleDomain = domains.length === 1;
+
return (
<Html>
<Head />
@@ -59,8 +61,9 @@ export default function DomainRenewalFailed({
<Text className="text-sm leading-6 text-neutral-600">
We attempted to charge your card to renew the following{" "}
- {pluralize("domain", domains.length)} but it failed. We will try
- again in 3 days.
+ {pluralize("domain", domains.length)} but{" "}
+ {hasSingleDomain ? "it" : "they"} failed. We will try again in 3
+ days.
</Text>
<Section className="my-8">
diff --git a/packages/email/src/templates/domain-renewed.tsx b/packages/email/src/templates/domain-renewed.tsx
index 6f027b36d4..503b8c23e0 100644
--- a/packages/email/src/templates/domain-renewed.tsx
+++ b/packages/email/src/templates/domain-renewed.tsx
@@ -40,10 +40,12 @@ export default function DomainRenewed({
}[];
expiresAt: Date;
}) {
+ const hasSingleDomain = domains.length === 1;
+
return (
<Html>
<Head />
- <Preview>Domain{domains.length > 1 ? "s" : ""} renewed</Preview>
+ <Preview>{pluralize("Domain", domains.length)} renewed</Preview>
<Tailwind>
<Body className="mx-auto my-auto bg-white font-sans">
<Container className="mx-auto my-10 max-w-[600px] px-5 py-5">
@@ -52,12 +54,13 @@ export default function DomainRenewed({
</Section>
<Heading className="mx-0 mb-5 mt-10 p-0 text-lg font-semibold text-neutral-800">
- Domain{domains.length > 1 ? "s" : ""} renewed
+ {pluralize("Domain", domains.length)} renewed
</Heading>
<Text className="text-sm leading-6 text-neutral-600">
- The following {pluralize("domain", domains.length)} have been
- successfully renewed for 1 year:
+ The following {pluralize("domain", domains.length)}{" "}
+ {hasSingleDomain ? "has" : "have"} been successfully renewed for 1
+ year:
</Text>
<Section>
@@ -82,7 +85,8 @@ export default function DomainRenewed({
</Section>
<Text className="text-sm leading-6 text-neutral-600">
- These domains are now active until{" "}
+ {hasSingleDomain ? "This domain is" : "These domains are"} now
+ active until{" "}
<span className="font-semibold text-black">
{formatDate(expiresAt)}
</span>
@@ -90,8 +94,9 @@ export default function DomainRenewed({
</Text>
<Text className="text-sm leading-6 text-neutral-600">
- No further action is needed. If you don't want to renew your
- domains next year, you can turn off auto-renewal in your{" "}
+ No further action is needed. If you don't want to renew your{" "}
+ {pluralize("domain", domains.length)} next year, you can turn off
+ auto-renewal in your{" "}
<Link
href={`https://app.dub.co/${workspace.slug}/settings/domains`}
className="font-semibold text-black underline"
@@ -106,7 +111,7 @@ export default function DomainRenewed({
className="rounded-lg bg-black px-6 py-3 text-center text-[12px] font-semibold text-white no-underline"
href={`https://app.dub.co/${workspace.slug}/settings/domains`}
>
- Manage your domains
+ Manage your {pluralize("domain", domains.length)}
</Link>
</Section>