Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/add missing translation functions to onboarding #1019

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/src/app/[lng]/onboarding/setup/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export default function OnboardingSetup({
}}
pl={0}
>
Go Back
{t("go-back")}
</Button>
<div className="flex flex-col md:flex-row md:space-x-12 md:space-y-0 space-y-12 align-top mt-8 md:mt-16 mb-48">
{activeStep === 0 && (
Expand Down
3 changes: 0 additions & 3 deletions app/src/components/steps/add-inventory-details-step.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,6 @@ export default function SetInventoryDetailsStep({
</Text>
</Box>
<Box>
{/* TODO:
only enable basic by default and disable basic+ until we have the feature
*/}
<Controller
name="inventoryGoal"
control={control}
Expand Down
25 changes: 12 additions & 13 deletions app/src/components/steps/select-city-steps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
InputGroup,
InputLeftElement,
InputRightElement,
Link,
Text,
useOutsideClick,
} from "@chakra-ui/react";
Expand All @@ -37,11 +38,11 @@ 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";
import { useSearchParams } from "next/navigation";
import { Trans } from "react-i18next";

const CityMap = dynamic(() => import("@/components/CityMap"), { ssr: false });

Expand Down Expand Up @@ -423,18 +424,17 @@ export default function SelectCityStep({
fontWeight="normal"
letterSpacing="wide"
>
In case the geographical boundary is not the right one{" "}
<Link href="mailto:[email protected]">
<Text
as="span"
color="interactive.secondary"
fontWeight="600"
<Trans i18nKey="city-boundary-info" t={t}>
<Link
color="content.link"
fontWeight="bold"
textDecoration="underline"
letterSpacing="wide"
textDecorationLine="underline"
href="mailto:[email protected]"
>
Contact Us
</Text>
</Link>
</Link>
</Trans>
</Text>
</Box>
</Box>
Expand Down Expand Up @@ -468,7 +468,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")}
</Text>
<Text
color="interactive.control"
Expand All @@ -479,8 +479,7 @@ export default function SelectCityStep({
textAlign="center"
letterSpacing="wide"
>
You will be able to check the geographical boundary for your
inventory
{t("unselected-city-boundary-description")}
</Text>
</Box>
</Box>
Expand Down
5 changes: 4 additions & 1 deletion app/src/i18n/locales/de/onboarding.json
Original file line number Diff line number Diff line change
Expand Up @@ -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</1></0>",
"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"
}
5 changes: 4 additions & 1 deletion app/src/i18n/locales/en/onboarding.json
Original file line number Diff line number Diff line change
Expand Up @@ -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</1></0>",
"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"
}
5 changes: 4 additions & 1 deletion app/src/i18n/locales/es/onboarding.json
Original file line number Diff line number Diff line change
Expand Up @@ -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</1></0>",
"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"
}
6 changes: 5 additions & 1 deletion app/src/i18n/locales/pt/onboarding.json
Original file line number Diff line number Diff line change
Expand Up @@ -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</1></0>",
"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"

}
Loading