From a43c0baa4610911d69036d784acd3ee5e2f1d248 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Mon, 19 Aug 2024 15:00:49 +0530 Subject: [PATCH] Avoid non-greppable context APIs for i18n --- web/apps/accounts/src/pages/_app.tsx | 4 +--- web/apps/auth/src/pages/_app.tsx | 4 +--- web/apps/photos/src/pages/_app.tsx | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/web/apps/accounts/src/pages/_app.tsx b/web/apps/accounts/src/pages/_app.tsx index 4b9572cdd2..6b19b530fb 100644 --- a/web/apps/accounts/src/pages/_app.tsx +++ b/web/apps/accounts/src/pages/_app.tsx @@ -52,9 +52,7 @@ const App: React.FC = ({ Component, pageProps }) => { setDialogBoxAttributesV2, }; - const title = isI18nReady - ? t("title", { context: "accounts" }) - : staticAppTitle; + const title = isI18nReady ? t("title_accounts") : staticAppTitle; return ( <> diff --git a/web/apps/auth/src/pages/_app.tsx b/web/apps/auth/src/pages/_app.tsx index cab009dd17..f369755cad 100644 --- a/web/apps/auth/src/pages/_app.tsx +++ b/web/apps/auth/src/pages/_app.tsx @@ -150,9 +150,7 @@ const App: React.FC = ({ Component, pageProps }) => { somethingWentWrong, }; - const title = isI18nReady - ? t("title", { context: "auth" }) - : staticAppTitle; + const title = isI18nReady ? t("title_auth") : staticAppTitle; return ( <> diff --git a/web/apps/photos/src/pages/_app.tsx b/web/apps/photos/src/pages/_app.tsx index 195ab2f8ff..15d2c58eee 100644 --- a/web/apps/photos/src/pages/_app.tsx +++ b/web/apps/photos/src/pages/_app.tsx @@ -330,9 +330,7 @@ export default function App({ Component, pageProps }: AppProps) { logout, }; - const title = isI18nReady - ? t("title", { context: "photos" }) - : staticAppTitle; + const title = isI18nReady ? t("title_photos") : staticAppTitle; return ( <>