-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: adjust amazon forwarding validation function (#957)
* refactor: adjust amazon forwarding validation function * linting, update translations * add additional test * use regex when checking for domain * formatting * update test
- Loading branch information
Showing
23 changed files
with
301 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,109 +1,106 @@ | ||
{ | ||
"config": { | ||
"abort": { | ||
"single_instance_allowed": "Only a single configuration of Mail and Packages is allowed.", | ||
"reconfigure_successful": "Reconfigure Successful" | ||
}, | ||
"error": { | ||
"communication": "Unable to connect or login to the mail server. Please check the log for details.", | ||
"invalid_path": "Please store the images in another directory.", | ||
"ffmpeg_not_found": "Generate MP4 requires ffmpeg", | ||
"amazon_domain": "Invalid forwarding email address.", | ||
"file_not_found": "Image file not found", | ||
"scan_too_low": "Scan interval too low (minimum 5)", | ||
"timeout_too_low": "IMAP timeout too low (minumim 10)" | ||
}, | ||
"step": { | ||
"user": { | ||
"data": { | ||
"host": "Host", | ||
"password": "Password", | ||
"port": "Port", | ||
"username": "Username", | ||
"imap_security": "IMAP Security", | ||
"verify_ssl": "Verify SSL Cert" | ||
}, | ||
"description": "Please enter the connection information of your mail server.", | ||
"title": "Mail and Packages (Step 1 of 2)" | ||
"abort": { | ||
"single_instance_allowed": "Only a single configuration of Mail and Packages is allowed.", | ||
"reconfigure_successful": "Reconfigure Successful" | ||
}, | ||
"config_2": { | ||
"data": { | ||
"folder": "Mail Folder", | ||
"resources": "Sensors List", | ||
"scan_interval": "Scanning Interval (minutes, minimum 5)", | ||
"image_path": "Image Path", | ||
"gif_duration": "Image Duration (seconds)", | ||
"image_security": "Random Image Filename", | ||
"imap_timeout": "Time in seconds before connection timeout (seconds, minimum 10)", | ||
"generate_mp4": "Create mp4 from images", | ||
"allow_external": "Create image for notification apps", | ||
"custom_img": "Use custom 'no image' image?" | ||
}, | ||
"description": "Finish the configuration by customizing the following based on your email structure and Home Assistant installation.\n\nFor details on the [Mail and Packages integration](https://github.com/moralmunky/Home-Assistant-Mail-And-Packages/wiki/Configuration-and-Email-Settings#configuration) options review the [configuration, templates, and automations section](https://github.com/moralmunky/Home-Assistant-Mail-And-Packages/wiki/Configuration-and-Email-Settings#configuration) on GitHub.", | ||
"title": "Mail and Packages (Step 2 of 2)" | ||
"error": { | ||
"communication": "Unable to connect or login to the mail server. Please check the log for details.", | ||
"invalid_path": "Please store the images in another directory.", | ||
"ffmpeg_not_found": "Generate MP4 requires ffmpeg", | ||
"amazon_domain": "Invalid forwarding email address.", | ||
"file_not_found": "Image file not found", | ||
"invalid_email_format": "Invalid email address format." | ||
}, | ||
"config_3": { | ||
"data": { | ||
"custom_img_file": "Path to custom image: (ie: images/my_custom_no_mail.jpg)" | ||
}, | ||
"description": "Enter the path and file name to your custom no mail image below.\n\nExample: images/custom_nomail.gif", | ||
"title": "Mail and Packages (Step 3 of 3)" | ||
}, | ||
"config_amazon": { | ||
"data": { | ||
"amazon_domain": "Amazon domain", | ||
"amazon_fwds": "Amazon forwarded email addresses", | ||
"amazon_days": "Days back to check for Amazon emails" | ||
}, | ||
"description": "Please enter the domain amazon sends email's from (ie: amazon.com or amazon.de)\n\nIf using Amazon forwarded emails please seperate each address with a comma or enter (none) to clear this setting.", | ||
"title": "Amazon Settings" | ||
}, | ||
"reconfigure": { | ||
"data": { | ||
"host": "Host", | ||
"password": "Password", | ||
"port": "Port", | ||
"username": "Username", | ||
"imap_security": "IMAP Security", | ||
"verify_ssl": "Verify SSL Cert" | ||
"step": { | ||
"user": { | ||
"description": "Please enter the connection information of your mail server.", | ||
"data": { | ||
"host": "Host", | ||
"password": "Password", | ||
"port": "Port", | ||
"username": "Username", | ||
"verify_ssl": "Verify SSL Cert", | ||
"imap_security": "IMAP Security" | ||
}, | ||
"title": "Mail and Packages (Step 1 of 2)" | ||
}, | ||
"description": "Please enter the connection information of your mail server.", | ||
"title": "Mail and Packages (Step 1 of 2)" | ||
}, | ||
"reconfig_2": { | ||
"data": { | ||
"folder": "Mail Folder", | ||
"scan_interval": "Scanning Interval (minutes)", | ||
"image_path": "Image Path", | ||
"gif_duration": "Image Duration (seconds)", | ||
"image_security": "Random Image Filename", | ||
"generate_mp4": "Create mp4 from images", | ||
"resources": "Sensors List", | ||
"imap_timeout": "Time in seconds before connection timeout (seconds, minimum 10)", | ||
"amazon_fwds": "Amazon fowarded email addresses", | ||
"allow_external": "Create image for notification apps", | ||
"amazon_days": "Days back to check for Amazon emails", | ||
"custom_img": "Use custom 'no image' image?" | ||
"config_2": { | ||
"data": { | ||
"folder": "Mail Folder", | ||
"resources": "Sensors List", | ||
"scan_interval": "Scanning Interval (minutes, minimum 5)", | ||
"image_path": "Image Path", | ||
"gif_duration": "Image Duration (seconds)", | ||
"image_security": "Random Image Filename", | ||
"imap_timeout": "Time in seconds before connection timeout (seconds, minimum 10)", | ||
"generate_mp4": "Create mp4 from images", | ||
"allow_external": "Create image for notification apps", | ||
"custom_img": "Use custom 'no image' image?" | ||
}, | ||
"description": "Finish the configuration by customizing the following based on your email structure and Home Assistant installation.\n\nFor details on the [Mail and Packages integration](https:\/\/github.com\/moralmunky\/Home-Assistant-Mail-And-Packages\/wiki\/Configuration-and-Email-Settings#configuration) options review the [configuration, templates, and automations section](https:\/\/github.com\/moralmunky\/Home-Assistant-Mail-And-Packages\/wiki\/Configuration-and-Email-Settings#configuration) on GitHub.\n\nIf using Amazon forwarded emails please separate each address with a comma.", | ||
"title": "Mail and Packages (Step 2 of 2)" | ||
}, | ||
"description": "Finish the configuration by customizing the following based on your email structure and Home Assistant installation.\n\nFor details on the [Mail and Packages integration](https://github.com/moralmunky/Home-Assistant-Mail-And-Packages/wiki/Configuration-and-Email-Settings#configuration) options review the [configuration, templates, and automations section](https://github.com/moralmunky/Home-Assistant-Mail-And-Packages/wiki/Configuration-and-Email-Settings#configuration) on GitHub.\n\nIf using Amazon forwarded emails please seperate each address with a comma or enter (none) to clear this setting.", | ||
"title": "Mail and Packages (Step 2 of 2)" | ||
}, | ||
"reconfig_3": { | ||
"data": { | ||
"custom_img_file": "Path to custom image: (i.e.: images/my_custom_no_mail.jpg)" | ||
"config_3": { | ||
"data": { | ||
"custom_img_file": "Path to custom image: (ie: images\/my_custom_no_mail.jpg)" | ||
}, | ||
"description": "Enter the path and file name to your custom no mail image below.\n\nExample: images\/custom_nomail.gif", | ||
"title": "Mail and Packages (Step 3 of 3)" | ||
}, | ||
"description": "Enter the path and file name to your custom no mail image below.\n\nExample: images/custom_nomail.gif", | ||
"title": "Mail and Packages (Step 3 of 3)" | ||
}, | ||
"reconfig_amazon": { | ||
"data": { | ||
"amazon_domain": "Amazon domain", | ||
"amazon_fwds": "Amazon forwarded email addresses", | ||
"amazon_days": "Days back to check for Amazon emails" | ||
}, | ||
"description": "Please enter the domain amazon sends email's from (ie: amazon.com or amazon.de)\n\nIf using Amazon forwarded emails please seperate each address with a comma or enter (none) to clear this setting.", | ||
"title": "Amazon Settings" | ||
} | ||
} | ||
"config_amazon": { | ||
"data": { | ||
"amazon_domain": "Amazon domain", | ||
"amazon_fwds": "Amazon fowarded email addresses", | ||
"amazon_days": "Days back to check for Amazon emails" | ||
}, | ||
"description": "Please enter the domain Amazon sends email's from (ie: amazon.com or amazon.de)\n\nIf using Amazon forwarded emails please seperate each address with a comma or enter (none) to clear this setting.", | ||
"title": "Amazon Settings" | ||
}, | ||
"reconfigure": { | ||
"data": { | ||
"host": "Host", | ||
"password": "Password", | ||
"port": "Port", | ||
"username": "Username", | ||
"imap_security": "IMAP Security", | ||
"verify_ssl": "Verify SSL Cert" | ||
}, | ||
"description": "Please enter the connection information of your mail server.", | ||
"title": "Mail and Packages (Step 1 of 2)" | ||
}, | ||
"reconfig_2": { | ||
"data": { | ||
"folder": "Mail Folder", | ||
"scan_interval": "Scanning Interval (minutes, minimum 5)", | ||
"image_path": "Image Path", | ||
"gif_duration": "Image Duration (seconds)", | ||
"image_security": "Random Image Filename", | ||
"generate_mp4": "Create mp4 from images", | ||
"resources": "Sensors List", | ||
"imap_timeout": "Time in seconds before connection timeout (seconds, minimum 10)", | ||
"allow_external": "Create image for notification apps", | ||
"custom_img": "Use custom 'no image' image?" | ||
}, | ||
"description": "Finish the configuration by customizing the following based on your email structure and Home Assistant installation.\n\nFor details on the [Mail and Packages integration](https:\/\/github.com\/moralmunky\/Home-Assistant-Mail-And-Packages\/wiki\/Configuration-and-Email-Settings#configuration) options review the [configuration, templates, and automations section](https:\/\/github.com\/moralmunky\/Home-Assistant-Mail-And-Packages\/wiki\/Configuration-and-Email-Settings#configuration) on GitHub.\n\nIf using Amazon forwarded emails please separate each address with a comma or enter (none) to clear this setting.", | ||
"title": "Mail and Packages (Step 2 of 2)" | ||
}, | ||
"reconfig_3": { | ||
"data": { | ||
"custom_img_file": "Path to custom image: (i.e.: images\/my_custom_no_mail.jpg)" | ||
}, | ||
"description": "Enter the path and file name to your custom no mail image below.\n\nExample: images\/custom_nomail.gif", | ||
"title": "Mail and Packages (Step 3 of 3)" | ||
}, | ||
"reconfig_amazon": { | ||
"data": { | ||
"amazon_domain": "Amazon domain", | ||
"amazon_fwds": "Amazon fowarded email addresses", | ||
"amazon_days": "Days back to check for Amazon emails" | ||
}, | ||
"description": "Please enter the domain Amazon sends email's from (ie: amazon.com or amazon.de)\n\nIf using Amazon forwarded emails please seperate each address with a comma or enter (none) to clear this setting.", | ||
"title": "Amazon Settings" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.