From 9264ecf6dd3602364596549567eac2abfd22c651 Mon Sep 17 00:00:00 2001 From: zhengqi zhang <770166635@qq.com> Date: Thu, 23 Nov 2023 15:04:39 +0800 Subject: [PATCH 01/14] Update language picker --- src/components/Header/Header.astro | 2 +- .../LanguageSelector/LanguageSelector.astro | 157 +++++++++++------- 2 files changed, 102 insertions(+), 57 deletions(-) diff --git a/src/components/Header/Header.astro b/src/components/Header/Header.astro index 430a70354..78080600c 100644 --- a/src/components/Header/Header.astro +++ b/src/components/Header/Header.astro @@ -77,7 +77,7 @@ const section = frontmatter?.section ?? "" ) } - + - - { - supportedLanguages.map((supportedLanguage) => { - let value = localizePath(pathname, supportedLanguage) - const flag = showFlag ? localeEmoji(supportedLanguage) + " " : "" - let nativeName = "" - if (languageMapping && languageMapping.hasOwnProperty(supportedLanguage)) { - nativeName = languageMapping[supportedLanguage] - } else { - nativeName = ISO6991.getNativeName(supportedLanguage) - } +const getLabel = (language) => { + const flag = showFlag ? localeEmoji(language) + " " : "" + let nativeName = "" + if (languageMapping && languageMapping.hasOwnProperty(language)) { + nativeName = languageMapping[language] + } else { + nativeName = ISO6991.getNativeName(language) + } - const label = flag + nativeName + return flag + nativeName +} +--- - return ( - - {label} - - ) - }) - } - + + + + + + {getLabel(supportedLanguages[0])} + + + + { + supportedLanguages.map((supportedLanguage, idx) => { + let value = localizePath(pathname, supportedLanguage) + const label = getLabel(supportedLanguage) + + return ( + + {idx === 0 ? ( + + + + + ) : ( + + + + )} + {label} + + ) + }) + } + + From e4b9f05d7689639be413d0c83005243b035247d9 Mon Sep 17 00:00:00 2001 From: zhengqi zhang <770166635@qq.com> Date: Tue, 26 Dec 2023 11:17:26 +0800 Subject: [PATCH 02/14] =?UTF-8?q?Add=20homepage=20for=20Espa=C3=B1ol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astro-i18next.config.ts | 2 +- .../LanguageSelector/LanguageSelector.astro | 18 +-- src/pages/es/home/ConnectUs.astro | 152 ++++++++++++++++++ src/pages/es/home/Navigate.astro | 63 ++++++++ src/pages/es/home/QuickStart.astro | 111 +++++++++++++ src/pages/es/home/index.astro | 61 +++++++ src/pages/es/index.astro | 2 +- src/pages/zh/home/ConnectUs.astro | 152 ++++++++++++++++++ src/pages/zh/home/Navigate.astro | 63 ++++++++ src/pages/zh/home/QuickStart.astro | 111 +++++++++++++ src/pages/zh/home/index.astro | 61 +++++++ 11 files changed, 784 insertions(+), 12 deletions(-) create mode 100644 src/pages/es/home/ConnectUs.astro create mode 100644 src/pages/es/home/Navigate.astro create mode 100644 src/pages/es/home/QuickStart.astro create mode 100644 src/pages/es/home/index.astro create mode 100644 src/pages/zh/home/ConnectUs.astro create mode 100644 src/pages/zh/home/Navigate.astro create mode 100644 src/pages/zh/home/QuickStart.astro create mode 100644 src/pages/zh/home/index.astro diff --git a/astro-i18next.config.ts b/astro-i18next.config.ts index 2b3e6b322..a118d1132 100644 --- a/astro-i18next.config.ts +++ b/astro-i18next.config.ts @@ -2,6 +2,6 @@ export default { defaultLocale: "en", showDefaultLocale: true, - locales: ["en", "zh", "es"], + locales: ["en", "es"], load: ["server", "client"], } diff --git a/src/components/Header/LanguageSelector/LanguageSelector.astro b/src/components/Header/LanguageSelector/LanguageSelector.astro index b50e313fe..c34f94314 100644 --- a/src/components/Header/LanguageSelector/LanguageSelector.astro +++ b/src/components/Header/LanguageSelector/LanguageSelector.astro @@ -9,7 +9,7 @@ const supportedLanguages = i18next.languages const { pathname } = Astro.url -const { showFlag = false, languageMapping, ...attributes } = Astro.props +const { showFlag = false, languageMapping } = Astro.props const { dark } = Astro.props const getLabel = (language) => { @@ -67,10 +67,6 @@ const getLabel = (language) => { position: relative; } - .language-selector.dark { - --black-100: #fff; - --orange-500: #fff; - } .language-selector:hover .options-modal { display: flex; } @@ -84,14 +80,15 @@ const getLabel = (language) => { .current-language { width: 100px; border-radius: 5px; - border: 1px solid var(--black-100); + border-width: 1px; + border-style: solid; display: flex; height: 36px; padding: 0 12px; justify-content: space-between; align-items: center; cursor: pointer; - color: var(--black-100); + @apply text-black dark:text-white border-black dark:border-white; } .options-list { @@ -101,7 +98,8 @@ const getLabel = (language) => { letter-spacing: 0.14px; padding: 4px 12px; border-radius: 5px; - border: 1px solid var(--black-100); + border-width: 1px; + border-style: solid; overflow: hidden; cursor: pointer; transition: height 0.3s ease; @@ -109,7 +107,7 @@ const getLabel = (language) => { justify-content: center; align-items: center; flex-direction: column; - background: var(--white-100); + @apply bg-pure-white dark:bg-black border-black dark:border-white; } .options-list li { @@ -119,7 +117,7 @@ const getLabel = (language) => { align-items: center; flex-direction: row; padding: 8px 0px; - color: var(--black-100); + @apply text-black dark:text-white; } .options-list li svg, diff --git a/src/pages/es/home/ConnectUs.astro b/src/pages/es/home/ConnectUs.astro new file mode 100644 index 000000000..7b0f46139 --- /dev/null +++ b/src/pages/es/home/ConnectUs.astro @@ -0,0 +1,152 @@ +--- +import SectionHeader from "~/components/SectionHeader/index.astro" +import LinkArrowSvg from "~/assets/svgs/home/home-link-arrow.svg?raw" +import DiscordSvg from "~/assets/svgs/home/Discord.svg?raw" +import ForumSvg from "~/assets/svgs/home/Forum.svg?raw" +import ContributeSvg from "~/assets/svgs/home/Contribute.svg?raw" + +const mediaList = [ + { + icon: DiscordSvg, + name: "Join our Discord", + content: "Connect with other Scroll developers and users.", + link: "https://discord.gg/scroll", + }, + { + icon: ForumSvg, + name: "Community Forum", + content: "Discuss and propose changes to Scroll’s core protocols.", + link: "http://community.scroll.io/", + }, + { + icon: ContributeSvg, + name: "Contribute to Scroll", + content: "Build with other developers.", + link: "https://github.com/scroll-tech/contribute-to-scroll", + }, +] +--- + + + + + { + mediaList.map(({ icon, name, content, link }) => ( + + + + + + + + + + + {name} + {content} + + )) + } + + + + diff --git a/src/pages/es/home/Navigate.astro b/src/pages/es/home/Navigate.astro new file mode 100644 index 000000000..765074a6e --- /dev/null +++ b/src/pages/es/home/Navigate.astro @@ -0,0 +1,63 @@ +--- +import NavCard from "~/components/NavCard.astro" +import StartSvg from "~/assets/svgs/home/home-start.svg?raw" +import DevelopSvg from "~/assets/svgs/home/home-develop.svg?raw" +import TechnologySvg from "~/assets/svgs/home/home-technology.svg?raw" +import LearnSvg from "~/assets/svgs/home/home-learn.svg?raw" +import SectionHeader from "~/components/SectionHeader/index.astro" + +const navList = [ + { + icon: StartSvg, + name: "Getting started", + content: "Bridge into Scroll and explore our dApp Ecosystem.", + link: "/en/getting-started/overview", + }, + { + icon: DevelopSvg, + name: "Developers", + content: "Dive into Scroll’s developer documentation.", + link: "/en/developers", + }, + { + icon: TechnologySvg, + name: "Technology", + content: "An overview of Scroll’s zkEVM Architecture.", + link: "/en/technology", + }, + { + icon: LearnSvg, + name: "Learn", + content: "An introduction to the world of ZK and Scalability.", + link: "/en/learn", + }, +] +--- + + + + + {navList.map(({ icon, name, content, link }) => )} + + + + diff --git a/src/pages/es/home/QuickStart.astro b/src/pages/es/home/QuickStart.astro new file mode 100644 index 000000000..5c13bf51e --- /dev/null +++ b/src/pages/es/home/QuickStart.astro @@ -0,0 +1,111 @@ +--- +import SectionHeader from "~/components/SectionHeader/index.astro" +import EtherSvg from "~/assets/svgs/home/EthersJS.svg?raw" + +const toolList = [ + { icon: "/svgs/Hardhat.svg", name: "Hardhat", link: "https://hardhat.org/", quickstartAnchor: "hardhat" }, + { icon: "/svgs/Foundry.svg", name: "Foundry", link: "https://getfoundry.sh/", quickstartAnchor: "foundry" }, + { icon: "/svgs/Remix.svg", name: "Remix", link: "https://remix-project.org/", quickstartAnchor: "remix-web-ide" }, + { + icon: EtherSvg, + color: "text-[#2A4B78] dark:text-white", + name: "EthersJS", + link: "https://ethers.org/", + quickstartAnchor: "ethersjs", + }, + { icon: "/svgs/Brownie.svg", name: "Brownie", link: "https://github.com/eth-brownie", quickstartAnchor: "brownie" }, + { icon: "/svgs/Truffle.svg", name: "Truffle", link: "https://trufflesuite.com/", quickstartAnchor: "truffle" }, +] +--- + + + + + { + toolList.map(({ icon, name, quickstartAnchor, color }) => ( + + + {color ? : } + + {name} + + )) + } + + + + diff --git a/src/pages/es/home/index.astro b/src/pages/es/home/index.astro new file mode 100644 index 000000000..a9a587cef --- /dev/null +++ b/src/pages/es/home/index.astro @@ -0,0 +1,61 @@ +--- +import { changeLanguage } from "i18next" +import HomeLayout from "../../../layouts/HomeLayout.astro" +import Search from "../../../components/HomeSearch" +import QuickStart from "./QuickStart.astro" +import Navigate from "./Navigate.astro" +import ConnectUs from "./ConnectUs.astro" + +changeLanguage("es") +--- + + + + + Welcome to Scroll Documentation + + + + + + + + + + + + + diff --git a/src/pages/es/index.astro b/src/pages/es/index.astro index bb9bbe32f..19a6738a1 100644 --- a/src/pages/es/index.astro +++ b/src/pages/es/index.astro @@ -3,4 +3,4 @@ import i18next, { changeLanguage } from "i18next" changeLanguage("es") --- - + diff --git a/src/pages/zh/home/ConnectUs.astro b/src/pages/zh/home/ConnectUs.astro new file mode 100644 index 000000000..7b0f46139 --- /dev/null +++ b/src/pages/zh/home/ConnectUs.astro @@ -0,0 +1,152 @@ +--- +import SectionHeader from "~/components/SectionHeader/index.astro" +import LinkArrowSvg from "~/assets/svgs/home/home-link-arrow.svg?raw" +import DiscordSvg from "~/assets/svgs/home/Discord.svg?raw" +import ForumSvg from "~/assets/svgs/home/Forum.svg?raw" +import ContributeSvg from "~/assets/svgs/home/Contribute.svg?raw" + +const mediaList = [ + { + icon: DiscordSvg, + name: "Join our Discord", + content: "Connect with other Scroll developers and users.", + link: "https://discord.gg/scroll", + }, + { + icon: ForumSvg, + name: "Community Forum", + content: "Discuss and propose changes to Scroll’s core protocols.", + link: "http://community.scroll.io/", + }, + { + icon: ContributeSvg, + name: "Contribute to Scroll", + content: "Build with other developers.", + link: "https://github.com/scroll-tech/contribute-to-scroll", + }, +] +--- + + + + + { + mediaList.map(({ icon, name, content, link }) => ( + + + + + + + + + + + {name} + {content} + + )) + } + + + + diff --git a/src/pages/zh/home/Navigate.astro b/src/pages/zh/home/Navigate.astro new file mode 100644 index 000000000..765074a6e --- /dev/null +++ b/src/pages/zh/home/Navigate.astro @@ -0,0 +1,63 @@ +--- +import NavCard from "~/components/NavCard.astro" +import StartSvg from "~/assets/svgs/home/home-start.svg?raw" +import DevelopSvg from "~/assets/svgs/home/home-develop.svg?raw" +import TechnologySvg from "~/assets/svgs/home/home-technology.svg?raw" +import LearnSvg from "~/assets/svgs/home/home-learn.svg?raw" +import SectionHeader from "~/components/SectionHeader/index.astro" + +const navList = [ + { + icon: StartSvg, + name: "Getting started", + content: "Bridge into Scroll and explore our dApp Ecosystem.", + link: "/en/getting-started/overview", + }, + { + icon: DevelopSvg, + name: "Developers", + content: "Dive into Scroll’s developer documentation.", + link: "/en/developers", + }, + { + icon: TechnologySvg, + name: "Technology", + content: "An overview of Scroll’s zkEVM Architecture.", + link: "/en/technology", + }, + { + icon: LearnSvg, + name: "Learn", + content: "An introduction to the world of ZK and Scalability.", + link: "/en/learn", + }, +] +--- + + + + + {navList.map(({ icon, name, content, link }) => )} + + + + diff --git a/src/pages/zh/home/QuickStart.astro b/src/pages/zh/home/QuickStart.astro new file mode 100644 index 000000000..5c13bf51e --- /dev/null +++ b/src/pages/zh/home/QuickStart.astro @@ -0,0 +1,111 @@ +--- +import SectionHeader from "~/components/SectionHeader/index.astro" +import EtherSvg from "~/assets/svgs/home/EthersJS.svg?raw" + +const toolList = [ + { icon: "/svgs/Hardhat.svg", name: "Hardhat", link: "https://hardhat.org/", quickstartAnchor: "hardhat" }, + { icon: "/svgs/Foundry.svg", name: "Foundry", link: "https://getfoundry.sh/", quickstartAnchor: "foundry" }, + { icon: "/svgs/Remix.svg", name: "Remix", link: "https://remix-project.org/", quickstartAnchor: "remix-web-ide" }, + { + icon: EtherSvg, + color: "text-[#2A4B78] dark:text-white", + name: "EthersJS", + link: "https://ethers.org/", + quickstartAnchor: "ethersjs", + }, + { icon: "/svgs/Brownie.svg", name: "Brownie", link: "https://github.com/eth-brownie", quickstartAnchor: "brownie" }, + { icon: "/svgs/Truffle.svg", name: "Truffle", link: "https://trufflesuite.com/", quickstartAnchor: "truffle" }, +] +--- + + + + + { + toolList.map(({ icon, name, quickstartAnchor, color }) => ( + + + {color ? : } + + {name} + + )) + } + + + + diff --git a/src/pages/zh/home/index.astro b/src/pages/zh/home/index.astro new file mode 100644 index 000000000..d0bdb9582 --- /dev/null +++ b/src/pages/zh/home/index.astro @@ -0,0 +1,61 @@ +--- +import { changeLanguage } from "i18next" +import HomeLayout from "../../../layouts/HomeLayout.astro" +import Search from "../../../components/HomeSearch" +import QuickStart from "./QuickStart.astro" +import Navigate from "./Navigate.astro" +import ConnectUs from "./ConnectUs.astro" + +changeLanguage("zh") +--- + + + + + Welcome to Scroll Documentation + + + + + + + + + + + + + From 05dab1292043ddbae31b0c6ac172f27176e51535 Mon Sep 17 00:00:00 2001 From: turupawn Date: Mon, 15 Jan 2024 14:35:24 -0600 Subject: [PATCH 03/14] landing page and subscribe footer translated to spanish --- public/locales/en/translation.json | 9 ++++--- public/locales/es/translation.json | 9 ++++--- .../Footer/Subscribe/EmailInput.tsx | 3 ++- src/components/Footer/Subscribe/Subscribe.tsx | 11 ++++---- src/pages/es/home/ConnectUs.astro | 16 ++++++------ src/pages/es/home/Navigate.astro | 26 +++++++++---------- src/pages/es/home/QuickStart.astro | 4 +-- src/pages/es/home/index.astro | 2 +- 8 files changed, 44 insertions(+), 36 deletions(-) diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index ad8a263e6..4c00b7bea 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -48,9 +48,12 @@ } }, "NewsletterCTA": { - "title": "Stay updated on the latest Scroll news", - "placeholder": "Enter your email address", - "buttonText": "Sign up" + "title": "Stay up-to-date on the latest Scroll Developer news", + "text": "Roadmap updates, virtual and live events, ecosystem opportunities and more", + "placeholder": "your email address here", + "thankYouForSubscribing": "Thank you for subscribing!", + "correctEmail": "Please use a correct email address.", + "pleaseInsertEmail": "Please insert your email." } }, "sidebar": { diff --git a/public/locales/es/translation.json b/public/locales/es/translation.json index e31da1785..6ddbb0558 100644 --- a/public/locales/es/translation.json +++ b/public/locales/es/translation.json @@ -48,9 +48,12 @@ } }, "NewsletterCTA": { - "title": "Stay updated on the latest Scroll news", - "placeholder": "Enter your email address", - "buttonText": "Sign up" + "title": "Mantente actualizado con las más recientes noticias sobre el Desarrollo de Scroll", + "text": "Roadmap, actualizaciones, eventos virtuales y presenciales, oportunidades en el ecosistema y más", + "placeholder": "tu correo electrónico aquí", + "thankYouForSubscribing": "¡Gracias por suscribirte!", + "correctEmail": "Porfavor usa un correo electrónico válido.", + "pleaseInsertEmail": "Porfavor ingresa tu correo electrónico." } }, "sidebar": { diff --git a/src/components/Footer/Subscribe/EmailInput.tsx b/src/components/Footer/Subscribe/EmailInput.tsx index 8905a6049..b177f6914 100644 --- a/src/components/Footer/Subscribe/EmailInput.tsx +++ b/src/components/Footer/Subscribe/EmailInput.tsx @@ -2,6 +2,7 @@ import React from "react" import styles from "./EmailInput.module.css" import ArrowSvg from "~/assets/svgs/footer/arrow-right.svg?react" import { clsx } from "~/lib" +import { t } from "i18next" const EmailInput = (props) => { const { end, onClick, onEnter, ...restProps } = props @@ -23,7 +24,7 @@ const EmailInput = (props) => { - Thank you for subscribing! + { t("landing.NewsletterCTA.thankYouForSubscribing") } { if (!email) { - setCustomMessage("Please insert your email.") + setCustomMessage(t("landing.NewsletterCTA.pleaseInsertEmail")) } else if (!emailValid) { - setCustomMessage("Please use a correct email address.") + setCustomMessage(t("landing.NewsletterCTA.correctEmail")) } else { subscribe({ EMAIL: email }) setEmail("") @@ -47,9 +48,9 @@ export default function Subscribe() { - Stay up-to-date on the latest Scroll Developer news + { t("landing.NewsletterCTA.title") } - Roadmap updates, virtual and live events, ecosystem opportunities and more + { t("landing.NewsletterCTA.text") } handleSubmit(subscribe)} onEnter={() => handleSubmit(subscribe)} - placeholder="your email address here" + placeholder= { t("landing.NewsletterCTA.placeholder") } end={status === "success"} /> {customMessage && {customMessage}} diff --git a/src/pages/es/home/ConnectUs.astro b/src/pages/es/home/ConnectUs.astro index 7b0f46139..464415e64 100644 --- a/src/pages/es/home/ConnectUs.astro +++ b/src/pages/es/home/ConnectUs.astro @@ -8,20 +8,20 @@ import ContributeSvg from "~/assets/svgs/home/Contribute.svg?raw" const mediaList = [ { icon: DiscordSvg, - name: "Join our Discord", - content: "Connect with other Scroll developers and users.", + name: "Únete a nuestro Discord", + content: "Conecta con otros desarradores y usuarios de Scroll.", link: "https://discord.gg/scroll", }, { icon: ForumSvg, - name: "Community Forum", - content: "Discuss and propose changes to Scroll’s core protocols.", + name: "Foro de la Comunidad", + content: "Conversa y propón cambios a los protocolos fundamentales de Scroll.", link: "http://community.scroll.io/", }, { icon: ContributeSvg, - name: "Contribute to Scroll", - content: "Build with other developers.", + name: "Contribuye a Scroll", + content: "Construye con otros desarrolladores.", link: "https://github.com/scroll-tech/contribute-to-scroll", }, ] @@ -29,8 +29,8 @@ const mediaList = [ { diff --git a/src/pages/es/home/Navigate.astro b/src/pages/es/home/Navigate.astro index 765074a6e..9085b689a 100644 --- a/src/pages/es/home/Navigate.astro +++ b/src/pages/es/home/Navigate.astro @@ -9,33 +9,33 @@ import SectionHeader from "~/components/SectionHeader/index.astro" const navList = [ { icon: StartSvg, - name: "Getting started", - content: "Bridge into Scroll and explore our dApp Ecosystem.", - link: "/en/getting-started/overview", + name: "¿Cómo empezar?", + content: "Migra hacia Scroll usando el Bridge y explora el Ecosistema de dApps.", + link: "/es/getting-started/overview", }, { icon: DevelopSvg, - name: "Developers", - content: "Dive into Scroll’s developer documentation.", - link: "/en/developers", + name: "Desarrolladores", + content: "Sumérgete en la documentación para desarrolladores de Scroll.", + link: "/es/developers", }, { icon: TechnologySvg, - name: "Technology", - content: "An overview of Scroll’s zkEVM Architecture.", - link: "/en/technology", + name: "Tecnología", + content: "Un vistazo general a la arquitectura de la zkEVM de Scroll.", + link: "/es/technology", }, { icon: LearnSvg, - name: "Learn", - content: "An introduction to the world of ZK and Scalability.", - link: "/en/learn", + name: "Aprende", + content: "Una introducción al mundo de ZK y de la escalabilidad.", + link: "/es/learn", }, ] --- - + {navList.map(({ icon, name, content, link }) => )} diff --git a/src/pages/es/home/QuickStart.astro b/src/pages/es/home/QuickStart.astro index 5c13bf51e..77f311698 100644 --- a/src/pages/es/home/QuickStart.astro +++ b/src/pages/es/home/QuickStart.astro @@ -20,8 +20,8 @@ const toolList = [ { diff --git a/src/pages/es/home/index.astro b/src/pages/es/home/index.astro index a9a587cef..9fa12781a 100644 --- a/src/pages/es/home/index.astro +++ b/src/pages/es/home/index.astro @@ -12,7 +12,7 @@ changeLanguage("es") - Welcome to Scroll Documentation + Bienvenido a la Documentación de Scroll From 1521c0cb7b3269e1a1fdb236d0c25e73b9c1c1d2 Mon Sep 17 00:00:00 2001 From: Ahmed Castro Date: Mon, 15 Jan 2024 14:44:59 -0600 Subject: [PATCH 04/14] landing page and subscribe footer translated to spanish (#154) --- public/locales/en/translation.json | 9 ++++--- public/locales/es/translation.json | 9 ++++--- .../Footer/Subscribe/EmailInput.tsx | 3 ++- src/components/Footer/Subscribe/Subscribe.tsx | 11 ++++---- src/pages/es/home/ConnectUs.astro | 16 ++++++------ src/pages/es/home/Navigate.astro | 26 +++++++++---------- src/pages/es/home/QuickStart.astro | 4 +-- src/pages/es/home/index.astro | 2 +- 8 files changed, 44 insertions(+), 36 deletions(-) diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index ad8a263e6..4c00b7bea 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -48,9 +48,12 @@ } }, "NewsletterCTA": { - "title": "Stay updated on the latest Scroll news", - "placeholder": "Enter your email address", - "buttonText": "Sign up" + "title": "Stay up-to-date on the latest Scroll Developer news", + "text": "Roadmap updates, virtual and live events, ecosystem opportunities and more", + "placeholder": "your email address here", + "thankYouForSubscribing": "Thank you for subscribing!", + "correctEmail": "Please use a correct email address.", + "pleaseInsertEmail": "Please insert your email." } }, "sidebar": { diff --git a/public/locales/es/translation.json b/public/locales/es/translation.json index e31da1785..6ddbb0558 100644 --- a/public/locales/es/translation.json +++ b/public/locales/es/translation.json @@ -48,9 +48,12 @@ } }, "NewsletterCTA": { - "title": "Stay updated on the latest Scroll news", - "placeholder": "Enter your email address", - "buttonText": "Sign up" + "title": "Mantente actualizado con las más recientes noticias sobre el Desarrollo de Scroll", + "text": "Roadmap, actualizaciones, eventos virtuales y presenciales, oportunidades en el ecosistema y más", + "placeholder": "tu correo electrónico aquí", + "thankYouForSubscribing": "¡Gracias por suscribirte!", + "correctEmail": "Porfavor usa un correo electrónico válido.", + "pleaseInsertEmail": "Porfavor ingresa tu correo electrónico." } }, "sidebar": { diff --git a/src/components/Footer/Subscribe/EmailInput.tsx b/src/components/Footer/Subscribe/EmailInput.tsx index 8905a6049..b177f6914 100644 --- a/src/components/Footer/Subscribe/EmailInput.tsx +++ b/src/components/Footer/Subscribe/EmailInput.tsx @@ -2,6 +2,7 @@ import React from "react" import styles from "./EmailInput.module.css" import ArrowSvg from "~/assets/svgs/footer/arrow-right.svg?react" import { clsx } from "~/lib" +import { t } from "i18next" const EmailInput = (props) => { const { end, onClick, onEnter, ...restProps } = props @@ -23,7 +24,7 @@ const EmailInput = (props) => { - Thank you for subscribing! + { t("landing.NewsletterCTA.thankYouForSubscribing") } { if (!email) { - setCustomMessage("Please insert your email.") + setCustomMessage(t("landing.NewsletterCTA.pleaseInsertEmail")) } else if (!emailValid) { - setCustomMessage("Please use a correct email address.") + setCustomMessage(t("landing.NewsletterCTA.correctEmail")) } else { subscribe({ EMAIL: email }) setEmail("") @@ -47,9 +48,9 @@ export default function Subscribe() { - Stay up-to-date on the latest Scroll Developer news + { t("landing.NewsletterCTA.title") } - Roadmap updates, virtual and live events, ecosystem opportunities and more + { t("landing.NewsletterCTA.text") } handleSubmit(subscribe)} onEnter={() => handleSubmit(subscribe)} - placeholder="your email address here" + placeholder= { t("landing.NewsletterCTA.placeholder") } end={status === "success"} /> {customMessage && {customMessage}} diff --git a/src/pages/es/home/ConnectUs.astro b/src/pages/es/home/ConnectUs.astro index 7b0f46139..464415e64 100644 --- a/src/pages/es/home/ConnectUs.astro +++ b/src/pages/es/home/ConnectUs.astro @@ -8,20 +8,20 @@ import ContributeSvg from "~/assets/svgs/home/Contribute.svg?raw" const mediaList = [ { icon: DiscordSvg, - name: "Join our Discord", - content: "Connect with other Scroll developers and users.", + name: "Únete a nuestro Discord", + content: "Conecta con otros desarradores y usuarios de Scroll.", link: "https://discord.gg/scroll", }, { icon: ForumSvg, - name: "Community Forum", - content: "Discuss and propose changes to Scroll’s core protocols.", + name: "Foro de la Comunidad", + content: "Conversa y propón cambios a los protocolos fundamentales de Scroll.", link: "http://community.scroll.io/", }, { icon: ContributeSvg, - name: "Contribute to Scroll", - content: "Build with other developers.", + name: "Contribuye a Scroll", + content: "Construye con otros desarrolladores.", link: "https://github.com/scroll-tech/contribute-to-scroll", }, ] @@ -29,8 +29,8 @@ const mediaList = [ { diff --git a/src/pages/es/home/Navigate.astro b/src/pages/es/home/Navigate.astro index 765074a6e..9085b689a 100644 --- a/src/pages/es/home/Navigate.astro +++ b/src/pages/es/home/Navigate.astro @@ -9,33 +9,33 @@ import SectionHeader from "~/components/SectionHeader/index.astro" const navList = [ { icon: StartSvg, - name: "Getting started", - content: "Bridge into Scroll and explore our dApp Ecosystem.", - link: "/en/getting-started/overview", + name: "¿Cómo empezar?", + content: "Migra hacia Scroll usando el Bridge y explora el Ecosistema de dApps.", + link: "/es/getting-started/overview", }, { icon: DevelopSvg, - name: "Developers", - content: "Dive into Scroll’s developer documentation.", - link: "/en/developers", + name: "Desarrolladores", + content: "Sumérgete en la documentación para desarrolladores de Scroll.", + link: "/es/developers", }, { icon: TechnologySvg, - name: "Technology", - content: "An overview of Scroll’s zkEVM Architecture.", - link: "/en/technology", + name: "Tecnología", + content: "Un vistazo general a la arquitectura de la zkEVM de Scroll.", + link: "/es/technology", }, { icon: LearnSvg, - name: "Learn", - content: "An introduction to the world of ZK and Scalability.", - link: "/en/learn", + name: "Aprende", + content: "Una introducción al mundo de ZK y de la escalabilidad.", + link: "/es/learn", }, ] --- - + {navList.map(({ icon, name, content, link }) => )} diff --git a/src/pages/es/home/QuickStart.astro b/src/pages/es/home/QuickStart.astro index 5c13bf51e..77f311698 100644 --- a/src/pages/es/home/QuickStart.astro +++ b/src/pages/es/home/QuickStart.astro @@ -20,8 +20,8 @@ const toolList = [ { diff --git a/src/pages/es/home/index.astro b/src/pages/es/home/index.astro index a9a587cef..9fa12781a 100644 --- a/src/pages/es/home/index.astro +++ b/src/pages/es/home/index.astro @@ -12,7 +12,7 @@ changeLanguage("es") - Welcome to Scroll Documentation + Bienvenido a la Documentación de Scroll From 748e44d0fa04a7bfaf925162f0f62a4f0603ae74 Mon Sep 17 00:00:00 2001 From: turupawn Date: Mon, 15 Jan 2024 15:06:59 -0600 Subject: [PATCH 05/14] footer translation to spanish part 2 --- public/locales/en/translation.json | 19 +++++++++++++++++++ public/locales/es/translation.json | 19 +++++++++++++++++++ .../Footer/PureFooter/PureFooter.tsx | 7 ++++--- src/components/Footer/helper.tsx | 17 +++++++++-------- 4 files changed, 51 insertions(+), 11 deletions(-) diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index 4c00b7bea..3ae25d7c0 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -155,6 +155,25 @@ "additionalResources": "Additional Resources" } }, + "footer": { + "aboutScroll": { + "title": "About Scroll", + "bugBounty": "Bug Bounty", + "joinUs": "Join Us", + "healthStatus": "Health Status", + "privacyPolicy": "Privacy Policy", + "termsAndConditions": "Terms and Conditions" + }, + "resources": { + "title": "Resources", + "blog": "Blog", + "documentation": "Documentation", + "pressKit": "Press Kit" + }, + "followUs": { + "title": "Follow Us" + } + }, "notTranslated": { "notTranslated": "This page has not been translated yet." } diff --git a/public/locales/es/translation.json b/public/locales/es/translation.json index 6ddbb0558..7ea00d6b6 100644 --- a/public/locales/es/translation.json +++ b/public/locales/es/translation.json @@ -155,6 +155,25 @@ "additionalResources": "Recursos Adicionales" } }, + "footer": { + "aboutScroll": { + "title": "Acerca de Scroll", + "bugBounty": "Cazarecompensas de bugs", + "joinUs": "Únete a nosotros", + "healthStatus": "Estado de servicios", + "privacyPolicy": "Políticas de privacidad", + "termsAndConditions": "Terminos y condiciones" + }, + "resources": { + "title": "Recursos", + "blog": "Blog", + "documentation": "Documentación", + "pressKit": "Kit de Prensa" + }, + "followUs": { + "title": "Follow Us" + } + }, "notTranslated": { "notTranslated": "Esta página no ha sido traducida aún." } diff --git a/src/components/Footer/PureFooter/PureFooter.tsx b/src/components/Footer/PureFooter/PureFooter.tsx index ee126d83f..64aa07067 100644 --- a/src/components/Footer/PureFooter/PureFooter.tsx +++ b/src/components/Footer/PureFooter/PureFooter.tsx @@ -1,6 +1,7 @@ import { useState, useEffect } from "preact/hooks" import { aboutList, mediaList, resourceList } from "../helper.tsx" import styles from "./PureFooter.module.css" +import { t } from "i18next" const Footer = () => { return ( @@ -9,7 +10,7 @@ const Footer = () => { - About Scroll + { t("footer.aboutScroll.title") } {aboutList.map((item) => ( @@ -19,7 +20,7 @@ const Footer = () => { - Resources + { t("footer.resources.title") } {resourceList.map((item) => ( @@ -30,7 +31,7 @@ const Footer = () => { - Follow Us + { t("footer.followUs.title") } {mediaList.map((item) => ( diff --git a/src/components/Footer/helper.tsx b/src/components/Footer/helper.tsx index c195d7dac..5914e3033 100644 --- a/src/components/Footer/helper.tsx +++ b/src/components/Footer/helper.tsx @@ -1,4 +1,5 @@ import React from "react" +import { t } from "i18next" const DiscordIcon: React.FC> = (props) => ( @@ -23,38 +24,38 @@ const TwitterIcon: React.FC> = (props) => ( export const aboutList = [ { - name: "Bug Bounty", + name: t("footer.aboutScroll.bugBounty"), href: "https://immunefi.com/bounty/scroll/", }, { - name: "Join Us", + name: t("footer.aboutScroll.joinUs"), href: "https://jobs.lever.co/ScrollFoundation", }, { - name: "Health Status", + name: t("footer.aboutScroll.healthStatus"), href: "https://status.scroll.io/", }, { - name: "Privacy Policy", + name: t("footer.aboutScroll.privacyPolicy"), href: "https://scroll.io/privacy-policy", }, { - name: "Terms and Conditions", + name: t("footer.aboutScroll.termsAndConditions"), href: "https://scroll.io/terms-and-conditions", }, ] export const resourceList = [ { - name: "Blog", + name: t("footer.resources.blog"), href: "https://scroll.io/blog", }, { - name: "Documentation", + name: t("footer.resources.documentation"), href: "https://docs.scroll.io/", }, { - name: "Press Kit", + name: t("footer.resources.pressKit"), href: "https://scrollzkp.notion.site/Scroll-Rebrand-Assets-5bb83465f56f40989c4f772b39ed3a06", }, ] From 50cbc5a79dd29d467fe1e1dc76d2786a6490d4a9 Mon Sep 17 00:00:00 2001 From: Ahmed Castro Date: Mon, 15 Jan 2024 15:11:35 -0600 Subject: [PATCH 06/14] Footer translation to spanish part2 (#155) * landing page and subscribe footer translated to spanish * footer translation to spanish part 2 --- public/locales/en/translation.json | 19 +++++++++++++++++++ public/locales/es/translation.json | 19 +++++++++++++++++++ .../Footer/PureFooter/PureFooter.tsx | 7 ++++--- src/components/Footer/helper.tsx | 17 +++++++++-------- 4 files changed, 51 insertions(+), 11 deletions(-) diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index 4c00b7bea..3ae25d7c0 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -155,6 +155,25 @@ "additionalResources": "Additional Resources" } }, + "footer": { + "aboutScroll": { + "title": "About Scroll", + "bugBounty": "Bug Bounty", + "joinUs": "Join Us", + "healthStatus": "Health Status", + "privacyPolicy": "Privacy Policy", + "termsAndConditions": "Terms and Conditions" + }, + "resources": { + "title": "Resources", + "blog": "Blog", + "documentation": "Documentation", + "pressKit": "Press Kit" + }, + "followUs": { + "title": "Follow Us" + } + }, "notTranslated": { "notTranslated": "This page has not been translated yet." } diff --git a/public/locales/es/translation.json b/public/locales/es/translation.json index 6ddbb0558..7ea00d6b6 100644 --- a/public/locales/es/translation.json +++ b/public/locales/es/translation.json @@ -155,6 +155,25 @@ "additionalResources": "Recursos Adicionales" } }, + "footer": { + "aboutScroll": { + "title": "Acerca de Scroll", + "bugBounty": "Cazarecompensas de bugs", + "joinUs": "Únete a nosotros", + "healthStatus": "Estado de servicios", + "privacyPolicy": "Políticas de privacidad", + "termsAndConditions": "Terminos y condiciones" + }, + "resources": { + "title": "Recursos", + "blog": "Blog", + "documentation": "Documentación", + "pressKit": "Kit de Prensa" + }, + "followUs": { + "title": "Follow Us" + } + }, "notTranslated": { "notTranslated": "Esta página no ha sido traducida aún." } diff --git a/src/components/Footer/PureFooter/PureFooter.tsx b/src/components/Footer/PureFooter/PureFooter.tsx index ee126d83f..64aa07067 100644 --- a/src/components/Footer/PureFooter/PureFooter.tsx +++ b/src/components/Footer/PureFooter/PureFooter.tsx @@ -1,6 +1,7 @@ import { useState, useEffect } from "preact/hooks" import { aboutList, mediaList, resourceList } from "../helper.tsx" import styles from "./PureFooter.module.css" +import { t } from "i18next" const Footer = () => { return ( @@ -9,7 +10,7 @@ const Footer = () => { - About Scroll + { t("footer.aboutScroll.title") } {aboutList.map((item) => ( @@ -19,7 +20,7 @@ const Footer = () => { - Resources + { t("footer.resources.title") } {resourceList.map((item) => ( @@ -30,7 +31,7 @@ const Footer = () => { - Follow Us + { t("footer.followUs.title") } {mediaList.map((item) => ( diff --git a/src/components/Footer/helper.tsx b/src/components/Footer/helper.tsx index c195d7dac..5914e3033 100644 --- a/src/components/Footer/helper.tsx +++ b/src/components/Footer/helper.tsx @@ -1,4 +1,5 @@ import React from "react" +import { t } from "i18next" const DiscordIcon: React.FC> = (props) => ( @@ -23,38 +24,38 @@ const TwitterIcon: React.FC> = (props) => ( export const aboutList = [ { - name: "Bug Bounty", + name: t("footer.aboutScroll.bugBounty"), href: "https://immunefi.com/bounty/scroll/", }, { - name: "Join Us", + name: t("footer.aboutScroll.joinUs"), href: "https://jobs.lever.co/ScrollFoundation", }, { - name: "Health Status", + name: t("footer.aboutScroll.healthStatus"), href: "https://status.scroll.io/", }, { - name: "Privacy Policy", + name: t("footer.aboutScroll.privacyPolicy"), href: "https://scroll.io/privacy-policy", }, { - name: "Terms and Conditions", + name: t("footer.aboutScroll.termsAndConditions"), href: "https://scroll.io/terms-and-conditions", }, ] export const resourceList = [ { - name: "Blog", + name: t("footer.resources.blog"), href: "https://scroll.io/blog", }, { - name: "Documentation", + name: t("footer.resources.documentation"), href: "https://docs.scroll.io/", }, { - name: "Press Kit", + name: t("footer.resources.pressKit"), href: "https://scrollzkp.notion.site/Scroll-Rebrand-Assets-5bb83465f56f40989c4f772b39ed3a06", }, ] From c13d909625477327ba39e3403d16ad4274d14305 Mon Sep 17 00:00:00 2001 From: turupawn Date: Mon, 15 Jan 2024 15:15:58 -0600 Subject: [PATCH 07/14] removed versioning + translated Follow Us --- public/locales/es/translation.json | 2 +- src/components/Footer/PureFooter/PureFooter.tsx | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/public/locales/es/translation.json b/public/locales/es/translation.json index 7ea00d6b6..361f78b8d 100644 --- a/public/locales/es/translation.json +++ b/public/locales/es/translation.json @@ -171,7 +171,7 @@ "pressKit": "Kit de Prensa" }, "followUs": { - "title": "Follow Us" + "title": "Síguenos" } }, "notTranslated": { diff --git a/src/components/Footer/PureFooter/PureFooter.tsx b/src/components/Footer/PureFooter/PureFooter.tsx index 64aa07067..a2374207d 100644 --- a/src/components/Footer/PureFooter/PureFooter.tsx +++ b/src/components/Footer/PureFooter/PureFooter.tsx @@ -40,8 +40,6 @@ const Footer = () => { ))} - - © Version 1.0.0 Scroll Ltd 2023 ) } From 408db9bb1be814b894f79b04d72013ad1bd1cd08 Mon Sep 17 00:00:00 2001 From: Daniel Helm Date: Mon, 15 Jan 2024 15:39:50 -0600 Subject: [PATCH 08/14] fix 404 and newsletter reloads --- src/layouts/HomeLayout.astro | 3 +- src/layouts/LandingLayout.astro | 125 -------------------------------- src/layouts/MainLayout.astro | 4 +- src/pages/404.astro | 21 +++--- src/pages/en/404.astro | 34 --------- src/pages/es/404.astro | 34 --------- src/pages/zh/404.astro | 34 --------- 7 files changed, 13 insertions(+), 242 deletions(-) delete mode 100644 src/layouts/LandingLayout.astro delete mode 100644 src/pages/en/404.astro delete mode 100644 src/pages/es/404.astro delete mode 100644 src/pages/zh/404.astro diff --git a/src/layouts/HomeLayout.astro b/src/layouts/HomeLayout.astro index 1c489978a..19c58e6c8 100644 --- a/src/layouts/HomeLayout.astro +++ b/src/layouts/HomeLayout.astro @@ -23,6 +23,7 @@ const canonicalURL = new URL(Astro.url.pathname, Astro.site) body { --doc-padding: 65px; } + .home-layout { margin-bottom: 0; } @@ -77,6 +78,6 @@ const canonicalURL = new URL(Astro.url.pathname, Astro.site) - +
Welcome to Scroll Documentation
Bienvenido a la Documentación de Scroll
About Scroll
{ t("footer.aboutScroll.title") }
Resources
{ t("footer.resources.title") }
Follow Us
{ t("footer.followUs.title") }
© Version 1.0.0 Scroll Ltd 2023