feat: validate translations with typescript (when added)
This commit is contained in:
parent
09038467f2
commit
401b8046ec
|
|
@ -1,5 +1,5 @@
|
|||
export const translations = {
|
||||
pl: {
|
||||
const pl = {
|
||||
siteTitle: "CEBULACAMP",
|
||||
nav: {
|
||||
about: "O nas",
|
||||
when: "Kiedy",
|
||||
|
|
@ -12,7 +12,6 @@ export const translations = {
|
|||
mobileNav: {
|
||||
toggleMenu: "Aktywnuj menu",
|
||||
menu: "Menu",
|
||||
|
||||
},
|
||||
hero: {
|
||||
title: "CEBULACAMP 2025",
|
||||
|
|
@ -25,8 +24,7 @@ export const translations = {
|
|||
},
|
||||
where: {
|
||||
title: "Gdzie",
|
||||
location:
|
||||
"klub Łącznik, Tramwajowa 1-3, Wrocław, obok Hackerspace Wrocław",
|
||||
location: "klub Łącznik, Tramwajowa 1-3, Wrocław, obok Hackerspace Wrocław",
|
||||
},
|
||||
when: {
|
||||
title: "Kiedy",
|
||||
|
|
@ -52,8 +50,17 @@ export const translations = {
|
|||
title: "Kontakt",
|
||||
email: "contact@cebula.camp",
|
||||
},
|
||||
},
|
||||
en: {
|
||||
// English translations would go here
|
||||
},
|
||||
};
|
||||
|
||||
const en = {};
|
||||
|
||||
export const translations: {
|
||||
en: typeof pl;
|
||||
pl: typeof pl;
|
||||
} = {
|
||||
pl: pl,
|
||||
// @ts-expect-error This should fail so far, remove me when translations are properly added to "en" object.
|
||||
en: en,
|
||||
};
|
||||
|
||||
export type Sections = keyof (typeof pl)["nav"];
|
||||
|
|
|
|||
Loading…
Reference in a new issue