Skip to content

armgit / ente

Public Imported from GitHub
0

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

Move strings to translations

Manav Rathi3502fcac5e14
diff --git a/web/apps/photos/src/components/Sidebar/Preferences.tsx b/web/apps/photos/src/components/Sidebar/Preferences.tsx
index 05d72c92ae..69671791ae 100644
--- a/web/apps/photos/src/components/Sidebar/Preferences.tsx
+++ b/web/apps/photos/src/components/Sidebar/Preferences.tsx
@@ -4,7 +4,6 @@ import { MenuItemGroup, MenuSectionTitle } from "@/base/components/Menu";
import { Titlebar } from "@/base/components/Titlebar";
import {
getLocaleInUse,
- pt,
setLocaleInUse,
supportedLocales,
type SupportedLocale,
@@ -96,7 +95,7 @@ export const Preferences: React.FC<SettingsDrawerProps> = ({
<EnteMenuItem
endIcon={<ChevronRight />}
onClick={() => setOpenMLSettings(true)}
- label={pt("Face and magic search")}
+ label={t("face_and_magic_search")}
/>
</MenuItemGroup>
</Box>
diff --git a/web/packages/base/locales/en-US/translation.json b/web/packages/base/locales/en-US/translation.json
index 1adafa2a79..df7047d359 100644
--- a/web/packages/base/locales/en-US/translation.json
+++ b/web/packages/base/locales/en-US/translation.json
@@ -264,6 +264,7 @@
"SCAN_QR_CODE": "Scan QR code instead",
"ENABLE_TWO_FACTOR": "Enable two-factor",
"ENABLE": "Enable",
+ "enabled": "Enabled",
"LOST_DEVICE": "Lost two-factor device",
"INCORRECT_CODE": "Incorrect code",
"TWO_FACTOR_INFO": "Add an additional layer of security by requiring more than your email and password to log in to your account",
@@ -477,6 +478,16 @@
"ROOT_LEVEL_FILE_WITH_FOLDER_NOT_ALLOWED_MESSAGE": "<p>You have dragged and dropped a mixture of files and folders.</p><p>Please provide either only files, or only folders when selecting option to create separate albums</p>",
"CHOSE_THEME": "Choose theme",
"more_details": "More details",
+ "ml_search": "Face and magic search",
+ "ml_search_description": "Ente supports on-device machine learning for face recognition, magic search and other advanced search features",
+ "ml_search_footnote": "Magic search allows to search photos by their contents, e.g. 'car', 'red car', 'Ferrari'",
+ "indexing": "Indexing",
+ "processed": "Processed",
+ "indexing_status_running": "Running",
+ "indexing_status_scheduled": "Scheduled",
+ "indexing_status_done": "Done",
+ "ml_search_disable": "Disable face and magic search",
+ "ml_search_disable_confirm": "Do you want to disable face and magic search on all your devices?",
"ENABLE_FACE_SEARCH": "Enable face recognition",
"ENABLE_FACE_SEARCH_TITLE": "Enable face recognition?",
"ENABLE_FACE_SEARCH_DESCRIPTION": "<p>If you enable face recognition, Ente will extract face geometry from your photos. This will happen on your device, and any generated biometric data will be end-to-encrypted.</p><p><a>Please click here for more details about this feature in our privacy policy</a></p>",
diff --git a/web/packages/new/photos/components/MLSettings.tsx b/web/packages/new/photos/components/MLSettings.tsx
index d36067155e..bce2617dba 100644
--- a/web/packages/new/photos/components/MLSettings.tsx
+++ b/web/packages/new/photos/components/MLSettings.tsx
@@ -124,7 +124,7 @@ export const MLSettings: React.FC<MLSettingsProps> = ({
<Stack spacing={"4px"} py={"12px"}>
<Titlebar
onClose={onClose}
- title={pt("Face and magic search")}
+ title={t("face_and_magic_search")}
onRootClose={onRootClose}
/>
{component}
@@ -161,9 +161,7 @@ const EnableML: React.FC<EnableMLProps> = ({ onEnable }) => {
return (
<Stack py={"20px"} px={"16px"} spacing={"32px"}>
<Typography color="text.muted">
- {pt(
- "Ente supports on-device machine learning for face recognition, magic search and other advanced search features",
- )}
+ {t("ml_search_description")}
</Typography>
<Stack spacing={"8px"}>
<Button color={"accent"} size="large" onClick={onEnable}>
@@ -175,9 +173,7 @@ const EnableML: React.FC<EnableMLProps> = ({ onEnable }) => {
</Button>
</Stack>
<Typography color="text.faint" variant="small">
- {pt(
- 'Magic search allows to search photos by their contents, e.g. "car", "red car", "Ferrari"',
- )}
+ {t("ml_search_footnote")}
</Typography>
</Stack>
);
@@ -319,14 +315,12 @@ const ManageML: React.FC<ManageMLProps> = ({
const confirmDisableML = () => {
setDialogBoxAttributesV2({
- title: pt("Disable face and magic search"),
- content: pt(
- "Do you want to disable face and magic search on all your devices?",
- ),
+ title: t("ml_search_disable"),
+ content: t("ml_search_disable_confirm"),
close: { text: t("cancel") },
proceed: {
variant: "critical",
- text: pt("Disable"),
+ text: t("DISABLE"),
action: onDisableML,
},
buttonDirection: "row",
@@ -338,7 +332,7 @@ const ManageML: React.FC<ManageMLProps> = ({
<Stack gap={3}>
<MenuItemGroup>
<EnteMenuItem
- label={pt("Enabled")}
+ label={t("enabled")}
variant="toggle"
checked={true}
onClick={confirmDisableML}
@@ -356,7 +350,7 @@ const ManageML: React.FC<ManageMLProps> = ({
justifyContent={"space-between"}
>
<Typography color="text.faint">
- {pt("Indexing")}
+ {t("indexing")}
</Typography>
<Typography>{status}</Typography>
</Stack>
@@ -370,7 +364,7 @@ const ManageML: React.FC<ManageMLProps> = ({
justifyContent={"space-between"}
>
<Typography color="text.faint">
- {pt("Processed")}
+ {t("processed")}
</Typography>
<Typography textAlign="right">{processed}</Typography>
</Stack>