Skip to content

Commit

Permalink
Simplify wording of success/failure emails
Browse files Browse the repository at this point in the history
  • Loading branch information
philmcmahon committed Aug 30, 2024
1 parent 7361c94 commit 4767813
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ const getApp = async () => {
}
const exportResult = await createTranscriptDocument(
config,
`${parsedItem.data.originalFilename} transcript${parsedItem.data.isTranslation ? ' translation' : ''}`,
`${parsedItem.data.originalFilename} transcript${parsedItem.data.isTranslation ? ' English translation' : ''}`,
exportRequest.data.oAuthTokenResponse,
transcriptText.text,
);
Expand Down
8 changes: 4 additions & 4 deletions packages/output-handler/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const successMessageBody = (
): string => {
const exportUrl = `${rootUrl}/export?transcriptId=${transcriptId}`;
return `
<h1>Transcript ${isTranslation ? 'english translation ' : ''}for ${originalFilename} ready</h1>
<h1>${isTranslation ? 'English translation ' : 'Transcription'} for ${originalFilename} ready</h1>
<p>Click <a href="${exportUrl}">here</a> to export to a google doc.</p>
<p><b>Note:</b> transcripts will expire after 7 days. Export your transcript to a doc now if you want to keep it. </p>
`;
Expand All @@ -43,7 +43,7 @@ const failureMessageBody = (
isTranslation: boolean,
): string => {
return `
<h1>Transcription ${isTranslation ? 'english translation ' : ''}for ${originalFilename} has failed.</h1>
<h1>${isTranslation ? 'English translation ' : 'Transcription'}for ${originalFilename} has failed.</h1>
<p>Please make sure that the file is a valid audio or video file.</p>
<p>Contact the digital investigations team for support.</p>
<p>Transcription ID: ${id}</p>
Expand Down Expand Up @@ -80,7 +80,7 @@ const handleTranscriptionSuccess = async (
sesClient,
config.app.emailNotificationFromAddress,
transcriptionOutput.userEmail,
`Transcription ${transcriptionOutput.isTranslation ? 'english translation ' : ''}complete for ${transcriptionOutput.originalFilename}`,
`${transcriptionOutput.isTranslation ? 'English translation' : 'Transcription'} complete for ${transcriptionOutput.originalFilename}`,
successMessageBody(
transcriptionOutput.id,
transcriptionOutput.originalFilename,
Expand Down Expand Up @@ -114,7 +114,7 @@ const handleTranscriptionFailure = async (
sesClient,
config.app.emailNotificationFromAddress,
transcriptionOutput.userEmail,
`Transcription ${transcriptionOutput.isTranslation ? 'translation ' : ''}failed for ${transcriptionOutput.originalFilename}`,
`${transcriptionOutput.isTranslation ? 'English translation ' : 'Transcription'} failed for ${transcriptionOutput.originalFilename}`,
failureMessageBody(
transcriptionOutput.originalFilename,
transcriptionOutput.id,
Expand Down

0 comments on commit 4767813

Please sign in to comment.