feat: translate auth and layout components to English

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ivan
2026-03-01 21:22:40 +00:00
parent ec48ff8405
commit 55676f59bd
2 changed files with 17 additions and 17 deletions

View File

@@ -29,15 +29,15 @@ export function LoginForm({ className }: LoginFormProps) {
const newErrors: { email?: string; password?: string } = {}; const newErrors: { email?: string; password?: string } = {};
if (!email) { if (!email) {
newErrors.email = 'El correo electrónico es requerido'; newErrors.email = 'Email is required';
} else if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) { } else if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) {
newErrors.email = 'Ingresa un correo electrónico válido'; newErrors.email = 'Enter a valid email address';
} }
if (!password) { if (!password) {
newErrors.password = 'La contraseña es requerida'; newErrors.password = 'Password is required';
} else if (password.length < 6) { } else if (password.length < 6) {
newErrors.password = 'La contraseña debe tener al menos 6 caracteres'; newErrors.password = 'Password must be at least 6 characters';
} }
setErrors(newErrors); setErrors(newErrors);
@@ -62,13 +62,13 @@ export function LoginForm({ className }: LoginFormProps) {
}); });
if (result?.error) { if (result?.error) {
setError('Credenciales inválidas. Por favor, verifica tu correo y contraseña.'); setError('Invalid credentials. Please check your email and password.');
} else { } else {
router.push(callbackUrl); router.push(callbackUrl);
router.refresh(); router.refresh();
} }
} catch (err) { } catch (err) {
setError('Ocurrió un error al iniciar sesión. Por favor, intenta de nuevo.'); setError('An error occurred while signing in. Please try again.');
} finally { } finally {
setIsLoading(false); setIsLoading(false);
} }
@@ -77,9 +77,9 @@ export function LoginForm({ className }: LoginFormProps) {
return ( return (
<Card className={cn('w-full max-w-md', className)}> <Card className={cn('w-full max-w-md', className)}>
<CardHeader className="space-y-1 text-center"> <CardHeader className="space-y-1 text-center">
<CardTitle className="text-2xl font-bold">Iniciar Sesión</CardTitle> <CardTitle className="text-2xl font-bold">Sign In</CardTitle>
<CardDescription> <CardDescription>
Ingresa tus credenciales para acceder al sistema Enter your credentials to access the system
</CardDescription> </CardDescription>
</CardHeader> </CardHeader>
<CardContent> <CardContent>
@@ -106,12 +106,12 @@ export function LoginForm({ className }: LoginFormProps) {
<div className="space-y-2"> <div className="space-y-2">
<label htmlFor="email" className="text-sm font-medium text-primary-700"> <label htmlFor="email" className="text-sm font-medium text-primary-700">
Correo Electrónico Email
</label> </label>
<Input <Input
id="email" id="email"
type="email" type="email"
placeholder="correo@ejemplo.com" placeholder="email@example.com"
value={email} value={email}
onChange={(e) => { onChange={(e) => {
setEmail(e.target.value); setEmail(e.target.value);
@@ -129,7 +129,7 @@ export function LoginForm({ className }: LoginFormProps) {
<div className="space-y-2"> <div className="space-y-2">
<label htmlFor="password" className="text-sm font-medium text-primary-700"> <label htmlFor="password" className="text-sm font-medium text-primary-700">
Contraseña Password
</label> </label>
<div className="relative"> <div className="relative">
<Input <Input
@@ -199,13 +199,13 @@ export function LoginForm({ className }: LoginFormProps) {
onChange={(e) => setRememberMe(e.target.checked)} onChange={(e) => setRememberMe(e.target.checked)}
className="h-4 w-4 rounded border-primary-300 text-primary focus:ring-primary-500" className="h-4 w-4 rounded border-primary-300 text-primary focus:ring-primary-500"
/> />
<span className="text-sm text-primary-600">Recordarme</span> <span className="text-sm text-primary-600">Remember me</span>
</label> </label>
<a <a
href="#" href="#"
className="text-sm text-primary-600 hover:text-primary-800 hover:underline" className="text-sm text-primary-600 hover:text-primary-800 hover:underline"
> >
¿Olvidaste tu contraseña? Forgot your password?
</a> </a>
</div> </div>
@@ -237,10 +237,10 @@ export function LoginForm({ className }: LoginFormProps) {
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
/> />
</svg> </svg>
Iniciando sesión... Signing in...
</div> </div>
) : ( ) : (
'Iniciar Sesión' 'Sign In'
)} )}
</Button> </Button>
</form> </form>

View File

@@ -26,10 +26,10 @@ export function Header() {
<div className="flex items-center gap-4"> <div className="flex items-center gap-4">
<div className="text-right"> <div className="text-right">
<p className="text-sm font-medium text-primary-800">{session?.user?.name || 'Usuario'}</p> <p className="text-sm font-medium text-primary-800">{session?.user?.name || 'User'}</p>
<p className="text-xs text-primary-500">{displayRole}</p> <p className="text-xs text-primary-500">{displayRole}</p>
</div> </div>
<Button variant="ghost" size="icon" onClick={handleLogout} title="Cerrar sesión"> <Button variant="ghost" size="icon" onClick={handleLogout} title="Log out">
<LogOut className="h-5 w-5" /> <LogOut className="h-5 w-5" />
</Button> </Button>
</div> </div>