diff --git a/src/app/[locale]/login/page.tsx b/src/app/[locale]/login/page.tsx
index de1693a..fff77b7 100644
--- a/src/app/[locale]/login/page.tsx
+++ b/src/app/[locale]/login/page.tsx
@@ -1,6 +1,7 @@
"use client";
import { FormEvent, useState } from "react";
+import { useTranslations } from "next-intl";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { MarkdownContent } from "@/app/components/MarkdownContent";
@@ -19,6 +20,7 @@ function returnPath(): string {
}
export default function LoginPage() {
+ const t = useTranslations("login");
const publicConfig = usePublicSystemConfig();
const [username, setUsername] = useState("");
const [password, setPassword] = useState("");
@@ -69,13 +71,15 @@ export default function LoginPage() {
setCaptchaRequired(true);
await refreshCaptcha();
}
- throw new Error(body.error || "Unable to sign in.");
+ throw new Error(body.error || t("unableToSignIn"));
}
window.location.replace(
body.redirectTo || localizedPath("/", window.location.pathname)
);
} catch (reason) {
- setError(reason instanceof Error ? reason.message : "Unable to sign in.");
+ setError(
+ reason instanceof Error ? reason.message : t("unableToSignIn")
+ );
setSubmitting(false);
}
};
@@ -97,7 +101,9 @@ export default function LoginPage() {
{publicConfig?.wordmark ?? DEFAULT_WORDMARK}
- Sign in to continue
+
+ {t("signInToContinue")}
+
{publicConfig?.loginTerms.enabled && publicConfig.loginTerms.markdown && (
@@ -107,7 +113,7 @@ export default function LoginPage() {
)}
{captchaRequired && (