From 64d869ea13ec7ad8cb9d0959c7bb3002a4344d79 Mon Sep 17 00:00:00 2001 From: Carlos Jorge Rodriguez Date: Mon, 8 Jan 2024 20:33:33 -0500 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20Add=20internationalization?= =?UTF-8?q?=20to=20layout=20component?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/App.astro | 2 +- src/i18n/en.json | 5 ++++- src/i18n/es.json | 5 ++++- src/layouts/Layout.astro | 43 +++++++++++++--------------------------- 4 files changed, 23 insertions(+), 32 deletions(-) diff --git a/src/components/App.astro b/src/components/App.astro index 4fbafd0..8476ce2 100644 --- a/src/components/App.astro +++ b/src/components/App.astro @@ -27,7 +27,7 @@ const i18n = getI18N({ currentLocale }); }); - +
diff --git a/src/i18n/en.json b/src/i18n/en.json index 368d916..771ac15 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -1,5 +1,8 @@ { - "SEO_TITLE": "", + "SEO_LANG": "en", + "SEO_LOCALE": "en_US", + "SEO_TITLE": "Carlos Jorge's personal portfolio website", + "SEO_DESCRIPTION": "Carlos Jorge's personal portfolio website. I show my most important github projects. The main goals of these projects is having fun and learn new technologies, good practices and try to make real creative ideas", "INTRO_TITLE": "Hi, I am", "INTRO_TITLE_AFTER_BR1": "Carlos Jorge,", "INTRO_TITLE_AFTER_BR2": "Web developer!", diff --git a/src/i18n/es.json b/src/i18n/es.json index b62d799..8da9452 100644 --- a/src/i18n/es.json +++ b/src/i18n/es.json @@ -1,5 +1,8 @@ { - "SEO_TITLE": "", + "SEO_LANG": "es", + "SEO_LOCALE": "es-ES", + "SEO_TITLE": "Portafolio personal de Carlos Jorge", + "SEO_DESCRIPTION": "Portafolio personal de Carlos Jorge. Enseño mis proyectos más importantes de github. Mi principal meta con estos proyectos es divertirme programando y aprender nuevas tecnologías, buenas prácticas y tratar de llevar a cabo ideas creativas", "INTRO_TITLE": "Hola, Soy", "INTRO_TITLE_AFTER_BR1": "Carlos Jorge,", "INTRO_TITLE_AFTER_BR2": "Un desarrollador Web!", diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 0b74d08..03ce1d6 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -2,54 +2,39 @@ import '../styles/styles.css'; export interface Props { - title: string; + SEO_LANG: string; + SEO_LOCALE: string; + SEO_TITLE: string; + SEO_DESCRIPTION: string; } -const { title } = Astro.props; +const { SEO_LANG, SEO_LOCALE, SEO_TITLE, SEO_DESCRIPTION } = Astro.props; --- - + - + - + - - - + + + - - + + - {title} + {SEO_TITLE}