Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

sc

Manav Rathif135b65d31f1
diff --git a/web/packages/base/locales/en-US/translation.json b/web/packages/base/locales/en-US/translation.json
index 3806623e46..293e2bb74a 100644
--- a/web/packages/base/locales/en-US/translation.json
+++ b/web/packages/base/locales/en-US/translation.json
@@ -80,6 +80,7 @@
"drag": "Drag",
"tap_inside_image": "Tap inside image",
"tap_outside_image": "Tap outside image",
+ "shortcuts": "Shortcuts",
"show_shortcuts": "Show shortcuts",
"zoom_preset": "Zoom preset",
"toggle_controls": "Toggle controls",
@@ -89,6 +90,8 @@
"view_info": "View info",
"copy_as_png": "Copy as PNG",
"toggle_fullscreen": "Toggle fullscreen",
+ "exit_fullscreen": "Exit fullscreen",
+ "go_fullscreen": "Go fullscreen",
"zoom": "Zoom",
"previous": "Previous",
"next": "Next",
@@ -582,6 +585,7 @@
"image": "Image",
"video": "Video",
"live_photo": "Live photo",
+ "edit_image": "Edit image",
"photo_editor": "Photo editor",
"confirm_editor_close": "Are you sure you want to close the editor?",
"confirm_editor_close_message": "Download your edited image or save a copy to Ente to persist your changes.",
diff --git a/web/packages/gallery/components/viewer/FileViewer.tsx b/web/packages/gallery/components/viewer/FileViewer.tsx
index 1b69a820aa..a85ae057cf 100644
--- a/web/packages/gallery/components/viewer/FileViewer.tsx
+++ b/web/packages/gallery/components/viewer/FileViewer.tsx
@@ -9,7 +9,7 @@ import { useIsSmallWidth } from "@/base/components/utils/hooks";
import { type ModalVisibilityProps } from "@/base/components/utils/modal";
import { useBaseContext } from "@/base/context";
import { lowercaseExtension } from "@/base/file-name";
-import { formattedListJoin, pt, ut } from "@/base/i18n";
+import { formattedListJoin, ut } from "@/base/i18n";
import type { LocalUser } from "@/base/local-user";
import log from "@/base/log";
import {
@@ -795,24 +795,20 @@ export const FileViewer: React.FC<FileViewerProps> = ({
>
{activeAnnotatedFile.annotation.showDownload == "menu" && (
<MoreMenuItem onClick={handleDownloadMenuAction}>
- <MoreMenuItemTitle>
- {/*TODO */ t("download")}
- </MoreMenuItemTitle>
+ <MoreMenuItemTitle>{t("download")}</MoreMenuItemTitle>
<FileDownloadOutlinedIcon />
</MoreMenuItem>
)}
{activeAnnotatedFile.annotation.showDelete && (
<MoreMenuItem onClick={handleConfirmDelete}>
- <MoreMenuItemTitle>
- {/*TODO */ t("delete")}
- </MoreMenuItemTitle>
+ <MoreMenuItemTitle>{t("delete")}</MoreMenuItemTitle>
<DeleteIcon />
</MoreMenuItem>
)}
{canCopyImage() && (
<MoreMenuItem onClick={handleCopyImage}>
<MoreMenuItemTitle>
- {/*TODO */ pt("Copy as PNG")}
+ {t("copy_as_png")}
</MoreMenuItemTitle>
{/* Tweak icon size to visually fit better with neighbours */}
<ContentCopyIcon sx={{ "&&": { fontSize: "18px" } }} />
@@ -820,9 +816,7 @@ export const FileViewer: React.FC<FileViewerProps> = ({
)}
{activeAnnotatedFile.annotation.showEditImage && (
<MoreMenuItem onClick={handleEditImage}>
- <MoreMenuItemTitle>
- {/*TODO */ pt("Edit image")}
- </MoreMenuItemTitle>
+ <MoreMenuItemTitle>{t("edit_image")}</MoreMenuItemTitle>
<EditIcon />
</MoreMenuItem>
)}
@@ -836,11 +830,9 @@ export const FileViewer: React.FC<FileViewerProps> = ({
}}
>
<MoreMenuItemTitle>
- {
- /*TODO */ isFullscreen
- ? pt("Exit fullscreen")
- : pt("Go fullscreen")
- }
+ {isFullscreen
+ ? t("exit_fullscreen")
+ : t("go_fullscreen")}
</MoreMenuItemTitle>
{isFullscreen ? (
<FullscreenExitOutlinedIcon />
@@ -850,7 +842,7 @@ export const FileViewer: React.FC<FileViewerProps> = ({
</MoreMenuItem>
<MoreMenuItem onClick={handleShortcuts} sx={{ mt: "2px" }}>
<Typography sx={{ color: "fixed.dark.text.faint" }}>
- {pt("Shortcuts")}
+ {t("shortcuts")}
</Typography>
</MoreMenuItem>
</MoreMenu>
@@ -1027,7 +1019,7 @@ const Shortcuts: React.FC<ShortcutsProps> = ({
slotProps={{ backdrop: { sx: { backdropFilter: "blur(30px)" } } }}
>
<SpacedRow sx={{ pt: 2, px: 2.5 }}>
- <DialogTitle>{pt("Shortcuts")}</DialogTitle>
+ <DialogTitle>{t("shortcuts")}</DialogTitle>
<DialogCloseIconButton {...{ onClose }} />
</SpacedRow>
<ShortcutsContent sx={{ "&&": { pt: 2, pb: 5, px: 5 } }}>
diff --git a/web/packages/gallery/components/viewer/photoswipe.ts b/web/packages/gallery/components/viewer/photoswipe.ts
index 4eef32350f..7542c3e436 100644
--- a/web/packages/gallery/components/viewer/photoswipe.ts
+++ b/web/packages/gallery/components/viewer/photoswipe.ts
@@ -233,8 +233,8 @@ export class FileViewerPhotoSwipe {
mainClass: "pswp-ente",
closeTitle: t("close"),
zoomTitle: t("zoom"),
- arrowPrevTitle: pt("Previous"),
- arrowNextTitle: pt("Next"),
+ arrowPrevTitle: t("previous"),
+ arrowNextTitle: t("next"),
// TODO(PS): Move to translations (unpreviewable_file_notification).
errorMsg: pt("This file could not be previewed"),
});