Skip to content

Commit

Permalink
feat(i18n): Updated translations. #53
Browse files Browse the repository at this point in the history
  • Loading branch information
emendelski committed Jul 17, 2024
1 parent c883c38 commit d313d27
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 30 deletions.
32 changes: 17 additions & 15 deletions src/components/HowToStart.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
import cloudMobile from "$lib/assets/svg/cloudMobile.svg";
export let list = [
{ text: "Informes de uso" },
{ text: "Mejoreas del equipamientro", style: "large" },
{ text: "Actuzaliaciones" },
{ text: "Conexión a la red" },
{ text: "Consultoría de negocios" },
{ text: "Preparación del proyecto" },
{ text: "Facturación" },
{ text: "Señalización" },
{ text: "Integraciones con sistemas propios", style: "large" },
{ text: "Mantenimiento Preventivo" },
{ text: "Rotación de certificados" },
{ text: "Viabilidad técnica" },
{ text: "Monitoreo de estado", style: "large" },
{ text: "Cambios de legislación" },
{ text: 'hts01', textDefault: "Informes de uso" },
{ text: 'hts02', textDefault: "Mejoreas del equipamientro", style: "large" },
{ text: 'hts03', textDefault: "Actuzaliaciones" },
{ text: 'hts04', textDefault: "Conexión a la red" },
{ text: 'hts05', textDefault: "Consultoría de negocios" },
{ text: 'hts06', textDefault: "Preparación del proyecto" },
{ text: 'hts07', textDefault: "Facturación" },
{ text: 'hts08', textDefault: "Señalización" },
{ text: 'hts09', textDefault: "Integraciones con sistemas propios", style: "large" },
{ text: 'hts10', textDefault: "Mantenimiento Preventivo" },
{ text: 'hts11', textDefault: "Rotación de certificados" },
{ text: 'hts12', textDefault: "Viabilidad técnica" },
{ text: 'hts13', textDefault: "Monitoreo de estado", style: "large" },
{ text: 'hts14', textDefault: "Cambios de legislación" },
];
const min = -12;
Expand Down Expand Up @@ -56,7 +56,9 @@
style="--rotate: {getRandomAngle()}deg"
tabindex="0"
>
{item.text}
{$_(`howToStart.list.${item.text}`, {
default: item.textDefault,
})}
</div>
</div>
{/each}
Expand Down
34 changes: 21 additions & 13 deletions src/components/common/Carousel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -59,32 +59,29 @@
select = index;
}
const images = [
let images = [
{
id: 'evSales',
url: evsales,
header: $_("carousel.evSales.header", {
default: "Because the sales of electric vehicles keep increasing",
}),
header: "Because the sales of electric vehicles keep increasing",
description: $_("carousel.evSales.description", {
default:
"Sales of EV already surpassed those of Diesel and the best selling car of the world is an EV.",
}),
},
{
id: 'greatCustomers',
url: great_customers,
header: $_("carousel.greatCustomers.header", {
default: "Because the EV drivers make for great customers",
}),
header: "Because the EV drivers make for great customers",
description: $_("carousel.greatCustomers.description", {
default:
"On average they are more welthy, spend more and are more loyal.",
}),
},
{
id: 'fleetSavings',
url: fleet_savings,
header: $_("carousel.fleetSavings.header", {
default: "Because switching your fleet to EVs can save you money",
}),
header: "Because switching your fleet to EVs can save you money",
description: $_("carousel.fleetSavings.description", {
default:
"Running costs of EVs are fraction of the price of combustion vehicles.",
Expand All @@ -97,10 +94,21 @@
<div class="siema">
{#each images as src, imageIndex (src)}
<div class="slider">
<h3>{src.header}</h3>
<img src={src.url} alt={src.description} width="98%" height={600} />
<h3>
{$_(`carousel.${src.id}.header`, {
default: src.header,
})}
</h3>
<img
src={src.url}
alt={ $_(`carousel.${src.id}.description`, {
default: src.description,
}) }
/>
<p>
{src.description}
{$_(`carousel.${src.id}.description`, {
default: src.description,
})}
</p>
</div>
{/each}
Expand Down
30 changes: 29 additions & 1 deletion src/services/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,23 @@
"howToStart": {
"title": "How can you get started?",
"subtitle": "You <em>could</em> call your electrician to install a basic EV charger from Amazon, but in reality<br/><em>the installation is just the first step</em> to a very complex ecosystem.",
"alt": "Example aspects to keep in mind"
"alt": "Example aspects to keep in mind",
"list": {
"hts01": "(en)Informes de uso",
"hts02": "(en)Mejoreas del equipamientro",
"hts03": "(en)Actuzaliaciones",
"hts04": "(en)Conexión a la red",
"hts05": "(en)Consultoría de negocios",
"hts06": "(en)Preparación del proyecto",
"hts07": "(en)Facturación",
"hts08": "(en)Señalización",
"hts09": "(en)Integraciones con sistemas propios",
"hts10": "(en)Mantenimiento Preventivo",
"hts11": "(en)Rotación de certificados",
"hts12": "(en)Viabilidad técnica",
"hts13": "(en)Monitoreo de estado",
"hts14": "(en)Cambios de legislación"
}
},
"nav": {
"need": "Why you need it",
Expand Down Expand Up @@ -206,5 +222,17 @@
},
"privacyPolicy": {
"title": "Privacy Policy"
},
"sliderContent": {
"one": {
"description": "1Description",
"name": "1Name",
"who": "1Who"
},
"two": {
"description": "2Description",
"name": "2Name",
"who": "2Who"
}
}
}
30 changes: 29 additions & 1 deletion src/services/messages/es-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,23 @@
"howToStart": {
"title": "¿Cómo puedes empezar?",
"subtitle": "<em>Podrías</em> llamar a tu electricista para que te instale un cargador básico de Amazon, pero en realidad la <em>instalación es sólo el primer paso</em> de un ecosistema muy complejo.",
"alt": "Ejemplos de aspectos a tener en cuenta"
"alt": "Ejemplos de aspectos a tener en cuenta",
"list": {
"hts01": "Informes de uso",
"hts02": "Mejoreas del equipamientro",
"hts03": "Actuzaliaciones",
"hts04": "Conexión a la red",
"hts05": "Consultoría de negocios",
"hts06": "Preparación del proyecto",
"hts07": "Facturación",
"hts08": "Señalización",
"hts09": "Integraciones con sistemas propios",
"hts10": "Mantenimiento Preventivo",
"hts11": "Rotación de certificados",
"hts12": "Viabilidad técnica",
"hts13": "Monitoreo de estado",
"hts14": "Cambios de legislación"
}
},
"nav": {
"need": "Por qué lo necesitas",
Expand Down Expand Up @@ -206,5 +222,17 @@
},
"privacyPolicy": {
"title": "Política de privacidad"
},
"sliderContent": {
"one": {
"description": "1Descripcion",
"name": "1Nombre",
"who": "1Quien"
},
"two": {
"description": "2Descripcion",
"name": "2Nombre",
"who": "2Quien"
}
}
}

0 comments on commit d313d27

Please sign in to comment.