From 290a7a702b51b803183032dd62100e5e465de605 Mon Sep 17 00:00:00 2001 From: Danah Date: Sun, 1 Dec 2024 18:41:32 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=B2=88=EC=97=AD=20=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=84=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.test.tsx | 14 +++++++++----- src/App.tsx | 2 -- src/assets/locales/en/translation.json | 9 ++++++++- src/assets/locales/ja/translation.json | 11 +++++++++-- src/assets/locales/ko/translation.json | 9 ++++++++- src/components/molecules/Footer/Footer.tsx | 6 ++++-- src/components/molecules/Header/Header.tsx | 6 +++--- src/pages/faq/page.tsx | 6 +++++- src/pages/guide/page.tsx | 8 ++++++-- src/pages/privacy/page.tsx | 2 +- src/pages/terms/page.tsx | 4 ++-- 11 files changed, 55 insertions(+), 22 deletions(-) diff --git a/src/App.test.tsx b/src/App.test.tsx index 7e5e4ca..faa3cf6 100644 --- a/src/App.test.tsx +++ b/src/App.test.tsx @@ -14,14 +14,16 @@ describe("상단 네비게이션", () => { renderWithProvider(, { initialEntries: ["/"] }); await userEvent.click(screen.getByRole("button", { name: /FAQ/ })); - expect(await screen.findByText(/Frequently Asked Questions/i)).toBeInTheDocument(); + expect( + await screen.findByText(/How to connect an external calendar(iCloud、Google、Outlook)/i) + ).toBeInTheDocument(); }); test("2. Guide", async () => { renderWithProvider(, { initialEntries: ["/"] }); await userEvent.click(screen.getByRole("button", { name: /Guide/ })); - expect(await screen.findByText(/User Guide/i)).toBeInTheDocument(); + expect(await screen.findByText(/Coming Soon/i)).toBeInTheDocument(); }); test("3. Language Option", async () => { @@ -44,6 +46,8 @@ describe("상단 네비게이션", () => { await waitFor(async () => { const languageButton = await screen.findByTestId("language-button"); expect(languageButton.getAttribute("aria-label")).equal("한국어"); + await userEvent.click(languageButton); + await userEvent.click(screen.getByTestId("language-option-english")); }); } }); @@ -65,10 +69,10 @@ describe("상단 네비게이션", () => { }); describe("하단 네비게이션", () => { - test("1. Terms of service", async () => { + test("1. Terms of Use", async () => { renderWithProvider(, { initialEntries: ["/"] }); - await userEvent.click(screen.getByRole("button", { name: /Terms of service/ })); + await userEvent.click(screen.getByRole("button", { name: /Terms of Use/ })); expect( await screen.findByText( 'We will explain the "terms of use" (hereinafter referred to as the "terms") for the the service and application "Plandy" (hereinafter referred to as "service") provided by Danah Kim (hereinafter referred to as the "service provider").' @@ -79,7 +83,7 @@ describe("하단 네비게이션", () => { test("2. Privacy policy", async () => { renderWithProvider(, { initialEntries: ["/"] }); - await userEvent.click(screen.getByRole("button", { name: /Privacy policy/ })); + await userEvent.click(screen.getByRole("button", { name: /Privacy Policy/ })); expect( await screen.findByText( 'This privacy policy explains the privacy policy for the service and application "Plandy" (hereinafter referred to as "the Service") provided by Danah Kim (hereinafter referred to as "the Service Provider").' diff --git a/src/App.tsx b/src/App.tsx index dcbaf13..74abd65 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -4,7 +4,6 @@ import ErrorBoundary from "@components/utils/ErrorBoundary"; import LangLayout from "@components/utils/LangLayout"; import Error404Page from "@pages/error/404/page"; import Error500Page from "@pages/error/500/page"; -import HowToConnectPage from "@pages/faq/how-to-connect/page"; import FaqPage from "@pages/faq/page"; import GuidePage from "@pages/guide/page"; import HomePage from "@pages/page"; @@ -17,7 +16,6 @@ function App() { } /> } /> - } /> } /> } /> } /> diff --git a/src/assets/locales/en/translation.json b/src/assets/locales/en/translation.json index a57f87f..67d1a7b 100644 --- a/src/assets/locales/en/translation.json +++ b/src/assets/locales/en/translation.json @@ -1,4 +1,11 @@ { "title": "Plandy | Reminders & Calendar", - "intro_text": "Simple and easy task Manager" + "intro_text": "Simple and easy task Manager", + "faq": "FAQ", + "faq_apple_102543": "If your iCloud Contacts, Calendars, or Reminders won’t sync", + "faq_apple_105124": "Share and assign reminders on your iPhone or iPad", + "guide": "Guide", + "terms": "Terms of Use", + "privacy": "Privacy Policy", + "coming_soon": "Coming Soon" } diff --git a/src/assets/locales/ja/translation.json b/src/assets/locales/ja/translation.json index 602db17..6b17c3e 100644 --- a/src/assets/locales/ja/translation.json +++ b/src/assets/locales/ja/translation.json @@ -1,4 +1,11 @@ { - "title": "Plandy: \u30EA\u30DE\u30A4\u30F3\u30C0\u30FC\u0020\uFF06\u0020\u30AB\u30EC\u30F3\u30C0\u30FC", - "intro_text": "\u30B7\u30F3\u30D7\u30EB\u3067\u7C21\u5358\u306A\u30BF\u30B9\u30AF\u7BA1\u7406" + "title": "Plandy | \u30EA\u30DE\u30A4\u30F3\u30C0\u30FC\u0020\uFF06\u0020\u30AB\u30EC\u30F3\u30C0\u30FC", + "intro_text": "\u30B7\u30F3\u30D7\u30EB\u3067\u7C21\u5358\u306A\u30BF\u30B9\u30AF\u7BA1\u7406", + "faq": "\u3088\u304F\u3042\u308B\u8CEA\u554F", + "faq_apple_102543": "\u0069\u0043\u006C\u006F\u0075\u0064\u0020\u306E\u9023\u7D61\u5148\u3001\u30AB\u30EC\u30F3\u30C0\u30FC\u3001\u30EA\u30DE\u30A4\u30F3\u30C0\u30FC\u304C\u540C\u671F\u3055\u308C\u306A\u3044\u5834\u5408", + "faq_apple_105124": "\u0069\u0050\u0068\u006F\u006E\u0065\u0020\u3084\u0020\u0069\u0050\u0061\u0064\u0020\u3067\u30EA\u30DE\u30A4\u30F3\u30C0\u30FC\u3092\u5171\u6709\u3059\u308B\uFF0F\u5272\u308A\u5F53\u3066\u308B", + "guide": "\u4F7F\u3044\u65B9\u30AC\u30A4\u30C9", + "terms": "\u5229\u7528\u898F\u7D04", + "privacy": "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC", + "coming_soon": "\u8FD1\u65E5\u516C\u958B" } diff --git a/src/assets/locales/ko/translation.json b/src/assets/locales/ko/translation.json index b3dfcd2..1511adf 100644 --- a/src/assets/locales/ko/translation.json +++ b/src/assets/locales/ko/translation.json @@ -1,4 +1,11 @@ { "title": "Plandy | \uB9AC\uB9C8\uC778\uB354\u0020\u0026\u0020\uB2EC\uB825", - "intro_text": "\uBE60\uB974\uACE0\u0020\uAC04\uD3B8\uD55C\u0020\uC77C\uC815\uACFC\u0020\uD560\uC77C\u0020\uAD00\uB9AC" + "intro_text": "\uBE60\uB974\uACE0\u0020\uAC04\uD3B8\uD55C\u0020\uC77C\uC815\uACFC\u0020\uD560\uC77C\u0020\uAD00\uB9AC", + "faq": "\u0008\uC790\uC8FC\u0020\uBB3B\uB294\u0020\uC9C8\uBB38", + "faq_apple_102543": "\u0069\u0043\u006C\u006F\u0075\u0064\u0020\uC5F0\uB77D\uCC98\u002C\u0020\uCE98\uB9B0\uB354\u0020\uB610\uB294\u0020\uBBF8\uB9AC\u0020\uC54C\uB9BC\uC774\u0020\uB3D9\uAE30\uD654\uB418\uC9C0\u0020\uC54A\uB294\u0020\uACBD\uC6B0", + "faq_apple_105124": "\u0069\u0050\u0068\u006F\u006E\u0065\u0020\uB610\uB294\u0020\u0069\u0050\u0061\u0064\uC5D0\uC11C\u0020\uBBF8\uB9AC\u0020\uC54C\uB9BC\u0020\uACF5\uC720\u0020\uBC0F\u0020\uD560\uB2F9\uD558\uAE30", + "guide": "\uC0AC\uC6A9\uC790\u0020\uAC00\uC774\uB4DC", + "terms": "\u0008\uC0AC\uC6A9\u0020\uC57D\uAD00", + "privacy": "\uAC1C\uC778\uC815\uBCF4\u0020\uCC98\uB9AC\uBC29\uCE68", + "coming_soon": "\uC900\uBE44\uC911" } diff --git a/src/components/molecules/Footer/Footer.tsx b/src/components/molecules/Footer/Footer.tsx index b74ebb3..614e23d 100644 --- a/src/components/molecules/Footer/Footer.tsx +++ b/src/components/molecules/Footer/Footer.tsx @@ -1,3 +1,4 @@ +import { useTranslation } from "react-i18next"; import { Link, useParams } from "react-router-dom"; import Button from "@components/atoms/Button"; @@ -7,6 +8,7 @@ import { GoogleFirebase } from "@utils/google-firebase"; import { Copyright, Divider, InfoBox, PolicyButtonGroup, StyledFooter } from "./Footer.styles"; function Footer() { + const { t } = useTranslation(); const { lang } = useParams(); const prefixUrlLang = lang ? `/${lang}` : ""; @@ -26,12 +28,12 @@ function Footer() { handleLogEvent("terms")}> handleLogEvent("privacy")}> diff --git a/src/components/molecules/Header/Header.tsx b/src/components/molecules/Header/Header.tsx index f76e067..1f536fd 100644 --- a/src/components/molecules/Header/Header.tsx +++ b/src/components/molecules/Header/Header.tsx @@ -13,7 +13,7 @@ import { matchSupportLanguage, SupportLanguage } from "@utils/i18n"; import { Adornment, HeaderInner, Logo, StyledHeader } from "./Header.styles"; function Header() { - const { i18n } = useTranslation(); + const { i18n, t } = useTranslation(); const navigate = useNavigate(); const { pathname } = useLocation(); const { lang } = useParams(); @@ -54,12 +54,12 @@ function Header() { handleLogEvent("faq")}> handleLogEvent("guide")}>