feat: localize various UI texts and labels to Spanish across application pages and interactive components.

This commit is contained in:
2026-01-16 23:25:36 -03:00
parent 2cfd1f204b
commit ffbef17396
19 changed files with 178 additions and 181 deletions
+17 -20
View File
@@ -28,7 +28,7 @@ export default function ExperienceLoginPage() {
// Verify user is a student
if (response.user.role !== "student") {
setError("Access denied. This portal is for students only. Please use the Studio portal for instructors.");
setError("Acceso denegado. Este portal es solo para estudiantes. Utiliza el portal de Studio para instructores.");
setLoading(false);
return;
}
@@ -47,7 +47,7 @@ export default function ExperienceLoginPage() {
router.push("/");
}
} catch (err) {
setError(err instanceof Error ? err.message : "Authentication failed");
setError(err instanceof Error ? err.message : "Falló la autenticación");
} finally {
setLoading(false);
}
@@ -61,8 +61,8 @@ export default function ExperienceLoginPage() {
<div className="inline-flex items-center justify-center w-16 h-16 bg-indigo-600 rounded-2xl mb-4">
<GraduationCap className="w-8 h-8 text-white" />
</div>
<h1 className="text-3xl font-black text-white mb-2">OpenCCB Experience</h1>
<p className="text-gray-400">Student Learning Portal</p>
<h1 className="text-3xl font-black text-white mb-2">Experiencia OpenCCB</h1>
Portal de Aprendizaje para Estudiantes
</div>
{/* Login/Register Form */}
@@ -72,15 +72,12 @@ export default function ExperienceLoginPage() {
onClick={() => setIsLogin(true)}
className={`flex-1 py-2 px-4 rounded-lg font-bold transition-all ${isLogin ? "bg-indigo-600 text-white" : "text-gray-400 hover:text-white"
}`}
>
Login
</button>
Iniciar Sesión/button>
<button
onClick={() => setIsLogin(false)}
className={`flex-1 py-2 px-4 rounded-lg font-bold transition-all ${!isLogin ? "bg-indigo-600 text-white" : "text-gray-400 hover:text-white"
}`}
>
Register
> Registrarse
</button>
</div>
@@ -88,7 +85,7 @@ export default function ExperienceLoginPage() {
{!isLogin && (
<div>
<label className="block text-sm font-bold text-gray-300 mb-2">
Full Name
Nombre Completo
</label>
<div className="relative">
<User className="absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400" />
@@ -106,7 +103,7 @@ export default function ExperienceLoginPage() {
{!isLogin && (
<div>
<label className="block text-sm font-bold text-gray-300 mb-2">
Organization Name (Optional)
Nombre de la Organización (Opcional)
</label>
<div className="relative">
<Building2 className="absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400" />
@@ -115,16 +112,16 @@ export default function ExperienceLoginPage() {
value={organizationName}
onChange={(e) => setOrganizationName(e.target.value)}
className="w-full bg-white/5 border border-white/10 rounded-xl py-3 pl-11 pr-4 text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500"
placeholder="Your School or Company"
placeholder="Tu Escuela o Empresa"
/>
</div>
<p className="text-xs text-gray-500 mt-2 pl-1">If left blank, an organization will be created based on your email domain.</p>
<p className="text-xs text-gray-500 mt-2 pl-1">Si se deja en blanco, se creará una organización basada en el dominio de tu correo electrónico.</p>
</div>
)}
<div>
<label className="block text-sm font-bold text-gray-300 mb-2">
Email
Correo Electrónico
</label>
<div className="relative">
<Mail className="absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400" />
@@ -133,7 +130,7 @@ export default function ExperienceLoginPage() {
value={email}
onChange={(e) => setEmail(e.target.value)}
className="w-full bg-white/5 border border-white/10 rounded-xl py-3 pl-11 pr-4 text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500"
placeholder="student@example.com"
placeholder="estudiante@ejemplo.com"
required
/>
</div>
@@ -141,7 +138,7 @@ export default function ExperienceLoginPage() {
<div>
<label className="block text-sm font-bold text-gray-300 mb-2">
Password
Contraseña
</label>
<div className="relative">
<Lock className="absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400" />
@@ -167,22 +164,22 @@ export default function ExperienceLoginPage() {
disabled={loading}
className="w-full bg-indigo-600 hover:bg-indigo-700 text-white font-bold py-3 rounded-xl transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
>
{loading ? "Processing..." : isLogin ? "Sign In" : "Create Account"}
{loading ? "Procesando..." : isLogin ? "Iniciar Sesión" : "Crear Cuenta"}
</button>
</form>
<div className="mt-6 pt-6 border-t border-white/10 text-center">
<p className="text-sm text-gray-400">
Are you an instructor?{" "}
¿Eres un instructor?{" "}
<a href="http://localhost:3000/auth/login" className="text-indigo-400 hover:text-indigo-300 font-bold">
Go to Instructor Portal
Ir al Portal de Instructores
</a>
</p>
</div>
</div>
<p className="text-center text-xs text-gray-500 mt-6">
OpenCCB Experience - Student Learning Portal
Experiencia OpenCCB - Portal de Aprendizaje para Estudiantes
</p>
</div>
</div>
+11 -11
View File
@@ -27,7 +27,7 @@ export default function RegisterPage() {
login(res.user, res.token);
router.push("/");
} catch (err) {
const message = err instanceof Error ? err.message : "Registration failed. Please try again.";
const message = err instanceof Error ? err.message : "El registro falló. Por favor, inténtalo de nuevo.";
setError(message);
} finally {
setLoading(false);
@@ -41,8 +41,8 @@ export default function RegisterPage() {
<div className="w-16 h-16 rounded-2xl bg-blue-600/10 border border-blue-500/20 flex items-center justify-center mx-auto text-blue-500 mb-6">
<UserPlus size={32} />
</div>
<h1 className="text-3xl font-black tracking-tighter text-white">Create Account</h1>
<p className="text-gray-500 font-bold uppercase tracking-widest text-[10px]">Join the next generation of learners</p>
<h1 className="text-3xl font-black tracking-tighter text-white">Crear Cuenta</h1>
<p className="text-gray-500 font-bold uppercase tracking-widest text-[10px]">Únete a la próxima generación de aprendices</p>
</div>
<div className="glass-card p-8 border-white/5 bg-white/[0.02]">
@@ -54,7 +54,7 @@ export default function RegisterPage() {
)}
<div className="space-y-2">
<label className="text-[10px] font-black uppercase tracking-widest text-gray-500 px-1">Full Name</label>
<label className="text-[10px] font-black uppercase tracking-widest text-gray-500 px-1">Nombre Completo</label>
<div className="relative">
<User className="absolute left-4 top-1/2 -translate-y-1/2 text-gray-500" size={18} />
<input
@@ -69,7 +69,7 @@ export default function RegisterPage() {
</div>
<div className="space-y-2">
<label className="text-[10px] font-black uppercase tracking-widest text-gray-500 px-1">Email Address</label>
<label className="text-[10px] font-black uppercase tracking-widest text-gray-500 px-1">Dirección de Correo Electrónico</label>
<div className="relative">
<Mail className="absolute left-4 top-1/2 -translate-y-1/2 text-gray-500" size={18} />
<input
@@ -84,7 +84,7 @@ export default function RegisterPage() {
</div>
<div className="space-y-2">
<label className="text-[10px] font-black uppercase tracking-widest text-gray-500 px-1">Password</label>
<label className="text-[10px] font-black uppercase tracking-widest text-gray-500 px-1">Contraseña</label>
<div className="relative">
<Lock className="absolute left-4 top-1/2 -translate-y-1/2 text-gray-500" size={18} />
<input
@@ -99,18 +99,18 @@ export default function RegisterPage() {
</div>
<div className="space-y-2">
<label className="text-[10px] font-black uppercase tracking-widest text-gray-500 px-1">Organization Name (Optional)</label>
<label className="text-[10px] font-black uppercase tracking-widest text-gray-500 px-1">Nombre de la Organización (Opcional)</label>
<div className="relative">
<Building2 className="absolute left-4 top-1/2 -translate-y-1/2 text-gray-500" size={18} />
<input
type="text"
value={organizationName}
onChange={(e) => setOrganizationName(e.target.value)}
placeholder="Your School or Company"
placeholder="Tu Escuela o Empresa"
className="w-full bg-white/5 border border-white/10 rounded-xl py-4 pl-12 pr-4 text-sm text-white focus:outline-none focus:border-blue-500 transition-all"
/>
</div>
<p className="text-[10px] text-gray-600 px-1">If blank, we&apos;ll use your email domain.</p>
<p className="text-[10px] text-gray-600 px-1">Si está en blanco, usaremos el dominio de tu correo electrónico.</p>
</div>
<button
@@ -118,13 +118,13 @@ export default function RegisterPage() {
type="submit"
className="btn-premium w-full !py-4 font-black text-xs uppercase tracking-[0.2em] shadow-xl shadow-blue-500/20 disabled:opacity-50"
>
{loading ? "Creating..." : "Start Learning"}
{loading ? "Creando..." : "Comenzar a Aprender"}
</button>
</form>
</div>
<p className="text-center text-[10px] font-bold uppercase tracking-widest text-gray-600">
Already have an account? <Link href="/auth/login" className="text-blue-500 hover:text-blue-400">Login here</Link>
¿Ya tienes una cuenta? <Link href="/auth/login" className="text-blue-500 hover:text-blue-400">Inicia sesión aquí</Link>
</p>
</div>
</div>