From 5dc24c8537c80ea4f76c9da570c3762bc46f6d77 Mon Sep 17 00:00:00 2001 From: Max Peintner Date: Thu, 26 Jun 2025 09:56:42 +0200 Subject: [PATCH] fix: ldap translations --- .../login/src/components/ldap-username-password-form.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/login/src/components/ldap-username-password-form.tsx b/apps/login/src/components/ldap-username-password-form.tsx index f7ea9aea0e..2f9824dff2 100644 --- a/apps/login/src/components/ldap-username-password-form.tsx +++ b/apps/login/src/components/ldap-username-password-form.tsx @@ -1,6 +1,7 @@ "use client"; import { createNewSessionForLDAP } from "@/lib/server/idp"; +import { useTranslations } from "next-intl"; import { useRouter } from "next/navigation"; import { useState } from "react"; import { useForm } from "react-hook-form"; @@ -26,6 +27,8 @@ export function LDAPUsernamePasswordForm({ idpId, link }: Props) { mode: "onBlur", }); + const t = useTranslations("ldap"); + const [error, setError] = useState(""); const [loading, setLoading] = useState(false); @@ -66,7 +69,7 @@ export function LDAPUsernamePasswordForm({ idpId, link }: Props) { type="text" autoComplete="username" {...register("loginName", { required: "This field is required" })} - label="Loginname" + label={t("username")} data-testid="username-text-input" /> @@ -75,7 +78,7 @@ export function LDAPUsernamePasswordForm({ idpId, link }: Props) { type="password" autoComplete="password" {...register("password", { required: "This field is required" })} - label="Password" + label={t("password")} data-testid="password-text-input" /> @@ -98,7 +101,7 @@ export function LDAPUsernamePasswordForm({ idpId, link }: Props) { data-testid="submit-button" > {loading && } - +