Skip to content

Commit

Permalink
translated the 404
Browse files Browse the repository at this point in the history
  • Loading branch information
Turupawn committed Jan 15, 2024
1 parent 4f4f8af commit c8cf8eb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@
"title": "Follow Us"
}
},
"pageNotFound": {
"title": "Page not found",
"text": "We're sorry, but we couldn't find the page you were looking for."
},
"notTranslated": {
"notTranslated": "This page has not been translated yet."
}
Expand Down
4 changes: 4 additions & 0 deletions public/locales/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@
"title": "Síguenos"
}
},
"pageNotFound": {
"title": "Página no encontrada",
"text": "Lo sentimos, pero no pudimos encontrar la página que buscas."
},
"notTranslated": {
"notTranslated": "Esta página no ha sido traducida aún."
}
Expand Down
6 changes: 3 additions & 3 deletions src/pages/404.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import i18next, { changeLanguage } from "i18next"
import i18next, { changeLanguage, t } from "i18next"
import HomeLayout from "../layouts/HomeLayout.astro"
// Should load last used language.
Expand All @@ -9,8 +9,8 @@ changeLanguage(i18next.language)
<HomeLayout>
<div class="wrapper">
<h2 class="highlight">404</h2>
<h2 class="heading-600">Page not found</h2>
<p>We're sorry, but we couldn't find the page you were looking for.</p>
<h2 class="heading-600">{t("pageNotFound.title")}</h2>
<p>{t("pageNotFound.text")}</p>
</div>
</HomeLayout>

Expand Down

0 comments on commit c8cf8eb

Please sign in to comment.