<% 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_max_confirmation_emails = <%= max_confirmation_emails %>;
    var mailpoet_beacon_articles = [
      '57ce07ffc6979108399a044b',
      '57ce079f903360649f6e56fc',
      '5d0a1da404286318cac46fe5',
      '5cbf19622c7d3a026fd3efe1',
      '58a5a7502c7d3a576d353c78',
    ];
  </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!'),
    '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'),
    'lastEngagement': __('Last engagement'),
    'engagementPeriodHeading': __('Engagement over the last 12 months'),
    'never': _x('never', 'when was the last time the subscriber engaged with the website?'),

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

    'subscribersInPlanCount': _x('%1$d / %2$d', 'count / total subscribers'),
    'subscribersInPlan': _x('%s subscribers in your plan', 'number of subscribers in a sending plan'),
    'subscribersInPlanTooltip': __('This is the total of subscribed, unconfirmed and inactive subscribers we count when you are sending with MailPoet Sending Service. 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 %1$s'),
    'subscriberUpdated': __('Subscriber was updated successfully!'),
    'subscriberAdded': __('Subscriber was added successfully!'),
    'welcomeEmailTip': __('This subscriber will receive Welcome Emails if any are active for your lists.'),

    'unsubscribedNewsletter': __('Unsubscribed at %1$d, from newsletter [link].'),
    'unsubscribedManage': __('Unsubscribed at %1$d, using the “Manage my Subscription” page.'),
    'unsubscribedAdmin': __('Unsubscribed at %1$d, by admin "%2$d".'),
    'unsubscribedMpApi': __('Unsubscribed at %1$d, via the MP API.'),
    'unsubscribedUnknown': __('Unsubscribed at %1$d, for an unknown reason.'),

    'subscriber': __('Subscriber'),
    'status': __('Status'),
    'lists': __('Lists'),
    'statisticsColumn': __('Score'),
    'subscribedOn': __('Subscribed on'),
    'lastModifiedOn': __('Last modified on'),
    'oneSubscriberTrashed': __('1 subscriber was moved to the trash.'),
    'multipleSubscribersTrashed': __('%1$d subscribers were moved to the trash.'),
    'oneSubscriberDeleted': __('1 subscriber was permanently deleted.'),
    'multipleSubscribersDeleted': __('%1$d subscribers were permanently deleted.'),
    'oneSubscriberRestored': __('1 subscriber has been restored from the trash.'),
    'multipleSubscribersRestored': __('%1$d subscribers have been restored from the trash.'),
    'moveToList': __('Move to list...'),
    'multipleSubscribersMovedToList': __('%1$d subscribers were moved to list <strong>%2$s</strong>'),
    'addToList': __('Add to list...'),
    'multipleSubscribersAddedToList': __('%1$d subscribers were added to list <strong>%2$s</strong>.'),
    'removeFromList': __('Remove from list...'),
    'multipleSubscribersRemovedFromList': __('%1$d subscribers were removed from list <strong>%2$s</strong>'),
    'removeFromAllLists': __('Remove from all lists'),
    'unsubscribe': _x('Unsubscribe', 'This is an action on the subscribers page'),
    'unsubscribeConfirm': __('This action will unsubscribe %s subscribers from all lists. This action cannot be undone. Are you sure, you want to continue?'),
    'multipleSubscribersRemovedFromAllLists': __('%1$d 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 their profile[/link] to change their email.'),
    'statsListingActionTitle': __('Statistics'),
    'statsHeading': _x('Stats: %s', 'This is a heading for the subscribers statistics page example: "Stats: mailpoet@example.com"'),
    'statsSentEmail': __('Sent email'),
    'statsOpened': __('Opened'),
    'statsMachineOpened': _x('Machine-opened', 'Percentage of newsletters that were opened by a machine'),
    'statsMachineOpenedTooltip': __('A machine-opened email is an email opened by a computer in the background without the user’s explicit request or knowledge. [link]Read more[/link]'),
    'statsClicked': __('Clicked'),
    'statsNotClicked': __('Not opened'),
    'openedEmailsHeading': __('Opened emails'),
    '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'),
    'premiumFeature': __('This is a Premium feature'),
    'upgradeRequired': __('Upgrade required'),
    'premiumRequired': __('Learn more about how each of your subscribers is engaging with your emails. See which emails they’ve opened, the links they clicked. If you’re a WooCommerce store owner, you’ll also see any purchases made as a result of your emails. [link]Learn more[/link].'),
    'freeLimitReached': __('Congratulations, you now have [subscribersCount] subscribers! Our free version is limited to [subscribersLimit] subscribers. You need to upgrade now to be able to continue using MailPoet.'),
    'planLimitReached': __('Congratulations, you now have [subscribersCount] subscribers! Your plan is limited to [subscribersLimit] subscribers. You need to upgrade now to be able to continue using MailPoet.'),
    'premiumBannerCtaFree': __('Upgrade'),
    'premiumBannerCtaUpgrade': __('Upgrade Now'),
    'premiumFeatureDescription':  __('Your current MailPoet plan includes advanced features, but they require the MailPoet Premium plugin to be installed and activated.'),
    'premiumFeatureButtonDownloadPremium':  __('Download MailPoet Premium plugin'),
    'premiumFeatureButtonActivatePremium':  __('Activate MailPoet Premium plugin'),
    'premiumFeatureDescriptionSubscribersLimitReached':  __('Congratulations, you now have [subscribersCount] subscribers! Your plan is limited to [subscribersLimit] subscribers. You need to upgrade now to be able to continue using MailPoet.'),
    'premiumFeatureButtonUpgradePlan':  __('Upgrade your plan'),
    'columnAction': _x('Action', 'Table column label for subscriber actions e.g. email open, link clicked'),
    'columnActionOn': _x('Action on', 'Table column label for date when subscriber action happened'),
    'columnCount': _x('Count', 'Table column label for count of subscriber actions'),
    'unknownBadgeName': __('Unknown'),
    'unknownBadgeTooltip': __('Not enough data.'),
    'tooltipUnknown': __('Fewer than 3 emails sent'),
    'excellentBadgeName': __('Excellent'),
    'excellentBadgeTooltip': __('Congrats!'),
    'tooltipExcellent': __('Read 50% or more of sent emails'),
    'goodBadgeName': __('Good'),
    'goodBadgeTooltip': __('Good stuff.'),
    'tooltipGood': __('Read between 20 and 50% of sent emails'),
    'averageBadgeName': __('Low'),
    'averageBadgeTooltip': __('Something to improve.'),
    'tooltipAverage': __('Read 20% or fewer of sent emails'),
    'engagementScoreDescription': __('Average percent of emails subscribers read in the last year'),

    'recalculateNow': __('Recalculate now'),
    'tags': __('Tags'),
    'addNewTag': __('Add new tag'),
    'tagAddedToMultipleSubscribers': __('Tag <strong>%1$s</strong> was added to %2$d subscribers.'),
    'tagRemovedFromMultipleSubscribers': __('Tag <strong>%1$s</strong> was removed from %2$d subscribers.'),
    'addTag': __('Add tag...'),
    'removeTag': __('Remove tag...'),
  }) %>
<% endblock %>

<% block after_translations %>
<%= do_action('mailpoet_subscribers_translations_after') %>
<% endblock %>
