From 5d261bfde89a1e94a2b4100acbb0e61f257cf63b Mon Sep 17 00:00:00 2001 From: Peter Zimon Date: Wed, 8 Jul 2020 13:09:23 +0200 Subject: [PATCH] Added pluralisation to members import no refs. - added correct pluralisation to pre- and post-validation copy of members import --- .../app/components/modal-import-members.hbs | 28 ++++++++++++------- .../app/services/member-import-validator.js | 3 +- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/ghost/admin/app/components/modal-import-members.hbs b/ghost/admin/app/components/modal-import-members.hbs index cbf8a227f1..4a723041ce 100644 --- a/ghost/admin/app/components/modal-import-members.hbs +++ b/ghost/admin/app/components/modal-import-members.hbs @@ -19,11 +19,11 @@

{{this.importResponse.imported.count}}

-

Members added

+

{{pluralize this.importResponse.imported.count "Member" without-count=true}} added

{{this.importResponse.invalid.count}}

-

Errors

+

{{pluralize this.importResponse.invalid.count "Error" without-count=true}}

@@ -33,7 +33,7 @@
{{svg-jar "warning" class="w5 h5 fill-red nudge-top--3 mr3"}}
-

{{this.importResponse.invalid.count}} members were skipped due to the following errors:

+

{{pluralize this.importResponse.invalid.count "member"}} were skipped due to the following errors:

{{#if this.config.enableDeveloperExperiments}}
    {{#each this.importResponse.invalid.errors as |error|}} @@ -51,10 +51,16 @@ {{#if (and this.filePresent (not this.failureMessage))}} {{#if this.validating}} {{#if validationErrors}} -
    -
    {{svg-jar "warning" class="nudge-top--2 w5 h5 fill-yellow-d1"}}
    +
    +
    + {{#if this.importDisabled}} + {{svg-jar "warning" class="nudge-top--2 w5 h5 fill-red"}} + {{else}} + {{svg-jar "warning" class="nudge-top--2 w5 h5 fill-yellow-d1"}} + {{/if}} +
    -

    The CSV contains errors! Some members will not be imported.

    +

    The CSV contains errors! {{unless this.importDisabled "Some members will not be imported."}}

    {{#if validationErrors}}
      {{#each validationErrors as |error|}} @@ -106,7 +112,7 @@ {{/if}} {{else}} {{#if this.failureMessage}} -
      +
      {{svg-jar "warning" class="nudge-top--2 w4 h4 fill-red"}}

      {{this.failureMessage}}

      @@ -136,9 +142,11 @@ - + {{#unless this.importDisabled}} + + {{/unless}} {{/if}} {{else}}