Repository navigation
fix(i18n): el servidor deja de devolver prosa en espanol en el portal y las notificaciones - #78
Conversation
… y las notificaciones Dos sitios devolvian texto en espanol que la API no debe llevar (ADR 0014, `API_CONVENTIONS`: `message` en ingles de desarrollador, y la interfaz traduce). - Portal (`PortalActionResult.message`): «Ya realizaste una accion...», «Cotizacion aceptada...» y «Cotizacion rechazada...» pasan a ingles. Ninguna pantalla los mostraba (la pagina del portal usa su catalogo `customerPortal`); eran prosa muerta en la API. El dato variable (`action`) ya viajaba en su campo. - Notificaciones en vivo: el WebSocket mandaba `title` con `NOTIFY_LABELS`, en espanol, y la campana lo pintaba tal cual: un usuario en ingles veia «Cotizacion aceptada». Ahora el servidor manda solo `event_type` y la interfaz pone el texto con `layout:notifications.events.<EventType>` (es y en, 14 eventos). Un evento sin entrada se muestra con su nombre. `NOTIFY_LABELS` y el campo `title` desaparecen; la unica interfaz que consumia el WebSocket es la nuestra. - El control «todo evento notificable tiene etiqueta» pasa a mirar los catalogos del frontend (y que no sobren etiquetas de eventos que el servidor nunca manda). Tests: el reenvio del WebSocket se prueba ahora ejecutando `notifications_ws` de verdad (antes tres tests recomponian el mensaje a mano y no ejercitaban el router), mas el filtro de eventos; la campana en espanol, en ingles y con un evento desconocido. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d37423e79c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "type": "notification", | ||
| "event_type": event_type, | ||
| "title": NOTIFY_LABELS.get(event_type, event_type), | ||
| "payload": event.get("payload", {}), |
There was a problem hiding this comment.
Preserve the title field during the WebSocket rollout
When this backend is deployed while a browser still has the previous frontend bundle open, that client continues rendering n.title; after the backend restart its built-in reconnect succeeds, but every new payload now lacks title, leaving notification headings blank until the user reloads. Keep a compatibility field (it can temporarily contain event_type) or version/phase the protocol change so existing sessions remain usable.
Useful? React with 👍 / 👎.
Resumen
Tercer paso del recorrido en inglés (tarea 12): dos sitios donde el servidor devolvía texto en español que la API no debe llevar (ADR 0014 y
API_CONVENTIONS:messageen inglés de desarrollador, la interfaz traduce). No eran iguales:PortalActionResult.message): «Ya realizaste una acción…», «Cotización aceptada…» y «Cotización rechazada…» pasan a inglés. Ninguna pantalla los mostraba (la página del portal usa su catálogocustomerPortal), así que eran prosa muerta en la API.titledesdeNOTIFY_LABELS, en español, y la campana lo pintaba tal cual; un usuario en inglés veía «Cotización aceptada». Ahora el servidor manda soloevent_typey la interfaz pone el texto conlayout:notifications.events.<EventType>(es y en, los 14 eventos). Un evento sin entrada se muestra con su nombre.NOTIFY_LABELSy el campotitledesaparecen: la única interfaz que consumía el WebSocket es la nuestra.Tests
notifications_wsde verdad. Antes tres tests recomponían el mensaje a mano y no ejercitaban el router. Los nuevos comprueban que no haytitley que el filtro de eventos funciona.NOTIFY_LABELSse adaptan.Verificación
Siguiente
Discovery (asistente, blueprint y descripciones de capacidades) y el recorrido real en el navegador en inglés.
🤖 Generated with Claude Code