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 } = {};
if (!email) {
newErrors.email = 'El correo electrónico es requerido';
newErrors.email = 'Email is required';
} 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) {
newErrors.password = 'La contraseña es requerida';
newErrors.password = 'Password is required';
} 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);
@@ -62,13 +62,13 @@ export function LoginForm({ className }: LoginFormProps) {
});
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 {
router.push(callbackUrl);
router.refresh();
}
} 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 {
setIsLoading(false);
}
@@ -77,9 +77,9 @@ export function LoginForm({ className }: LoginFormProps) {
return (
<Card className={cn('w-full max-w-md', className)}>
<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>
Ingresa tus credenciales para acceder al sistema
Enter your credentials to access the system
</CardDescription>
</CardHeader>
<CardContent>
@@ -106,12 +106,12 @@ export function LoginForm({ className }: LoginFormProps) {
<div className="space-y-2">
<label htmlFor="email" className="text-sm font-medium text-primary-700">
Correo Electrónico
Email
</label>
<Input
id="email"
type="email"
placeholder="correo@ejemplo.com"
placeholder="email@example.com"
value={email}
onChange={(e) => {
setEmail(e.target.value);
@@ -129,7 +129,7 @@ export function LoginForm({ className }: LoginFormProps) {
<div className="space-y-2">
<label htmlFor="password" className="text-sm font-medium text-primary-700">
Contraseña
Password
</label>
<div className="relative">
<Input
@@ -199,13 +199,13 @@ export function LoginForm({ className }: LoginFormProps) {
onChange={(e) => setRememberMe(e.target.checked)}
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>
<a
href="#"
className="text-sm text-primary-600 hover:text-primary-800 hover:underline"
>
¿Olvidaste tu contraseña?
Forgot your password?
</a>
</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"
/>
</svg>
Iniciando sesión...
Signing in...
</div>
) : (
'Iniciar Sesión'
'Sign In'
)}
</Button>
</form>

View File

@@ -26,10 +26,10 @@ export function Header() {
<div className="flex items-center gap-4">
<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>
</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" />
</Button>
</div>