From 98a289c90208e326c6a61a83438984639947751d Mon Sep 17 00:00:00 2001 From: Ebube Anyanwu Date: Thu, 15 Aug 2024 00:26:29 +0100 Subject: [PATCH] feat/multiple language support: added messages --- messages/en.json | 58 ++++++++++++++++++ messages/es.json | 60 ++++++++++++++++++ messages/fr.json | 60 ++++++++++++++++++ src/components/layouts/footer/footer.test.tsx | 4 +- src/components/layouts/footer/index.tsx | 61 +++++++++++-------- .../layouts/homepage/HowItWorks.tsx | 16 ++--- .../layouts/homepage/PerfectFit.tsx | 10 +-- .../layouts/homepage/TestimonialCard.tsx | 4 +- .../layouts/homepage/Testimonials.tsx | 7 ++- .../layouts/homepage/testimonials-data.tsx | 12 ++-- src/components/layouts/navbar/index.tsx | 8 ++- src/components/layouts/navbar/links.ts | 6 +- .../layouts/navbar/mobile-navbar.tsx | 8 ++- 13 files changed, 253 insertions(+), 61 deletions(-) diff --git a/messages/en.json b/messages/en.json index c5f2b6d01..2a941f571 100644 --- a/messages/en.json +++ b/messages/en.json @@ -1,4 +1,13 @@ { + "navbar": { + "login": "Log in", + "register": "Get Started" + }, + "navLinks": { + "home": "Home", + "pricing": "Pricing", + "careers": "Careers" + }, "HomePage": { "title": "Hello world!" }, @@ -22,5 +31,54 @@ "scalableDescription": "Our boilerplate is designed to grow with your product. Easily add new features and functionalities as needed.", "easyTitle": "Easy Customization", "easyDescription": "Tailor the experience to your specific needs and preferences for maximum results." + }, + "testimonials": { + "title": "Client Testimonials", + "description": "Don't just take our word for it - see what actual users of our product have to say about their experience.", + "content": "I've been using this web hosting service for over a year and I'm really impressed with the uptime and support. The website has never gone down and the customer service is always quick to help with any issues I have. Highly recommend!" + }, + "perfectFit": { + "title": "Find The Perfect Fit", + "description": "Choose the boilerplate plan that best suits your project needs and budget. All plans include access to our comprehensive library of pre-built sections, drag-and-drop customization.", + "cta": "See Our Pricing Plan" + }, + "footer": { + "newsletterSignUp": "Sign Up For Newsletters", + "subscribe": "Subscribe", + "navigation": "Navigation", + "support": "Support", + "legal": "Legal", + "followUs": "Follow Us", + "privacyPolicy": "Privacy Policy", + "termsOfUse": "Terms of Use", + "enterYourEmail": "Enter your email", + "links": { + "navigation": "Navigation", + "home": "Home", + "aboutUs": "About Us", + "career": "Career", + "features": "Features", + "blog": "Blog", + "support": "Support", + "helpCenter": "Help Center", + "faq": "FAQ", + "waitingList": "Waiting List", + "pricingExperience": "Pricing Experience", + "contactUs": "Contact Us", + "legal": "Legal", + "privacyPolicy": "Privacy Policy", + "termsAndConditions": "Terms and Conditions" + }, + "social": { + "facebook": "Facebook", + "instagram": "Instagram", + "linkedin": "LinkedIn", + "youtube": "YouTube" + }, + "footerBottom": { + "privacyPolicy": "Privacy Policy", + "termsOfUse": "Terms of Use", + "copyright": "2024 All Rights Reserved" + } } } \ No newline at end of file diff --git a/messages/es.json b/messages/es.json index 41e6e69ca..1d45fd409 100644 --- a/messages/es.json +++ b/messages/es.json @@ -1,4 +1,13 @@ { + "navbar": { + "login": "Iniciar sesión", + "register": "Comenzar" + }, + "navLinks": { + "home": "Inicio", + "pricing": "Precios", + "careers": "Carreras" + }, "HomePage": { "title": "¡Hola, mundo!" }, @@ -22,5 +31,56 @@ "scalableDescription": "Nuestro boilerplate está diseñado para crecer con tu producto. Añade fácilmente nuevas características y funcionalidades según sea necesario.", "easyTitle": "Personalización Fácil", "easyDescription": "Personaliza la experiencia según tus necesidades y preferencias específicas para obtener resultados óptimos." + }, + "testimonials": { + "title": "Testimonios de Clientes", + "description": "No te fíes solo de nuestra palabra: descubre lo que los usuarios reales de nuestro producto tienen que decir sobre su experiencia.", + "content": "He estado usando este servicio de alojamiento web durante más de un año y estoy realmente impresionado con el tiempo de actividad y el soporte. El sitio web nunca ha caído y el servicio al cliente siempre es rápido para ayudar con cualquier problema que tenga. ¡Altamente recomendado!" + }, + "perfectFit": { + "title": "Encuentra la Solución Perfecta", + "description": "Elige el plan de plantilla que mejor se adapte a las necesidades y presupuesto de tu proyecto. Todos los planes incluyen acceso a nuestra biblioteca completa de secciones preconstruidas y personalización mediante arrastrar y soltar.", + "cta": "Consulta Nuestro Plan de Precios" + }, + "footer": { + "boilerplate": "Plantilla", + "address": "Detalles del logo y dirección", + "newsletterSignUp": "Suscríbete al Boletín", + "subscribe": "Suscribirse", + "navigation": "Navegación", + "support": "Soporte", + "legal": "Legal", + "followUs": "Síguenos", + "privacyPolicy": "Política de Privacidad", + "termsOfUse": "Términos de Uso", + "enterYourEmail": "Introduce tu correo electrónico", + "links": { + "navigation": "Navegación", + "home": "Inicio", + "aboutUs": "Sobre Nosotros", + "career": "Carrera", + "features": "Características", + "blog": "Blog", + "support": "Soporte", + "helpCenter": "Centro de Ayuda", + "faq": "FAQ", + "waitingList": "Lista de Espera", + "pricingExperience": "Experiencia de Precios", + "contactUs": "Contáctanos", + "legal": "Legal", + "privacyPolicy": "Política de Privacidad", + "termsAndConditions": "Términos y Condiciones" + }, + "social": { + "facebook": "Facebook", + "instagram": "Instagram", + "linkedin": "LinkedIn", + "youtube": "YouTube" + }, + "footerBottom": { + "privacyPolicy": "Política de Privacidad", + "termsOfUse": "Términos de Uso", + "copyright": "2024 Todos los Derechos Reservados" + } } } \ No newline at end of file diff --git a/messages/fr.json b/messages/fr.json index 099f33b3d..690a448bb 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -1,4 +1,13 @@ { + "navbar": { + "login": "Se connecter", + "register": "Commencer" + }, + "navLinks": { + "home": "Accueil", + "pricing": "Tarification", + "careers": "Carrières" + }, "HomePage": { "title": "Bonjour le monde !" }, @@ -22,5 +31,56 @@ "scalableDescription": "Notre modèle est conçu pour évoluer avec votre produit. Ajoutez facilement de nouvelles fonctionnalités selon vos besoins.", "easyTitle": "Personnalisation Facile", "easyDescription": "Adaptez l'expérience à vos besoins et préférences spécifiques pour des résultats maximaux." + }, + "testimonials": { + "title": "Témoignages de Clients", + "description": "Ne vous fiez pas seulement à notre parole : découvrez ce que les utilisateurs réels de notre produit ont à dire sur leur expérience.", + "content": "J'utilise ce service d'hébergement web depuis plus d'un an et je suis vraiment impressionné par le temps de disponibilité et le support. Le site web n'est jamais tombé et le service client est toujours rapide pour aider avec les problèmes que j'ai. Je recommande vivement !" + }, + "perfectFit": { + "title": "Trouvez la Solution Parfaite", + "description": "Choisissez le plan de modèle qui correspond le mieux aux besoins et au budget de votre projet. Tous les plans incluent l'accès à notre bibliothèque complète de sections pré-construites et à la personnalisation par glisser-déposer.", + "cta": "Voir Notre Plan Tarifaire" + }, + "footer": { + "boilerplate": "Gabarit", + "address": "Détails du logo et adresse", + "newsletterSignUp": "Inscrivez-vous à la Newsletter", + "subscribe": "S'abonner", + "navigation": "Navigation", + "support": "Support", + "legal": "Légal", + "followUs": "Suivez-nous", + "privacyPolicy": "Politique de Confidentialité", + "termsOfUse": "Conditions d'Utilisation", + "enterYourEmail": "Entrez votre e-mail", + "links": { + "navigation": "Navigation", + "home": "Accueil", + "aboutUs": "À Propos de Nous", + "career": "Carrière", + "features": "Fonctionnalités", + "blog": "Blog", + "support": "Support", + "helpCenter": "Centre d'Aide", + "faq": "FAQ", + "waitingList": "Liste d'Attente", + "pricingExperience": "Expérience Tarifaire", + "contactUs": "Contactez-nous", + "legal": "Légal", + "privacyPolicy": "Politique de Confidentialité", + "termsAndConditions": "Conditions Générales" + }, + "social": { + "facebook": "Facebook", + "instagram": "Instagram", + "linkedin": "LinkedIn", + "youtube": "YouTube" + }, + "footerBottom": { + "privacyPolicy": "Politique de Confidentialité", + "termsOfUse": "Conditions d'Utilisation", + "copyright": "2024 Tous Droits Réservés" + } } } \ No newline at end of file diff --git a/src/components/layouts/footer/footer.test.tsx b/src/components/layouts/footer/footer.test.tsx index 5edf885ce..4fa8c349b 100644 --- a/src/components/layouts/footer/footer.test.tsx +++ b/src/components/layouts/footer/footer.test.tsx @@ -1,12 +1,12 @@ import Footer from "."; -import { render } from "~/test/utils"; +import { renderWithIntl } from "~/test/utils"; describe("page tests", () => { it("footer renders", () => { expect.assertions(1); - const view = render(