diff --git a/crabfit-frontend/public/i18n/ja/help.json b/crabfit-frontend/public/i18n/ja/help.json deleted file mode 100644 index 4d0f1c7..0000000 --- a/crabfit-frontend/public/i18n/ja/help.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "How to Crab Fit", - - "p1": "Crab Fit is a tool that helps you when planning events with friends or coworkers. You just create an event, enter your availability, send it out, and see when everyone is free!", - "p2": "See below for detailed steps of how to Crab Fit your event.", - - "s1": "Step 1", - - "p3": "Use the form at <1>crab.fit to make a new event. You only need to put in the rough time period for when your event occurs here, not your availability.", - "p4": "For example, we'll use \"Jenny's Birthday Lunch\". Jenny wants her birthday lunch to happen on the same week as her birthday, the 15th of April, but she knows that not all of her friends are available on the 15th. She also doesn't want to do it on the weekend.", - "p5": "Jenny also knows that since it's a lunch event, it can't start before 11am or go any later than 5pm.", - - "s2": "Step 2", - - "p6": "Enter your availability for the event you just created.", - "p7": "In our example, Jenny now puts in her availability for her birthday lunch. She is free all week, except after 3pm on Tuesday and Wednesday, and before 1pm on Friday.", - - "s3": "Step 3", - - "p8": "Send the link to everyone you want to come.", - "p9": "After Jenny has sent the link to her friends and waited for them to also fill out their availabilities, she can now easily see them all on the heatmap below and choose the darkest area for a time that suits everyone!", - "p10": "In this example, 1pm to 3pm on Friday the 16th works for all Jenny's friends." -} diff --git a/crabfit-frontend/public/i18n/ja/home.json b/crabfit-frontend/public/i18n/ja/home.json deleted file mode 100644 index 6a2b766..0000000 --- a/crabfit-frontend/public/i18n/ja/home.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "create": "CREATE A", - "recently_visited": "Recently visited", - "nav": { - "about": "About", - "donate": "Donate" - }, - "form": { - "name": { - "label": "Give your event a name!", - "sublabel": "Or leave blank to generate one" - }, - "dates": { - "label": "What dates might work?", - "sublabel": "Click and drag to select", - "options": { - "specific": "Specific dates", - "week": "Days of the week" - }, - "tooltips": { - "previous": "先月", - "next": "来月", - "today": "今日" - } - }, - "times": { - "label": "What times might work?", - "sublabel": "Click and drag to select a time range" - }, - "timezone": { - "label": "And the timezone", - "defaultOption": "Select..." - }, - - "button": "Create", - "errors": { - "no_dates": "There aren't any dates selected", - "same_times": "The start and end times can't be the same", - "no_time": "There isn't any time selected", - "unknown": "Something went wrong. Please try again later." - } - }, - "offline": "You can't create a Crab Fit when you don't have an internet connection. Please make sure you're connected.", - - "about": { - "name": "About Crab Fit", - "events": "Events created", - "availabilities": "Availabilities entered", - "content": { - "p1": "Crab Fit helps you fit your event around everyone's schedules. Simply create an event above and send the link to everyone that is participating. Results update live and you will be able to see a heat-map of when everyone is free.<1/><2>Learn more about how to Crab Fit.", - "p2": "Create a lot of Crab Fits? Get the <1>Chrome extension or <3>Firefox extension for your browser! You can also download the <5>Android app to Crab Fit on the go.", - "p3": "Created by <1>Ben Grant, Crab Fit is the modern-day solution to your group event planning debates.", - "p4": "The code for Crab Fit is open source, if you find any issues or want to contribute, you can visit the <1>repository. By using Crab Fit you agree to the <3>privacy policy.", - "p5": "Consider donating below if it helped you out so it can stay free for everyone. 🦀" - } - } -} diff --git a/crabfit-frontend/src/pages/Privacy/Privacy.tsx b/crabfit-frontend/src/pages/Privacy/Privacy.tsx index 3d8418e..48c0031 100644 --- a/crabfit-frontend/src/pages/Privacy/Privacy.tsx +++ b/crabfit-frontend/src/pages/Privacy/Privacy.tsx @@ -1,4 +1,4 @@ -import { useEffect, useRef } from 'react'; +import { useState, useEffect, useRef } from 'react'; import { useHistory } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; @@ -22,11 +22,14 @@ const Privacy = () => { const { push } = useHistory(); const { t, i18n } = useTranslation(['common', 'privacy']); const contentRef = useRef(); + const [content, setContent] = useState(''); useEffect(() => { document.title = `${t('privacy:name')} - Crab Fit`; }, [t]); + useEffect(() => setContent(contentRef.current?.innerText || ''), [contentRef.current]); + return ( <> @@ -39,7 +42,7 @@ const Privacy = () => { {!i18n.language.startsWith('en') && (

{t('privacy:translate')}