/**
  * Create the array needed for translation and passing other settings to JS.
  *
  * @return $data array the dynamic data array
  */
 private function get_translation_data()
 {
     global $ai1ec_importer_plugin_helper;
     $lang = $this->events_helper->get_lang();
     $data = array('select_one_option' => __('Select at least one user/group/page to subscribe to.', AI1EC_PLUGIN_NAME), 'error_no_response' => __('An unexpected error occurred. Try reloading the page.', AI1EC_PLUGIN_NAME), 'no_more_subscription' => __('No subscriptions yet!', AI1EC_PLUGIN_NAME), 'no_more_than_ten' => __('Please select no more than ten users/groups/pages at a time to avoid overloading Facebook requests.', AI1EC_PLUGIN_NAME), 'duplicate_feed_message' => esc_html__('This feed is already being imported.', AI1EC_PLUGIN_NAME), 'invalid_url_message' => esc_html__('Please enter a valid iCalendar URL.', AI1EC_PLUGIN_NAME), 'invalid_email_message' => esc_html__('Please enter a valid e-mail address.', AI1EC_PLUGIN_NAME), 'now' => $this->events_helper->gmt_to_local(Ai1ec_Time_Utility::current_time()), 'date_format' => $this->settings->input_date_format, 'month_names' => $this->ai1ec_locale->get_localized_month_names(), 'day_names' => $this->ai1ec_locale->get_localized_week_names(), 'week_start_day' => $this->settings->week_start_day, 'twentyfour_hour' => $this->settings->input_24h_time, 'region' => $this->settings->geo_region_biasing ? $this->events_helper->get_region() : '', 'disable_autocompletion' => $this->settings->disable_autocompletion, 'error_message_not_valid_lat' => __('Please enter a valid latitude. A valid latitude is comprised between +90 and -90.', AI1EC_PLUGIN_NAME), 'error_message_not_valid_long' => __('Please enter a valid longitude. A valid longitude is comprised between +180 and -180.', AI1EC_PLUGIN_NAME), 'error_message_not_entered_lat' => __('When the "Input coordinates" checkbox is checked, "Latitude" is a required field.', AI1EC_PLUGIN_NAME), 'error_message_not_entered_long' => __('When the "Input coordinates" checkbox is checked, "Longitude" is a required field.', AI1EC_PLUGIN_NAME), 'language' => $lang, 'page' => '', 'page_on_front_description' => __('This setting cannot be changed in Event Platform mode.', AI1EC_PLUGIN_NAME), 'strict_mode' => $this->settings->event_platform_strict, 'platform_active' => $this->settings->event_platform_active, 'facebook_logged_in' => $ai1ec_importer_plugin_helper->check_if_we_have_a_valid_facebook_access_token(), 'app_id_and_secret_are_required' => __("You must specify both an app ID and app secret to connect to Facebook.", AI1EC_PLUGIN_NAME), 'ajax_url' => admin_url('admin-ajax.php'), 'url_not_valid' => __("The URL you have entered seems to be invalid. Please remember that URLs must start with either 'http://' or 'https://'.", AI1EC_PLUGIN_NAME), 'mail_url_required' => __("Both the <em>calendar URL</em> and <em>e-mail address</em> fields are required.", AI1EC_PLUGIN_NAME), 'confirm_reset_theme' => __("Are you sure you want to reset your theme options to their default values?", AI1EC_PLUGIN_NAME));
     return $data;
 }
 /**
  * Create the array needed for translation and passing other settings to JS.
  *
  * @return $data array the dynamic data array
  */
 private function get_translation_data()
 {
     global $ai1ec_importer_plugin_helper;
     $force_ssl_admin = force_ssl_admin();
     if ($force_ssl_admin && !is_ssl()) {
         force_ssl_admin(false);
     }
     $ajax_url = admin_url('admin-ajax.php');
     force_ssl_admin($force_ssl_admin);
     $data = array('select_one_option' => __('Select at least one user/group/page to subscribe to.', AI1EC_PLUGIN_NAME), 'is_calendar_page' => isset($_GET[self::IS_CALENDAR_PAGE]) && $_GET[self::IS_CALENDAR_PAGE] === self::TRUE_PARAM, 'error_no_response' => __('An unexpected error occurred. Try reloading the page.', AI1EC_PLUGIN_NAME), 'no_more_subscription' => __('No subscriptions yet!', AI1EC_PLUGIN_NAME), 'no_more_than_ten' => __('Please select no more than ten users/groups/pages at a time to avoid overloading Facebook requests.', AI1EC_PLUGIN_NAME), 'duplicate_feed_message' => esc_html__('This feed is already being imported.', AI1EC_PLUGIN_NAME), 'invalid_url_message' => esc_html__('Please enter a valid iCalendar URL.', AI1EC_PLUGIN_NAME), 'invalid_email_message' => esc_html__('Please enter a valid e-mail address.', AI1EC_PLUGIN_NAME), 'now' => $this->events_helper->gmt_to_local(Ai1ec_Time_Utility::current_time()), 'date_format' => $this->settings->input_date_format, 'month_names' => $this->ai1ec_locale->get_localized_month_names(), 'day_names' => $this->ai1ec_locale->get_localized_week_names(), 'week_start_day' => $this->settings->week_start_day, 'twentyfour_hour' => $this->settings->input_24h_time, 'region' => $this->settings->geo_region_biasing ? $this->events_helper->get_region() : '', 'disable_autocompletion' => $this->settings->disable_autocompletion, 'error_message_not_valid_lat' => __('Please enter a valid latitude. A valid latitude is comprised between +90 and -90.', AI1EC_PLUGIN_NAME), 'error_message_not_valid_long' => __('Please enter a valid longitude. A valid longitude is comprised between +180 and -180.', AI1EC_PLUGIN_NAME), 'error_message_not_entered_lat' => __('When the "Input coordinates" checkbox is checked, "Latitude" is a required field.', AI1EC_PLUGIN_NAME), 'error_message_not_entered_long' => __('When the "Input coordinates" checkbox is checked, "Longitude" is a required field.', AI1EC_PLUGIN_NAME), 'language' => $this->events_helper->get_lang(), 'page' => '', 'page_on_front_description' => __('This setting cannot be changed in Event Platform mode.', AI1EC_PLUGIN_NAME), 'strict_mode' => $this->settings->event_platform_strict, 'platform_active' => $this->settings->event_platform_active, 'facebook_logged_in' => $ai1ec_importer_plugin_helper->check_if_we_have_a_valid_facebook_access_token(), 'app_id_and_secret_are_required' => __('You must specify both an app ID and app secret to connect to Facebook.', AI1EC_PLUGIN_NAME), 'file_upload_required' => __('You must specify a valid file to upload or paste your data into the text field.', AI1EC_PLUGIN_NAME), 'file_upload_not_permitted' => __('Only .ics and .csv files are supported.', AI1EC_PLUGIN_NAME), 'ajax_url' => $ajax_url, 'url_not_valid' => __('The URL you have entered seems to be invalid. Please remember that URLs must start with either "http://" or "https://".', AI1EC_PLUGIN_NAME), 'mail_url_required' => __('Both the <em>calendar URL</em> and <em>e-mail address</em> fields are required.', AI1EC_PLUGIN_NAME), 'confirm_reset_theme' => __('Are you sure you want to reset your theme options to their default values?', AI1EC_PLUGIN_NAME), 'license_key' => $this->settings->get_license_key(), 'reset_saved_filter_text' => __('Save this filter as default', AI1EC_PLUGIN_NAME), 'clear_saved_filter_text' => __('Remove default filter', AI1EC_PLUGIN_NAME), 'save_filter_text_ok' => __('The active filter has been saved as your default for this calendar.', AI1EC_PLUGIN_NAME), 'remove_filter_text_ok' => __('Your default calendar filter has been removed.', AI1EC_PLUGIN_NAME), 'size_less_variable_not_ok' => __('The value you have entered is not a valid CSS length.', AI1EC_PLUGIN_NAME), 'week_view_starts_at' => $this->settings->week_view_starts_at, 'week_view_ends_at' => $this->settings->week_view_ends_at, 'end_must_be_after_start' => __('The end date can\'t be earlier than the start date.', AI1EC_PLUGIN_NAME), 'show_at_least_six_hours' => __('For week and day view, you must select an interval of at least 6 hours.', AI1EC_PLUGIN_NAME), 'label_buy_tickets_url' => __('Buy tickets URL (optional)', AI1EC_PLUGIN_NAME), 'label_rsvp_url' => __('Registration URL (optional)', AI1EC_PLUGIN_NAME), 'label_a_buy_tickets_url' => __('Buy Tickets URL:', AI1EC_PLUGIN_NAME), 'label_a_rsvp_url' => __('Registration URL:', AI1EC_PLUGIN_NAME), 'event_price_not_entered' => __('Please enter an event cost, or mark the event as free.', AI1EC_PLUGIN_NAME), 'blog_timezone' => Ai1ec_Meta::get_option('gmt_offset'), 'use_select2' => $this->settings->use_select2_widgets, 'require_desclaimer' => __('If you choose to require a disclaimer on the front-end event creation form, you must provide the disclaimer text (HTML allowed) in the appropriate field.', AI1EC_PLUGIN_NAME));
     return $data;
 }