Skip to content

Commit

Permalink
fix: translation for speaker preview
Browse files Browse the repository at this point in the history
  • Loading branch information
domysh committed Sep 29, 2024
1 parent 4f435e6 commit d42b4f5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/components/Home/SpeakerPreview.astro
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
---
import { getSpeakers } from "../../data/api/sessionize_api";
import { getLangFromUrl, useTranslatedPath, useTranslations } from "../../i18n/utils";
import { RandomSpeakerList } from "./RandomSpeakerList";
const speakers = await getSpeakers();
const lang = getLangFromUrl(Astro.url);
const t = useTranslations(lang);
const getPath = useTranslatedPath(lang);
---

<div class="py-14 main-container px-4" >
<h2 class="text-6xl mb-10 font-bold text-white">Speakers</h2>
<h2 class="text-6xl mb-10 font-bold text-white">{t("info.speakers")}</h2>
<div class="grid md:grid-cols-4 sm:grid-cols-2 grid-flow-row gap-10 mt-5 mb-10">
<RandomSpeakerList client:only="react" speakers={speakers??[]} />
</div>

<a
class="btn-content text-xl px-8"
href="/speakers">See all Speakers</a
href={getPath("/speakers")}>{t("speaker.seeAll")}</a
>
</div>
2 changes: 1 addition & 1 deletion src/i18n/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const ui = {
'info.speakers': 'Speaker',
'info.tracks': 'Track',
'info.categories': 'Categorie',
'speaker.seeAll': 'Vedi tutti gli speaker',
'speaker.seeAll': 'Tutti gli speaker',
'hero.ticketsAvailable': 'BIGLIETTI DISPONIBILI',
'ticket.title': 'Prenota ora il tuo biglietto',
'ticket.free': 'GRATIS',
Expand Down

0 comments on commit d42b4f5

Please sign in to comment.