From 50518b376b83b82685df82a96e75f32454f9ab99 Mon Sep 17 00:00:00 2001 From: gabriel Date: Sun, 31 May 2026 18:37:36 +0200 Subject: [PATCH] fix: add missing i18n keys for TeamManagement and remove hardcoded fallbacks --- apps/web/src/locales/en/translation.json | 16 +++++++++++-- apps/web/src/locales/es/translation.json | 16 +++++++++++-- apps/web/src/pages/TeamManagement.tsx | 30 ++++++++++++------------ apps/web/src/pages/TeamRoster.tsx | 2 +- 4 files changed, 44 insertions(+), 20 deletions(-) diff --git a/apps/web/src/locales/en/translation.json b/apps/web/src/locales/en/translation.json index 4b15093..390d1e6 100644 --- a/apps/web/src/locales/en/translation.json +++ b/apps/web/src/locales/en/translation.json @@ -17,7 +17,18 @@ "copied": "Copied", "revoked": "Revoked.", "patch": "Patch v{{name}}", - "optional": "optional" + "optional": "optional", + "abbreviation": "Abbreviation", + "create": "Create", + "creating": "Creating…", + "logo": "Logo", + "newTeam": "New Team", + "noMembers": "No members yet.", + "players": "Players", + "region": "Region", + "staff": "Staff", + "teamName": "Team name", + "upload": "Upload" }, "nav": { "dashboard": "Dashboard", @@ -116,7 +127,8 @@ "removeSuccess": "Player removed.", "removeError": "Error removing player.", "addSuccess": "Player added.", - "addError": "Error adding player." + "addError": "Error adding player.", + "subtitle": "Manage your squad composition and player roles." }, "staffManagement": { "title": "Staff & Invitations", diff --git a/apps/web/src/locales/es/translation.json b/apps/web/src/locales/es/translation.json index 5a681e3..07e1534 100644 --- a/apps/web/src/locales/es/translation.json +++ b/apps/web/src/locales/es/translation.json @@ -17,7 +17,18 @@ "copied": "Copiado", "revoked": "Revocada.", "patch": "Parche v{{name}}", - "optional": "opcional" + "optional": "opcional", + "abbreviation": "Abreviatura", + "create": "Crear", + "creating": "Creando…", + "logo": "Logo", + "newTeam": "Nuevo equipo", + "noMembers": "Sin miembros todavía.", + "players": "Jugadores", + "region": "Región", + "staff": "Staff", + "teamName": "Nombre del equipo", + "upload": "Subir imagen" }, "nav": { "dashboard": "Dashboard", @@ -116,7 +127,8 @@ "removeSuccess": "Jugador eliminado.", "removeError": "Error al eliminar el jugador.", "addSuccess": "Jugador añadido.", - "addError": "Error al añadir el jugador." + "addError": "Error al añadir el jugador.", + "subtitle": "Gestiona la composición y roles de tu plantilla." }, "staffManagement": { "title": "Staff e Invitaciones", diff --git a/apps/web/src/pages/TeamManagement.tsx b/apps/web/src/pages/TeamManagement.tsx index 609592d..ae76b21 100644 --- a/apps/web/src/pages/TeamManagement.tsx +++ b/apps/web/src/pages/TeamManagement.tsx @@ -125,7 +125,7 @@ function TeamList({ onSelect }: { onSelect: (id: string) => void }) { {canCreate && !showCreate && ( )} @@ -135,30 +135,30 @@ function TeamList({ onSelect }: { onSelect: (id: string) => void }) { {showCreate && (
-

{t('common.newTeam', 'New Team')}

+

{t('common.newTeam')}

- + setForm((f) => ({ ...f, name: e.target.value }))} placeholder="e.g. Team Liquid" style={{ width: '100%' }} />
- + setForm((f) => ({ ...f, abbreviation: e.target.value }))} placeholder="e.g. TL" maxLength={10} style={{ width: '100%' }} />
- + setForm((f) => ({ ...f, region: e.target.value }))} placeholder="e.g. EU, NA, LATAM" style={{ width: '100%' }} />
- +
setForm((f) => ({ ...f, logoUrl: e.target.value }))} placeholder="https://..." style={{ flex: 1 }} />
@@ -192,9 +192,9 @@ function TeamList({ onSelect }: { onSelect: (id: string) => void }) {
- +
@@ -207,7 +207,7 @@ function TeamList({ onSelect }: { onSelect: (id: string) => void }) {

{t('teamRoster.noTeams')}

{canCreate && ( )}
@@ -308,7 +308,7 @@ function TeamDetail({ teamId, onBack }: { teamId: string; onBack: () => void }) {/* Header */}
@@ -351,11 +351,11 @@ function TeamDetail({ teamId, onBack }: { teamId: string; onBack: () => void })
- {t('common.staff', 'Staff')} + {t('common.staff')}
{staffMembers.length === 0 ? ( -
{t('common.noMembers', 'No staff members yet.')}
+
{t('common.noMembers')}
) : ( staffMembers.map((member) => ( void })
- {t('common.players', 'Jugadores')} + {t('common.players')}
{playerMembers.map((member) => ( @@ -560,7 +560,7 @@ function AddMemberPanel({ teamId, canInviteManager, onClose }: { teamId: string; )}
- + diff --git a/apps/web/src/pages/TeamRoster.tsx b/apps/web/src/pages/TeamRoster.tsx index d987584..4a11965 100644 --- a/apps/web/src/pages/TeamRoster.tsx +++ b/apps/web/src/pages/TeamRoster.tsx @@ -238,7 +238,7 @@ export default function TeamRoster() {

{t('teamRoster.title')}

- {t('teamRoster.subtitle', 'Manage your squad composition and player roles.')} + {t('teamRoster.subtitle')}

{canEdit && !showCreate && (