diff --git a/package.json b/package.json index 1887719e..379fcdb1 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "clsx": "^2.1.1", "focus-visible": "^5.2.0", "framer-motion": "^11.2.4", + "i18next": "^21.8.10", "lucide-react": "^0.378.0", "mantine-flagpack": "^4.0.1", "next": "14.2.3", @@ -50,6 +51,7 @@ "react-countdown": "^2.3.5", "react-countdown-circle-timer": "^3.2.1", "react-dom": "18.3.1", + "react-i18next": "^11.18.6", "react-redux": "^9.1.2", "redux": "^5.0.1", "redux-socket.io-middleware": "^1.0.4", diff --git a/public/locales/en/common.json b/public/locales/en/common.json index b6f2111f..c99c641c 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -4,5 +4,36 @@ "title": "Welcome, streamer", "description": "Unlock the Ultimate Dota 2 Streaming Experience with Dotabod! Boost your stream's engagement, showcase real-time stats, and delight your audience with our all-in-one streaming toolkit. Elevate your game and become the streamer you were meant to be!" }, - "live": "Live" -} \ No newline at end of file + "live": "Live", + "setup": { + "title": "Setup", + "subtitle": "Let's get Dotabod working for you right away", + "step1": "Twitch", + "step2": "Dota 2", + "step3": "OBS", + "step4": "All done!", + "finalNote": "That's it! You're all set up." + }, + "features": { + "main": { + "title": "Main features", + "subtitle": "Customize the options your stream receives." + }, + "chat": { + "title": "Chatter", + "subtitle": "The bot can post some random messages as you play your game." + }, + "advanced": { + "title": "Advanced features", + "subtitle": "Looking for even more? They'll be here 😎" + }, + "overlay": { + "title": "Overlay", + "subtitle": "This stuff will show up on your stream" + } + }, + "troubleshoot": { + "title": "Live preview", + "subtitle": "Take a peak to see if your OBS is showing the correct overlay. Try joining a bot match to have this preview show the pick blocker, for example." + } +} diff --git a/src/components/Homepage/Hero.tsx b/src/components/Homepage/Hero.tsx index 576c8d29..09ef7d13 100644 --- a/src/components/Homepage/Hero.tsx +++ b/src/components/Homepage/Hero.tsx @@ -12,6 +12,7 @@ import { CursorArrowRaysIcon } from '@heroicons/react/24/outline' import useSWR from 'swr' import { fetcher } from '@/lib/fetcher' import TwitchSvg from 'src/images/logos/twitch.svg' +import { useTranslation } from 'react-i18next'; const featuredUsers = [ { @@ -132,6 +133,7 @@ const TwitchUser = ({ } export function Hero() { + const { t } = useTranslation(); const session = useSession() const name = session.data?.user?.name || 'streamers' const { nonSupporters } = grouped @@ -147,7 +149,7 @@ export function Hero() {
- Unlock the Ultimate Dota 2 Streaming Experience with Dotabod! - Boost your stream's engagement, showcase real-time stats, and - delight your audience with our all-in-one streaming toolkit. - Elevate your game and become the streamer you were meant to be! + {t('hero.description', "Unlock the Ultimate Dota 2 Streaming Experience with Dotabod! Boost your stream's engagement, showcase real-time stats, and delight your audience with our all-in-one streaming toolkit. Elevate your game and become the streamer you were meant to be!")}
- Test it by joining a bot match. Visit the{' '} - Live Preview page to confirm the - overlay is showing. You should see the minimap blocker overlay - once you're in a match. + {t('setup.testInstruction', "Test it by joining a bot match. Visit the Live Preview page to confirm the overlay is showing. You should see the minimap blocker overlay once you're in a match.")} + {t('setup.livePreview', 'Live Preview page')} + {t('setup.note', "Note: Dotabod will only work if your stream is online.")}
-Note: Dotabod will only work if your stream is online.