💚 End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
update(photos):add-translations
Aswin Asok06ffa2f38b72
diff --git a/web/apps/photos/src/components/PhotosAuthShell.tsx b/web/apps/photos/src/components/PhotosAuthShell.tsxindex aa295a13cb..65fcd97be3 100644--- a/web/apps/photos/src/components/PhotosAuthShell.tsx+++ b/web/apps/photos/src/components/PhotosAuthShell.tsx@@ -2,7 +2,7 @@ import { Tick02Icon } from "@hugeicons/core-free-icons";import { HugeiconsIcon } from "@hugeicons/react";import { GlobalStyles, keyframes, styled } from "@mui/material";import { EnteLogo } from "ente-base/components/EnteLogo";-import { pt } from "ente-base/i18n";+import { t } from "i18next";import type React from "react";import {authAboveMobileMediaQuery,@@ -24,13 +24,22 @@ export const PhotosAuthShell: React.FC<PhotosAuthShellProps> = ({<FrameCurves /><PageCard><DesktopBrandSlot>- <BrandPanel headline={authHeadline} size="desktop" />+ <BrandPanel+ headline={t("photos_auth_headline")}+ size="desktop"+ /></DesktopBrandSlot><TabletBrandSlot>- <BrandPanel headline={authHeadline} size="tablet" />+ <BrandPanel+ headline={t("photos_auth_headline")}+ size="tablet"+ /></TabletBrandSlot><MobileBrandSlot>- <BrandPanel headline={authHeadline} size="mobile" />+ <BrandPanel+ headline={t("photos_auth_headline")}+ size="mobile"+ /></MobileBrandSlot><ContentSheet><SheetHandle />@@ -42,8 +51,6 @@ export const PhotosAuthShell: React.FC<PhotosAuthShellProps> = ({</PageRoot>);-const authHeadline = pt("Safe home for your photos");-const shellReveal = keyframes({from: { opacity: 0, transform: "translateY(18px)" },to: { opacity: 1, transform: "translateY(0)" },@@ -104,15 +111,15 @@ const BrandPanel: React.FC<BrandPanelProps> = ({ headline, size }) => (<PanelHeadline size={size}>{headline}</PanelHeadline>{size !== "mobile" && (<PanelSubtitle size={size}>- {pt("End-to-end encrypted. Cross-platform. Open-source.")}+ {t("photos_auth_subtitle")}</PanelSubtitle>)}{size === "desktop" && (<BulletList>{[- pt("10 GB free forever"),- pt("Stored in 3 locations"),- pt("Open source, independently audited"),+ t("photos_auth_free_storage"),+ t("photos_auth_no_ads_no_spying"),+ t("photos_auth_multiple_storage_locations"),].map((bullet) => (<Bullet key={bullet}><CheckCircle aria-hidden="true">diff --git a/web/apps/photos/src/components/auth/CredentialsForm.tsx b/web/apps/photos/src/components/auth/CredentialsForm.tsxindex abd0ccdefb..e3f3a0cb0c 100644--- a/web/apps/photos/src/components/auth/CredentialsForm.tsx+++ b/web/apps/photos/src/components/auth/CredentialsForm.tsx@@ -1,9 +1,9 @@import { styled } from "@mui/material";import type { VerifyMasterPasswordPresentationProps } from "ente-accounts/components/VerifyMasterPasswordForm";import type { CredentialsPresentationProps } from "ente-accounts/pages/credentials";-import { pt } from "ente-base/i18n";import { t } from "i18next";import type React from "react";+import { Trans } from "react-i18next";import { Button } from "./Button";import { Form } from "./Form";import { FormFields } from "./FormFields";@@ -24,10 +24,11 @@ export function CredentialsForm({<ScreenHeadertitle={t("enter_password")}subtitle={- <>- {pt("Signing in as ")}- <Email>{userEmail}</Email>- </>+ <Trans+ i18nKey="auth_signing_in_as"+ components={{ a: <Email /> }}+ values={{ email: userEmail }}+ />}/>{passwordForm}diff --git a/web/apps/photos/src/components/auth/DevSettingsDialog.tsx b/web/apps/photos/src/components/auth/DevSettingsDialog.tsxindex 7f8d194886..1810989b58 100644--- a/web/apps/photos/src/components/auth/DevSettingsDialog.tsx+++ b/web/apps/photos/src/components/auth/DevSettingsDialog.tsx@@ -1,7 +1,6 @@import { InformationCircleIcon } from "@hugeicons/core-free-icons";import { HugeiconsIcon } from "@hugeicons/react";import { CircularProgress, styled } from "@mui/material";-import { pt } from "ente-base/i18n";import type { DevSettingsPresentationProps } from "ente-new/photos/components/DevSettings";import { t } from "i18next";import type React from "react";@@ -43,9 +42,7 @@ export function DevSettingsDialog({{t("developer_settings")}</AuthDialogTitle><AuthDialogText>- {pt(- "Point this app at your own Ente server. Leave it blank to use api.ente.io.",- )}+ {t("auth_developer_settings_subtitle")}</AuthDialogText></AuthDialogHeader><TextField@@ -60,9 +57,9 @@ export function DevSettingsDialog({error={Boolean(error)}helperText={error == "Invalid endpoint"- ? pt("Enter a full URL, including https://")+ ? t("auth_endpoint_invalid_url"): error- ? pt("Could not reach this endpoint")+ ? t("auth_endpoint_unreachable"): undefined}trailing={@@ -87,7 +84,7 @@ export function DevSettingsDialog({size={18}sx={{ color: "var(--photos-auth-primary)" }}/>- <span>{pt("Checking the endpoint is reachable")}</span>+ <span>{t("auth_endpoint_checking")}</span></StatusPill>)}<ButtonRow>diff --git a/web/apps/photos/src/components/auth/LoginForm.tsx b/web/apps/photos/src/components/auth/LoginForm.tsxindex fb8b2212ee..7fbf2055ac 100644--- a/web/apps/photos/src/components/auth/LoginForm.tsx+++ b/web/apps/photos/src/components/auth/LoginForm.tsx@@ -1,6 +1,5 @@import { Input, styled } from "@mui/material";import type { LoginPresentationProps } from "ente-accounts/components/LoginContents";-import { pt } from "ente-base/i18n";import { t } from "i18next";import type React from "react";import { Button } from "./Button";@@ -29,9 +28,9 @@ export function LoginForm({title={isJoinAlbumContext? t("login_to_join_album")- : pt("Welcome back")+ : t("auth_welcome_back")}- subtitle={pt("Enter your details to continue.")}+ subtitle={t("auth_login_subtitle")}/><Form onSubmit={onSubmit}><FormFields>@@ -41,8 +40,8 @@ export function LoginForm({onChange={onEmailChange}type="email"autoComplete="username"- label={pt("Email address")}- placeholder={pt("[email protected]")}+ label={t("auth_email_label")}+ placeholder={t("auth_email_placeholder")}autoFocusdisabled={isSubmitting}error={Boolean(emailError)}@@ -66,7 +65,7 @@ export function LoginForm({</TextLink>) : (<AccountPrompt>- <span>{pt("Don't have an account?")}</span>+ <span>{t("auth_new_account_prompt")}</span><TextLink regular onClick={onSignUp}>{t("sign_up")}</TextLink>diff --git a/web/apps/photos/src/components/auth/PasskeyVerificationForm.tsx b/web/apps/photos/src/components/auth/PasskeyVerificationForm.tsxindex 3b45561bd8..6e3e1a9998 100644--- a/web/apps/photos/src/components/auth/PasskeyVerificationForm.tsx+++ b/web/apps/photos/src/components/auth/PasskeyVerificationForm.tsx@@ -2,9 +2,9 @@ import { InformationCircleIcon } from "@hugeicons/core-free-icons";import { HugeiconsIcon } from "@hugeicons/react";import { CircularProgress, styled } from "@mui/material";import type { VerifyingPasskeyPresentationProps } from "ente-accounts/components/LoginComponents";-import { pt } from "ente-base/i18n";import { t } from "i18next";import type React from "react";+import { Trans } from "react-i18next";import { Button } from "./Button";import { FormFooter } from "./FormFooter";import { ScreenHeader } from "./ScreenHeader";@@ -45,24 +45,24 @@ export function PasskeyVerificationForm({onClick={onRetry}disabled={isChecking}>- {pt("Open the browser window again")}+ {t("auth_passkey_reopen")}</Button>);return (<><ScreenHeader- title={pt("Verify your passkey")}+ title={t("auth_passkey_verify_title")}subtitle={- <>- {pt("We opened a browser window")}- {email ? (- <>- {pt(" for ")}- <Email>{email}</Email>- </>- ) : null}- </>+ email ? (+ <Trans+ i18nKey="auth_passkey_window_opened_for"+ components={{ a: <Email /> }}+ values={{ email }}+ />+ ) : (+ t("auth_passkey_window_opened")+ )}/><StatusCard role="status" $stalled={stalled}>@@ -87,15 +87,13 @@ export function PasskeyVerificationForm({<StatusText><StatusTitle>{stalled- ? pt("Still waiting")+ ? t("auth_passkey_still_waiting"): t("waiting_for_verification")}</StatusTitle><StatusCaption>{stalled- ? pt(- "The browser window may have been closed before you finished. Open it again to retry.",- )- : pt("This page updates on its own")}+ ? t("auth_passkey_stalled_hint")+ : t("auth_passkey_auto_updates")}</StatusCaption></StatusText></StatusCard>diff --git a/web/apps/photos/src/components/auth/RecoveryForm.tsx b/web/apps/photos/src/components/auth/RecoveryForm.tsxindex 406b28c173..a28b6526ae 100644--- a/web/apps/photos/src/components/auth/RecoveryForm.tsx+++ b/web/apps/photos/src/components/auth/RecoveryForm.tsx@@ -1,7 +1,6 @@import { styled } from "@mui/material";import type { RecoverAccountPresentationProps } from "ente-accounts/pages/recover";import type { TwoFactorRecoverPresentationProps } from "ente-accounts/pages/two-factor/recover";-import { pt } from "ente-base/i18n";import log from "ente-base/log";import { useFormik } from "formik";import { t } from "i18next";@@ -32,9 +31,7 @@ export function RecoverAccountForm({...props}onNoRecoveryKey={() => setShowNoRecoveryKey(true)}title={t("recover_account")}- subtitle={pt(- "Enter the recovery key you saved when you created your account.",- )}+ subtitle={t("auth_recover_account_subtitle")}/><AuthDialogopen={showNoRecoveryKey}@@ -73,9 +70,7 @@ export function RecoverTwoFactorForm(<RecoveryForm{...props}title={t("recover_two_factor")}- subtitle={pt(- "Enter your recovery key to regain access to your account.",- )}+ subtitle={t("auth_recover_two_factor_subtitle")}/>);}@@ -134,7 +129,7 @@ function RecoveryForm({<TextFieldname="recoveryKey"label={t("recovery_key")}- placeholder={pt("Paste your 24-word recovery key")}+ placeholder={t("auth_recovery_key_placeholder")}value={formik.values.recoveryKey}onChange={formik.handleChange}onKeyDown={handleRecoveryKeyDown}diff --git a/web/apps/photos/src/components/auth/RecoveryKeyForm.tsx b/web/apps/photos/src/components/auth/RecoveryKeyForm.tsxindex f58c48b176..0d0ac152f4 100644--- a/web/apps/photos/src/components/auth/RecoveryKeyForm.tsx+++ b/web/apps/photos/src/components/auth/RecoveryKeyForm.tsx@@ -3,7 +3,6 @@ import DoneIcon from "@mui/icons-material/Done";import { CircularProgress, styled } from "@mui/material";import type { RecoveryKeyPresentationProps } from "ente-accounts/components/RecoveryKey";import { useClipboardCopy } from "ente-base/components/utils/hooks";-import { pt } from "ente-base/i18n";import { t } from "i18next";import type React from "react";import { Button } from "./Button";@@ -23,7 +22,7 @@ export function RecoveryKeyForm({return (<><ScreenHeader- title={pt("Your recovery key")}+ title={t("auth_recovery_key_title")}subtitle={t("recovery_key_description")}/><RecoveryKeyBox>@@ -34,7 +33,9 @@ export function RecoveryKeyForm({type="button"onClick={handleCopy}aria-label={- copied ? t("copied") : pt("Copy recovery key")+ copied+ ? t("copied")+ : t("auth_copy_recovery_key")}><CopyIcon fontSize="small" />diff --git a/web/apps/photos/src/components/auth/SecondFactorChoiceDialog.tsx b/web/apps/photos/src/components/auth/SecondFactorChoiceDialog.tsxindex 2905c031f7..475264a817 100644--- a/web/apps/photos/src/components/auth/SecondFactorChoiceDialog.tsx+++ b/web/apps/photos/src/components/auth/SecondFactorChoiceDialog.tsx@@ -1,6 +1,5 @@import { styled } from "@mui/material";import type { SecondFactorChoicePresentationProps } from "ente-accounts/components/SecondFactorChoice";-import { pt } from "ente-base/i18n";import { t } from "i18next";import type React from "react";import {@@ -29,9 +28,7 @@ export function SecondFactorChoiceDialog({{t("two_factor")}</AuthDialogTitle><AuthDialogText>- {pt(- "Confirm it’s you with the second factor you set up.",- )}+ {t("auth_second_factor_choice_subtitle")}</AuthDialogText></AuthDialogHeader><ButtonStack>diff --git a/web/apps/photos/src/components/auth/SetPasswordForm.tsx b/web/apps/photos/src/components/auth/SetPasswordForm.tsxindex 409d4fe874..7bc8114248 100644--- a/web/apps/photos/src/components/auth/SetPasswordForm.tsx+++ b/web/apps/photos/src/components/auth/SetPasswordForm.tsx@@ -1,6 +1,5 @@import { styled } from "@mui/material";import type { NewPasswordPresentationProps } from "ente-accounts/components/NewPasswordForm";-import { pt } from "ente-base/i18n";import { t } from "i18next";import type React from "react";import { Button } from "./Button";@@ -32,9 +31,7 @@ export function SetPasswordForm({<><ScreenHeadertitle={submitButtonTitle}- subtitle={pt(- "We don't store your password. If you forget it, the only way back to your photos is your recovery key.",- )}+ subtitle={t("auth_password_recovery_warning")}/><Form onSubmit={onSubmit}><HiddenEmail@@ -50,7 +47,7 @@ export function SetPasswordForm({<TextFieldname="password"label={t("password")}- placeholder={pt("Choose a strong password")}+ placeholder={t("auth_strong_password_placeholder")}autoComplete="new-password"showPasswordTogglevalue={password}@@ -68,7 +65,7 @@ export function SetPasswordForm({<TextFieldname="confirmPassword"label={t("confirm_password")}- placeholder={pt("Type it once more")}+ placeholder={t("auth_repeat_password_placeholder")}autoComplete="new-password"showPasswordTogglevalue={confirmPassword}diff --git a/web/apps/photos/src/components/auth/SignUpForm.tsx b/web/apps/photos/src/components/auth/SignUpForm.tsxindex 63c0689d4c..330f57c141 100644--- a/web/apps/photos/src/components/auth/SignUpForm.tsx+++ b/web/apps/photos/src/components/auth/SignUpForm.tsx@@ -1,7 +1,6 @@import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined";import { styled, Tooltip } from "@mui/material";import type { SignUpPresentationProps } from "ente-accounts/components/SignUpContents";-import { pt } from "ente-base/i18n";import { t } from "i18next";import type React from "react";import { Trans } from "react-i18next";@@ -43,16 +42,16 @@ export function SignUpForm({title={isJoinAlbumContext? t("signup_to_join_album")- : pt("Create your account")+ : t("auth_create_account")}- subtitle={pt("A few details and you’ll be ready to go.")}+ subtitle={t("auth_signup_subtitle")}/><Form onSubmit={onSubmit}><FormFields><TextFieldname="email"- label={pt("Email address")}- placeholder={pt("[email protected]")}+ label={t("auth_email_label")}+ placeholder={t("auth_email_placeholder")}type="email"autoComplete="username"value={email}@@ -66,7 +65,7 @@ export function SignUpForm({<TextFieldname="password"label={t("password")}- placeholder={pt("Your password")}+ placeholder={t("auth_password_placeholder")}autoComplete="new-password"showPasswordTogglevalue={password}@@ -83,7 +82,7 @@ export function SignUpForm({<TextFieldname="confirmPassword"label={t("confirm_password")}- placeholder={pt("Repeat password")}+ placeholder={t("auth_confirm_password_placeholder")}autoComplete="new-password"showPasswordTogglevalue={confirmPassword}@@ -106,7 +105,7 @@ export function SignUpForm({</Tooltip></ReferralLabel>}- placeholder={pt("Optional")}+ placeholder={t("auth_optional")}value={referral}onChange={onReferralChange}disabled={isSubmitting}@@ -150,7 +149,7 @@ export function SignUpForm({{t("create_account")}</Button><AccountPrompt>- <span>{pt("Already have an account?")}</span>+ <span>{t("auth_existing_account_prompt")}</span><TextLink regular onClick={onLogin}>{t("login")}</TextLink>diff --git a/web/apps/photos/src/components/auth/VerifyEmailForm.tsx b/web/apps/photos/src/components/auth/VerifyEmailForm.tsxindex b07f46296f..fa5a0fc8bf 100644--- a/web/apps/photos/src/components/auth/VerifyEmailForm.tsx+++ b/web/apps/photos/src/components/auth/VerifyEmailForm.tsx@@ -1,10 +1,10 @@import { styled } from "@mui/material";import type { VerifyEmailPresentationProps } from "ente-accounts/pages/verify";-import { pt } from "ente-base/i18n";import log from "ente-base/log";import { useFormik } from "formik";import { t } from "i18next";import type React from "react";+import { Trans } from "react-i18next";import { Button } from "./Button";import { Form } from "./Form";import { FormFields } from "./FormFields";@@ -66,12 +66,13 @@ export function VerifyEmailForm({return (<><ScreenHeader- title={pt("Check your inbox")}+ title={t("auth_check_inbox")}subtitle={- <>- {pt("We sent a verification code to ")}- <Email>{email}</Email>- </>+ <Trans+ i18nKey="auth_verification_code_sent_to"+ components={{ a: <Email /> }}+ values={{ email }}+ />}/><Form onSubmit={formik.handleSubmit}>diff --git a/web/packages/base/locales/en-US/translation.json b/web/packages/base/locales/en-US/translation.jsonindex a956f7c85e..f2ac060140 100644--- a/web/packages/base/locales/en-US/translation.json+++ b/web/packages/base/locales/en-US/translation.json@@ -883,6 +883,45 @@"at": "at","auth_next": "next","auth_download_mobile_app": "Download our mobile app to manage your secrets",+ "photos_auth_headline": "Safe home for your photos",+ "photos_auth_subtitle": "End-to-end encrypted. Cross-platform. Open-source.",+ "photos_auth_free_storage": "10GB free foreever",+ "photos_auth_no_ads_no_spying": "No Ads, No Spying",+ "photos_auth_multiple_storage_locations": "Stored in multiple locations",+ "auth_recover_account_subtitle": "Enter the recovery key you saved when you created your account.",+ "auth_recover_two_factor_subtitle": "Enter your recovery key to regain access to your account.",+ "auth_recovery_key_placeholder": "Paste your 24-word recovery key",+ "auth_create_account": "Create your account",+ "auth_signup_subtitle": "A few details and you’ll be ready to go.",+ "auth_email_label": "Email address",+ "auth_email_placeholder": "[email protected]",+ "auth_password_placeholder": "Your password",+ "auth_confirm_password_placeholder": "Repeat password",+ "auth_optional": "Optional",+ "auth_existing_account_prompt": "Already have an account?",+ "auth_second_factor_choice_subtitle": "Confirm it’s you with the second factor you set up.",+ "auth_developer_settings_subtitle": "Point this app at your own Ente server. Leave it blank to use api.ente.io.",+ "auth_endpoint_invalid_url": "Enter a full URL, including https://",+ "auth_endpoint_unreachable": "Could not reach this endpoint",+ "auth_endpoint_checking": "Checking the endpoint is reachable",+ "auth_signing_in_as": "Signing in as <a>{{email}}</a>",+ "auth_passkey_reopen": "Open the browser window again",+ "auth_passkey_verify_title": "Verify your passkey",+ "auth_passkey_window_opened": "We opened a browser window",+ "auth_passkey_window_opened_for": "We opened a browser window for <a>{{email}}</a>",+ "auth_passkey_still_waiting": "Still waiting",+ "auth_passkey_stalled_hint": "The browser window may have been closed before you finished. Open it again to retry.",+ "auth_passkey_auto_updates": "This page updates on its own",+ "auth_recovery_key_title": "Your recovery key",+ "auth_copy_recovery_key": "Copy recovery key",+ "auth_welcome_back": "Welcome back",+ "auth_login_subtitle": "Enter your details to continue.",+ "auth_new_account_prompt": "Don't have an account?",+ "auth_password_recovery_warning": "We don't store your password. If you forget it, the only way back to your photos is your recovery key.",+ "auth_strong_password_placeholder": "Choose a strong password",+ "auth_repeat_password_placeholder": "Type it once more",+ "auth_check_inbox": "Check your inbox",+ "auth_verification_code_sent_to": "We sent a verification code to <a>{{email}}</a>","no_codes_added_yet": "No codes added yet","hide": "Hide","unhide": "Unhide",