Various events in the life of this plugin have caused an over complicated key and duplicated keys. This commits attempts to regroup everything related to discourse_post_event under a top level `discourse_post_event` key, removes the `event_ui` level as it's not very clear, technically everything is UI. And finally attempts to remove the duplicates.
Before, site settings were divided into `discourse calendar` and `discourse events`.
This PR is merging them. Also, translation were moved under `discourse_calendar` key.
In preparation for core PR https://github.com/discourse/discourse/pull/18413
which changes JS to load default yml site settings, the
main one needing changes is that now the
allow_uncategorized_topics setting is false
by default, so we have to choose a category
first in many places.
Previously we were storing a 'UTC' datetime in the database which was in fact a local datetime. That means that, every time it was accessed, consumers would have to ignore the "Z" suffix and parse it using the specified `timezone`.
Adding that kind of logic to every consumer would be very error-prone. Instead, this commit changes the implementation so that `original_start_time` and `original_end_time` are 'technically correct', truly-UTC timestamps. Consumers that need to obtain the original 'local' timestamp (e.g. recurrence) can do something like `original_start_time.in_timezone(timezone)`. Most consumers (e.g. notifications, event-countdown UI, etc.) don't care about the original timezone, and so they can now stick to using `original_start_time` without issue.
A number of specs are introduced to test timezone behaviour, including recurrence across daylight-saving transitions.
A migration will fix existing erroneous data in the database.
A number of JS fixes are also included, and a basic JS acceptance test is introduced.