π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Clean up strings
Manav Rathic0fee7bc9158
diff --git a/web/apps/payments/src/pages/404.tsx b/web/apps/payments/src/pages/404.tsxindex 2f6f5d9d08..91d8d2800e 100644--- a/web/apps/payments/src/pages/404.tsx+++ b/web/apps/payments/src/pages/404.tsx@@ -1,7 +1,7 @@import { Container } from "components/Container";+import S from "utils/strings";import React from "react";-import constants from "utils/strings";export default function Home() {- return <Container>{constants.NOT_FOUND}</Container>;+ return <Container>{S.error_404}</Container>;}diff --git a/web/apps/payments/src/pages/_app.tsx b/web/apps/payments/src/pages/_app.tsxindex 9d57985e9f..7686c5f8f5 100644--- a/web/apps/payments/src/pages/_app.tsx+++ b/web/apps/payments/src/pages/_app.tsx@@ -1,14 +1,14 @@import type { AppProps } from "next/app";import Head from "next/head";import React from "react";-import constants from "utils/strings";+import S from "utils/strings";import "../styles/globals.css";function MyApp({ Component, pageProps }: AppProps) {return (<><Head>- <title>{constants.TITLE}</title>+ <title>{S.title}</title></Head><Component {...pageProps} /></>diff --git a/web/apps/payments/src/pages/index.tsx b/web/apps/payments/src/pages/index.tsxindex 19151dc0ee..98d4a586dd 100644--- a/web/apps/payments/src/pages/index.tsx+++ b/web/apps/payments/src/pages/index.tsx@@ -2,7 +2,7 @@ import { Container } from "components/Container";import { Spinner } from "components/Spinner";import * as React from "react";import { parseAndHandleRequest } from "services/billing-service";-import constants from "utils/strings";+import S from "utils/strings";export default function Home() {const [failed, setFailed] = React.useState(false);@@ -20,9 +20,5 @@ export default function Home() {main();}, []);- return (- <Container>- {failed ? constants.SOMETHING_WENT_WRONG : <Spinner />}- </Container>- );+ return <Container>{failed ? S.error_generic : <Spinner />}</Container>;}diff --git a/web/apps/payments/src/utils/strings.ts b/web/apps/payments/src/utils/strings.tsindex 44ba64b8fe..5632289bee 100644--- a/web/apps/payments/src/utils/strings.ts+++ b/web/apps/payments/src/utils/strings.ts@@ -1,7 +1,14 @@-const englishConstants = {- TITLE: "Payments | ente.io",- SOMETHING_WENT_WRONG: "Oops, something went wrong.",- NOT_FOUND: "404 | This page could not be found.",+/**+ * User facing strings in the app+ *+ * By keeping them separate, we make our lives easier if/when we need to+ * localize the corresponding pages. Right now, these are just the values in the+ * default language, English.+ */+const S = {+ title: "Payments | ente.io",+ error_generic: "Oops, something went wrong.",+ error_404: "404 | This page could not be found.",};-export default englishConstants;+export default S;