diff --git a/src/hooks/useSasquatchGuide.ts b/src/hooks/useSasquatchGuide.ts index 37bf6f1..5938857 100644 --- a/src/hooks/useSasquatchGuide.ts +++ b/src/hooks/useSasquatchGuide.ts @@ -1,6 +1,7 @@ import { useState, useEffect } from 'react'; import { useLocation, useNavigate } from 'react-router-dom'; import { useCurrentUser } from '@/hooks/useCurrentUser'; +import { useTranslation } from '@/contexts/language'; import type { GuideMessage } from '@/components/SasquatchGuide'; /** @@ -8,6 +9,7 @@ import type { GuideMessage } from '@/components/SasquatchGuide'; * Always visible on home and onboarding pages, can be minimized/expanded at will */ export function useSasquatchGuide() { + const { t } = useTranslation(); const location = useLocation(); const navigate = useNavigate(); const { user } = useCurrentUser(); @@ -20,21 +22,21 @@ export function useSasquatchGuide() { if (location.pathname === '/') { message = { id: 'welcome', - title: 'Welcome to SkateSpots! 🦧', - message: "Yo, I'm The Sasquatch. Keeper of boards, trails, and wild rides. Welcome to the untamed skate world on Nostr—no suits, no ads, just skaters carving their own path. Here, you own your tricks, your data, and even earn Bitcoin for leaving your mark. Connect with skaters in your hood or across the globe. No rules but shredding, no footprints but your own.", + title: t('sasquatchGuide.homeTitle'), + message: t('sasquatchGuide.homeMessage'), context: 'home', suggestedQuestions: [ - 'Plan me 3 days in Barcelona', - 'Find beginner spots', - 'Any upcoming events?', - 'Community stats', - 'Find coaches near me', - 'Gear for sale?', - 'What is Nostr?', - 'Is this free?', + t('sasquatchGuide.homeQ1'), + t('sasquatchGuide.homeQ2'), + t('sasquatchGuide.homeQ3'), + t('sasquatchGuide.homeQ4'), + t('sasquatchGuide.homeQ5'), + t('sasquatchGuide.homeQ6'), + t('sasquatchGuide.homeQ7'), + t('sasquatchGuide.homeQ8'), ], action: { - label: 'Learn More', + label: t('sasquatchGuide.homeLearnMore'), onClick: () => { navigate('/onboarding'); }, @@ -50,21 +52,21 @@ export function useSasquatchGuide() { else if (location.pathname === '/onboarding') { message = { id: 'onboarding', - title: 'Getting Started 🚀', - message: "Let me help you understand the basics! Nostr is your identity, Bitcoin Lightning lets you earn sats for contributions, and zaps are instant tips. Ask me anything about getting started!", + title: t('sasquatchGuide.onboardingTitle'), + message: t('sasquatchGuide.onboardingMessage'), context: 'onboarding', suggestedQuestions: [ - 'How to login?', - 'What is Nostr?', - 'How does Nostr work?', - 'What is Cashu?', - 'How to use Cashu wallet?', - 'What are mints?', - 'What are zaps?', - 'What is NWC?', + t('sasquatchGuide.onboardingQ1'), + t('sasquatchGuide.onboardingQ2'), + t('sasquatchGuide.onboardingQ3'), + t('sasquatchGuide.onboardingQ4'), + t('sasquatchGuide.onboardingQ5'), + t('sasquatchGuide.onboardingQ6'), + t('sasquatchGuide.onboardingQ7'), + t('sasquatchGuide.onboardingQ8'), ], action: { - label: user ? 'Start exploring' : 'Login to begin', + label: user ? t('sasquatchGuide.onboardingStart') : t('sasquatchGuide.onboardingLogin'), onClick: () => { if (user) { navigate('/map'); @@ -94,21 +96,21 @@ export function useSasquatchGuide() { else if (location.pathname === '/lab') { message = { id: 'lab-guide', - title: 'Welcome to The Lab! 🎓', - message: `This is where the magic happens! Find coaches who can teach you anything from kickflips to darkslides, or connect with filmers to capture your best sessions. Filter by skills, check their experience, and book a session. Remember - everyone started somewhere!`, + title: t('sasquatchGuide.labTitle'), + message: t('sasquatchGuide.labMessage'), context: 'lab', suggestedQuestions: [ - 'Find coaches', - 'Find filmers', - 'Find photographers', - 'Find video editors', - 'Find a ramp builder', - 'What is The Lab?', - 'What is a builder?', - 'How to offer coaching?', + t('sasquatchGuide.labQ1'), + t('sasquatchGuide.labQ2'), + t('sasquatchGuide.labQ3'), + t('sasquatchGuide.labQ4'), + t('sasquatchGuide.labQ5'), + t('sasquatchGuide.labQ6'), + t('sasquatchGuide.labQ7'), + t('sasquatchGuide.labQ8'), ], action: user ? undefined : { - label: 'Login to Offer Services', + label: t('sasquatchGuide.labLogin'), onClick: () => { navigate('/onboarding'); }, @@ -123,19 +125,19 @@ export function useSasquatchGuide() { else if (location.pathname === '/crews') { message = { id: 'crews-guide', - title: 'Crews 🤘', - message: `Crews are your map-anchored skate family — the people you skate WITH, not who you hire. Every crew has home turf on the map, home spots, members and a manifesto. Members confirm from their own keys, so the roster's legit. Start your own or find your people!`, + title: t('sasquatchGuide.crewsTitle'), + message: t('sasquatchGuide.crewsMessage'), context: undefined, suggestedQuestions: [ - 'What are crews?', - 'How to start a crew?', - 'How is a crew different from The Lab?', - 'How do members confirm?', - 'What is Nostr?', - 'How do zaps work?', + t('sasquatchGuide.crewsQ1'), + t('sasquatchGuide.crewsQ2'), + t('sasquatchGuide.crewsQ3'), + t('sasquatchGuide.crewsQ4'), + t('sasquatchGuide.crewsQ5'), + t('sasquatchGuide.crewsQ6'), ], action: user ? undefined : { - label: 'Login to Create a Crew', + label: t('sasquatchGuide.crewsLogin'), onClick: () => { navigate('/onboarding'); }, @@ -152,7 +154,7 @@ export function useSasquatchGuide() { } setCurrentMessage(message); - }, [location.pathname, user, navigate]); + }, [location.pathname, user, navigate, t]); const dismissCurrentMessage = () => { setCurrentMessage(undefined); diff --git a/src/i18n/en.ts b/src/i18n/en.ts index f0d3684..7b9ae42 100644 --- a/src/i18n/en.ts +++ b/src/i18n/en.ts @@ -6878,6 +6878,51 @@ walletUi: { offlineViewDetails: 'View cached spot details', offlineKeepActing: 'Keep acting — posts, RSVPs, listings and messages are queued and send when you reconnect', }, + sasquatchGuide: { + homeTitle: 'Welcome to SkateSpots! 🦧', + homeMessage: "Yo, I'm The Sasquatch. Keeper of boards, trails, and wild rides. Welcome to the untamed skate world on Nostr—no suits, no ads, just skaters carving their own path. Here, you own your tricks, your data, and even earn Bitcoin for leaving your mark. Connect with skaters in your hood or across the globe. No rules but shredding, no footprints but your own.", + homeQ1: 'Plan me 3 days in Barcelona', + homeQ2: 'Find beginner spots', + homeQ3: 'Any upcoming events?', + homeQ4: 'Community stats', + homeQ5: 'Find coaches near me', + homeQ6: 'Gear for sale?', + homeQ7: 'What is Nostr?', + homeQ8: 'Is this free?', + homeLearnMore: 'Learn More', + onboardingTitle: 'Getting Started 🚀', + onboardingMessage: 'Let me help you understand the basics! Nostr is your identity, Bitcoin Lightning lets you earn sats for contributions, and zaps are instant tips. Ask me anything about getting started!', + onboardingQ1: 'How to login?', + onboardingQ2: 'What is Nostr?', + onboardingQ3: 'How does Nostr work?', + onboardingQ4: 'What is Cashu?', + onboardingQ5: 'How to use Cashu wallet?', + onboardingQ6: 'What are mints?', + onboardingQ7: 'What are zaps?', + onboardingQ8: 'What is NWC?', + onboardingStart: 'Start exploring', + onboardingLogin: 'Login to begin', + labTitle: 'Welcome to The Lab! 🎓', + labMessage: 'This is where the magic happens! Find coaches who can teach you anything from kickflips to darkslides, or connect with filmers to capture your best sessions. Filter by skills, check their experience, and book a session. Remember - everyone started somewhere!', + labQ1: 'Find coaches', + labQ2: 'Find filmers', + labQ3: 'Find photographers', + labQ4: 'Find video editors', + labQ5: 'Find a ramp builder', + labQ6: 'What is The Lab?', + labQ7: 'What is a builder?', + labQ8: 'How to offer coaching?', + labLogin: 'Login to Offer Services', + crewsTitle: 'Crews 🤘', + crewsMessage: "Crews are your map-anchored skate family — the people you skate WITH, not who you hire. Every crew has home turf on the map, home spots, members and a manifesto. Members confirm from their own keys, so the roster's legit. Start your own or find your people!", + crewsQ1: 'What are crews?', + crewsQ2: 'How to start a crew?', + crewsQ3: 'How is a crew different from The Lab?', + crewsQ4: 'How do members confirm?', + crewsQ5: 'What is Nostr?', + crewsQ6: 'How do zaps work?', + crewsLogin: 'Login to Create a Crew', + }, supportUi: { keepMapFree: 'Keep the map free', keepMapFreeDesc: 'No ads, no tracking, no VC. Your sats pay for hosting, the AI node and the relay.', diff --git a/src/i18n/es.ts b/src/i18n/es.ts index 004d33a..7038101 100644 --- a/src/i18n/es.ts +++ b/src/i18n/es.ts @@ -6878,6 +6878,51 @@ walletUi: { offlineViewDetails: 'Ver detalles de spots en caché', offlineKeepActing: 'Sigue actuando — publicaciones, RSVPs, anuncios y mensajes se ponen en cola y se envían al reconectar', }, + sasquatchGuide: { + homeTitle: '¡Bienvenido a SkateSpots! 🦧', + homeMessage: 'Yo, soy The Sasquatch. Guardián de tablas, rutas y aventuras salvajes. Bienvenido al indómito mundo del skate en Nostr — sin trajes, sin anuncios, solo skaters abriendo su propio camino. Aquí tus trucos y tus datos son tuyos, y hasta ganas Bitcoin por dejar tu huella. Conecta con skaters de tu barrio o de todo el mundo. Sin más reglas que rodar, sin más huellas que las tuyas.', + homeQ1: 'Planéame 3 días en Barcelona', + homeQ2: 'Encuentra spots para principiantes', + homeQ3: '¿Hay eventos próximos?', + homeQ4: 'Estadísticas de la comunidad', + homeQ5: 'Encuentra coaches cerca de mí', + homeQ6: '¿Equipo en venta?', + homeQ7: '¿Qué es Nostr?', + homeQ8: '¿Esto es gratis?', + homeLearnMore: 'Saber más', + onboardingTitle: 'Primeros pasos 🚀', + onboardingMessage: '¡Déjame ayudarte con lo básico! Nostr es tu identidad, Bitcoin Lightning te permite ganar sats por tus aportes, y los zaps son propinas instantáneas. ¡Pregúntame lo que quieras para empezar!', + onboardingQ1: '¿Cómo iniciar sesión?', + onboardingQ2: '¿Qué es Nostr?', + onboardingQ3: '¿Cómo funciona Nostr?', + onboardingQ4: '¿Qué es Cashu?', + onboardingQ5: '¿Cómo usar la cartera Cashu?', + onboardingQ6: '¿Qué son los mints?', + onboardingQ7: '¿Qué son los zaps?', + onboardingQ8: '¿Qué es NWC?', + onboardingStart: 'Empezar a explorar', + onboardingLogin: 'Inicia sesión para empezar', + labTitle: '¡Bienvenido a The Lab! 🎓', + labMessage: '¡Aquí es donde pasa la magia! Encuentra coaches que te enseñen desde kickflips hasta darkslides, o conecta con filmers para capturar tus mejores sesiones. Filtra por habilidades, revisa su experiencia y reserva una sesión. Recuerda: ¡todos empezamos en algún sitio!', + labQ1: 'Encuentra coaches', + labQ2: 'Encuentra filmers', + labQ3: 'Encuentra fotógrafos', + labQ4: 'Encuentra editores de vídeo', + labQ5: 'Encuentra un constructor de ramps', + labQ6: '¿Qué es The Lab?', + labQ7: '¿Qué es un builder?', + labQ8: '¿Cómo ofrecer coaching?', + labLogin: 'Inicia sesión para ofrecer servicios', + crewsTitle: 'Crews 🤘', + crewsMessage: 'Las crews son tu familia de skate anclada al mapa — la gente con la que patinas, no a la que contratas. Cada crew tiene su territorio en el mapa, spots habituales, miembros y un manifiesto. Los miembros confirman con su propia clave, así que la lista es legítima. ¡Crea la tuya o encuentra a tu gente!', + crewsQ1: '¿Qué son las crews?', + crewsQ2: '¿Cómo empezar una crew?', + crewsQ3: '¿En qué se diferencia una crew de The Lab?', + crewsQ4: '¿Cómo confirman los miembros?', + crewsQ5: '¿Qué es Nostr?', + crewsQ6: '¿Cómo funcionan los zaps?', + crewsLogin: 'Inicia sesión para crear una crew', + }, supportUi: { keepMapFree: 'Mantén el mapa gratis', keepMapFreeDesc: 'Sin anuncios, sin rastreo, sin capital riesgo. Tus sats pagan el hosting, el nodo de IA y el relay.',