feat(i18n): localize recipients UI

This commit is contained in:
2026-06-14 18:33:57 +02:00
parent ea37fc8d70
commit c0ae7a034a
11 changed files with 665 additions and 34 deletions
+132
View File
@@ -559,6 +559,138 @@ describe("i18n dictionaries", () => {
})
})
it("provides localized recipient UI copy for English and Spanish", () => {
expect(getDictionary("en").inventory.recipients).toEqual({
list: {
title: "Recipients",
addLabel: "Add Recipient",
empty: "No recipients found.",
columns: {
username: "Username",
name: "Name",
email: "Email",
phone: "Phone",
department: "Department",
actions: "Actions",
},
actions: {
view: "View recipient",
edit: "Edit recipient",
},
},
detail: {
notFound: "Recipient not found",
labels: {
username: "Username",
email: "Email",
phone: "Phone",
department: "Department",
},
},
new: {
title: "Add Recipient",
},
edit: {
title: "Edit Recipient",
notFound: "Recipient not found",
},
form: {
usernameLabel: "Username",
usernamePlaceholder: "Username",
firstNameLabel: "First Name",
firstNamePlaceholder: "First name",
lastNameLabel: "Last Name",
lastNamePlaceholder: "Last name",
departmentLabel: "Department",
departmentPlaceholder: "Select a department",
emailLabel: "Email",
emailPlaceholder: "Email",
phoneLabel: "Phone",
phonePlaceholder: "Phone",
createSubmit: "Create Recipient",
updateSubmit: "Update Recipient",
},
fallback: {
unknownDepartment: "Unknown department",
},
departments: {
IT: "IT",
ENGINEERING: "Engineering",
LOGISTICS: "Logistics",
TRAFFIC: "Traffic",
DRIVER: "Driver",
ADMINISTRATION: "Administration",
SALES: "Sales",
OTHER: "Other",
},
})
expect(getDictionary("es").inventory.recipients).toEqual({
list: {
title: "Destinatarios",
addLabel: "Agregar destinatario",
empty: "No se encontraron destinatarios.",
columns: {
username: "Usuario",
name: "Nombre",
email: "Correo electrónico",
phone: "Teléfono",
department: "Departamento",
actions: "Acciones",
},
actions: {
view: "Ver destinatario",
edit: "Editar destinatario",
},
},
detail: {
notFound: "Destinatario no encontrado",
labels: {
username: "Usuario",
email: "Correo electrónico",
phone: "Teléfono",
department: "Departamento",
},
},
new: {
title: "Agregar destinatario",
},
edit: {
title: "Editar destinatario",
notFound: "Destinatario no encontrado",
},
form: {
usernameLabel: "Usuario",
usernamePlaceholder: "Usuario",
firstNameLabel: "Nombre",
firstNamePlaceholder: "Nombre",
lastNameLabel: "Apellido",
lastNamePlaceholder: "Apellido",
departmentLabel: "Departamento",
departmentPlaceholder: "Selecciona un departamento",
emailLabel: "Correo electrónico",
emailPlaceholder: "Correo electrónico",
phoneLabel: "Teléfono",
phonePlaceholder: "Teléfono",
createSubmit: "Crear destinatario",
updateSubmit: "Actualizar destinatario",
},
fallback: {
unknownDepartment: "Departamento desconocido",
},
departments: {
IT: "IT",
ENGINEERING: "Ingeniería",
LOGISTICS: "Logística",
TRAFFIC: "Tráfico",
DRIVER: "Chofer",
ADMINISTRATION: "Administración",
SALES: "Ventas",
OTHER: "Otro",
},
})
})
it("provides localized movement UI copy for English and Spanish", () => {
expect(getDictionary("en").inventory.movements).toEqual({
list: {