diff options
author | INOUE Daisuke <inoue.daisuke@gmail.com> | 2025-03-23 14:06:00 +0900 |
---|---|---|
committer | INOUE Daisuke <inoue.daisuke@gmail.com> | 2025-04-08 22:21:55 +0900 |
commit | 79d28b2a14cfab50b9a5a42e7d85ce7dedc7c180 (patch) | |
tree | 9f87ec42a99312787adbebb9eee2f905b36bd57e /src/routes/magicLink.ts | |
parent | 9b955505e6a8dc4f1dbcd8f12d25996b57cf64df (diff) |
MagicLink translation
Diffstat (limited to 'src/routes/magicLink.ts')
-rw-r--r-- | src/routes/magicLink.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/routes/magicLink.ts b/src/routes/magicLink.ts index b4afca6..5eb424b 100644 --- a/src/routes/magicLink.ts +++ b/src/routes/magicLink.ts @@ -4,6 +4,7 @@ import { sendEmailFromTemplate } from "../lib/email.js"; import { generateMagicLinkToken } from "../util/generator.js"; import MagicLink from "../models/MagicLink.js"; import { getConfigMiddleware } from "../lib/middleware.js"; +import i18next from "i18next"; const router = Router(); @@ -16,7 +17,7 @@ router.post("/magic-link/event/create", async (req: Request, res: Response) => { ...frontendConfig(res), message: { type: "danger", - text: "Please provide an email address.", + text: i18next.t("ml.provideemail"), }, }); return; @@ -31,7 +32,7 @@ router.post("/magic-link/event/create", async (req: Request, res: Response) => { ...frontendConfig(res), message: { type: "success", - text: "Thanks! If this email address can create events, you should receive an email with a magic link.", + text: i18next.t("ml.thanks"), }, }); return; @@ -51,7 +52,7 @@ router.post("/magic-link/event/create", async (req: Request, res: Response) => { sendEmailFromTemplate( email, "", - `Magic link to create an event`, + i18next.t("ml.mailsubject"), "createEventMagicLink", { token, @@ -65,7 +66,7 @@ router.post("/magic-link/event/create", async (req: Request, res: Response) => { ...frontendConfig(res), message: { type: "success", - text: "Thanks! If this email address can create events, you should receive an email with a magic link.", + text: i18next.t("ml.thanks"), }, }); }); |