Skip to content

lightweight, client-only calendar web application. All data persists in the URL hash for instant sharing, No backend required. Optional AES-GCM password protection keeps shared links locked without a server

JavaScript

feat(i18n): add Italian localization support and sync language keys

Supun Lakmal9111e01db6f4
diff --git a/README.md b/README.md
index 5b712df..db1591d 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@ GitHub: https://github.com/supunlakmal/hash-calendar
## What is new
-- Multi-language UI (English, Sinhala, Tamil)
+- Multi-language UI (English, Sinhala, Tamil, Italian)
- Mobile drawer menu with quick icon actions
- World Planner modal (multi-timezone planning grid, home zone, scrubber, 12h/24h toggle)
- App launcher menu in the top bar
diff --git a/locales/en.js b/locales/en.js
index 6637102..505812b 100644
--- a/locales/en.js
+++ b/locales/en.js
@@ -1,239 +1,240 @@
export default {
// Navigation
- 'nav.prev': 'Prev',
- 'nav.today': 'Today',
- 'nav.next': 'Next',
- 'nav.prevMonth': 'Previous month',
- 'nav.nextMonth': 'Next month',
+ "nav.prev": "Prev",
+ "nav.today": "Today",
+ "nav.next": "Next",
+ "nav.prevMonth": "Previous month",
+ "nav.nextMonth": "Next month",
// View toggles
- 'view.day': 'Day',
- 'view.week': 'Week',
- 'view.month': 'Month',
- 'view.year': 'Year',
- 'view.agenda': 'Agenda',
+ "view.day": "Day",
+ "view.week": "Week",
+ "view.month": "Month",
+ "view.year": "Year",
+ "view.agenda": "Agenda",
// Action buttons
- 'btn.addEvent': 'Add event',
- 'btn.copyLink': 'Copy link',
- 'btn.shareQr': 'Share QR',
- 'btn.lock': 'Lock',
- 'btn.unlock': 'Unlock',
- 'btn.removeLock': 'Remove lock',
- 'btn.focus': 'Focus',
- 'btn.exitFocus': 'Exit focus',
- 'btn.save': 'Save',
- 'btn.cancel': 'Cancel',
- 'btn.delete': 'Delete',
- 'btn.addEventForDay': 'Add event for this day',
- 'btn.viewJson': 'View JSON',
- 'btn.exportJson': 'Export JSON',
- 'btn.importIcs': 'Import .ics',
- 'btn.clearCalendar': 'Clear calendar',
- 'btn.addTimezone': 'Add timezone',
- 'btn.gotIt': 'Got it',
- 'btn.copyJson': 'Copy JSON',
- 'btn.copyHash': 'Copy hash',
- 'btn.downloadJson': 'Download JSON',
- 'btn.copyTextLink': 'Copy text link instead',
- 'btn.worldPlanner': 'Planner',
- 'planner.notFound': 'Timezone not found',
- 'planner.homeTitle': 'Make Home',
- 'planner.removeTitle': 'Remove',
- 'launcher.ariaLabel': 'App Launcher',
- 'app.calendar': 'Hash Calendar',
- 'app.spreadsheet': 'Spreadsheet Live',
+ "btn.addEvent": "Add event",
+ "btn.copyLink": "Copy link",
+ "btn.shareQr": "Share QR",
+ "btn.lock": "Lock",
+ "btn.unlock": "Unlock",
+ "btn.removeLock": "Remove lock",
+ "btn.focus": "Focus",
+ "btn.exitFocus": "Exit focus",
+ "btn.save": "Save",
+ "btn.cancel": "Cancel",
+ "btn.delete": "Delete",
+ "btn.addEventForDay": "Add event for this day",
+ "btn.viewJson": "View JSON",
+ "btn.exportJson": "Export JSON",
+ "btn.importIcs": "Import .ics",
+ "btn.clearCalendar": "Clear calendar",
+ "btn.addTimezone": "Add timezone",
+ "btn.gotIt": "Got it",
+ "btn.copyJson": "Copy JSON",
+ "btn.copyHash": "Copy hash",
+ "btn.downloadJson": "Download JSON",
+ "btn.copyTextLink": "Copy text link instead",
+ "btn.worldPlanner": "Planner",
+ "planner.notFound": "Timezone not found",
+ "planner.homeTitle": "Make Home",
+ "planner.removeTitle": "Remove",
+ "launcher.ariaLabel": "App Launcher",
+ "app.calendar": "Hash Calendar",
+ "app.spreadsheet": "Spreadsheet Live",
// Modal titles
- 'modal.addEvent': 'Add event',
- 'modal.editEvent': 'Edit event',
- 'modal.unlockCalendar': 'Unlock calendar',
- 'modal.setPassword': 'Set password',
- 'modal.shareData': 'Share data',
- 'modal.scanQr': 'Scan to open on mobile',
- 'modal.selectTimezone': 'Select timezone',
- 'modal.worldPlanner': 'World Planner',
+ "modal.addEvent": "Add event",
+ "modal.editEvent": "Edit event",
+ "modal.unlockCalendar": "Unlock calendar",
+ "modal.setPassword": "Set password",
+ "modal.shareData": "Share data",
+ "modal.scanQr": "Scan to open on mobile",
+ "modal.selectTimezone": "Select timezone",
+ "modal.worldPlanner": "World Planner",
// Event form fields
- 'event.title': 'Title',
- 'event.date': 'Date',
- 'event.start': 'Start',
- 'event.duration': 'Duration (mins)',
- 'event.allDay': 'All day',
- 'event.recurrence': 'Recurrence',
- 'event.color': 'Color',
+ "event.title": "Title",
+ "event.date": "Date",
+ "event.start": "Start",
+ "event.duration": "Duration (mins)",
+ "event.allDay": "All day",
+ "event.recurrence": "Recurrence",
+ "event.color": "Color",
// Recurrence options
- 'recurrence.none': 'None',
- 'recurrence.daily': 'Daily',
- 'recurrence.weekly': 'Weekly',
- 'recurrence.monthly': 'Monthly',
- 'recurrence.yearly': 'Yearly',
+ "recurrence.none": "None",
+ "recurrence.daily": "Daily",
+ "recurrence.weekly": "Weekly",
+ "recurrence.monthly": "Monthly",
+ "recurrence.yearly": "Yearly",
// Password form
- 'password.password': 'Password',
- 'password.confirmPassword': 'Confirm password',
- 'password.setDesc': 'Add a password so only people with the link and password can read this calendar.',
- 'password.unlockDesc': 'Enter the password to decrypt this calendar.',
- 'password.required': 'Password is required.',
- 'password.mismatch': 'Passwords do not match.',
+ "password.password": "Password",
+ "password.confirmPassword": "Confirm password",
+ "password.setDesc": "Add a password so only people with the link and password can read this calendar.",
+ "password.unlockDesc": "Enter the password to decrypt this calendar.",
+ "password.required": "Password is required.",
+ "password.mismatch": "Passwords do not match.",
// Side panel sections
- 'panel.selectedDay': 'Selected day',
- 'panel.shareExport': 'Share and export',
- 'panel.dangerZone': 'Danger zone',
- 'panel.urlLength': 'URL length',
- 'panel.urlWarning': 'Warning: long URLs may get truncated when shared.',
+ "panel.selectedDay": "Selected day",
+ "panel.shareExport": "Share and export",
+ "panel.dangerZone": "Danger zone",
+ "panel.urlLength": "URL length",
+ "panel.urlWarning": "Warning: long URLs may get truncated when shared.",
// Timezone/world clock
- 'tz.worldClock': 'World Clock',
- 'tz.subtitle': 'Local time plus saved zones',
- 'tz.search': 'Search',
- 'tz.searchPlaceholder': 'Search (e.g. London)',
- 'tz.noMatches': 'No matches yet. Try a city, region, or UTC+5:30.',
- 'tz.addToCompare': 'Add a timezone to compare.',
- 'tz.notSupported': "Timezone search isn't supported in this browser.",
+ "tz.worldClock": "World Clock",
+ "tz.subtitle": "Local time plus saved zones",
+ "tz.search": "Search",
+ "tz.searchPlaceholder": "Search (e.g. London)",
+ "tz.noMatches": "No matches yet. Try a city, region, or UTC+5:30.",
+ "tz.addToCompare": "Add a timezone to compare.",
+ "tz.notSupported": "Timezone search isn't supported in this browser.",
// Focus mode
- 'focus.nextUpIn': 'NEXT UP IN',
- 'focus.allClear': 'ALL CLEAR',
- 'focus.inProgress': 'IN PROGRESS',
- 'focus.noUpcoming': 'No upcoming events',
- 'focus.upLater': 'Up later',
+ "focus.nextUpIn": "NEXT UP IN",
+ "focus.allClear": "ALL CLEAR",
+ "focus.inProgress": "IN PROGRESS",
+ "focus.noUpcoming": "No upcoming events",
+ "focus.upLater": "Up later",
// Calendar display
- 'calendar.allDay': 'All day',
- 'calendar.moreEvents': '+{{count}} more',
- 'calendar.noUpcoming': 'No upcoming events',
- 'calendar.noEvents': 'No events yet.',
+ "calendar.allDay": "All day",
+ "calendar.moreEvents": "+{{count}} more",
+ "calendar.noUpcoming": "No upcoming events",
+ "calendar.noEvents": "No events yet.",
// Settings
- 'settings.weekStartsSunday': 'Week starts Sunday',
- 'settings.weekStartsMonday': 'Week starts Monday',
- 'settings.themeLight': 'Theme: Light',
- 'settings.themeDark': 'Theme: Dark',
- 'settings.language': 'Language',
+ "settings.weekStartsSunday": "Week starts Sunday",
+ "settings.weekStartsMonday": "Week starts Monday",
+ "settings.themeLight": "Theme: Light",
+ "settings.themeDark": "Theme: Dark",
+ "settings.language": "Language",
// Language names
- 'lang.en': 'English',
- 'lang.si': 'සිංහල',
- 'lang.ta': 'Tamil',
+ "lang.en": "English",
+ "lang.si": "සිංහල",
+ "lang.ta": "தமிழ்",
+ "lang.it": "Italian",
// Toast messages
- 'toast.linkCopied': 'Link copied',
- 'toast.eventsImported': 'Events imported',
- 'toast.eventDeleted': 'Event deleted',
- 'toast.eventsCleared': 'Events cleared',
- 'toast.jsonCopied': 'JSON copied',
- 'toast.hashCopied': 'Hash copied',
- 'toast.lockRemoved': 'Lock removed',
- 'toast.calendarLocked': 'Calendar locked',
- 'toast.calendarUnlocked': 'Calendar unlocked',
- 'toast.incorrectPassword': 'Incorrect password',
- 'toast.unableToCopyLink': 'Unable to copy link',
- 'toast.unableToCopyJson': 'Unable to copy JSON',
- 'toast.unableToCopyHash': 'Unable to copy hash',
- 'toast.noEventsFound': 'No events found',
- 'toast.qrLibraryFailed': 'QR library failed to load',
- 'toast.qrError': 'Error generating QR code',
+ "toast.linkCopied": "Link copied",
+ "toast.eventsImported": "Events imported",
+ "toast.eventDeleted": "Event deleted",
+ "toast.eventsCleared": "Events cleared",
+ "toast.jsonCopied": "JSON copied",
+ "toast.hashCopied": "Hash copied",
+ "toast.lockRemoved": "Lock removed",
+ "toast.calendarLocked": "Calendar locked",
+ "toast.calendarUnlocked": "Calendar unlocked",
+ "toast.incorrectPassword": "Incorrect password",
+ "toast.unableToCopyLink": "Unable to copy link",
+ "toast.unableToCopyJson": "Unable to copy JSON",
+ "toast.unableToCopyHash": "Unable to copy hash",
+ "toast.noEventsFound": "No events found",
+ "toast.qrLibraryFailed": "QR library failed to load",
+ "toast.qrError": "Error generating QR code",
// Confirmation dialogs
- 'confirm.deleteEvent': 'Delete this event?',
- 'confirm.clearAll': 'Clear all events? This cannot be undone.',
- 'confirm.removeLock': 'Remove password protection? This will store data unencrypted in the URL.',
+ "confirm.deleteEvent": "Delete this event?",
+ "confirm.clearAll": "Clear all events? This cannot be undone.",
+ "confirm.removeLock": "Remove password protection? This will store data unencrypted in the URL.",
// Mobile warning
- 'mobile.title': 'Mobile view notice',
- 'mobile.message': "This app isn't optimized for mobile and tab view yet.",
+ "mobile.title": "Mobile view notice",
+ "mobile.message": "This app isn't optimized for mobile and tab view yet.",
// QR modal
- 'qr.warning': 'Warning: URL is {{length}} characters. Some QR scanners may struggle with codes this large.',
- 'qr.helper': 'Point your phone camera at this code to open your calendar.',
+ "qr.warning": "Warning: URL is {{length}} characters. Some QR scanners may struggle with codes this large.",
+ "qr.helper": "Point your phone camera at this code to open your calendar.",
// JSON modal
- 'json.urlHash': 'URL hash',
- 'json.jsonData': 'JSON data',
+ "json.urlHash": "URL hash",
+ "json.jsonData": "JSON data",
// Locked overlay
- 'locked.title': 'Encrypted calendar',
- 'locked.message': 'Enter the password to unlock and edit this calendar.',
+ "locked.title": "Encrypted calendar",
+ "locked.message": "Enter the password to unlock and edit this calendar.",
// Labels
- 'label.details': 'Details',
- 'label.events': 'Events',
- 'label.clock': 'Clock',
- 'label.calendar': 'Calendar',
- 'label.language': 'Language',
- 'label.close': 'Close',
- 'label.menu': 'Menu',
+ "label.details": "Details",
+ "label.events": "Events",
+ "label.clock": "Clock",
+ "label.calendar": "Calendar",
+ "label.language": "Language",
+ "label.close": "Close",
+ "label.menu": "Menu",
// Countdown widget
- 'countdown.upNext': 'Up Next',
- 'countdown.startsAt': 'Starts at {{time}}',
- 'countdown.starts': 'Starts {{date}} at {{time}}',
+ "countdown.upNext": "Up Next",
+ "countdown.startsAt": "Starts at {{time}}",
+ "countdown.starts": "Starts {{date}} at {{time}}",
// Agenda view
- 'agenda.title': 'Agenda',
- 'agenda.rangeLabel': 'Agenda · {{range}}',
+ "agenda.title": "Agenda",
+ "agenda.rangeLabel": "Agenda · {{range}}",
// Brand
- 'brand.subtitle': 'Serverless privacy calendar. Your URL is the save file.',
+ "brand.subtitle": "Serverless privacy calendar. Your URL is the save file.",
// World Planner
- 'planner.addTimezone': 'Add timezone (e.g. London)',
+ "planner.addTimezone": "Add timezone (e.g. London)",
// Month names
- 'month.january': 'January',
- 'month.february': 'February',
- 'month.march': 'March',
- 'month.april': 'April',
- 'month.may': 'May',
- 'month.june': 'June',
- 'month.july': 'July',
- 'month.august': 'August',
- 'month.september': 'September',
- 'month.october': 'October',
- 'month.november': 'November',
- 'month.december': 'December',
+ "month.january": "January",
+ "month.february": "February",
+ "month.march": "March",
+ "month.april": "April",
+ "month.may": "May",
+ "month.june": "June",
+ "month.july": "July",
+ "month.august": "August",
+ "month.september": "September",
+ "month.october": "October",
+ "month.november": "November",
+ "month.december": "December",
// Short month names
- 'month.short.jan': 'Jan',
- 'month.short.feb': 'Feb',
- 'month.short.mar': 'Mar',
- 'month.short.apr': 'Apr',
- 'month.short.may': 'May',
- 'month.short.jun': 'Jun',
- 'month.short.jul': 'Jul',
- 'month.short.aug': 'Aug',
- 'month.short.sep': 'Sep',
- 'month.short.oct': 'Oct',
- 'month.short.nov': 'Nov',
- 'month.short.dec': 'Dec',
+ "month.short.jan": "Jan",
+ "month.short.feb": "Feb",
+ "month.short.mar": "Mar",
+ "month.short.apr": "Apr",
+ "month.short.may": "May",
+ "month.short.jun": "Jun",
+ "month.short.jul": "Jul",
+ "month.short.aug": "Aug",
+ "month.short.sep": "Sep",
+ "month.short.oct": "Oct",
+ "month.short.nov": "Nov",
+ "month.short.dec": "Dec",
// Weekday names
- 'weekday.sunday': 'Sunday',
- 'weekday.monday': 'Monday',
- 'weekday.tuesday': 'Tuesday',
- 'weekday.wednesday': 'Wednesday',
- 'weekday.thursday': 'Thursday',
- 'weekday.friday': 'Friday',
- 'weekday.saturday': 'Saturday',
+ "weekday.sunday": "Sunday",
+ "weekday.monday": "Monday",
+ "weekday.tuesday": "Tuesday",
+ "weekday.wednesday": "Wednesday",
+ "weekday.thursday": "Thursday",
+ "weekday.friday": "Friday",
+ "weekday.saturday": "Saturday",
// Short weekday names
- 'weekday.short.sun': 'Sun',
- 'weekday.short.mon': 'Mon',
- 'weekday.short.tue': 'Tue',
- 'weekday.short.wed': 'Wed',
- 'weekday.short.thu': 'Thu',
- 'weekday.short.fri': 'Fri',
- 'weekday.short.sat': 'Sat',
+ "weekday.short.sun": "Sun",
+ "weekday.short.mon": "Mon",
+ "weekday.short.tue": "Tue",
+ "weekday.short.wed": "Wed",
+ "weekday.short.thu": "Thu",
+ "weekday.short.fri": "Fri",
+ "weekday.short.sat": "Sat",
// Narrow weekday names (for year view)
- 'weekday.narrow.sun': 'S',
- 'weekday.narrow.mon': 'M',
- 'weekday.narrow.tue': 'T',
- 'weekday.narrow.wed': 'W',
- 'weekday.narrow.thu': 'T',
- 'weekday.narrow.fri': 'F',
- 'weekday.narrow.sat': 'S',
+ "weekday.narrow.sun": "S",
+ "weekday.narrow.mon": "M",
+ "weekday.narrow.tue": "T",
+ "weekday.narrow.wed": "W",
+ "weekday.narrow.thu": "T",
+ "weekday.narrow.fri": "F",
+ "weekday.narrow.sat": "S",
};
diff --git a/locales/si.js b/locales/si.js
index 052bc04..699c31d 100644
--- a/locales/si.js
+++ b/locales/si.js
@@ -1,239 +1,240 @@
export default {
// Navigation
- 'nav.prev': 'පෙර',
- 'nav.today': 'අද',
- 'nav.next': 'ඊළඟ',
- 'nav.prevMonth': 'පෙර මාසය',
- 'nav.nextMonth': 'ඊළඟ මාසය',
+ "nav.prev": "පෙර",
+ "nav.today": "අද",
+ "nav.next": "ඊළඟ",
+ "nav.prevMonth": "පෙර මාසය",
+ "nav.nextMonth": "ඊළඟ මාසය",
// View toggles
- 'view.day': 'දවස',
- 'view.week': 'සතිය',
- 'view.month': 'මාසය',
- 'view.year': 'අවුරුද්ද',
- 'view.agenda': 'න්‍යාය පත්‍රය',
+ "view.day": "දවස",
+ "view.week": "සතිය",
+ "view.month": "මාසය",
+ "view.year": "අවුරුද්ද",
+ "view.agenda": "න්‍යාය පත්‍රය",
// Action buttons
- 'btn.addEvent': 'සිදුවීම එක් කරන්න',
- 'btn.copyLink': 'සබැඳිය පිටපත් කරන්න',
- 'btn.shareQr': 'QR බෙදාගන්න',
- 'btn.lock': 'අගුළු දමන්න',
- 'btn.unlock': 'අගුළු අරින්න',
- 'btn.removeLock': 'අගුළ ඉවත් කරන්න',
- 'btn.focus': 'නාභිගත වන්න',
- 'btn.exitFocus': 'නාභිගතයෙන් ඉවත් වන්න',
- 'btn.save': 'සුරකින්න',
- 'btn.cancel': 'අවලංගු කරන්න',
- 'btn.delete': 'මකන්න',
- 'btn.addEventForDay': 'මේ දවසට සිදුවීම එක් කරන්න',
- 'btn.viewJson': 'JSON බලන්න',
- 'btn.exportJson': 'JSON අපනයනය කරන්න',
- 'btn.importIcs': '.ics ආයාත කරන්න',
- 'btn.clearCalendar': 'දිනදර්ශනය මකන්න',
- 'btn.addTimezone': 'වේලා කලාපය එක් කරන්න',
- 'btn.gotIt': 'තේරුණා',
- 'btn.copyJson': 'JSON පිටපත් කරන්න',
- 'btn.copyHash': 'හෑෂ් පිටපත් කරන්න',
- 'btn.downloadJson': 'JSON බාගන්න',
- 'btn.copyTextLink': 'ඒ වෙනුවට පෙළ සබැඳිය පිටපත් කරන්න',
- 'btn.worldPlanner': 'සැලසුම්කරු',
- 'planner.notFound': 'වේලා කලාපය හමු නොවීය',
- 'planner.homeTitle': 'ප්‍රධාන වේලාව ලෙස සකසන්න',
- 'planner.removeTitle': 'ඉවත් කරන්න',
- 'launcher.ariaLabel': 'යෙදුම් මෙනුව',
- 'app.calendar': 'Hash Calendar',
- 'app.spreadsheet': 'Spreadsheet Live',
+ "btn.addEvent": "සිදුවීම එක් කරන්න",
+ "btn.copyLink": "සබැඳිය පිටපත් කරන්න",
+ "btn.shareQr": "QR බෙදාගන්න",
+ "btn.lock": "අගුළු දමන්න",
+ "btn.unlock": "අගුළු අරින්න",
+ "btn.removeLock": "අගුළ ඉවත් කරන්න",
+ "btn.focus": "නාභිගත වන්න",
+ "btn.exitFocus": "නාභිගතයෙන් ඉවත් වන්න",
+ "btn.save": "සුරකින්න",
+ "btn.cancel": "අවලංගු කරන්න",
+ "btn.delete": "මකන්න",
+ "btn.addEventForDay": "මේ දවසට සිදුවීම එක් කරන්න",
+ "btn.viewJson": "JSON බලන්න",
+ "btn.exportJson": "JSON අපනයනය කරන්න",
+ "btn.importIcs": ".ics ආයාත කරන්න",
+ "btn.clearCalendar": "දිනදර්ශනය මකන්න",
+ "btn.addTimezone": "වේලා කලාපය එක් කරන්න",
+ "btn.gotIt": "තේරුණා",
+ "btn.copyJson": "JSON පිටපත් කරන්න",
+ "btn.copyHash": "හෑෂ් පිටපත් කරන්න",
+ "btn.downloadJson": "JSON බාගන්න",
+ "btn.copyTextLink": "ඒ වෙනුවට පෙළ සබැඳිය පිටපත් කරන්න",
+ "btn.worldPlanner": "සැලසුම්කරු",
+ "planner.notFound": "වේලා කලාපය හමු නොවීය",
+ "planner.homeTitle": "ප්‍රධාන වේලාව ලෙස සකසන්න",
+ "planner.removeTitle": "ඉවත් කරන්න",
+ "launcher.ariaLabel": "යෙදුම් මෙනුව",
+ "app.calendar": "Hash Calendar",
+ "app.spreadsheet": "Spreadsheet Live",
// Modal titles
- 'modal.addEvent': 'සිදුවීම එක් කරන්න',
- 'modal.editEvent': 'සිදුවීම සංස්කරණය කරන්න',
- 'modal.unlockCalendar': 'දිනදර්ශනය අගුළු අරින්න',
- 'modal.setPassword': 'මුරපදය සකසන්න',
- 'modal.shareData': 'දත්ත බෙදාගන්න',
- 'modal.scanQr': 'ජංගම දුරකථනයේ විවෘත කිරීමට ස්කෑන් කරන්න',
- 'modal.selectTimezone': 'වේලා කලාපය තෝරන්න',
- 'modal.worldPlanner': 'ලෝක සැලසුම්කරු',
+ "modal.addEvent": "සිදුවීම එක් කරන්න",
+ "modal.editEvent": "සිදුවීම සංස්කරණය කරන්න",
+ "modal.unlockCalendar": "දිනදර්ශනය අගුළු අරින්න",
+ "modal.setPassword": "මුරපදය සකසන්න",
+ "modal.shareData": "දත්ත බෙදාගන්න",
+ "modal.scanQr": "ජංගම දුරකථනයේ විවෘත කිරීමට ස්කෑන් කරන්න",
+ "modal.selectTimezone": "වේලා කලාපය තෝරන්න",
+ "modal.worldPlanner": "ලෝක සැලසුම්කරු",
// Event form fields
- 'event.title': 'මාතෘකාව',
- 'event.date': 'දිනය',
- 'event.start': 'ආරම්භය',
- 'event.duration': 'කාල සීමාව (මිනිත්තු)',
- 'event.allDay': 'මුළු දවස',
- 'event.recurrence': 'පුනරාවර්තනය',
- 'event.color': 'වර්ණය',
+ "event.title": "මාතෘකාව",
+ "event.date": "දිනය",
+ "event.start": "ආරම්භය",
+ "event.duration": "කාල සීමාව (මිනිත්තු)",
+ "event.allDay": "මුළු දවස",
+ "event.recurrence": "පුනරාවර්තනය",
+ "event.color": "වර්ණය",
// Recurrence options
- 'recurrence.none': 'කිසිවක් නැත',
- 'recurrence.daily': 'දිනපතා',
- 'recurrence.weekly': 'සතිපතා',
- 'recurrence.monthly': 'මාසිකව',
- 'recurrence.yearly': 'වාර්ෂිකව',
+ "recurrence.none": "කිසිවක් නැත",
+ "recurrence.daily": "දිනපතා",
+ "recurrence.weekly": "සතිපතා",
+ "recurrence.monthly": "මාසිකව",
+ "recurrence.yearly": "වාර්ෂිකව",
// Password form
- 'password.password': 'මුරපදය',
- 'password.confirmPassword': 'මුරපදය තහවුරු කරන්න',
- 'password.setDesc': 'සබැඳිය සහ මුරපදය ඇති පුද්ගලයින්ට පමණක් මෙම දිනදර්ශනය කියවිය හැකි පරිදි මුරපදයක් එක් කරන්න.',
- 'password.unlockDesc': 'මෙම දිනදර්ශනය විකේතනය කිරීමට මුරපදය ඇතුළත් කරන්න.',
- 'password.required': 'මුරපදය අවශ්‍යයි.',
- 'password.mismatch': 'මුරපද ගැලපෙන්නේ නැත.',
+ "password.password": "මුරපදය",
+ "password.confirmPassword": "මුරපදය තහවුරු කරන්න",
+ "password.setDesc": "සබැඳිය සහ මුරපදය ඇති පුද්ගලයින්ට පමණක් මෙම දිනදර්ශනය කියවිය හැකි පරිදි මුරපදයක් එක් කරන්න.",
+ "password.unlockDesc": "මෙම දිනදර්ශනය විකේතනය කිරීමට මුරපදය ඇතුළත් කරන්න.",
+ "password.required": "මුරපදය අවශ්‍යයි.",
+ "password.mismatch": "මුරපද ගැලපෙන්නේ නැත.",
// Side panel sections
- 'panel.selectedDay': 'තෝරාගත් දිනය',
- 'panel.shareExport': 'බෙදාගැනීම සහ අපනයනය',
- 'panel.dangerZone': 'අන්තරාදායක කලාපය',
- 'panel.urlLength': 'URL දිග',
- 'panel.urlWarning': 'අනතුරු ඇඟවීම: දිගු URL බෙදාගන්නා විට කපා හැරිය හැක.',
+ "panel.selectedDay": "තෝරාගත් දිනය",
+ "panel.shareExport": "බෙදාගැනීම සහ අපනයනය",
+ "panel.dangerZone": "අන්තරාදායක කලාපය",
+ "panel.urlLength": "URL දිග",
+ "panel.urlWarning": "අනතුරු ඇඟවීම: දිගු URL බෙදාගන්නා විට කපා හැරිය හැක.",
// Timezone/world clock
- 'tz.worldClock': 'ලෝක ඔරලෝසුව',
- 'tz.subtitle': 'දේශීය වේලාව සහ සුරකින ලද කලාප',
- 'tz.search': 'සොයන්න',
- 'tz.searchPlaceholder': 'සොයන්න (උදා: London)',
- 'tz.noMatches': 'තවමත් ගැලපීම් නොමැත. නගරයක්, කලාපයක් හෝ UTC+5:30 උත්සාහ කරන්න.',
- 'tz.addToCompare': 'සැසඳීමට වේලා කලාපයක් එක් කරන්න.',
- 'tz.notSupported': 'මෙම බ්‍රව්සරයේ වේලා කලාප සෙවීම සහාය නොදක්වයි.',
+ "tz.worldClock": "ලෝක ඔරලෝසුව",
+ "tz.subtitle": "දේශීය වේලාව සහ සුරකින ලද කලාප",
+ "tz.search": "සොයන්න",
+ "tz.searchPlaceholder": "සොයන්න (උදා: London)",
+ "tz.noMatches": "තවමත් ගැලපීම් නොමැත. නගරයක්, කලාපයක් හෝ UTC+5:30 උත්සාහ කරන්න.",
+ "tz.addToCompare": "සැසඳීමට වේලා කලාපයක් එක් කරන්න.",
+ "tz.notSupported": "මෙම බ්‍රව්සරයේ වේලා කලාප සෙවීම සහාය නොදක්වයි.",
// Focus mode
- 'focus.nextUpIn': 'ඊළඟට',
- 'focus.allClear': 'සියල්ල පැහැදිලියි',
- 'focus.inProgress': 'ක්‍රියාත්මක වෙමින්',
- 'focus.noUpcoming': 'ඉදිරි සිදුවීම් නොමැත',
- 'focus.upLater': 'පසුව',
+ "focus.nextUpIn": "ඊළඟට",
+ "focus.allClear": "සියල්ල පැහැදිලියි",
+ "focus.inProgress": "ක්‍රියාත්මක වෙමින්",
+ "focus.noUpcoming": "ඉදිරි සිදුවීම් නොමැත",
+ "focus.upLater": "පසුව",
// Calendar display
- 'calendar.allDay': 'මුළු දවස',
- 'calendar.moreEvents': '+{{count}} තවත්',
- 'calendar.noUpcoming': 'ඉදිරි සිදුවීම් නොමැත',
- 'calendar.noEvents': 'තවමත් සිදුවීම් නොමැත.',
+ "calendar.allDay": "මුළු දවස",
+ "calendar.moreEvents": "+{{count}} තවත්",
+ "calendar.noUpcoming": "ඉදිරි සිදුවීම් නොමැත",
+ "calendar.noEvents": "තවමත් සිදුවීම් නොමැත.",
// Settings
- 'settings.weekStartsSunday': 'සතිය ඉරිදා ආරම්භ වේ',
- 'settings.weekStartsMonday': 'සතිය සඳුදා ආරම්භ වේ',
- 'settings.themeLight': 'තේමාව: ආලෝකය',
- 'settings.themeDark': 'තේමාව: අඳුරු',
- 'settings.language': 'භාෂාව',
+ "settings.weekStartsSunday": "සතිය ඉරිදා ආරම්භ වේ",
+ "settings.weekStartsMonday": "සතිය සඳුදා ආරම්භ වේ",
+ "settings.themeLight": "තේමාව: ආලෝකය",
+ "settings.themeDark": "තේමාව: අඳුරු",
+ "settings.language": "භාෂාව",
// Language names
- 'lang.en': 'English',
- 'lang.si': 'සිංහල',
- 'lang.ta': 'දෙමළ (Tamil)',
+ "lang.en": "English",
+ "lang.si": "සිංහල",
+ "lang.ta": "தமிழ்",
+ "lang.it": "Italian",
// Toast messages
- 'toast.linkCopied': 'සබැඳිය පිටපත් විය',
- 'toast.eventsImported': 'සිදුවීම් ආයාත විය',
- 'toast.eventDeleted': 'සිදුවීම මකා දමන ලදී',
- 'toast.eventsCleared': 'සිදුවීම් මකා දමන ලදී',
- 'toast.jsonCopied': 'JSON පිටපත් විය',
- 'toast.hashCopied': 'හෑෂ් පිටපත් විය',
- 'toast.lockRemoved': 'අගුළ ඉවත් කරන ලදී',
- 'toast.calendarLocked': 'දිනදර්ශනය අගුළු දමන ලදී',
- 'toast.calendarUnlocked': 'දිනදර්ශනය අගුළු ඇරිණි',
- 'toast.incorrectPassword': 'වැරදි මුරපදයක්',
- 'toast.unableToCopyLink': 'සබැඳිය පිටපත් කළ නොහැක',
- 'toast.unableToCopyJson': 'JSON පිටපත් කළ නොහැක',
- 'toast.unableToCopyHash': 'හෑෂ් පිටපත් කළ නොහැක',
- 'toast.noEventsFound': 'සිදුවීම් හමු නොවීය',
- 'toast.qrLibraryFailed': 'QR පුස්තකාලය පූරණය කිරීමට අසමත් විය',
- 'toast.qrError': 'QR කේතය ජනනය කිරීමේදී දෝෂයකි',
+ "toast.linkCopied": "සබැඳිය පිටපත් විය",
+ "toast.eventsImported": "සිදුවීම් ආයාත විය",
+ "toast.eventDeleted": "සිදුවීම මකා දමන ලදී",
+ "toast.eventsCleared": "සිදුවීම් මකා දමන ලදී",
+ "toast.jsonCopied": "JSON පිටපත් විය",
+ "toast.hashCopied": "හෑෂ් පිටපත් විය",
+ "toast.lockRemoved": "අගුළ ඉවත් කරන ලදී",
+ "toast.calendarLocked": "දිනදර්ශනය අගුළු දමන ලදී",
+ "toast.calendarUnlocked": "දිනදර්ශනය අගුළු ඇරිණි",
+ "toast.incorrectPassword": "වැරදි මුරපදයක්",
+ "toast.unableToCopyLink": "සබැඳිය පිටපත් කළ නොහැක",
+ "toast.unableToCopyJson": "JSON පිටපත් කළ නොහැක",
+ "toast.unableToCopyHash": "හෑෂ් පිටපත් කළ නොහැක",
+ "toast.noEventsFound": "සිදුවීම් හමු නොවීය",
+ "toast.qrLibraryFailed": "QR පුස්තකාලය පූරණය කිරීමට අසමත් විය",
+ "toast.qrError": "QR කේතය ජනනය කිරීමේදී දෝෂයකි",
// Confirmation dialogs
- 'confirm.deleteEvent': 'මෙම සිදුවීම මකන්නද?',
- 'confirm.clearAll': 'සියලුම සිදුවීම් මකන්නද? මෙය ආපසු හැරවිය නොහැක.',
- 'confirm.removeLock': 'මුරපද ආරක්ෂාව ඉවත් කරන්නද? මෙය දත්ත URL හි සංකේතනය නොකර ගබඩා කරයි.',
+ "confirm.deleteEvent": "මෙම සිදුවීම මකන්නද?",
+ "confirm.clearAll": "සියලුම සිදුවීම් මකන්නද? මෙය ආපසු හැරවිය නොහැක.",
+ "confirm.removeLock": "මුරපද ආරක්ෂාව ඉවත් කරන්නද? මෙය දත්ත URL හි සංකේතනය නොකර ගබඩා කරයි.",
// Mobile warning
- 'mobile.title': 'ජංගම දසුන දැනුම්දීම',
- 'mobile.message': 'මෙම යෙදුම තවමත් ජංගම සහ ටැබ් දර්ශනය සඳහා ප්‍රශස්තිකරණය කර නොමැත.',
+ "mobile.title": "ජංගම දසුන දැනුම්දීම",
+ "mobile.message": "මෙම යෙදුම තවමත් ජංගම සහ ටැබ් දර්ශනය සඳහා ප්‍රශස්තිකරණය කර නොමැත.",
// QR modal
- 'qr.warning': 'අනතුරු ඇඟවීම: URL අක්ෂර {{length}} කි. සමහර QR ස්කෑනර් මෙතරම් විශාල කේත සමඟ අරගල කළ හැක.',
- 'qr.helper': 'ඔබේ දිනදර්ශනය විවෘත කිරීමට මෙම කේතයට ඔබේ දුරකථන කැමරාව යොමු කරන්න.',
+ "qr.warning": "අනතුරු ඇඟවීම: URL අක්ෂර {{length}} කි. සමහර QR ස්කෑනර් මෙතරම් විශාල කේත සමඟ අරගල කළ හැක.",
+ "qr.helper": "ඔබේ දිනදර්ශනය විවෘත කිරීමට මෙම කේතයට ඔබේ දුරකථන කැමරාව යොමු කරන්න.",
// JSON modal
- 'json.urlHash': 'URL හෑෂ්',
- 'json.jsonData': 'JSON දත්ත',
+ "json.urlHash": "URL හෑෂ්",
+ "json.jsonData": "JSON දත්ත",
// Locked overlay
- 'locked.title': 'සංකේතිත දිනදර්ශනය',
- 'locked.message': 'මෙම දිනදර්ශනය අගුළු හැරීමට සහ සංස්කරණය කිරීමට මුරපදය ඇතුළත් කරන්න.',
+ "locked.title": "සංකේතිත දිනදර්ශනය",
+ "locked.message": "මෙම දිනදර්ශනය අගුළු හැරීමට සහ සංස්කරණය කිරීමට මුරපදය ඇතුළත් කරන්න.",
// Labels
- 'label.details': 'විස්තර',
- 'label.events': 'සිදුවීම්',
- 'label.clock': 'ඔරලෝසුව',
- 'label.calendar': 'දිනදර්ශනය',
- 'label.language': 'භාෂාව',
- 'label.close': 'වසන්න',
- 'label.menu': 'මෙනුව',
+ "label.details": "විස්තර",
+ "label.events": "සිදුවීම්",
+ "label.clock": "ඔරලෝසුව",
+ "label.calendar": "දිනදර්ශනය",
+ "label.language": "භාෂාව",
+ "label.close": "වසන්න",
+ "label.menu": "මෙනුව",
// Countdown widget
- 'countdown.upNext': 'ඊළඟට',
- 'countdown.startsAt': '{{time}} ට ආරම්භ වේ',
- 'countdown.starts': '{{date}} {{time}} ට ආරම්භ වේ',
+ "countdown.upNext": "ඊළඟට",
+ "countdown.startsAt": "{{time}} ට ආරම්භ වේ",
+ "countdown.starts": "{{date}} {{time}} ට ආරම්භ වේ",
// Agenda view
- 'agenda.title': 'න්‍යාය පත්‍රය',
- 'agenda.rangeLabel': 'න්‍යාය පත්‍රය · {{range}}',
+ "agenda.title": "න්‍යාය පත්‍රය",
+ "agenda.rangeLabel": "න්‍යාය පත්‍රය · {{range}}",
// Brand
- 'brand.subtitle': 'සේවාදායකයක් නොමැති රහස්‍යතා දිනදර්ශනය. ඔබේ URL සුරැකුම් ගොනුවයි.',
+ "brand.subtitle": "සේවාදායකයක් නොමැති රහස්‍යතා දිනදර්ශනය. ඔබේ URL සුරැකුම් ගොනුවයි.",
// World Planner
- 'planner.addTimezone': 'වේලා කලාපය එක් කරන්න (උදා: London)',
+ "planner.addTimezone": "වේලා කලාපය එක් කරන්න (උදා: London)",
// Month names
- 'month.january': 'ජනවාරි',
- 'month.february': 'පෙබරවාරි',
- 'month.march': 'මාර්තු',
- 'month.april': 'අප්‍රේල්',
- 'month.may': 'මැයි',
- 'month.june': 'ජූනි',
- 'month.july': 'ජූලි',
- 'month.august': 'අගෝස්තු',
- 'month.september': 'සැප්තැම්බර්',
- 'month.october': 'ඔක්තෝබර්',
- 'month.november': 'නොවැම්බර්',
- 'month.december': 'දෙසැම්බර්',
+ "month.january": "ජනවාරි",
+ "month.february": "පෙබරවාරි",
+ "month.march": "මාර්තු",
+ "month.april": "අප්‍රේල්",
+ "month.may": "මැයි",
+ "month.june": "ජූනි",
+ "month.july": "ජූලි",
+ "month.august": "අගෝස්තු",
+ "month.september": "සැප්තැම්බර්",
+ "month.october": "ඔක්තෝබර්",
+ "month.november": "නොවැම්බර්",
+ "month.december": "දෙසැම්බර්",
// Short month names
- 'month.short.jan': 'ජන',
- 'month.short.feb': 'පෙබ',
- 'month.short.mar': 'මාර්',
- 'month.short.apr': 'අප්‍රේල්',
- 'month.short.may': 'මැයි',
- 'month.short.jun': 'ජූනි',
- 'month.short.jul': 'ජූලි',
- 'month.short.aug': 'අගෝ',
- 'month.short.sep': 'සැප්',
- 'month.short.oct': 'ඔක්',
- 'month.short.nov': 'නොවැ',
- 'month.short.dec': 'දෙසැ',
+ "month.short.jan": "ජන",
+ "month.short.feb": "පෙබ",
+ "month.short.mar": "මාර්",
+ "month.short.apr": "අප්‍රේල්",
+ "month.short.may": "මැයි",
+ "month.short.jun": "ජූනි",
+ "month.short.jul": "ජූලි",
+ "month.short.aug": "අගෝ",
+ "month.short.sep": "සැප්",
+ "month.short.oct": "ඔක්",
+ "month.short.nov": "නොවැ",
+ "month.short.dec": "දෙසැ",
// Weekday names
- 'weekday.sunday': 'ඉරිදා',
- 'weekday.monday': 'සඳුදා',
- 'weekday.tuesday': 'අඟහරුවාදා',
- 'weekday.wednesday': 'බදාදා',
- 'weekday.thursday': 'බ්‍රහස්පතින්දා',
- 'weekday.friday': 'සිකුරාදා',
- 'weekday.saturday': 'සෙනසුරාදා',
+ "weekday.sunday": "ඉරිදා",
+ "weekday.monday": "සඳුදා",
+ "weekday.tuesday": "අඟහරුවාදා",
+ "weekday.wednesday": "බදාදා",
+ "weekday.thursday": "බ්‍රහස්පතින්දා",
+ "weekday.friday": "සිකුරාදා",
+ "weekday.saturday": "සෙනසුරාදා",
// Short weekday names
- 'weekday.short.sun': 'ඉරි',
- 'weekday.short.mon': 'සඳු',
- 'weekday.short.tue': 'අඟ',
- 'weekday.short.wed': 'බදා',
- 'weekday.short.thu': 'බ්‍රහ',
- 'weekday.short.fri': 'සිකු',
- 'weekday.short.sat': 'සෙන',
+ "weekday.short.sun": "ඉරි",
+ "weekday.short.mon": "සඳු",
+ "weekday.short.tue": "අඟ",
+ "weekday.short.wed": "බදා",
+ "weekday.short.thu": "බ්‍රහ",
+ "weekday.short.fri": "සිකු",
+ "weekday.short.sat": "සෙන",
// Narrow weekday names (for year view)
- 'weekday.narrow.sun': 'ඉ',
- 'weekday.narrow.mon': 'ස',
- 'weekday.narrow.tue': 'අ',
- 'weekday.narrow.wed': 'බ',
- 'weekday.narrow.thu': 'බ්‍ර',
- 'weekday.narrow.fri': 'සි',
- 'weekday.narrow.sat': 'සෙ',
+ "weekday.narrow.sun": "ඉ",
+ "weekday.narrow.mon": "ස",
+ "weekday.narrow.tue": "අ",
+ "weekday.narrow.wed": "බ",
+ "weekday.narrow.thu": "බ්‍ර",
+ "weekday.narrow.fri": "සි",
+ "weekday.narrow.sat": "සෙ",
};
diff --git a/locales/ta.js b/locales/ta.js
index 2a3a4d7..1bb9bb1 100644
--- a/locales/ta.js
+++ b/locales/ta.js
@@ -118,6 +118,7 @@ export default {
'lang.en': 'English',
'lang.si': 'සිංහල',
'lang.ta': 'தமிழ்',
+ 'lang.it': 'Italian',
// Toast messages
'toast.linkCopied': 'இணைப்பு நகலெடுக்கப்பட்டது',
diff --git a/modules/i18n.js b/modules/i18n.js
index 4d50f97..d1bac37 100644
--- a/modules/i18n.js
+++ b/modules/i18n.js
@@ -1,12 +1,14 @@
import en from "../locales/en.js";
import si from "../locales/si.js";
import ta from "../locales/ta.js";
+import it from "../locales/it.js";
-const translations = { en, si, ta };
+const translations = { en, si, ta, it };
export const SUPPORTED_LANGUAGES = [
{ code: 'en', nameKey: 'lang.en' },
{ code: 'si', nameKey: 'lang.si' },
- { code: 'ta', nameKey: 'lang.ta' }
+ { code: 'ta', nameKey: 'lang.ta' },
+ { code: 'it', nameKey: 'lang.it' }
];
let currentLang = "en";
const updateCallbacks = [];
@@ -18,7 +20,10 @@ const updateCallbacks = [];
export function setLanguage(lang) {
if (translations[lang]) {
currentLang = lang;
- document.documentElement.setAttribute('lang', lang === 'si' ? 'si' : 'en');
+ document.documentElement.setAttribute('lang', lang);
+ if (document.body) {
+ document.body.setAttribute('lang', lang);
+ }
localStorage.setItem("hashcal.language", lang);
updateDOM();
updateCallbacks.forEach(cb => cb(lang));
@@ -82,6 +87,7 @@ export function getCurrentLanguage() {
export function getCurrentLocale() {
if (currentLang === 'si') return 'si-LK';
if (currentLang === 'ta') return 'ta-IN';
+ if (currentLang === 'it') return 'it-IT';
return 'en-US';
}