From 2b786de601748cc3996f645460e2368a4f6f8eaa Mon Sep 17 00:00:00 2001 From: Cephas Chapa Date: Wed, 18 Dec 2024 13:56:13 +0200 Subject: [PATCH 1/3] fix: adds missing translation to city step --- app/src/app/[lng]/onboarding/setup/page.tsx | 2 +- .../components/steps/select-city-steps.tsx | 32 ++++++++++--------- app/src/i18n/locales/en/onboarding.json | 5 ++- 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/app/src/app/[lng]/onboarding/setup/page.tsx b/app/src/app/[lng]/onboarding/setup/page.tsx index 1c778d777..1117171b9 100644 --- a/app/src/app/[lng]/onboarding/setup/page.tsx +++ b/app/src/app/[lng]/onboarding/setup/page.tsx @@ -223,7 +223,7 @@ export default function OnboardingSetup({ }} pl={0} > - Go Back + {t("go-back")}
{activeStep === 0 && ( diff --git a/app/src/components/steps/select-city-steps.tsx b/app/src/components/steps/select-city-steps.tsx index e3924f681..53af2112f 100644 --- a/app/src/components/steps/select-city-steps.tsx +++ b/app/src/components/steps/select-city-steps.tsx @@ -42,6 +42,7 @@ import Image from "next/image"; import dynamic from "next/dynamic"; import { NoResultsIcon } from "../icons"; import { useSearchParams } from "next/navigation"; +import { Trans } from "react-i18next"; const CityMap = dynamic(() => import("@/components/CityMap"), { ssr: false }); @@ -423,18 +424,20 @@ export default function SelectCityStep({ fontWeight="normal" letterSpacing="wide" > - In case the geographical boundary is not the right one{" "} - - - Contact Us - - + + In case the geographical boundary is not the right one{" "} + + + Contact Us + + + @@ -468,7 +471,7 @@ export default function SelectCityStep({ fontFamily="heading" textAlign="center" > - Search and select the city to be shown on the map + {t("unselected-city-boundary-heading")} - You will be able to check the geographical boundary for your - inventory + {t("unselected-city-boundary-description")} diff --git a/app/src/i18n/locales/en/onboarding.json b/app/src/i18n/locales/en/onboarding.json index 34fa5136e..2111505ab 100644 --- a/app/src/i18n/locales/en/onboarding.json +++ b/app/src/i18n/locales/en/onboarding.json @@ -65,5 +65,8 @@ "create-inventory": "Create Inventory", "create-ghg-inventory": "Create your GHG Inventory", "inventory-creation-description": "In this step, configure your city's GHG emissions inventory by selecting the inventory year, setting the target, and adding contextual data such as population.", - "start-inventory": "Start Inventory" + "start-inventory": "Start Inventory", + "city-boundary-info": "In case the geographical boundary is not the right one <0><1>Contact Us", + "unselected-city-boundary-heading": "Search and select the city to be shown on the map", + "unselected-city-boundary-description": "You will be able to check the geographical boundary for your inventory" } From 549596c02defb0d9d1b1f2654f4bbc207bd762c2 Mon Sep 17 00:00:00 2001 From: Cephas Chapa Date: Wed, 18 Dec 2024 13:57:29 +0200 Subject: [PATCH 2/3] removes todo --- app/src/components/steps/add-inventory-details-step.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/src/components/steps/add-inventory-details-step.tsx b/app/src/components/steps/add-inventory-details-step.tsx index fe0636fb9..14b36baa4 100644 --- a/app/src/components/steps/add-inventory-details-step.tsx +++ b/app/src/components/steps/add-inventory-details-step.tsx @@ -220,9 +220,6 @@ export default function SetInventoryDetailsStep({ - {/* TODO: - only enable basic by default and disable basic+ until we have the feature - */} Date: Wed, 18 Dec 2024 14:11:17 +0200 Subject: [PATCH 3/3] fix: adds more translations --- .../components/steps/select-city-steps.tsx | 23 ++++++++----------- app/src/i18n/locales/de/onboarding.json | 5 +++- app/src/i18n/locales/es/onboarding.json | 5 +++- app/src/i18n/locales/pt/onboarding.json | 6 ++++- 4 files changed, 23 insertions(+), 16 deletions(-) diff --git a/app/src/components/steps/select-city-steps.tsx b/app/src/components/steps/select-city-steps.tsx index 53af2112f..19e338329 100644 --- a/app/src/components/steps/select-city-steps.tsx +++ b/app/src/components/steps/select-city-steps.tsx @@ -27,6 +27,7 @@ import { InputGroup, InputLeftElement, InputRightElement, + Link, Text, useOutsideClick, } from "@chakra-ui/react"; @@ -37,7 +38,6 @@ import { WarningIcon, } from "@chakra-ui/icons"; import RecentSearches from "@/components/recent-searches"; -import Link from "next/link"; import Image from "next/image"; import dynamic from "next/dynamic"; import { NoResultsIcon } from "../icons"; @@ -424,18 +424,15 @@ export default function SelectCityStep({ fontWeight="normal" letterSpacing="wide" > - - In case the geographical boundary is not the right one{" "} - - - Contact Us - + + + Contact Us diff --git a/app/src/i18n/locales/de/onboarding.json b/app/src/i18n/locales/de/onboarding.json index 6b7f2bff8..4bef4d6af 100644 --- a/app/src/i18n/locales/de/onboarding.json +++ b/app/src/i18n/locales/de/onboarding.json @@ -65,5 +65,8 @@ "done-description": "Tolle Arbeit! Sie können Ihre Inventardaten jederzeit überprüfen, hinzufügen und aktualisieren. Beginnen Sie jetzt mit der Vervollständigung Ihres Treibhausgas-Emissionsinventars!", "create-ghg-inventory": "Erstellen Sie Ihr GHG-Inventar", "inventory-creation-description": "In diesem Schritt konfigurieren Sie das GHG-Emissionsinventar Ihrer Stadt, indem Sie das Inventarjahr auswählen, das Ziel festlegen und kontextbezogene Daten wie die Bevölkerung hinzufügen.", - "start-inventory": "Startinventar" + "start-inventory": "Startinventar", + "city-boundary-info": "Falls die geografische Grenze nicht korrekt ist <0><1>Kontaktieren Sie uns", + "unselected-city-boundary-heading": "Suchen und wählen Sie die Stadt aus, die auf der Karte angezeigt werden soll", + "unselected-city-boundary-description": "Sie können die geografische Grenze für Ihren Bestand überprüfen" } diff --git a/app/src/i18n/locales/es/onboarding.json b/app/src/i18n/locales/es/onboarding.json index 1d36a3948..d7911e81b 100644 --- a/app/src/i18n/locales/es/onboarding.json +++ b/app/src/i18n/locales/es/onboarding.json @@ -66,5 +66,8 @@ "create-inventory": "Crea Inventario", "create-ghg-inventory": "Crea tu Inventario de GEI", "inventory-creation-description": "En este paso, configure el inventario de emisiones de GEI de su ciudad seleccionando el año del inventario, estableciendo el objetivo y agregando datos contextuales como la población.", - "start-inventory": "Inicio de Inventario" + "start-inventory": "Inicio de Inventario", + "city-boundary-info": "En caso de que el límite geográfico no sea el correcto <0><1>Contáctenos", + "unselected-city-boundary-heading": "Busque y seleccione la ciudad que se mostrará en el mapa", + "unselected-city-boundary-description": "Podrá verificar el límite geográfico de su inventario" } diff --git a/app/src/i18n/locales/pt/onboarding.json b/app/src/i18n/locales/pt/onboarding.json index 9467e2ebf..5ca971550 100644 --- a/app/src/i18n/locales/pt/onboarding.json +++ b/app/src/i18n/locales/pt/onboarding.json @@ -65,5 +65,9 @@ "create-inventory": "Criar Inventário", "create-ghg-inventory": "Crie o seu Inventário de GEE", "inventory-creation-description": "Nesta etapa, configure o inventário de emissões de GEE da sua cidade, selecionando o ano do inventário, definindo o objetivo e adicionando dados contextuais, como a população.", - "start-inventory": "Iniciar Inventário" + "start-inventory": "Iniciar Inventário", + "city-boundary-info": "Caso a fronteira geográfica não seja a correta <0><1>Contate-nos", + "unselected-city-boundary-heading": "Pesquise e selecione a cidade a ser exibida no mapa", + "unselected-city-boundary-description": "Você poderá verificar a fronteira geográfica do seu inventário" + }