Skip to content

Commit

Permalink
Update react-pdf; pdfjs worker; Fixes for il8n (#8395)
Browse files Browse the repository at this point in the history
  • Loading branch information
gigincg authored Aug 22, 2024
1 parent a7101ef commit 90ee1b5
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 27 deletions.
40 changes: 20 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"react-i18next": "^13.0.1",
"react-infinite-scroll-component": "^6.1.0",
"react-markdown": "^8.0.7",
"react-pdf": "^9.0.0",
"react-pdf": "^9.1.0",
"react-player": "^2.16.0",
"react-redux": "^8.1.1",
"react-webcam": "^7.2.0",
Expand Down
3 changes: 1 addition & 2 deletions public/pdf.worker.min.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/Components/Common/FilePreviewDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const FilePreviewDialog = (props: FilePreviewProps) => {
onClose={() => {
handleClose();
}}
title="File Preview"
title={t("file_preview")}
show={show}
>
{fileUrl ? (
Expand Down Expand Up @@ -146,6 +146,7 @@ const FilePreviewDialog = (props: FilePreviewProps) => {
) : previewExtensions.includes(file_state.extension) ? (
<iframe
sandbox=""
// eslint-disable-next-line i18next/no-literal-string
title="Source Files"
src={fileUrl}
className="h-[75vh] w-full"
Expand All @@ -156,7 +157,7 @@ const FilePreviewDialog = (props: FilePreviewProps) => {
icon="l-file"
className="mb-4 text-5xl text-secondary-600"
/>
Can't preview this file. Try downloading it.
{t("file_preview_not_supported")}
</div>
)}
</div>
Expand Down
6 changes: 4 additions & 2 deletions src/Locale/en/Common.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
"latitude_invalid": "Latitude must be between -90 and 90",
"longitude_invalid": "Longitude must be between -180 and 180",
"save": "Save",
"continue" : "Continue",
"continue": "Continue",
"save_and_continue": "Save and Continue",
"select": "Select",
"lsg": "Lsg",
Expand Down Expand Up @@ -149,6 +149,8 @@
"sort_by": "Sort By",
"none": "None",
"choose_file": "Choose File",
"file_preview": "File Preview",
"file_preview_not_supported": "Can't preview this file. Try downloading it.",
"view_faciliy": "View Facility",
"view_patients": "View Patients",
"frequency": "Frequency",
Expand Down Expand Up @@ -180,4 +182,4 @@
"GENDER__1": "Male",
"GENDER__2": "Female",
"GENDER__3": "Non-binary"
}
}

0 comments on commit 90ee1b5

Please sign in to comment.