diff --git a/.jules/palette.md b/.jules/palette.md new file mode 100644 index 0000000..7e6da48 --- /dev/null +++ b/.jules/palette.md @@ -0,0 +1,3 @@ +## 2026-04-24 - Missing translation keys break typecheck +**Learning:** When adding accessibility labels to icon-only buttons via `useLanguage` hook and `t('...')` in this React Native app, adding the new key to `src/i18n/translations.ts` in the base language object (`it`) but missing it in other type-checked language objects (like `const en: typeof it = {...}`) will cause `npm run typecheck` to fail with TS2741. +**Action:** Always verify that newly added translation keys are duplicated across all language dictionary objects in `translations.ts` to satisfy TypeScript's strict type checking. diff --git a/src/components/DrawerMenu.tsx b/src/components/DrawerMenu.tsx index e22e073..6b46ed4 100644 --- a/src/components/DrawerMenu.tsx +++ b/src/components/DrawerMenu.tsx @@ -84,7 +84,13 @@ export default function DrawerMenu({ visible, onClose, onSelect }: Props) { style={styles.headerGradient} > - + diff --git a/src/components/ShiftTimeline.tsx b/src/components/ShiftTimeline.tsx index 9c7f60b..e9414b1 100644 --- a/src/components/ShiftTimeline.tsx +++ b/src/components/ShiftTimeline.tsx @@ -143,7 +143,13 @@ export default function ShiftTimeline({ visible, onClose, shiftStart, shiftEnd, Voli nel Turno {fmtTime(startSec)} – {fmtTime(endSec)} - + diff --git a/src/i18n/translations.ts b/src/i18n/translations.ts index 8ccd1e2..727ba1c 100644 --- a/src/i18n/translations.ts +++ b/src/i18n/translations.ts @@ -6,7 +6,7 @@ const it = { overlayNotepad: 'Blocco Note', overlayPhonebook: 'Rubrica', overlayPasswords: 'Password', overlayManuals: 'Manuali DCS', overlaySettings: 'Impostazioni', // Common - cancel: 'Annulla', save: 'Salva', delete: 'Elimina', error: 'Errore', + close: 'Chiudi', cancel: 'Annulla', save: 'Salva', delete: 'Elimina', error: 'Errore', confirm: 'Conferma', ok: 'OK', add: 'Aggiungi', // Settings settingsTitle: 'Impostazioni', @@ -164,7 +164,7 @@ const en: typeof it = { overlayNotepad: 'Notepad', overlayPhonebook: 'Phonebook', overlayPasswords: 'Password', overlayManuals: 'DCS Manuals', overlaySettings: 'Settings', // Common - cancel: 'Cancel', save: 'Save', delete: 'Delete', error: 'Error', + close: 'Close', cancel: 'Cancel', save: 'Save', delete: 'Delete', error: 'Error', confirm: 'Confirm', ok: 'OK', add: 'Add', // Settings settingsTitle: 'Settings',