Add src/uix/langs/components/chronos.ts (~41 keys, es+en) and register it
in the componentLangs barrel. Route every hardcoded string in the provider
and the eidos wrappers (view / when-editor / day-peek) through
soma.langs.ts(ref) / .t(ref, params), reusing common.calendar.* for month
nav and common.buttons.* for cancel/save/close instead of duplicating.
Covers morfo texts, toolbar/views, the editor dialog, the when-editor
(modes, dates, time bands with interpolated "Band {{n}}"), the week badge
("Semana {{n}}"), and the draft validation messages.
Verified: translations:check 0 chronos errors; npm run check 0 chronos/langs
errors; browser under locale es renders Spanish (Hoy / Evento / Tipo /
Fechas / Todo el día·Único·Dividido), console clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
menubar-v4-safe
parent
6c55e092b5
commit
2742e4e6de
@ -0,0 +1,87 @@
|
||||
import type { LangNode } from '$libs/langs';
|
||||
|
||||
/**
|
||||
* Default strings for the chronos component. Merged under
|
||||
* `components.chronos.*` by `ActiveUix` (via the `componentLangs` barrel).
|
||||
*
|
||||
* Morfo references entries by absolute idlangref
|
||||
* (`'#?components.chronos.{key}|fallback'`); the eidos wrappers + provider
|
||||
* resolve UI strings the same way via `soma.langs.ts(...)`. Shared actions
|
||||
* (cancel / close) and month navigation reuse `common.*` instead.
|
||||
*/
|
||||
export const chronosLangs = {
|
||||
// ── Morfo texts (grid + toolbar) ──────────────────────────────────────────
|
||||
label: { es: 'Calendario', en: 'Calendar' },
|
||||
'prev-month': { es: 'Mes anterior', en: 'Previous month' },
|
||||
'next-month': { es: 'Mes siguiente', en: 'Next month' },
|
||||
today: { es: 'Hoy', en: 'Today' },
|
||||
'more-events': { es: 'Ver más eventos', en: 'Show more events' },
|
||||
|
||||
// ── Toolbar + views ───────────────────────────────────────────────────────
|
||||
search: { es: 'Buscar', en: 'Search' },
|
||||
'week-n': { es: 'Semana {{n}}', en: 'Week {{n}}' },
|
||||
'add-event': { es: 'Añadir evento', en: 'Add event' },
|
||||
'new-event': { es: 'Nuevo evento', en: 'New event' },
|
||||
'view-month': { es: 'Vista de mes', en: 'Month view' },
|
||||
'view-week': { es: 'Vista de semana', en: 'Week view' },
|
||||
'view-day': { es: 'Vista de día', en: 'Day view' },
|
||||
'view-agenda': { es: 'Agenda', en: 'Agenda' },
|
||||
'all-day': { es: 'Todo el día', en: 'All day' },
|
||||
untitled: { es: '(sin título)', en: '(untitled)' },
|
||||
'event-types': { es: 'Tipos de evento', en: 'Event types' },
|
||||
'resize-width': { es: 'Redimensionar ancho', en: 'Resize width' },
|
||||
'drag-to-resize': { es: 'Arrastra para redimensionar', en: 'Drag to resize' },
|
||||
|
||||
// ── Editor dialog ─────────────────────────────────────────────────────────
|
||||
'edit-event': { es: 'Editar evento', en: 'Edit event' },
|
||||
event: { es: 'Evento', en: 'Event' },
|
||||
'title-label': { es: 'Título', en: 'Title' },
|
||||
'title-placeholder': { es: 'Título del evento', en: 'Event title' },
|
||||
type: { es: 'Tipo', en: 'Type' },
|
||||
color: { es: 'Color', en: 'Color' },
|
||||
delete: { es: 'Eliminar', en: 'Delete' },
|
||||
|
||||
// ── "When" editor ─────────────────────────────────────────────────────────
|
||||
'time-mode': { es: 'Modo de tiempo', en: 'Time mode' },
|
||||
'mode-all-day': { es: 'Todo el día', en: 'All day' },
|
||||
'mode-single': { es: 'Único', en: 'Single' },
|
||||
'mode-split': { es: 'Dividido', en: 'Split' },
|
||||
dates: { es: 'Fechas', en: 'Dates' },
|
||||
'event-dates': { es: 'Fechas del evento', en: 'Event dates' },
|
||||
'start-date': { es: 'Fecha de inicio', en: 'Start date' },
|
||||
'end-date': { es: 'Fecha de fin', en: 'End date' },
|
||||
start: { es: 'Inicio', en: 'Start' },
|
||||
end: { es: 'Fin', en: 'End' },
|
||||
hours: { es: 'Horas', en: 'Hours' },
|
||||
'event-time': { es: 'Hora del evento', en: 'Event time' },
|
||||
'time-bands': { es: 'Franjas horarias', en: 'Time bands' },
|
||||
'add-band': { es: 'Añadir franja', en: 'Add band' },
|
||||
'bands-hint': {
|
||||
es: 'Las franjas se repiten en cada día del rango.',
|
||||
en: 'Bands repeat on each day of the date range.'
|
||||
},
|
||||
'band-n': { es: 'Franja {{n}}', en: 'Band {{n}}' },
|
||||
'remove-band': { es: 'Quitar franja {{n}}', en: 'Remove band {{n}}' },
|
||||
|
||||
// ── Validation ────────────────────────────────────────────────────────────
|
||||
'err-end-before-start': {
|
||||
es: 'La fecha de fin es anterior a la de inicio.',
|
||||
en: 'End date is before the start date.'
|
||||
},
|
||||
'err-end-time': {
|
||||
es: 'La hora de fin debe ser posterior a la de inicio.',
|
||||
en: 'End time must be after the start time.'
|
||||
},
|
||||
'err-no-bands': {
|
||||
es: 'Añade al menos una franja horaria.',
|
||||
en: 'Add at least one time band.'
|
||||
},
|
||||
'err-band-end': {
|
||||
es: 'Franja {{n}}: el fin debe ser posterior al inicio.',
|
||||
en: 'Band {{n}}: end must be after start.'
|
||||
},
|
||||
'err-band-overlap': {
|
||||
es: 'La franja {{n}} solapa la anterior.',
|
||||
en: 'Band {{n}} overlaps the previous band.'
|
||||
}
|
||||
} satisfies LangNode;
|
||||
Loading…
Reference in new issue