diff --git a/locales/en-US/add-author-form.json b/locales/en-US/add-author-form.json deleted file mode 100644 index 8be09251e..000000000 --- a/locales/en-US/add-author-form.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "title": { - "message": "Add an author – PREreview of “{preprintTitle}”" - }, - "enterTheirName": { - "message": "Enter their name" - }, - "enterTheirEmail": { - "message": "Enter their email address" - }, - "invalidEmail": { - "message": "Enter an email address in the correct format, like name@example.com" - }, - "addAuthor": { - "message": "Add an author" - }, - "nameInputLabel": { - "message": "Name" - }, - "theyWillChooseTheirName": { - "message": "They will be able to choose their published name." - }, - "emailAddress": { - "message": "Email address" - }, - "useOfEmail": { - "message": "We’ll only use this to contact them about this PREreview." - }, - "error": { - "message": "Error" - }, - "saveAndContinue": { - "message": "Save and continue" - } -} diff --git a/locales/en-US/add-authors-form.json b/locales/en-US/add-authors-form.json deleted file mode 100644 index e80733337..000000000 --- a/locales/en-US/add-authors-form.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "title": { - "message": "Error: You have added {authorCount, number} other {authorCount, plural, one {author} other {authors}} – PREreview of “{preprintTitle}”" - }, - "back": { - "message": "Back" - }, - "errorSummaryTitle": { - "message": "There is a problem" - }, - "yesIfAnotherAuthor": { - "message": "Select yes if you need to add another author" - }, - "addedAuthorCount": { - "message": "You have added {authorCount, number} other {authorCount, plural, one {author} other {authors}}" - }, - "authorNumber": { - "message": "Author {number, number}" - }, - "changeAuthorDetails": { - "message": "Change {name}’s details" - }, - "removeAuthor": { - "message": "Remove {name}" - }, - "name": { - "message": "Name" - }, - "emailAddress": { - "message": "Email address" - }, - "needToAddAuthor": { - "message": "Do you need to add another author?" - }, - "error": { - "message": "Error:" - }, - "no": { - "message": "No" - }, - "yes": { - "message": "Yes" - }, - "continueButton": { - "message": "Continue" - } -} diff --git a/locales/en-US/change-author-form.json b/locales/en-US/change-author-form.json deleted file mode 100644 index b6b111b1e..000000000 --- a/locales/en-US/change-author-form.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "title": { - "message": "Change {name}’s details – PREreview of “{preprintTitle}”" - }, - "enterName": { - "message": "Enter their name" - }, - "enterEmail": { - "message": "Enter their email address" - }, - "invalidEmail": { - "message": "Enter an email address in the correct format, like name@example.com" - }, - "changeAuthorDetails": { - "message": "Change {name}’s details" - }, - "name": { - "message": "Name" - }, - "ableToChoseName": { - "message": "They will be able to choose their published name." - }, - "error": { - "message": "Error" - }, - "emailAddress": { - "message": "Email address" - }, - "useOfEmail": { - "message": "We’ll only use this to contact them about this PREreview." - } -} diff --git a/locales/en-US/publish-form.json b/locales/en-US/publish-form.json deleted file mode 100644 index d1ba6b796..000000000 --- a/locales/en-US/publish-form.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "title": { - "message": "Publish your PREreview of “{preprintTitle}”" - }, - "checkPrereview": { - "message": "Check your PREreview" - }, - "preprintDetails": { - "message": "Preprint details" - }, - "preprintTitle": { - "message": "Title" - }, - "preprintServer": { - "message": "Preprint server" - }, - "authorDetails": { - "message": "Author details" - }, - "yourDetails": { - "message": "Your details" - }, - "yourPublishedName": { - "message": "Your published name" - }, - "publishedName": { - "message": "Published name" - }, - "changeName": { - "message": "Change name" - }, - "changeInvitedAuthors": { - "message": "Change invited authors" - }, - "changeCompetingInterests": { - "message": "Change competing interests" - }, - "changePrereview": { - "message": "Change PREreview" - }, - "doesIntroductionExplain": { - "message": "Does the introduction explain the objective of the research presented in the preprint?" - }, - "changeIfIntroExplains": { - "message": "Change if the introduction explains the objective of the research presented in the preprint" - }, - "methodsWellSuited": { - "message": "Are the methods well-suited for this research?" - }, - "changeMethodsWellSuited": { - "message": "Change if the methods are well-suited for this research" - }, - "conclusionsSupported": { - "message": "Are the conclusions supported by the data?" - }, - "changeConclusionsSupported": { - "message": "Change if the conclusions are supported by the data" - }, - "dataPresentationWellSuited": { - "message": "Are the data presentations, including visualizations, well-suited to represent the data?" - }, - "changeDataPresentationWellSuited": { - "message": "Change if the data presentations are well-suited to represent the data?" - }, - "clearDiscussion": { - "message": "How clearly do the authors discuss, explain, and interpret their findings and potential next steps for the research?" - }, - "changeClearDiscussion": { - "message": "Change how clearly the authors discuss their findings and next steps" - }, - "advanceKnowledge": { - "message": "Is the preprint likely to advance academic knowledge?" - }, - "changeAdvanceKnowledge": { - "message": "Change if the preprint is likely to advance academic knowledge" - }, - "benefitFromEditing": { - "message": "Would it benefit from language editing?" - }, - "changeBenefitFromEditing": { - "message": "Change if it would benefit from language editing" - }, - "wouldRecommend": { - "message": "Would you recommend this preprint to others?" - }, - "changeWouldRecommend": { - "message": "Change if you would recommend this preprint to others" - }, - "readyForAttention": { - "message": "Is it ready for attention from an editor, publisher or broader audience?" - }, - "changeReadyForAttention": { - "message": "Change it it is ready for attention from an editor, publisher or broader audience" - }, - "nowPublish": { - "message": "Now publish your PREreview" - }, - "weWillAssignLicense": { - "message": "We will assign your PREreview a DOI (a permanent identifier) and make it publicly available under a {licenseLink} license." - }, - "publishButton": { - "message": "Publish PREreview" - } -} diff --git a/locales/en-US/published-page.json b/locales/en-US/published-page.json deleted file mode 100644 index 558802ffc..000000000 --- a/locales/en-US/published-page.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "title": { - "message": "PREreview published" - }, - "yourDoi": { - "message": "Your DOI" - }, - "whatHappensNext": { - "message": "What happens next" - }, - "whereYouCanSeeYourPrereview": { - "message": "You’ll be able to see your PREreview shortly. It’ll also appear on our {communitySlackLink}{isScietyPreprint, boolean, true { and {scietyLink}} false {}}." - }, - "communitySlack": { - "message": "Community Slack" - }, - "opensInNewTab": { - "message": "opens in a new tab" - }, - "letUsKnowAuthorDetails": { - "message": "Please let us know the other authors’ details (names and ORCID iDs), and we’ll add them to the PREreview. Our email address is {mailtoHelp}." - }, - "sentEmailsToAuthors": { - "message": "We’ve sent emails to the other authors, inviting them to appear." - }, - "shareYourReview": { - "message": "Share your review" - }, - "letCommunityKnow": { - "message": "Let the community know that you published your review." - }, - "writeATweet": { - "message": "Write a Tweet" - }, - "shareOnLinkedin": { - "message": "Share it on LinkedIn" - }, - "listOnSciety": { - "message": "List it on Sciety" - }, - "howItWent": { - "message": "Let us know how it went" - }, - "scheduleAnInterview": { - "message": "Schedule an interview with our product team to discuss your experience on PREreview. We gladly compensate interviewees in appreciation for their help!" - }, - "backToPreprint": { - "message": "Back to preprint" - }, - "skipToMain": { - "message": "Skip to main content" - } -} diff --git a/locales/en-US/write-review-shared.json b/locales/en-US/write-review-shared.json deleted file mode 100644 index 9785f736c..000000000 --- a/locales/en-US/write-review-shared.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "errorPrefix": { - "message": "Error: " - }, - "backNav": { - "message": "Back" - }, - "errorSummaryTitle": { - "message": "There is a problem" - }, - "saveAndContinue": { - "message": "Save and continue" - } -} diff --git a/locales/en-US/write-review.json b/locales/en-US/write-review.json new file mode 100644 index 000000000..6a43589f0 --- /dev/null +++ b/locales/en-US/write-review.json @@ -0,0 +1,248 @@ +{ + "addAuthorTitle": { + "message": "Add an author – PREreview of “{preprintTitle}”" + }, + "enterTheirName": { + "message": "Enter their name" + }, + "enterTheirEmail": { + "message": "Enter their email address" + }, + "invalidEmail": { + "message": "Enter an email address in the correct format, like name@example.com" + }, + "addAuthor": { + "message": "Add an author" + }, + "nameInputLabel": { + "message": "Name" + }, + "theyWillChooseTheirName": { + "message": "They will be able to choose their published name." + }, + "emailAddress": { + "message": "Email address" + }, + "useOfEmail": { + "message": "We’ll only use this to contact them about this PREreview." + }, + "saveAndContinue": { + "message": "Save and continue" + }, + "addAuthorsTitle": { + "message": "Error: You have added {authorCount, number} other {authorCount, plural, one {author} other {authors}} – PREreview of “{preprintTitle}”" + }, + "back": { + "message": "Back" + }, + "errorSummaryTitle": { + "message": "There is a problem" + }, + "yesIfAnotherAuthor": { + "message": "Select yes if you need to add another author" + }, + "addedAuthorCount": { + "message": "You have added {authorCount, number} other {authorCount, plural, one {author} other {authors}}" + }, + "authorNumber": { + "message": "Author {number, number}" + }, + "changeAuthorDetailsLink": { + "message": "Change {name}’s details" + }, + "removeAuthor": { + "message": "Remove {name}" + }, + "name": { + "message": "Name" + }, + "needToAddAuthor": { + "message": "Do you need to add another author?" + }, + "no": { + "message": "No" + }, + "yes": { + "message": "Yes" + }, + "continueButton": { + "message": "Continue" + }, + "changeAuthorTitle": { + "message": "Change {name}’s details – PREreview of “{preprintTitle}”" + }, + "enterName": { + "message": "Enter their name" + }, + "enterEmail": { + "message": "Enter their email address" + }, + "changeAuthorDetailsHeading": { + "message": "Change {name}’s details" + }, + "ableToChoseName": { + "message": "They will be able to choose their published name." + }, + "error": { + "message": "Error" + }, + "errorPrefix": { + "message": "Error: " + }, + "backNav": { + "message": "Back" + }, + "prereviewPublishedTitle": { + "message": "PREreview published" + }, + "yourDoi": { + "message": "Your DOI" + }, + "whatHappensNext": { + "message": "What happens next" + }, + "whereYouCanSeeYourPrereview": { + "message": "You’ll be able to see your PREreview shortly. It’ll also appear on our {communitySlackLink}{isScietyPreprint, boolean, true { and {scietyLink}} false {}}." + }, + "communitySlack": { + "message": "Community Slack" + }, + "opensInNewTab": { + "message": "opens in a new tab" + }, + "letUsKnowAuthorDetails": { + "message": "Please let us know the other authors’ details (names and ORCID iDs), and we’ll add them to the PREreview. Our email address is {mailtoHelp}." + }, + "sentEmailsToAuthors": { + "message": "We’ve sent emails to the other authors, inviting them to appear." + }, + "shareYourReview": { + "message": "Share your review" + }, + "letCommunityKnow": { + "message": "Let the community know that you published your review." + }, + "writeATweet": { + "message": "Write a Tweet" + }, + "shareOnLinkedin": { + "message": "Share it on LinkedIn" + }, + "listOnSciety": { + "message": "List it on Sciety" + }, + "howItWent": { + "message": "Let us know how it went" + }, + "scheduleAnInterview": { + "message": "Schedule an interview with our product team to discuss your experience on PREreview. We gladly compensate interviewees in appreciation for their help!" + }, + "backToPreprint": { + "message": "Back to preprint" + }, + "skipToMain": { + "message": "Skip to main content" + }, + "publishTitle": { + "message": "Publish your PREreview of “{preprintTitle}”" + }, + "checkPrereview": { + "message": "Check your PREreview" + }, + "preprintDetails": { + "message": "Preprint details" + }, + "preprintTitle": { + "message": "Title" + }, + "preprintServer": { + "message": "Preprint server" + }, + "authorDetails": { + "message": "Author details" + }, + "yourDetails": { + "message": "Your details" + }, + "yourPublishedName": { + "message": "Your published name" + }, + "publishedName": { + "message": "Published name" + }, + "changeName": { + "message": "Change name" + }, + "changeInvitedAuthors": { + "message": "Change invited authors" + }, + "changeCompetingInterests": { + "message": "Change competing interests" + }, + "changePrereview": { + "message": "Change PREreview" + }, + "doesIntroductionExplain": { + "message": "Does the introduction explain the objective of the research presented in the preprint?" + }, + "changeIfIntroExplains": { + "message": "Change if the introduction explains the objective of the research presented in the preprint" + }, + "methodsWellSuited": { + "message": "Are the methods well-suited for this research?" + }, + "changeMethodsWellSuited": { + "message": "Change if the methods are well-suited for this research" + }, + "conclusionsSupported": { + "message": "Are the conclusions supported by the data?" + }, + "changeConclusionsSupported": { + "message": "Change if the conclusions are supported by the data" + }, + "dataPresentationWellSuited": { + "message": "Are the data presentations, including visualizations, well-suited to represent the data?" + }, + "changeDataPresentationWellSuited": { + "message": "Change if the data presentations are well-suited to represent the data?" + }, + "clearDiscussion": { + "message": "How clearly do the authors discuss, explain, and interpret their findings and potential next steps for the research?" + }, + "changeClearDiscussion": { + "message": "Change how clearly the authors discuss their findings and next steps" + }, + "advanceKnowledge": { + "message": "Is the preprint likely to advance academic knowledge?" + }, + "changeAdvanceKnowledge": { + "message": "Change if the preprint is likely to advance academic knowledge" + }, + "benefitFromEditing": { + "message": "Would it benefit from language editing?" + }, + "changeBenefitFromEditing": { + "message": "Change if it would benefit from language editing" + }, + "wouldRecommend": { + "message": "Would you recommend this preprint to others?" + }, + "changeWouldRecommend": { + "message": "Change if you would recommend this preprint to others" + }, + "readyForAttention": { + "message": "Is it ready for attention from an editor, publisher or broader audience?" + }, + "changeReadyForAttention": { + "message": "Change it it is ready for attention from an editor, publisher or broader audience" + }, + "nowPublish": { + "message": "Now publish your PREreview" + }, + "weWillAssignLicense": { + "message": "We will assign your PREreview a DOI (a permanent identifier) and make it publicly available under a {licenseLink} license." + }, + "publishButton": { + "message": "Publish PREreview" + } +} diff --git a/src/write-review/add-author-page/add-author-form.ts b/src/write-review/add-author-page/add-author-form.ts index 0f78123fb..b1bbad3ba 100644 --- a/src/write-review/add-author-page/add-author-form.ts +++ b/src/write-review/add-author-page/add-author-form.ts @@ -31,7 +31,7 @@ export function addAuthorForm({ return StreamlinePageResponse({ status: error ? Status.BadRequest : Status.OK, title: pipe( - t('add-author-form', 'title')({ preprintTitle: preprint.title.toString() }), + t('write-review', 'addAuthorTitle')({ preprintTitle: preprint.title.toString() }), errorPrefix(locale, error), plainText, ), @@ -40,20 +40,18 @@ export function addAuthorForm({
${error ? pipe(form, toErrorItems(locale), errorSummary(locale)) : ''} -

${t('add-author-form', 'addAuthor')()}

+

${t('write-review', 'addAuthor')()}

-

+

-

${t('add-author-form', 'theyWillChooseTheirName')()}

+

${t('write-review', 'theyWillChooseTheirName')()}

${E.isLeft(form.name) ? html`
Error: - ${match(form.name.left) - .with({ _tag: 'MissingE' }, t('add-author-form', 'enterTheirName')) - .exhaustive()} + ${match(form.name.left).with({ _tag: 'MissingE' }, t('write-review', 'enterTheirName')).exhaustive()}
` : ''} @@ -74,17 +72,17 @@ export function addAuthorForm({
-

+

-

${t('add-author-form', 'useOfEmail')()}

+

${t('write-review', 'useOfEmail')()}

${E.isLeft(form.emailAddress) ? html`
- ${t('add-author-form', 'error')()}: + ${t('write-review', 'error')()}: ${match(form.emailAddress.left) - .with({ _tag: 'MissingE' }, t('add-author-form', 'enterTheirEmail')) - .with({ _tag: 'InvalidE' }, t('add-author-form', 'invalidEmail')) + .with({ _tag: 'MissingE' }, t('write-review', 'enterTheirEmail')) + .with({ _tag: 'InvalidE' }, t('write-review', 'invalidEmail')) .exhaustive()}
` @@ -128,7 +126,7 @@ const toErrorItems = (locale: SupportedLocale) => (form: AddAuthorForm) => html`
  • ${match(form.name.left) - .with({ _tag: 'MissingE' }, translate(locale)('add-author-form', 'enterTheirName')) + .with({ _tag: 'MissingE' }, translate(locale)('write-review', 'enterTheirName')) .exhaustive()}
  • @@ -139,8 +137,8 @@ const toErrorItems = (locale: SupportedLocale) => (form: AddAuthorForm) => html`
  • ${match(form.emailAddress.left) - .with({ _tag: 'MissingE' }, translate(locale)('add-author-form', 'enterTheirEmail')) - .with({ _tag: 'InvalidE' }, translate(locale)('add-author-form', 'invalidEmail')) + .with({ _tag: 'MissingE' }, translate(locale)('write-review', 'enterTheirEmail')) + .with({ _tag: 'InvalidE' }, translate(locale)('write-review', 'invalidEmail')) .exhaustive()}
  • diff --git a/src/write-review/add-authors-page/add-authors-form.ts b/src/write-review/add-authors-page/add-authors-form.ts index e3b5fa922..473473656 100644 --- a/src/write-review/add-authors-page/add-authors-form.ts +++ b/src/write-review/add-authors-page/add-authors-form.ts @@ -43,26 +43,26 @@ export function addAuthorsForm({ status: error ? Status.BadRequest : Status.OK, title: plainText( t( - 'add-authors-form', - 'title', + 'write-review', + 'addAuthorsTitle', )({ error: error ? identity : () => '', authorCount, preprintTitle: preprint.title.toString() }), ), nav: html`${t('add-authors-form', 'back')()}${t('write-review', 'back')()}`, main: html` ${error ? html` -

    ${t('add-authors-form', 'errorSummaryTitle')()}

    +

    ${t('write-review', 'errorSummaryTitle')()}

      ${E.isLeft(form.anotherAuthor) ? html`
    • ${match(form.anotherAuthor.left) - .with({ _tag: 'MissingE' }, t('add-authors-form', 'yesIfAnotherAuthor')) + .with({ _tag: 'MissingE' }, t('write-review', 'yesIfAnotherAuthor')) .exhaustive()}
    • @@ -73,29 +73,29 @@ export function addAuthorsForm({ ` : ''} -

      ${t('add-authors-form', 'addedAuthorCount')({ authorCount })}

      +

      ${t('write-review', 'addedAuthorCount')({ authorCount })}

      ${authors.map( (author, index) => html`
      -

      ${t('add-authors-form', 'authorNumber')({ number: index + 1 })}

      +

      ${t('write-review', 'authorNumber')({ number: index + 1 })}

      ${rawHtml(t('add-authors-form', 'changeAuthorDetails')({ name: author.name, visuallyHidden }))}${rawHtml(t('write-review', 'changeAuthorDetailsLink')({ name: author.name, visuallyHidden }))} ${rawHtml(t('add-authors-form', 'removeAuthor')({ name: author.name, visuallyHidden }))}${rawHtml(t('write-review', 'removeAuthor')({ name: author.name, visuallyHidden }))}
      -
      ${t('add-authors-form', 'name')()}
      +
      ${t('write-review', 'name')()}
      ${author.name}
      -
      ${t('add-authors-form', 'emailAddress')()}
      +
      ${t('write-review', 'emailAddress')()}
      ${author.emailAddress}
      @@ -110,14 +110,14 @@ export function addAuthorsForm({ E.isLeft(form.anotherAuthor) ? 'aria-invalid="true" aria-errormessage="another-author-error"' : '', )} > -

      ${t('add-authors-form', 'needToAddAuthor')()}

      +

      ${t('write-review', 'needToAddAuthor')()}

      ${E.isLeft(form.anotherAuthor) ? html`
      - ${t('add-authors-form', 'error')()} + ${t('write-review', 'error')()} ${match(form.anotherAuthor.left) - .with({ _tag: 'MissingE' }, t('add-authors-form', 'yesIfAnotherAuthor')) + .with({ _tag: 'MissingE' }, t('write-review', 'yesIfAnotherAuthor')) .exhaustive()}
      ` @@ -134,7 +134,7 @@ export function addAuthorsForm({ .with({ right: 'no' }, () => 'checked') .otherwise(() => '')} /> - ${t('add-authors-form', 'no')()} + ${t('write-review', 'no')()}
    • @@ -148,14 +148,14 @@ export function addAuthorsForm({ .with({ right: 'yes' }, () => 'checked') .otherwise(() => '')} /> - ${t('add-authors-form', 'yes')()} + ${t('write-review', 'yes')()}
    • - + `, canonical: format(writeReviewAddAuthorMatch.formatter, { id: preprint.id }), diff --git a/src/write-review/change-author-page/change-author-form.ts b/src/write-review/change-author-page/change-author-form.ts index 6b7c86aef..a6dc7bc31 100644 --- a/src/write-review/change-author-page/change-author-form.ts +++ b/src/write-review/change-author-page/change-author-form.ts @@ -32,7 +32,7 @@ export function changeAuthorForm({ return StreamlinePageResponse({ status: error ? Status.BadRequest : Status.OK, title: pipe( - t('change-author-form', 'title')({ name: author.name, preprintTitle: preprint.title.toString() }), + t('write-review', 'changeAuthorTitle')({ name: author.name, preprintTitle: preprint.title.toString() }), errorPrefix(locale, error), plainText, ), @@ -45,18 +45,18 @@ export function changeAuthorForm({ > ${error ? pipe(form, toErrorItems(locale), errorSummary(locale)) : ''} -

      ${t('change-author-form', 'changeAuthorDetails')({ name: author.name })}

      +

      ${t('write-review', 'changeAuthorDetailsHeading')({ name: author.name })}

      -

      +

      -

      ${t('change-author-form', 'ableToChoseName')()}

      +

      ${t('write-review', 'ableToChoseName')()}

      ${E.isLeft(form.name) ? html`
      - ${t('change-author-form', 'error')()}: - ${match(form.name.left).with({ _tag: 'MissingE' }, t('change-author-form', 'enterName')).exhaustive()} + ${t('write-review', 'error')()}: + ${match(form.name.left).with({ _tag: 'MissingE' }, t('write-review', 'enterName')).exhaustive()}
      ` : ''} @@ -76,17 +76,17 @@ export function changeAuthorForm({
      -

      +

      -

      ${t('change-author-form', 'useOfEmail')()}

      +

      ${t('write-review', 'useOfEmail')()}

      ${E.isLeft(form.emailAddress) ? html`
      - ${t('change-author-form', 'error')()}: + ${t('write-review', 'error')()}: ${match(form.emailAddress.left) - .with({ _tag: 'MissingE' }, t('change-author-form', 'enterEmail')) - .with({ _tag: 'InvalidE' }, t('change-author-form', 'invalidEmail')) + .with({ _tag: 'MissingE' }, t('write-review', 'enterEmail')) + .with({ _tag: 'InvalidE' }, t('write-review', 'invalidEmail')) .exhaustive()}
      ` @@ -129,7 +129,7 @@ const toErrorItems = (locale: SupportedLocale) => (form: ChangeAuthorForm) => ht
    • ${match(form.name.left) - .with({ _tag: 'MissingE' }, translate(locale, 'change-author-form', 'enterName')) + .with({ _tag: 'MissingE' }, translate(locale, 'write-review', 'enterName')) .exhaustive()}
    • @@ -140,8 +140,8 @@ const toErrorItems = (locale: SupportedLocale) => (form: ChangeAuthorForm) => ht
    • ${match(form.emailAddress.left) - .with({ _tag: 'MissingE' }, translate(locale, 'change-author-form', 'enterEmail')) - .with({ _tag: 'InvalidE' }, translate(locale, 'change-author-form', 'invalidEmail')) + .with({ _tag: 'MissingE' }, translate(locale, 'write-review', 'enterEmail')) + .with({ _tag: 'InvalidE' }, translate(locale, 'write-review', 'invalidEmail')) .exhaustive()}
    • diff --git a/src/write-review/publish-page/publish-form.ts b/src/write-review/publish-page/publish-form.ts index 0ff31b7ea..312edfc46 100644 --- a/src/write-review/publish-page/publish-form.ts +++ b/src/write-review/publish-page/publish-form.ts @@ -41,21 +41,21 @@ export function publishForm(preprint: PreprintTitle, review: CompletedForm, user } return StreamlinePageResponse({ - title: plainText(t('publish-form', 'title')({ preprintTitle: preprint.title.toString() })), + title: plainText(t('write-review', 'publishTitle')({ preprintTitle: preprint.title.toString() })), nav: backNav(locale, format(writeReviewConductMatch.formatter, { id: preprint.id })), main: html`
      -

      ${t('publish-form', 'checkPrereview')()}

      +

      ${t('write-review', 'checkPrereview')()}

      -

      ${t('publish-form', 'preprintDetails')()}

      +

      ${t('write-review', 'preprintDetails')()}

      -
      ${t('publish-form', 'preprintTitle')()}
      +
      ${t('write-review', 'preprintTitle')()}
      ${preprint.title}
      -
      ${t('publish-form', 'preprintServer')()}
      +
      ${t('write-review', 'preprintServer')()}
      ${match(preprint.id.type) .with('africarxiv', () => 'AfricArXiv Preprints') @@ -101,8 +101,8 @@ export function publishForm(preprint: PreprintTitle, review: CompletedForm, user

      ${match(review.moreAuthors) - .with('yes', t('publish-form', 'authorDetails')) - .with('no', 'yes-private', t('publish-form', 'yourDetails')) + .with('yes', t('write-review', 'authorDetails')) + .with('no', 'yes-private', t('write-review', 'yourDetails')) .exhaustive()}

      @@ -111,14 +111,14 @@ export function publishForm(preprint: PreprintTitle, review: CompletedForm, user
      ${match(review.moreAuthors) - .with('yes', t('publish-form', 'yourPublishedName')) - .with('no', 'yes-private', t('publish-form', 'publishedName')) + .with('yes', t('write-review', 'yourPublishedName')) + .with('no', 'yes-private', t('write-review', 'publishedName')) .exhaustive()}
      ${displayAuthor(review.persona === 'public' ? user : { name: user.pseudonym })}
      ${rawHtml(t('publish-form', 'changeName')(visuallyHidden))}${rawHtml(t('write-review', 'changeName')(visuallyHidden))}
      @@ -130,7 +130,7 @@ export function publishForm(preprint: PreprintTitle, review: CompletedForm, user
      ${pipe(review.otherAuthors, RNEA.map(get('name')), formatList(DefaultLocale))}
      ${rawHtml(t('publish-form', 'changeInvitedAuthors')(visuallyHidden))}${rawHtml(t('write-review', 'changeInvitedAuthors')(visuallyHidden))}
      @@ -142,7 +142,7 @@ export function publishForm(preprint: PreprintTitle, review: CompletedForm, user
      ${getCompetingInterests(review)}
      ${rawHtml(t('publish-form', 'changeCompetingInterests')(visuallyHidden))}${rawHtml(t('write-review', 'changeCompetingInterests')(visuallyHidden))}
      @@ -156,7 +156,7 @@ export function publishForm(preprint: PreprintTitle, review: CompletedForm, user ${review.reviewType === 'freeform' ? html` ${rawHtml(t('publish-form', 'changePrereview')(visuallyHidden))}${rawHtml(t('write-review', 'changePrereview')(visuallyHidden))} ` : ''} @@ -172,7 +172,7 @@ export function publishForm(preprint: PreprintTitle, review: CompletedForm, user : html`
      -
      ${t('publish-form', 'doesIntroductionExplain')()}
      +
      ${t('write-review', 'doesIntroductionExplain')()}
      ${match(review.introductionMatches) .with('yes', () => 'Yes') @@ -186,12 +186,12 @@ export function publishForm(preprint: PreprintTitle, review: CompletedForm, user : ''}
      ${rawHtml(t('publish-form', 'changeIfIntroExplains')(visuallyHidden))} + >${rawHtml(t('write-review', 'changeIfIntroExplains')(visuallyHidden))}
      -
      ${t('publish-form', 'methodsWellSuited')()}
      +
      ${t('write-review', 'methodsWellSuited')()}
      ${match(review.methodsAppropriate) .with('inappropriate', () => 'Highly inappropriate') @@ -207,12 +207,12 @@ export function publishForm(preprint: PreprintTitle, review: CompletedForm, user : ''}
      ${rawHtml(t('publish-form', 'changeMethodsWellSuited')(visuallyHidden))} + >${rawHtml(t('write-review', 'changeMethodsWellSuited')(visuallyHidden))}
      -
      ${t('publish-form', 'conclusionsSupported')()}
      +
      ${t('write-review', 'conclusionsSupported')()}
      ${match(review.resultsSupported) .with('not-supported', () => 'Highly unsupported') @@ -228,12 +228,12 @@ export function publishForm(preprint: PreprintTitle, review: CompletedForm, user : ''}
      ${rawHtml(t('publish-form', 'changeConclusionsSupported')(visuallyHidden))}${rawHtml(t('write-review', 'changeConclusionsSupported')(visuallyHidden))}
      -
      ${t('publish-form', 'dataPresentationWellSuited')()}
      +
      ${t('write-review', 'dataPresentationWellSuited')()}
      ${match(review.dataPresentation) .with('inappropriate-unclear', () => 'Highly inappropriate or unclear') @@ -249,12 +249,12 @@ export function publishForm(preprint: PreprintTitle, review: CompletedForm, user : ''}
      ${rawHtml(t('publish-form', 'changeDataPresentationWellSuited')(visuallyHidden))}${rawHtml(t('write-review', 'changeDataPresentationWellSuited')(visuallyHidden))}
      -
      ${t('publish-form', 'clearDiscussion')()}
      +
      ${t('write-review', 'clearDiscussion')()}
      ${match(review.findingsNextSteps) .with('inadequately', () => 'Very unclearly') @@ -270,12 +270,12 @@ export function publishForm(preprint: PreprintTitle, review: CompletedForm, user : ''}
      ${rawHtml(t('publish-form', 'changeClearDiscussion')(visuallyHidden))} + >${rawHtml(t('write-review', 'changeClearDiscussion')(visuallyHidden))}
      -
      ${t('publish-form', 'advanceKnowledge')()}
      +
      ${t('write-review', 'advanceKnowledge')()}
      ${match(review.novel) .with('no', () => 'Not at all likely') @@ -289,12 +289,12 @@ export function publishForm(preprint: PreprintTitle, review: CompletedForm, user ${review.novel !== 'skip' && review.novelDetails ? html`
      ${review.novelDetails}
      ` : ''}
      ${rawHtml(t('publish-form', 'changeAdvanceKnowledge')(visuallyHidden))}${rawHtml(t('write-review', 'changeAdvanceKnowledge')(visuallyHidden))}
      -
      ${t('publish-form', 'benefitFromEditing')()}
      +
      ${t('write-review', 'benefitFromEditing')()}
      ${match(review.languageEditing) .with('no', () => 'No') @@ -304,12 +304,12 @@ export function publishForm(preprint: PreprintTitle, review: CompletedForm, user ${review.languageEditingDetails ? html`
      ${review.languageEditingDetails}
      ` : ''}
      ${rawHtml(t('publish-form', 'changeBenefitFromEditing')(visuallyHidden))}${rawHtml(t('write-review', 'changeBenefitFromEditing')(visuallyHidden))}
      -
      ${t('publish-form', 'wouldRecommend')()}
      +
      ${t('write-review', 'wouldRecommend')()}
      ${match(review.shouldRead) .with('no', () => 'No, it’s of low quality or is majorly flawed') @@ -320,12 +320,12 @@ export function publishForm(preprint: PreprintTitle, review: CompletedForm, user ${review.shouldReadDetails ? html`
      ${review.shouldReadDetails}
      ` : ''}
      ${rawHtml(t('publish-form', 'changeWouldRecommend')(visuallyHidden))} + >${rawHtml(t('write-review', 'changeWouldRecommend')(visuallyHidden))}
      -
      ${t('publish-form', 'readyForAttention')()}
      +
      ${t('write-review', 'readyForAttention')()}
      ${match(review.readyFullReview) .with('no', () => 'No, it needs a major revision') @@ -336,7 +336,7 @@ export function publishForm(preprint: PreprintTitle, review: CompletedForm, user ${review.readyFullReviewDetails ? html`
      ${review.readyFullReviewDetails}
      ` : ''}
      ${rawHtml(t('publish-form', 'changeReadyForAttention')(visuallyHidden))}${rawHtml(t('write-review', 'changeReadyForAttention')(visuallyHidden))}
      @@ -345,12 +345,12 @@ export function publishForm(preprint: PreprintTitle, review: CompletedForm, user
    -

    ${t('publish-form', 'nowPublish')()}

    +

    ${t('write-review', 'nowPublish')()}

    ${rawHtml( t( - 'publish-form', + 'write-review', 'weWillAssignLicense', )({ licenseLink: 'CC BY 4.0', @@ -358,7 +358,7 @@ export function publishForm(preprint: PreprintTitle, review: CompletedForm, user )}

    - + `, diff --git a/src/write-review/published-page/published-page.ts b/src/write-review/published-page/published-page.ts index 9d670a5b5..81f4391f1 100644 --- a/src/write-review/published-page/published-page.ts +++ b/src/write-review/published-page/published-page.ts @@ -22,9 +22,9 @@ export const publishedPage = ({ locale: SupportedLocale }) => { const t = translate(locale) - const opensInNewTab = t('published-page', 'opensInNewTab')() + const opensInNewTab = t('write-review', 'opensInNewTab')() const communitySlackLink = html`${t('published-page', 'communitySlack')()} (${opensInNewTab})${t('write-review', 'communitySlack')()} (${opensInNewTab})`.toString() const scietyLink = html`Sciety (${opensInNewTab})`.toString() return templatePage({ - title: plainText(t('published-page', 'title')()), + title: plainText(t('write-review', 'prereviewPublishedTitle')()), content: html`
    -

    ${t('published-page', 'title')()}

    +

    ${t('write-review', 'prereviewPublishedTitle')()}

    - ${t('published-page', 'yourDoi')()}
    + ${t('write-review', 'yourDoi')()}
    ${doi}
    -

    ${t('published-page', 'whatHappensNext')()}

    +

    ${t('write-review', 'whatHappensNext')()}

    ${rawHtml( t( - 'published-page', + 'write-review', 'whereYouCanSeeYourPrereview', )({ communitySlackLink, scietyLink, isScietyPreprint: isScietyPreprint(preprint.id) }), )} @@ -60,16 +60,16 @@ export const publishedPage = ({ ${form.moreAuthors === 'yes' && form.otherAuthors.length === 0 ? html`

    -

    ${t('published-page', 'letUsKnowAuthorDetails')({ mailtoHelp })}

    +

    ${t('write-review', 'letUsKnowAuthorDetails')({ mailtoHelp })}

    ` : form.moreAuthors === 'yes' && form.otherAuthors.length > 0 - ? html`

    ${t('published-page', 'sentEmailsToAuthors')()}

    ` + ? html`

    ${t('write-review', 'sentEmailsToAuthors')()}

    ` : ''} -

    ${t('published-page', 'shareYourReview')()}

    +

    ${t('write-review', 'shareYourReview')()}

    -

    ${t('published-page', 'letCommunityKnow')()}

    +

    ${t('write-review', 'letCommunityKnow')()}

    ${t('write-review', 'writeATweet')()} (${opensInNewTab}) ${t('published-page', 'shareOnLinkedin')()} (${opensInNewTab})${t('write-review', 'shareOnLinkedin')()} (${opensInNewTab}) ${isScietyPreprint(preprint.id) ? html` ${t('published-page', 'listOnSciety')()} (${opensInNewTab})${t('write-review', 'listOnSciety')()} (${opensInNewTab})` : ''}
    -

    ${t('published-page', 'howItWent')()}

    +

    ${t('write-review', 'howItWent')()}

    ${rawHtml( t( - 'published-page', + 'write-review', 'scheduleAnInterview', )({ link: (s: string) => @@ -122,11 +122,11 @@ export const publishedPage = ({

    ${t('published-page', 'backToPreprint')()}${t('write-review', 'backToPreprint')()}
    `, - skipLinks: [[html`${t('published-page', 'skipToMain')()}`, '#main-content']], + skipLinks: [[html`${t('write-review', 'skipToMain')()}`, '#main-content']], type: 'streamline', user, }) diff --git a/src/write-review/shared-elements.ts b/src/write-review/shared-elements.ts index 4b5a5f6f2..9df681796 100644 --- a/src/write-review/shared-elements.ts +++ b/src/write-review/shared-elements.ts @@ -3,14 +3,14 @@ import { type Html, html } from '../html.js' import { type SupportedLocale, translate } from '../locales/index.js' export const errorPrefix = (locale: SupportedLocale, error: boolean) => (s: string) => - pipe(error ? translate(locale)('write-review-shared', 'errorPrefix')() : '', prefix => `${prefix}${s}`) + pipe(error ? translate(locale)('write-review', 'errorPrefix')() : '', prefix => `${prefix}${s}`) export const backNav = (locale: SupportedLocale, href: string) => - html`${translate(locale)('write-review-shared', 'backNav')()}` + html`${translate(locale, 'write-review', 'backNav')()}` export const errorSummary = (locale: SupportedLocale) => (errorItems: Html) => html` -

    ${translate(locale)('write-review-shared', 'errorSummaryTitle')()}

    +

    ${translate(locale, 'write-review', 'errorSummaryTitle')()}

    @@ -18,4 +18,4 @@ export const errorSummary = (locale: SupportedLocale) => (errorItems: Html) => h ` export const saveAndContinueButton = (locale: SupportedLocale) => - html`` + html``