Skip to content
This repository was archived by the owner on Aug 17, 2025. It is now read-only.

Commit d63f9af

Browse files
committed
Added translation system
Added iconify package dependency
1 parent 2bb7fac commit d63f9af

File tree

15 files changed

+453
-143
lines changed

15 files changed

+453
-143
lines changed

package-lock.json

Lines changed: 114 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,22 @@
1515
"@emotion/react": "^11.14.0",
1616
"@emotion/styled": "^11.14.0",
1717
"@fontsource/roboto": "^5.2.5",
18+
"@iconify/react": "^5.2.1",
1819
"@mui/icons-material": "^7.0.2",
1920
"@mui/material": "^7.0.2",
2021
"boardify": "file:",
2122
"framer-motion": "^12.7.4",
23+
"i18next": "^25.0.1",
24+
"i18next-browser-languagedetector": "^8.0.5",
2225
"path": "^0.12.7",
2326
"react": "^19.0.0",
2427
"react-dom": "^19.0.0",
28+
"react-i18next": "^15.4.1",
2529
"react-router": "^7.5.1"
2630
},
2731
"devDependencies": {
2832
"@eslint/js": "^9.22.0",
33+
"@types/i18next": "^12.1.0",
2934
"@types/node": "^22.14.1",
3035
"@types/react": "^19.0.10",
3136
"@types/react-dom": "^19.0.4",

src/components/LanguageSwap.tsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import React from 'react';
2+
import { useTranslation } from 'react-i18next';
3+
import { IconButton, Box } from '@mui/material';
4+
import { Icon } from '@iconify/react';
5+
6+
const LanguageSwap: React.FC = () => {
7+
const { i18n } = useTranslation();
8+
9+
const changeLanguage = (language: string) => {
10+
i18n.changeLanguage(language);
11+
};
12+
13+
return (
14+
<Box sx={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
15+
{/* USA Flag */}
16+
<IconButton onClick={() => changeLanguage('en')} color="inherit">
17+
<Icon icon={"flag:gb-4x3"} width={30} height={20} />
18+
</IconButton>
19+
20+
{/* Czech Flag */}
21+
<IconButton onClick={() => changeLanguage('cs')} color="inherit">
22+
<Icon icon={"flag:cz-4x3"} width={30} height={20} />
23+
</IconButton>
24+
</Box>
25+
);
26+
};
27+
28+
export default LanguageSwap;

src/components/footer/Footer.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ import { Box, Typography, Link, IconButton } from "@mui/material";
33
import EmailIcon from "@mui/icons-material/Email";
44
import LinkedInIcon from "@mui/icons-material/LinkedIn";
55
import GitHubIcon from "@mui/icons-material/GitHub";
6+
import { useTranslation } from "react-i18next";
67

78
export const Footer = () => {
9+
const { t } = useTranslation();
10+
811
return (
912
<footer className="footer">
1013
<Box className="footer__contacts" sx={{ padding: "1rem", display: "flex", justifyContent: "center", gap: 2 }}>
@@ -38,7 +41,7 @@ export const Footer = () => {
3841
</Box>
3942
<div className="footer__bottom">
4043
<Typography variant="body2">
41-
© {new Date().getFullYear()} Ondřej Kačírek. All rights reserved.
44+
© {new Date().getFullYear()} {t("footer.copyright")}
4245
</Typography>
4346
</div>
4447
</footer>

src/components/header/Header.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
}
1212

1313
.header__container {
14+
15+
display: flex;
16+
align-items: center;
1417
margin-left: auto;
1518
margin-right: auto;
1619
height: 100%;
@@ -38,4 +41,8 @@
3841
height: 100%;
3942
width: 100%;
4043
object-fit: contain;
44+
}
45+
46+
.header__language {
47+
margin-left: auto;
4148
}

src/components/header/Header.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import LanguageSwapHeader from "../LanguageSwap"
12
import "./Header.css"
23
import logo from "/favicon.png"
34

@@ -11,6 +12,9 @@ export const Header = () => {
1112
</a>
1213
<h1>Boardify</h1>
1314
</div>
15+
<div className="header__language">
16+
<LanguageSwapHeader />
17+
</div>
1418
</div>
1519
</header>
1620
)

src/i18n.d.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
import "i18next"
3+
import en from "@locales/en/translation.json"
4+
import cs from "@locales/cs/translation.json"
5+
6+
7+
declare module "i18next" {
8+
interface CustomTypeOptions {
9+
resources: {
10+
en: typeof en
11+
cs: typeof cs
12+
}
13+
}
14+
}
15+
16+
export interface FeatureItem {
17+
title: string
18+
description: string
19+
icon: string
20+
}

src/locales/cs/translation.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"translation": {
3+
"home": {
4+
"title": "Vítejte na Boardify!",
5+
"description": "<strong>Boardify</strong> je vaše nekonečná digitální tabule pro organizování médií — ideální pro moodboardy, sbírky výzkumů a vizuální plánování. Postaveno s <strong>Reactem</strong> a <strong>Tauri</strong> pro rychlost a flexibilitu.",
6+
"view_on_github": "Zobrazit na GitHubu",
7+
"footer": {
8+
"copyright": "Ondřej Kačírek. Všechna práva vyhrazena."
9+
},
10+
"features": {
11+
"title": "Funkce",
12+
"items": [
13+
{
14+
"title": "Nekonečné plátno",
15+
"description": "Uspořádejte média a poznámky volně v neomezeném prostoru. Ideální pro kreativní brainstorming a vizuální pracovní postupy.",
16+
"icon": "mdi:infinity"
17+
},
18+
{
19+
"title": "Drag & Drop",
20+
"description": "Rychlé nahrávání a organizování obrázků, videí a dokumentů pomocí intuitivního drag-and-drop ovládání.",
21+
"icon": "mdi:mouse"
22+
},
23+
{
24+
"title": "Pluginová podpora",
25+
"description": "Navrženo pro rozšíření — snadno integrujte nové nástroje nebo vytvářejte vlastní funkce.",
26+
"icon": "mdi:rocket"
27+
},
28+
{
29+
"title": "Podporováno Tauri",
30+
"description": "Rychlý, lehký a nativní výkon díky Tauri — ideální pro pokročilé uživatele.",
31+
"icon": "mdi:flash"
32+
},
33+
{
34+
"title": "Vlastní UI",
35+
"description": "Postaveno s Reactem a MUI. Můžete přizpůsobit a upravit rozhraní tak, aby vyhovovalo vašemu pracovnímu postupu.",
36+
"icon": "mdi:palette"
37+
}
38+
]
39+
}
40+
},
41+
"roadmap": {
42+
"title": "Plán",
43+
"items": [
44+
{
45+
"title": "Podpora dalších typů souborů",
46+
"description": "Přidat podporu pro PDF, audio a dokumenty.",
47+
"status": "V průběhu"
48+
},
49+
{
50+
"title": "Systém hledání a označování médií",
51+
"description": "Implementovat hledání a označování mediálních souborů.",
52+
"status": "Připravujeme"
53+
},
54+
{
55+
"title": "Pluginové API pro vlastní rozšíření",
56+
"description": "Umožnit třetím stranám pluginy pro rozšíření funkcionality.",
57+
"status": "Dokončeno"
58+
},
59+
{
60+
"title": "Podpora Markdown poznámek pro kontextové tabule",
61+
"description": "Podpora pro syntaxi markdownu v poznámkách.",
62+
"status": "Připravujeme"
63+
}
64+
]
65+
}
66+
}
67+
}

0 commit comments

Comments
 (0)