diff --git a/src/pages/gallery/components/UploadProgress.tsx b/src/pages/gallery/components/UploadProgress.tsx index 0f91cfbfe..0c37e20c3 100644 --- a/src/pages/gallery/components/UploadProgress.tsx +++ b/src/pages/gallery/components/UploadProgress.tsx @@ -1,5 +1,6 @@ import React from 'react'; import { Alert, Modal, ProgressBar } from 'react-bootstrap'; +import constants from 'utils/strings/constants' export default function UploadProgress({ fileCounter, uploadStage, now, ...props }) { return ( @@ -17,10 +18,10 @@ export default function UploadProgress({ fileCounter, uploadStage, now, ...props {now === 100 ? ( - Upload Completed + {constants.UPLOAD[3]} ) : ( <> - {uploadStage} {fileCounter?.current} of {fileCounter?.total} + {constants.UPLOAD[uploadStage]} {fileCounter?.total != 0 ? `${fileCounter?.current} ${constants.OF} ${fileCounter?.total}` : ''} )} diff --git a/src/services/uploadService.ts b/src/services/uploadService.ts index 08bd23be0..14309e3a9 100644 --- a/src/services/uploadService.ts +++ b/src/services/uploadService.ts @@ -74,10 +74,10 @@ class Queue { } export enum UPLOAD_STAGES { - START = "Preparing to upload", - ENCRYPTION = "Encryting your files", - UPLOAD = "Uploading your Files", - FINISH = "Files Uploaded Successfully !!!" + START, + ENCRYPTION, + UPLOAD, + FINISH } class UploadService { diff --git a/src/utils/strings/englishConstants.tsx b/src/utils/strings/englishConstants.tsx index 4cb78d615..e3154dc4b 100644 --- a/src/utils/strings/englishConstants.tsx +++ b/src/utils/strings/englishConstants.tsx @@ -45,6 +45,13 @@ const englishConstants = { SELECT_COLLECTION: `Select/Click on Collection to upload`, CLOSE: 'Close', NOTHING_HERE: `nothing to see here! 👀`, + UPLOAD: { + 0: "Preparing to upload", + 1: "Encryting your files", + 2: "Uploading your Files", + 3: "Files Uploaded Successfully !!!" + }, + OF: 'of' }; export default englishConstants;