From ac5e9ec14ea7e0e90df248b28b4a645aacb2700c Mon Sep 17 00:00:00 2001 From: Andrew Grimberg Date: Wed, 2 Feb 2022 06:43:07 -0800 Subject: [PATCH] Fix: Correct error strings The error string for a URL that returns bad data incorrectly states that AirBnB is the only supported calendar. This is incorrect as we now verify that the data returns is of type text/calendar and accept any calendar that passes this. Additionally, the error string for invalid URLs was not giving a reason why it was considered invalid. Issue: #73 Signed-off-by: Andrew Grimberg --- custom_components/rental_control/strings.json | 8 ++++---- custom_components/rental_control/translations/en.json | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/custom_components/rental_control/strings.json b/custom_components/rental_control/strings.json index 1a2ae87..38836a5 100644 --- a/custom_components/rental_control/strings.json +++ b/custom_components/rental_control/strings.json @@ -1,9 +1,9 @@ { "config": { "error": { - "bad_ics": "Only AirBnB iCalendars are supported", + "bad_ics": "URL did not provide valid calendar", "bad_time": "Check-in/out time is invalid. Use 24 hour time", - "invalid_url": "Invalid Calendar URL", + "invalid_url": "Only https URLs are supported", "same_name": "Name already in use", "unknown": "Unexpected error" }, @@ -28,9 +28,9 @@ }, "options": { "error": { - "bad_ics": "Only AirBnB iCalendars are supported", + "bad_ics": "URL did not provide valid calendar", "bad_time": "Check-in/out time is invalid. Use 24 hour time", - "invalid_url": "Invalid Calendar URL", + "invalid_url": "Only https URLs are supported", "same_name": "Name already in use", "unknown": "Unexpected error" }, diff --git a/custom_components/rental_control/translations/en.json b/custom_components/rental_control/translations/en.json index 1a2ae87..38836a5 100644 --- a/custom_components/rental_control/translations/en.json +++ b/custom_components/rental_control/translations/en.json @@ -1,9 +1,9 @@ { "config": { "error": { - "bad_ics": "Only AirBnB iCalendars are supported", + "bad_ics": "URL did not provide valid calendar", "bad_time": "Check-in/out time is invalid. Use 24 hour time", - "invalid_url": "Invalid Calendar URL", + "invalid_url": "Only https URLs are supported", "same_name": "Name already in use", "unknown": "Unexpected error" }, @@ -28,9 +28,9 @@ }, "options": { "error": { - "bad_ics": "Only AirBnB iCalendars are supported", + "bad_ics": "URL did not provide valid calendar", "bad_time": "Check-in/out time is invalid. Use 24 hour time", - "invalid_url": "Invalid Calendar URL", + "invalid_url": "Only https URLs are supported", "same_name": "Name already in use", "unknown": "Unexpected error" },