From e95c28ab64c5d3d6a1dc6b0d3a186bbfc6e53c52 Mon Sep 17 00:00:00 2001 From: Mic Date: Fri, 21 Mar 2025 00:02:00 +0100 Subject: [PATCH] Add error message for no active calendar and improve error handling in calendar event dialog --- _locales/en/messages.json | 4 ++++ js/mzta-menus.js | 3 +++ 2 files changed, 7 insertions(+) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index d79bdd1c..90513981 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1206,5 +1206,9 @@ "prefs_OptionText_spamfilter_context_menu_Info": { "message": "If checked, the \"Analyze for spam\" context menu item will be shown when right-clicking on an email in the messages list.", "description": "" + }, + "noActiveCalendar": { + "message": "No active calendar found!", + "description": "" } } \ No newline at end of file diff --git a/js/mzta-menus.js b/js/mzta-menus.js index 4ec3dcf1..36f236cd 100644 --- a/js/mzta-menus.js +++ b/js/mzta-menus.js @@ -238,6 +238,9 @@ export class mzta_Menus { taWorkingStatus.stopWorking(); return {ok:'1'}; } else { + if (result_openCalendarEventDialog.error.startsWith("|>>")) { + result_openCalendarEventDialog.error = browser.i18n.getMessage(result_openCalendarEventDialog.error.substring(3)); + } browser.tabs.sendMessage(tabs[0].id, { command: "sendAlert", curr_tab_type: tabs[0].type, message: browser.i18n.getMessage("calendar_opening_dialog_error") + ": " + result_openCalendarEventDialog.error }); taWorkingStatus.stopWorking(); return {ok:'0'};