diff --git a/ghost/members-importer/lib/email-template.js b/ghost/members-importer/lib/email-template.js index 77a510656d..27a2e6f4ba 100644 --- a/ghost/members-importer/lib/email-template.js +++ b/ghost/members-importer/lib/email-template.js @@ -1,3 +1,7 @@ +function formatNumber(number) { + return number.toLocaleString(); +} + const iff = (cond, yes, no) => (cond ? yes : no); module.exports = ({result, siteUrl, membersUrl, emailRecipient}) => ` @@ -136,14 +140,14 @@ module.exports = ({result, siteUrl, membersUrl, emailRecipient}) => ` ${iff(result.imported > 0, ` -

A total of ${result.imported} ${iff(result.imported === 1, 'person', 'people')} were successfully added or updated in your list of members, and now have access to your site.

+

A total of ${formatNumber(result.imported)} ${iff(result.imported === 1, 'person', 'people')} were successfully added or updated in your list of members, and now have access to your site.

`, ``)} ${iff(result.errors.length > 0, `

- ${iff(result.imported === 0, `No members were added.`, `${result.errors.length} ${iff(result.errors.length === 1, `member was`, `members were`)} skipped due to errors.`)} There's a validated CSV file attached to this email with the list of errors so that you can fix them and re-upload the CSV to complete the import.

+ ${iff(result.imported === 0, `No members were added.`, `${formatNumber(result.errors.length)} ${iff(result.errors.length === 1, `member was`, `members were`)} skipped due to errors.`)} There's a validated CSV file attached to this email with the list of errors so that you can fix them and re-upload the CSV to complete the import.

`, '')}