<% extends 'layout.html' %>

<% block content %>
  <div id="subscribers_container"></div>

  <script type="text/javascript">
    var mailpoet_listing_per_page = <%= items_per_page %>;
    var mailpoet_segments = <%= json_encode(segments) %>;
    var mailpoet_custom_fields = <%= json_encode(custom_fields) %>;
    var mailpoet_month_names = <%= json_encode(month_names) %>;
    var mailpoet_date_formats = <%= json_encode(date_formats) %>;
    var mailpoet_premium_active = <%= json_encode(premium_plugin_active) %>;
    var mailpoet_max_confirmation_emails = <%= max_confirmation_emails %>;
    var mss_active = <%= json_encode(mss_active) %>;
    var mailpoet_beacon_articles = [
      '57ce07ffc6979108399a044b',
      '57ce079f903360649f6e56fc',
      '5d0a1da404286318cac46fe5',
      '5cbf19622c7d3a026fd3efe1',
      '58a5a7502c7d3a576d353c78',
    ];
    var mailpoet_subscribers_limit = <%= subscribers_limit ? subscribers_limit : 'false'  %>;
    var mailpoet_subscribers_limit_reached = <%= subscribers_limit_reached ? 'true' : 'false' %>;
    var mailpoet_has_valid_api_key = <%= has_valid_api_key ? 'true' : 'false' %>;
    var mailpoet_mss_key_invalid = <%= mss_key_invalid ? 'true' : 'false' %>;
    var mailpoet_subscribers_count = <%= subscriber_count %>;
    var mailpoet_subscribers_in_plan_count = <%= subscriber_count %>;
  </script>
<% endblock %>

<% block translations %>
  <%= localize({
    'pageTitle': __('Subscribers'),
    'searchLabel': __('Search'),
    'loadingItems': __('Loading subscribers...'),
    'noItemsFound': __('No subscribers were found.'),
    'bouncedSubscribersHelp': __("Email addresses that are invalid or don't exist anymore are called \"bounced addresses\". It's a good practice not to send emails to bounced addresses to keep a good reputation with spam filters. Send your emails with MailPoet and we'll automatically ensure to keep a list of bounced addresses without any setup."),
    'bouncedSubscribersPremiumButtonText': __('Get premium version!'),
    'selectAllLabel': __('All subscribers on this page are selected.'),
    'selectedAllLabel': __('All %d subscribers are selected.'),
    'selectAllLink': __('Select all subscribers on all pages.'),
    'clearSelection': __('Clear selection'),
    'permanentlyDeleted': __('%d subscribers were permanently deleted.'),
    'selectBulkAction': __('Select bulk action'),
    'bulkActions': __('Bulk Actions'),
    'apply': __('Apply'),
    'filter': __('Filter'),
    'emptyTrash': __('Empty Trash'),
    'selectAll': __('Select All'),
    'edit': __('Edit'),
    'restore': __('Restore'),
    'trash': __('Trash'),
    'moveToTrash': __('Move to trash'),
    'deletePermanently': __('Delete Permanently'),
    'showMoreDetails': __('Show more details'),

    'previousPage': __('Previous page'),
    'firstPage': __('First page'),
    'nextPage': __('Next page'),
    'lastPage': __('Last page'),
    'currentPage': __('Current Page'),
    'pageOutOf': __('of'),
    'numberOfItemsSingular': __('1 item'),
    'numberOfItemsMultiple': __('%$1d items'),

    'subscribersInPlan': __('%$1d subscribers in your plan'),
    'subscribersInPlanTooltip': __('This is the total of subscribed, unconfirmed and inactive subscribers. The count excludes unsubscribed and bounced (invalid) email addresses.'),

    'email': __('E-mail'),
    'firstname': __('First name'),
    'lastname': __('Last name'),
    'status': __('Status'),
    'unconfirmed': __('Unconfirmed'),
    'subscribed': __('Subscribed'),
    'unsubscribed': __('Unsubscribed'),
    'inactive': __('Inactive'),
    'bounced': __('Bounced'),
    'selectList': __('Select a list'),
    'unsubscribedOn': __('Unsubscribed on %$1s'),
    'subscriberUpdated': __('Subscriber was updated successfully!'),
    'subscriberAdded': __('Subscriber was added successfully!'),
    'welcomeEmailTip': __('This subscriber will receive Welcome Emails if any are active for your lists.'),

    'subscriber': __('Subscriber'),
    'status': __('Status'),
    'lists': __('Lists'),
    'subscribedOn': __('Subscribed on'),
    'lastModifiedOn': __('Last modified on'),
    'oneSubscriberTrashed': __('1 subscriber was moved to the trash.'),
    'multipleSubscribersTrashed': __('%$1d subscribers were moved to the trash.'),
    'oneSubscriberDeleted': __('1 subscriber was permanently deleted.'),
    'multipleSubscribersDeleted': __('%$1d subscribers were permanently deleted.'),
    'oneSubscriberRestored': __('1 subscriber has been restored from the trash.'),
    'multipleSubscribersRestored': __('%$1d subscribers have been restored from the trash.'),
    'moveToList': __('Move to list...'),
    'multipleSubscribersMovedToList': __('%$1d subscribers were moved to list <strong>%$2s</strong>'),
    'addToList': __('Add to list...'),
    'multipleSubscribersAddedToList': __('%$1d subscribers were added to list <strong>%$2s</strong>.'),
    'removeFromList': __('Remove from list...'),
    'multipleSubscribersRemovedFromList': __('%$1d subscribers were removed from list <strong>%$2s</strong>'),
    'removeFromAllLists': __('Remove from all lists'),
    'multipleSubscribersRemovedFromAllLists': __('%$1d subscribers were removed from all lists.'),
    'resendConfirmationEmail': __('Resend confirmation email'),
    'oneConfirmationEmailSent': __('1 confirmation email has been sent.'),
    'listsToWhichSubscriberWasSubscribed': __('Lists to which the subscriber was subscribed.'),
    'WPUsersSegment': __('WordPress Users'),
    'WPUserEditNotice': __('This subscriber is a registered WordPress user. [link]Edit his/her profile[/link] to change his/her email.'),
    'allSendingPausedHeader': __('All sending is currently paused!'),
    'allSendingPausedBody': __('Your key to send with MailPoet is invalid.'),
    'allSendingPausedLink': __('Purchase a key'),
    'tip': __('Tip:'),
    'customFieldsTip': __('Need to add new fields, like a telephone number or street address? You can add custom fields by editing the subscription form on the Forms page.'),
    'year': __('Year'),
    'month': __('Month'),
    'day': __('Day'),
    'new': __('Add New'),
    'import': __('Import'),
    'export': __('Export'),
    'save': __('Save'),
    'backToList': __('Back')
  }) %>
<% endblock %>
