From 7086ea5f97e3fb3878ff463b7f1136f6dbc56fcb Mon Sep 17 00:00:00 2001 From: tisachi Date: Tue, 27 Oct 2026 06:55:25 +0100 Subject: [PATCH] =?UTF-8?q?Web:=20wielojezycznosc=20=E2=80=94=20cala=20tre?= =?UTF-8?q?sc=20wizytowki=20przez=20t()/Trans=20z=20locales=20pl/en=20w=20?= =?UTF-8?q?src/i18n=20(i18next=20+=20react-i18next),=20domyslny=20jezyk=20?= =?UTF-8?q?z=20przegladarki,=20przelacznik=20PL/EN=20w=20naglowku=20z=20za?= =?UTF-8?q?pisem=20w=20localStorage=20fitos-web-lang,=20aktualizacja=20htm?= =?UTF-8?q?l=20lang=20/=20document.title=20/=20meta=20description=20przy?= =?UTF-8?q?=20zmianie=20jezyka;=20testy=20unit=208=20i=20e2e=207=20przecho?= =?UTF-8?q?dza=20(nowy=20spec=20jezykowy),=20AGENTS.md:=20zakres=20i18n=20?= =?UTF-8?q?obejmuje=20tez=20web?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AGENTS.md | 16 +- web/package-lock.json | 78 ++++- web/package.json | 2 + web/src/components/BootLog.tsx | 21 +- web/src/components/PhoneMock.tsx | 48 ++- web/src/i18n/index.ts | 112 +++++++ web/src/i18n/language.ts | 35 +++ web/src/i18n/locales/en/boot.json | 10 + web/src/i18n/locales/en/common.json | 5 + web/src/i18n/locales/en/concepts.json | 64 ++++ web/src/i18n/locales/en/cta.json | 13 + web/src/i18n/locales/en/ecosystem.json | 36 +++ web/src/i18n/locales/en/footer.json | 13 + web/src/i18n/locales/en/hero.json | 8 + web/src/i18n/locales/en/manifest.json | 19 ++ web/src/i18n/locales/en/mock.json | 18 ++ web/src/i18n/locales/en/nav.json | 12 + web/src/i18n/locales/en/tracks.json | 118 +++++++ web/src/i18n/locales/pl/boot.json | 10 + web/src/i18n/locales/pl/common.json | 5 + web/src/i18n/locales/pl/concepts.json | 55 ++++ web/src/i18n/locales/pl/cta.json | 13 + web/src/i18n/locales/pl/ecosystem.json | 36 +++ web/src/i18n/locales/pl/footer.json | 13 + web/src/i18n/locales/pl/hero.json | 8 + web/src/i18n/locales/pl/manifest.json | 19 ++ web/src/i18n/locales/pl/mock.json | 18 ++ web/src/i18n/locales/pl/nav.json | 12 + web/src/i18n/locales/pl/tracks.json | 121 +++++++ web/src/main.tsx | 1 + web/src/sections/Concepts.tsx | 157 ++++----- web/src/sections/Cta.tsx | 27 +- web/src/sections/Ecosystem.tsx | 90 +++--- web/src/sections/Footer.tsx | 24 +- web/src/sections/Hero.tsx | 14 +- web/src/sections/Manifest.tsx | 34 +- web/src/sections/SiteHeader.tsx | 53 +++- web/src/sections/Track.tsx | 8 +- web/src/sections/Tracks.tsx | 420 +++++++------------------ web/test/e2e/language.spec.ts | 39 +++ web/test/landing.test.tsx | 10 + web/test/setup.ts | 11 +- 42 files changed, 1260 insertions(+), 566 deletions(-) create mode 100644 web/src/i18n/index.ts create mode 100644 web/src/i18n/language.ts create mode 100644 web/src/i18n/locales/en/boot.json create mode 100644 web/src/i18n/locales/en/common.json create mode 100644 web/src/i18n/locales/en/concepts.json create mode 100644 web/src/i18n/locales/en/cta.json create mode 100644 web/src/i18n/locales/en/ecosystem.json create mode 100644 web/src/i18n/locales/en/footer.json create mode 100644 web/src/i18n/locales/en/hero.json create mode 100644 web/src/i18n/locales/en/manifest.json create mode 100644 web/src/i18n/locales/en/mock.json create mode 100644 web/src/i18n/locales/en/nav.json create mode 100644 web/src/i18n/locales/en/tracks.json create mode 100644 web/src/i18n/locales/pl/boot.json create mode 100644 web/src/i18n/locales/pl/common.json create mode 100644 web/src/i18n/locales/pl/concepts.json create mode 100644 web/src/i18n/locales/pl/cta.json create mode 100644 web/src/i18n/locales/pl/ecosystem.json create mode 100644 web/src/i18n/locales/pl/footer.json create mode 100644 web/src/i18n/locales/pl/hero.json create mode 100644 web/src/i18n/locales/pl/manifest.json create mode 100644 web/src/i18n/locales/pl/mock.json create mode 100644 web/src/i18n/locales/pl/nav.json create mode 100644 web/src/i18n/locales/pl/tracks.json create mode 100644 web/test/e2e/language.spec.ts diff --git a/AGENTS.md b/AGENTS.md index 0551655..28cf0d3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -23,8 +23,8 @@ - `401` ignorowane automatycznie; `403`/`404`/`5xx` zawsze FAIL. - Selektory E2E: `getByRole`, `getByText`, `input[type=...]`; nie używaj `getByLabel`. - Nigdy nie dotykaj ani nie usuwaj wolumenu `fitos_pgdata`. -- `i18n` dotyczy tylko `app`/`admin`; `web` może mieć literały PL. -- Zakaz literałów PL w `app/src`/`admin/src` poza `src/i18n/locales/**`; każdy tekst UI przez `t()`. +- `i18n` dotyczy `app`, `admin` i `web` (web: osobny klucz `localStorage['fitos-web-lang']`, domyślny język = przeglądarki). +- Zakaz literałów PL w `app/src`/`admin/src`/`web/src` poza `src/i18n/locales/**`; każdy tekst UI przez `t()`. - Daty/czas/liczby przez helpery z `lib/format.ts`; nie używaj `toLocaleDateString('pl-PL')`. - Mapy statusów/ról trzymają `labelKey`, nie gotowy tekst. - Git: commity PL bez polskich znaków, wzór `Obszar: co zmieniono (efekt)`. @@ -42,7 +42,7 @@ - Klient API: `src/api/client.ts` z tokenami i flow 401 -> refresh -> retry. - Typy API frontu: `src/api/types.ts`. - `api`: Express + Prisma + PostgreSQL. -- `web`: React + Vite, wizytówka, odizolowana, bez i18n i zależności od API. +- `web`: React + Vite, wizytówka, odizolowana, bez zależności od API; i18n z własnym klastrem locale i przełącznikiem PL/EN w nagłówku. - `ops`: deploy/docs/remote poza kodem aplikacji. ## Topbar @@ -122,15 +122,15 @@ - Promocja kodu: ten sam ref ze stagingu na prod. ## i18n -- Zakres: wyłącznie `app` i `admin`. +- Zakres: `app`, `admin` i `web`. - Stack: `react-i18next`; języki `pl` / `en`. -- Wykrywanie języka: `localStorage['fitos-lang']` -> `navigator.language` -> domyślnie `pl`. -- Aktualizacja `` oraz `document.title` w `i18n/index.ts`. -- Zasoby: `app|admin/src/i18n/locales/{pl,en}/.json`. +- Wykrywanie języka: `localStorage['fitos-lang']` (web: `fitos-web-lang`) -> `navigator.language` -> domyślnie `pl`. +- Aktualizacja `` oraz `document.title` w `i18n/index.ts` (web additionally aktualizuje `meta[name=description]`). +- Zasoby: `app|admin|web/src/i18n/locales/{pl,en}/.json`. - Klucze i namespace’y po angielsku. - Wartości uzupełniaj zawsze w `pl` i `en`. - Każdy tekst UI musi iść przez `t()`. -- Strażnik: `grep [ąćęłńóśźż]` w `app/src` / `admin/src` nie może wykazać stringów UI poza locales. +- Strażnik: `grep [ąćęłńóśźż]` w `app/src` / `admin/src` / `web/src` nie może wykazać stringów UI poza locales. - Nowe formatery dat/czasu/liczb przez `i18n.t` + `resolveLocaleTag`. - Pluralizacja przez sufiksy `_one`/`_few`/`_many`/`_other` lub parametr `count`. - Teksty poza renderem muszą poprawnie reagować na zmianę języka. diff --git a/web/package-lock.json b/web/package-lock.json index 5b5347b..1a0b706 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -11,9 +11,11 @@ "@fontsource/manrope": "^5.3.0", "@fontsource/space-grotesk": "^5.3.0", "@tailwindcss/vite": "^4.3.3", + "i18next": "^26.4.7", "lucide-react": "^1.33.0", "react": "^18.3.1", "react-dom": "^18.3.1", + "react-i18next": "^17.0.20", "tailwindcss": "^4.3.3" }, "devDependencies": { @@ -323,7 +325,6 @@ "version": "7.29.10", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.10.tgz", "integrity": "sha512-NpugTzbKgGrNe45Ui32cN8vCFFMxVtP/9rtfwv0nP5FRDAjvYBxJcLVpYA9mr1jxP6cnIT7x9LUzuDTbWYYNRA==", - "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -3660,6 +3661,15 @@ "node": ">=18" } }, + "node_modules/html-parse-stringify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/html-parse-stringify/-/html-parse-stringify-4.0.1.tgz", + "integrity": "sha512-0zHsZJrK7S3K2aucXWL6ycoYJ/iNtIcFHC/nYQgFklPtrv5LpJctIiSCroWZWeuoXvuyFdzp6KzjJQ+OT5MfFw==", + "license": "MIT", + "funding": { + "url": "https://locize.com" + } + }, "node_modules/http-proxy-agent": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", @@ -3688,6 +3698,34 @@ "node": ">= 14" } }, + "node_modules/i18next": { + "version": "26.5.11", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-26.5.11.tgz", + "integrity": "sha512-Wc0klBPKxqZ2tL2qdAnF8xvvnWgr1IMGSY2ikTiAvaFVbz7xiFARtkoU4RidBDw1SyziGROp0qxu6qnJ7l2Wug==", + "funding": [ + { + "type": "individual", + "url": "https://www.locize.com/i18next" + }, + { + "type": "individual", + "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project" + }, + { + "type": "individual", + "url": "https://www.locize.com" + } + ], + "license": "MIT", + "peerDependencies": { + "typescript": "^5 || ^6 || ^7" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/iconv-lite": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", @@ -4667,6 +4705,33 @@ "react": "^18.3.1" } }, + "node_modules/react-i18next": { + "version": "17.1.9", + "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-17.1.9.tgz", + "integrity": "sha512-OgYqIH13XHPlWTaaI795Dz+k2AdKnXcOxNQVnf750T8Ij0TYWp1nYvXRpoJBulPqlyk2OAbn1PM4tFKiIj/byA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.29.7", + "html-parse-stringify": "^4.0.1", + "use-sync-external-store": "^1.6.0" + }, + "peerDependencies": { + "i18next": ">= 26.2.0", + "react": ">= 16.8.0", + "typescript": "^5 || ^6 || ^7" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + }, + "react-native": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, "node_modules/react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", @@ -5076,7 +5141,7 @@ "version": "5.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "dev": true, + "devOptional": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -5134,6 +5199,15 @@ "punycode": "^2.1.0" } }, + "node_modules/use-sync-external-store": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.7.0.tgz", + "integrity": "sha512-6L+EeigHMQhdaIPNIFUKwfWJSwWFQ8gJbJ2DLOs5sDIegTwR9fRxvnM3uciHKjIZhFz+KAv2emhWMRvDmMcY8A==", + "license": "MIT", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, "node_modules/vite": { "version": "6.4.4", "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.4.tgz", diff --git a/web/package.json b/web/package.json index a066307..751b1f7 100644 --- a/web/package.json +++ b/web/package.json @@ -19,7 +19,9 @@ "@fontsource/manrope": "^5.3.0", "@fontsource/space-grotesk": "^5.3.0", "@tailwindcss/vite": "^4.3.3", + "i18next": "^26.4.7", "lucide-react": "^1.33.0", + "react-i18next": "^17.0.20", "react": "^18.3.1", "react-dom": "^18.3.1", "tailwindcss": "^4.3.3" diff --git a/web/src/components/BootLog.tsx b/web/src/components/BootLog.tsx index 92fb321..89f0893 100644 --- a/web/src/components/BootLog.tsx +++ b/web/src/components/BootLog.tsx @@ -1,19 +1,11 @@ -import { useEffect, useState } from 'react'; +import { useEffect, useMemo, useState } from 'react'; +import { useTranslation } from 'react-i18next'; interface BootLine { text: string; ok?: boolean; } -// Log startowy „systemu” — ≤6 linii, po wpisaniu zostają widoczne. -const LINES: BootLine[] = [ - { text: '$ fitos --init' }, - { text: 'moduł Trening ......... ', ok: true }, - { text: 'moduł Coaching ........ ', ok: true }, - { text: 'moduł Siłownie ........ ', ok: true }, - { text: '$ system gotowy — 0 błędów' }, -]; - const CHAR_MS = 24; const LINE_MS = 240; @@ -26,6 +18,11 @@ function prefersReducedMotion() { /** Boot log z efektem typewritera; w prefers-reduced-motion renderuje się od razu. */ export function BootLog() { + const { t, i18n } = useTranslation('boot'); + const LINES = useMemo( + () => t('lines', { returnObjects: true }) as unknown as BootLine[], + [t, i18n.language], + ); const done = prefersReducedMotion(); const [visible, setVisible] = useState<{ line: number; char: number }>( done ? { line: LINES.length, char: 0 } : { line: 0, char: 0 }, @@ -53,11 +50,11 @@ export function BootLog() { cancelled = true; clearTimeout(timer); }; - }, [done]); + }, [done, LINES]); return (
       {LINES.map((l, i) => {
diff --git a/web/src/components/PhoneMock.tsx b/web/src/components/PhoneMock.tsx
index cba4d3b..53ba43d 100644
--- a/web/src/components/PhoneMock.tsx
+++ b/web/src/components/PhoneMock.tsx
@@ -1,4 +1,5 @@
 import { useEffect, useState } from 'react';
+import { useTranslation } from 'react-i18next';
 import { CalendarClock, Wifi } from 'lucide-react';
 import { StreakDots } from './StreakDots';
 
@@ -15,7 +16,7 @@ function useClock() {
 }
 
 // odliczany w pętli czas przerwy między seriami
-function useBreakCountdown(from = 45) {
+function useRestCountdown(from = 45) {
   const [secs, setSecs] = useState(from);
   useEffect(() => {
     const id = setInterval(() => setSecs((s) => (s > 0 ? s - 1 : from)), 1000);
@@ -64,14 +65,11 @@ function SideButtons() {
 
 /** Mock iPhone’a 16 Pro (tytan, Dynamic Island) z odpaloną apką „Trwa trening”. */
 export function PhoneMock() {
+  const { t } = useTranslation('mock');
   const clock = useClock();
-  const przerwa = useBreakCountdown();
+  const rest = useRestCountdown();
   return (
-    
+
@@ -100,9 +98,11 @@ export function PhoneMock() {
- Trwa trening + {t('liveSession')} + + + {t('sessionDay', { n: 3 })} - sesja · dzień 3
@@ -111,7 +111,7 @@ export function PhoneMock() { {' '} - Przysiady + {t('squats')} 4 × 8 @ 100 kg @@ -120,46 +120,46 @@ export function PhoneMock() { {' '} - Wyciskanie skos + {t('inclinePress')} 3 × 10 @ 60 kg

- Wyciskanie sztangi + {t('barbellPress')}

4 x 8 @ 80 kg · RIR 2

- Seria 3/4 - powt. 8 + {t('setOf', { done: 3, total: 4 })} + {t('repsValue', { n: 8 })}
- Przerwa + {t('rest')} - {przerwa} + {rest}
- Norma spełniona + {t('goalMet')}
{/* dwa kafelki: killstreak i pomiary */}
- Killstreak + {t('killstreakTile')} -

23 dni · rekord 41

+

{t('killstreakInfo')}

- Progres + {t('progressTile')} -

- Wyciskanie +20 kg / 12 tyg. -

+

{t('progressInfo')}

@@ -184,9 +182,9 @@ export function PhoneMock() {
- 4 ćwiczenia + {t('exercisesCount')}
diff --git a/web/src/i18n/index.ts b/web/src/i18n/index.ts new file mode 100644 index 0000000..dc9fc69 --- /dev/null +++ b/web/src/i18n/index.ts @@ -0,0 +1,112 @@ +import i18n from 'i18next'; +import { initReactI18next } from 'react-i18next'; +import { + applyDocumentLanguage, + detectInitialLanguage, + setStoredLanguage, + type Language, +} from './language'; +import plCommon from './locales/pl/common.json'; +import plNav from './locales/pl/nav.json'; +import plHero from './locales/pl/hero.json'; +import plBoot from './locales/pl/boot.json'; +import plMock from './locales/pl/mock.json'; +import plManifest from './locales/pl/manifest.json'; +import plEcosystem from './locales/pl/ecosystem.json'; +import plConcepts from './locales/pl/concepts.json'; +import plTracks from './locales/pl/tracks.json'; +import plCta from './locales/pl/cta.json'; +import plFooter from './locales/pl/footer.json'; +import enCommon from './locales/en/common.json'; +import enNav from './locales/en/nav.json'; +import enHero from './locales/en/hero.json'; +import enBoot from './locales/en/boot.json'; +import enMock from './locales/en/mock.json'; +import enManifest from './locales/en/manifest.json'; +import enEcosystem from './locales/en/ecosystem.json'; +import enConcepts from './locales/en/concepts.json'; +import enTracks from './locales/en/tracks.json'; +import enCta from './locales/en/cta.json'; +import enFooter from './locales/en/footer.json'; + +export const NAMESPACES = [ + 'common', + 'nav', + 'hero', + 'boot', + 'mock', + 'manifest', + 'ecosystem', + 'concepts', + 'tracks', + 'cta', + 'footer', +] as const; +export type Namespace = (typeof NAMESPACES)[number]; + +const resources = { + pl: { + common: plCommon, + nav: plNav, + hero: plHero, + boot: plBoot, + mock: plMock, + manifest: plManifest, + ecosystem: plEcosystem, + concepts: plConcepts, + tracks: plTracks, + cta: plCta, + footer: plFooter, + }, + en: { + common: enCommon, + nav: enNav, + hero: enHero, + boot: enBoot, + mock: enMock, + manifest: enManifest, + ecosystem: enEcosystem, + concepts: enConcepts, + tracks: enTracks, + cta: enCta, + footer: enFooter, + }, +} as const; + +const initial = detectInitialLanguage(); +applyDocumentLanguage(initial); + +function applyDocumentMeta() { + document.title = i18n.t('common:documentTitle'); + const meta = document.querySelector('meta[name="description"]'); + if (meta) meta.setAttribute('content', i18n.t('common:metaDescription')); +} + +void i18n + .use(initReactI18next) + .init({ + lng: initial, + fallbackLng: 'pl', + supportedLngs: ['pl', 'en'], + defaultNS: 'common', + ns: [...NAMESPACES], + resources, + interpolation: { escapeValue: false }, + react: { useSuspense: false }, + }) + .then(applyDocumentMeta); + +// , document.title i meta description podążają za językiem także +// przy zmianie przez i18n.changeLanguage (testy, przełącznik), nie tylko przez changeLanguage() z tego modułu. +i18n.on('languageChanged', (lng) => { + applyDocumentLanguage(lng === 'en' ? 'en' : 'pl'); + applyDocumentMeta(); +}); + +export function changeLanguage(lang: Language) { + setStoredLanguage(lang); + void i18n.changeLanguage(lang); +} + +export { i18n }; +export default i18n; diff --git a/web/src/i18n/language.ts b/web/src/i18n/language.ts new file mode 100644 index 0000000..a987fc5 --- /dev/null +++ b/web/src/i18n/language.ts @@ -0,0 +1,35 @@ +export type Language = 'pl' | 'en'; + +/* osobny klucz niż w app ('fitos-lang') — web i app mogą współdzielić domenę macierzystą */ +const STORAGE_KEY = 'fitos-web-lang'; + +export function getStoredLanguage(): Language | null { + try { + const saved = localStorage.getItem(STORAGE_KEY); + if (saved === 'pl' || saved === 'en') return saved; + } catch { + // ignore + } + return null; +} + +export function setStoredLanguage(lang: Language) { + try { + localStorage.setItem(STORAGE_KEY, lang); + } catch { + // ignore + } +} + +/* localStorage → navigator.language (en* → en) → pl. */ +export function detectInitialLanguage(): Language { + const stored = getStoredLanguage(); + if (stored) return stored; + const nav = typeof navigator !== 'undefined' ? navigator.language || '' : ''; + if (nav.toLowerCase().startsWith('en')) return 'en'; + return 'pl'; +} + +export function applyDocumentLanguage(lang: Language) { + document.documentElement.lang = lang; +} diff --git a/web/src/i18n/locales/en/boot.json b/web/src/i18n/locales/en/boot.json new file mode 100644 index 0000000..db605b7 --- /dev/null +++ b/web/src/i18n/locales/en/boot.json @@ -0,0 +1,10 @@ +{ + "logAria": "FitOS boot log", + "lines": [ + { "text": "$ fitos --init" }, + { "text": "Training module ....... ", "ok": true }, + { "text": "Coaching module ....... ", "ok": true }, + { "text": "Gyms module ........... ", "ok": true }, + { "text": "$ system ready — 0 errors" } + ] +} diff --git a/web/src/i18n/locales/en/common.json b/web/src/i18n/locales/en/common.json new file mode 100644 index 0000000..af939df --- /dev/null +++ b/web/src/i18n/locales/en/common.json @@ -0,0 +1,5 @@ +{ + "documentTitle": "FitOS — Training that delivers.", + "metaDescription": "FitOS — the operating system for training. From planning to the last set: plans, live sessions, killstreaks, coaches and gyms in one place.", + "brandVersion": "v1 · MVP" +} diff --git a/web/src/i18n/locales/en/concepts.json b/web/src/i18n/locales/en/concepts.json new file mode 100644 index 0000000..2e17195 --- /dev/null +++ b/web/src/i18n/locales/en/concepts.json @@ -0,0 +1,64 @@ +{ + "title": "Glossary of concepts", + "lead": "Six bricks FitOS is built from. Even without knowing the system, this one section is enough to get what it's about.", + "tags": [ + "dumbbells", + "kettlebell", + "barbell", + "cable", + "machine", + "bench", + "cardio", + "bodyweight" + ], + "membership": { + "exerciser": "exerciser", + "coachRole": "role: coach", + "gym": "gym", + "inviteLine": "invitation: valid until Nov 30 · access expires afterwards" + }, + "verification": { + "question": "— how well the profile reflects the real person", + "status": "Status: Verified" + }, + "measurements": { + "weightStart": "82.4 kg", + "loss": "−4.3 kg / 12 wks", + "weightEnd": "78.1 kg" + }, + "days": ["M", "T", "W", "T", "F", "S"], + "states": { + "done": "done", + "planned": "planned", + "skipped": "skipped", + "off": "rest day" + }, + "planFlow": "plan → day-of → live session: in progress → completed", + "streakNote": "every complete workout adds a dot; a skipped day wipes the streak", + "items": { + "sprzet": { + "title": "Equipment", + "desc": "A gym equipment catalogue — with specs and photos. An exerciser's plan is computed from the equipment actually standing on the gym floor." + }, + "czlonkostwa": { + "title": "Memberships", + "desc": "How people and places connect inside the system, enabling safe cooperation and access to private zones." + }, + "weryfikacja": { + "title": "Verification", + "desc": "A trust and authenticity system. A gym or coach profile can be a virtual reflection of a community or a verified venue with an address and schedule — with an admin's consent." + }, + "pomiary": { + "title": "Measurements", + "desc": "Body metrics over time: weight, circumferences, photos. Body fat and muscle mass computed automatically — a chart in the app, not in a spreadsheet." + }, + "plan": { + "title": "Plan and session", + "desc": "A plan is week after week: days planned, completed and skipped. A live session is a logged workout — set after set, with weights and reps." + }, + "killstreak": { + "title": "Killstreak", + "desc": "A streak of consecutive effective workouts. Only complete ones count — every set logged; a skipped or unfinished day resets the counter." + } + } +} diff --git a/web/src/i18n/locales/en/cta.json b/web/src/i18n/locales/en/cta.json new file mode 100644 index 0000000..f4b09b2 --- /dev/null +++ b/web/src/i18n/locales/en/cta.json @@ -0,0 +1,13 @@ +{ + "linesA": [ + "ready: training · coaching · gyms", + "critical errors: none", + "data: your infrastructure", + "start ready — pick a module" + ], + "linesB": ["$ fitos --run", "port 9002 · self-hosted", "$ ./start --pick-module"], + "heading": "System ready.", + "lead": "Switch on the module you need: your own training or your clients' training.", + "openApp": "Open the app", + "adminPanel": "Admin panel" +} diff --git a/web/src/i18n/locales/en/ecosystem.json b/web/src/i18n/locales/en/ecosystem.json new file mode 100644 index 0000000..0289e17 --- /dev/null +++ b/web/src/i18n/locales/en/ecosystem.json @@ -0,0 +1,36 @@ +{ + "hubLabel": "core", + "title": "Ecosystem — the core of the system", + "lead": "FitOS isn't a training app with a gym add-on. It's a core in which the needs of exercisers, coaches and gyms interlock — nobody here is an end user.", + "rows": { + "wnosi": "brings", + "bierze": "takes", + "wiaze": "links" + }, + "participants": { + "cwiczacy": { + "role": "Exerciser", + "brings": "trust and real training results — the data everything else rests on", + "gets": "equipment, a plan, a coach and a community in one place", + "link": "trains in a gym whose equipment limits their plan" + }, + "trener": { + "role": "Coach", + "brings": "knowledge: plans, progressions and care for their clients", + "gets": "access to gym floors and clients who actually train", + "link": "writes plans around the equipment of the gym where their client trains" + }, + "silownia": { + "role": "Gym", + "brings": "equipment, hours, rules and a place to train", + "gets": "people who show up with a plan, and a voice in their own feed", + "link": "supplies equipment and announces itself to the people who need it" + }, + "admin": { + "role": "Administrator", + "brings": "stability: care for data quality and ecosystem security", + "gets": "an ecosystem that runs itself — no default trust, no junk data", + "link": "grants official status to gyms after verifying their authenticity" + } + } +} diff --git a/web/src/i18n/locales/en/footer.json b/web/src/i18n/locales/en/footer.json new file mode 100644 index 0000000..f0fa492 --- /dev/null +++ b/web/src/i18n/locales/en/footer.json @@ -0,0 +1,13 @@ +{ + "aboutTitle": "About this system", + "about": { + "producer": "Producer", + "producerValue": "FitOS", + "version": "Version", + "versionValue": "MVP (v1)", + "core": "Core", + "coreValue": "Express + Prisma + PostgreSQL" + }, + "blurb": "FitOS is the operating system for training: plans, live sessions, killstreaks, coaches and gyms — all on one self-hosted stack.", + "copyright": "© {{year}} FitOS — training that delivers." +} diff --git a/web/src/i18n/locales/en/hero.json b/web/src/i18n/locales/en/hero.json new file mode 100644 index 0000000..722b2bd --- /dev/null +++ b/web/src/i18n/locales/en/hero.json @@ -0,0 +1,8 @@ +{ + "titleA": "Training,", + "titleB": "that actually", + "titleC": "delivers.", + "lead": "FitOS is the operating system for training. From planning to the last set.", + "openApp": "Open the app", + "adminPanel": "Admin panel" +} diff --git a/web/src/i18n/locales/en/manifest.json b/web/src/i18n/locales/en/manifest.json new file mode 100644 index 0000000..7902919 --- /dev/null +++ b/web/src/i18n/locales/en/manifest.json @@ -0,0 +1,19 @@ +{ + "linesA": [ + "$ fitos --run", + "core: Express + Prisma + PostgreSQL", + "plan → day → session → set", + "killstreak: complete workouts only" + ], + "linesB": [ + "perspectives: exerciser · coach · owner · admin", + "ecosystem: shared data, different goals", + "data: self-hosted, zero cloud", + "$ ./track --yours" + ], + "headlineA": "Plan. Set. Weight. Measure.", + "headlineB": "All in one system.", + "para1": "FitOS replaces the chaos of a dozen apps with one secure self-hosted platform, installed directly in your infrastructure.", + "para2": "We brought exercisers, coaches and gym owners together in a shared data ecosystem. No middlemen, no privacy leaks, on the same plans and measurements.", + "discover": "Get to know FitOS: check out the ecosystem architecture, the glossary of concepts and dedicated user tracks." +} diff --git a/web/src/i18n/locales/en/mock.json b/web/src/i18n/locales/en/mock.json new file mode 100644 index 0000000..2bb565e --- /dev/null +++ b/web/src/i18n/locales/en/mock.json @@ -0,0 +1,18 @@ +{ + "previewAria": "FitOS app preview on a phone: a session is running, set 3 of 4, killstreak 23 days", + "liveSession": "Session running", + "sessionDay": "session · day {{n}}", + "squats": "Squats", + "inclinePress": "Incline press", + "barbellPress": "Barbell bench press", + "setOf": "Set {{done}}/{{total}}", + "repsValue": "reps {{n}}", + "rest": "Rest", + "goalMet": "Goal met", + "killstreakTile": "Killstreak", + "killstreakInfo": "23 days · best 41", + "progressTile": "Progress", + "progressInfo": "Bench +20 kg / 12 wks", + "nextSession": "Thursday · Cables & Back", + "exercisesCount": "4 exercises" +} diff --git a/web/src/i18n/locales/en/nav.json b/web/src/i18n/locales/en/nav.json new file mode 100644 index 0000000..3802b2a --- /dev/null +++ b/web/src/i18n/locales/en/nav.json @@ -0,0 +1,12 @@ +{ + "sectionsAria": "Site sections", + "anchors": { + "ekosystem": "Ecosystem", + "slownik": "Glossary", + "sciezki": "Tracks" + }, + "launch": "Launch", + "langPl": "Polski", + "langEn": "English", + "langSwitchAria": "Change language" +} diff --git a/web/src/i18n/locales/en/tracks.json b/web/src/i18n/locales/en/tracks.json new file mode 100644 index 0000000..d9419bc --- /dev/null +++ b/web/src/i18n/locales/en/tracks.json @@ -0,0 +1,118 @@ +{ + "introTitle": "Choose your track", + "introLead": "The same system from four perspectives. Expand yours — you'll see the role, the modules and how they interlock with the gym and the rest of the ecosystem.", + "process": "process {{index}}/04", + "expand": "+ open details", + "collapse": "— collapse", + "detailsAria": "Details: {{label}}", + "labels": { + "trenujacy": "Exerciser track", + "trener": "Coach track", + "silownia": "Gym track", + "admin": "Administrator track" + }, + "trackCards": { + "trenujacy": "For exercisers", + "trener": "For coaches", + "silownia": "For gyms", + "admin": "For admins" + }, + "summaries": { + "trenujacy": "You train from plan to the last set — and the plan, history and calendar live on the equipment of real (or verified virtual) gyms.", + "trener": "You guide clients from plan to correction — in the context of the equipment and rules of the gym where they actually train.", + "silownia": "In FitOS a gym is a full participant: from a virtual reflection to a verified venue with equipment, schedule and its own feed.", + "admin": "The backstage that keeps the ecosystem in check: users, gyms, verifications, content catalogues and a full audit." + }, + "roleTitle": "Role and permissions", + "roleSummary": { + "trenujacy": "Exerciser — an ordinary gym member: they train and use plans, and their role in a given gym is granted by membership.", + "trener": "Coach — looks after clients and writes their training plans; in a gym they hold the role granted in a membership.", + "silownia": "Gym owner — runs the venue; a permission granted in a membership, not a separate account type.", + "admin": "Administrator — full access to the FitOS admin panel; a role flagged on the account." + }, + "gains": { + "trenujacy": ["Create plans and run workouts", "Access the gym feed and stats"], + "trener": [ + "Invite clients and look after them", + "Create and edit their plans", + "Insight into client progress" + ], + "silownia": [ + "Gym details, hours and address", + "Equipment, photos and schedule", + "Invite people and grant them roles" + ], + "admin": [ + "Manage all users and gyms", + "Verify gym submissions", + "Catalogues, notices and system logs" + ] + }, + "moduleTitle": "Modules", + "linksTitle": "Connections", + "modCards": { + "plans": "Plans.app", + "session": "Live Session", + "killstreak": "Killstreak.app", + "progress": "Progress.app", + "measurements": "Measures.app", + "calendar": "Calendar.app", + "trainees": "Clients.app", + "planning": "Planning.app", + "messenger": "Messenger.app", + "invitations": "Invitations.app", + "profile": "Gym.Profile", + "equipment": "Floor.Equipment", + "announcements": "Announce.Feed", + "private": "Private.Room", + "users": "Users", + "gyms": "Gyms", + "verifications": "Verifications", + "dictionaries": "Catalogues", + "logs": "Logs", + "notices": "Notices" + }, + "bodies": { + "plans": "The whole training structure: week → day → session → set. A plan matures in draft → active mode, weeks have aliases (“Deload”). The gym restricts equipment choice, and day dates are computed automatically.", + "session": "You enter reps, RIR 0–10 and a difficulty slider 1–5. The rest timer keeps rest in check, and the “Goal met” button closes the set. Extra sets beyond the plan? Sure — as a bonus.", + "killstreak": "Consecutive effective workouts form a streak. It resets after a skipped or partial day — no mercy, no cheating. You see your best record and dots from the last 30 days.", + "progress": "Charts of estimated 1RM and volume, records and deltas. Exercises matched to your goals and exclusions — you watch what actually grows.", + "measurements": "Weight and circumferences: chest, waist, biceps L/R and the rest of the tape. The system counts the delta from the first measurement, so progress shows in numbers, not in the mirror.", + "calendar": "The training year on one screen: goal, bonus, deficit on every day. History with comments on sets — you remember not only the weight but also why.", + "trainees": "A relationship cockpit in six tabs: Overview, Conversation, Discipline, Progress, Calendar, Plans. The system lights up flags itself: reset streak, no session for 7 days, high deficit. Sets colored by range.", + "planning": "One active plan per client — zero draft versions in circulation. Put “Client results” into the norms, so progression is computed from real weights, not from thin air.", + "messenger": "A coach ↔ client relationship, a separate thread per relationship. Instead of a screenshot you attach a session or a specific exercise with results — the conversation has context.", + "invitations": "Coaching cooperation and access to private gyms — via invitations with an expiry date. The key expires, access doesn't linger by accident.", + "profile": "You start virtual: the community reflects real gyms, and 👍/👎 ratings say how well the description matches reality. Then real: address, gallery with a cover, schedule and capacity.", + "equipment": "Equipment straight from the catalogue: dumbbells, kettlebell, barbell, cable, machine, bench, cardio, bodyweight. Every entry with a spec and photos — exercisers' plans are computed exactly from this list.", + "announcements": "An announcement reaches members, not the whole world:", + "announcementNote": "⚠ Power outage — gym closed", + "private": "Want a closed room? Private gyms work exclusively with invitations (expiry date). The owner invites people and grants them roles.", + "users": "Account management (profile data and access), gym memberships and moderation: suspending and blocking accounts.", + "gyms": "Assigning the owner, running the gallery, publishing announcements on the gym's behalf.", + "verifications": "New gym submissions and virtual verification. A process of confirming a venue's authenticity — approval grants REAL status and makes the applicant the owner.", + "dictionaries": "Content catalogues: exercise types with “how it's done” descriptions and common mistakes, machines and training areas.", + "logs": "Full activity audit — ActivityLog records who, what and when. In a dispute there's no discussion, there's an entry.", + "notices": "System notices for members — the same mechanism as gym announcements, a different source of the entry." + }, + "links": { + "trenujacy": [ + "You train in a gym whose equipment limits your plan — and you read its announcements (e.g. breakdowns) in News, next to your coach's plans.", + "Want to train in a private gym? You get an invitation with an expiry date — see gym track.", + "Working with a coach? Their plans, conversations and discipline are the coach track — the same data pipeline." + ], + "trener": [ + "You write plans around the gym's equipment where your client trains — the catalogue and constraints are the same set of interlocks as for the exerciser.", + "Your plans and conversations reach the client through the feed and messenger — no separate app for contact.", + "Want to train on the floor as an external coach? The owner grants you a role via the gym track." + ], + "silownia": [ + "Exercisers verify your virtual reflection with votes, and a document-backed submission is approved by the administrator track — from that moment the profile is REAL.", + "Coaches write plans around your equipment (see coach track), and their clients come to the floor with a ready plan." + ], + "admin": [ + "You approve a verification and the gym track becomes REAL — with equipment and a feed for its members.", + "The catalogues (exercises, machines, areas) are the content on which the exerciser track and the coach track build every plan." + ] + } +} diff --git a/web/src/i18n/locales/pl/boot.json b/web/src/i18n/locales/pl/boot.json new file mode 100644 index 0000000..5194870 --- /dev/null +++ b/web/src/i18n/locales/pl/boot.json @@ -0,0 +1,10 @@ +{ + "logAria": "Log startowy FitOS", + "lines": [ + { "text": "$ fitos --init" }, + { "text": "moduł Trening ......... ", "ok": true }, + { "text": "moduł Coaching ........ ", "ok": true }, + { "text": "moduł Siłownie ........ ", "ok": true }, + { "text": "$ system gotowy — 0 błędów" } + ] +} diff --git a/web/src/i18n/locales/pl/common.json b/web/src/i18n/locales/pl/common.json new file mode 100644 index 0000000..e0102d5 --- /dev/null +++ b/web/src/i18n/locales/pl/common.json @@ -0,0 +1,5 @@ +{ + "documentTitle": "FitOS — Trening, który się dowozi.", + "metaDescription": "FitOS — system operacyjny treningu. Od planowania po ostatnią serię: plany, sesje na żywo, killstreak, trenerzy i siłownie w jednym miejscu.", + "brandVersion": "v1 · MVP" +} diff --git a/web/src/i18n/locales/pl/concepts.json b/web/src/i18n/locales/pl/concepts.json new file mode 100644 index 0000000..a3cc07d --- /dev/null +++ b/web/src/i18n/locales/pl/concepts.json @@ -0,0 +1,55 @@ +{ + "title": "Słownik pojęć", + "lead": "Sześć cegieł, z których zbudowany jest FitOS. Bez znajomości systemu wystarczy ta jedna sekcja, żeby wiedzieć, o co w nim chodzi.", + "tags": ["hantle", "kettlebell", "sztanga", "wyciąg", "maszyna", "ławka", "cardio", "masa ciała"], + "membership": { + "exerciser": "ćwiczący", + "coachRole": "rola: trener", + "gym": "siłownia", + "inviteLine": "zaproszenie: ważne do 30 lis · po terminie dostęp wygasa" + }, + "verification": { + "question": "— czy profil dobrze oddaje prawdziwą osobę", + "status": "Status: Zweryfikowane" + }, + "measurements": { + "weightStart": "82,4 kg", + "loss": "−4,3 kg / 12 tyg.", + "weightEnd": "78,1 kg" + }, + "days": ["P", "W", "Ś", "C", "S", "N"], + "states": { + "done": "ukończony", + "planned": "planowany", + "skipped": "pominięty", + "off": "dzień wolny" + }, + "planFlow": "plan → dzień w dniu → sesja na żywo: w trakcie → ukończona", + "streakNote": "każdy kompletny trening dokłada kropkę; pominięty dzień kasuje serię", + "items": { + "sprzet": { + "title": "Sprzęt", + "desc": "Katalog sprzętu siłowni — ze specyfikacjami i zdjęciami. Plan ćwiczącego liczony jest ze sprzętu, który realnie stoi w hali." + }, + "czlonkostwa": { + "title": "Członkostwa", + "desc": "Sposób, w jaki ludzie i miejsca łączą się w systemie, umożliwiając bezpieczną współpracę i dostęp do prywatnych stref." + }, + "weryfikacja": { + "title": "Weryfikacja", + "desc": "System budowania zaufania i autentyczności. Profil siłowni lub trenera może być wirtualnym odwzorowaniem społeczności lub zweryfikowanym obiektem z adresem i grafikiem — za zgodą administratora." + }, + "pomiary": { + "title": "Pomiary", + "desc": "Parametry ciała w czasie: waga, obwody, zdjęcia. Procenty i masy mięśniowe liczone automatycznie — wykres w aplikacji, nie w arkuszu." + }, + "plan": { + "title": "Plan i sesja", + "desc": "Plan to tydzień po tygodniu: dni planowane, ukończone i pominięte. Sesja na żywo to zapisany trening — seria po serii, z ciężarami i powtórzeniami." + }, + "killstreak": { + "title": "Killstreak", + "desc": "Seria kolejnych skutecznych treningów. Liczą się tylko te kompletne — każda seria zapisana; pominięty lub niedokończony dzień resetuje licznik." + } + } +} diff --git a/web/src/i18n/locales/pl/cta.json b/web/src/i18n/locales/pl/cta.json new file mode 100644 index 0000000..27a062e --- /dev/null +++ b/web/src/i18n/locales/pl/cta.json @@ -0,0 +1,13 @@ +{ + "linesA": [ + "gotowe: trening · coaching · siłownie", + "błędy krytyczne: brak", + "dane: Twoja infrastruktura", + "start gotowy — wybieraj modul" + ], + "linesB": ["$ fitos --run", "port 9002 · self-hosted", "$ ./start --wybierz-modul"], + "heading": "System gotowy.", + "lead": "Włącz moduł, którego potrzebujesz: trening swój albo trening podopiecznych.", + "openApp": "Otwórz aplikację", + "adminPanel": "Panel admina" +} diff --git a/web/src/i18n/locales/pl/ecosystem.json b/web/src/i18n/locales/pl/ecosystem.json new file mode 100644 index 0000000..a35a2cc --- /dev/null +++ b/web/src/i18n/locales/pl/ecosystem.json @@ -0,0 +1,36 @@ +{ + "hubLabel": "rdzeń", + "title": "Ekosystem — rdzeń systemu", + "lead": "FitOS nie jest aplikacją treningową z dodatkiem siłowni. To rdzeń, w którym potrzeby ćwiczących, trenerów i siłowni zazębiają się nawzajem — nikt nie jest tu użytkownikiem końcowym.", + "rows": { + "wnosi": "wnosi", + "bierze": "bierze", + "wiaze": "wiąże" + }, + "participants": { + "cwiczacy": { + "role": "Ćwiczący", + "brings": "zaufanie i realne wyniki treningów — dane, na których trzyma się cała reszta", + "gets": "sprzęt, plan, trener i społeczność w jednym miejscu", + "link": "trenuje w siłowni, której sprzęt limituje jego plan" + }, + "trener": { + "role": "Trener", + "brings": "wiedzę: plany, progresje i opiekę nad podopiecznymi", + "gets": "dostęp do hal siłowni i podopiecznych, którzy realnie trenują", + "link": "układa plany pod sprzęt siłowni, w której trenuje jego podopieczny" + }, + "silownia": { + "role": "Siłownia", + "brings": "sprzęt, godziny, zasady i miejsce do trenowania", + "gets": "ludzi, którzy przychodzą po plan, i głos w swoim feedzie", + "link": "dostarcza sprzęt i ogłasza się ludziom, którzy jej potrzebują" + }, + "admin": { + "role": "Administrator", + "brings": "stabilność: dbałość o jakość danych i bezpieczeństwo ekosystemu", + "gets": "ekosystem, który działa sam — bez domyślnego zaufania i śmieciowych danych", + "link": "nadaje oficjalny status siłowniom po weryfikacji ich autentyczności" + } + } +} diff --git a/web/src/i18n/locales/pl/footer.json b/web/src/i18n/locales/pl/footer.json new file mode 100644 index 0000000..5ca664a --- /dev/null +++ b/web/src/i18n/locales/pl/footer.json @@ -0,0 +1,13 @@ +{ + "aboutTitle": "O tym systemie", + "about": { + "producer": "Producent", + "producerValue": "FitOS", + "version": "Wersja", + "versionValue": "MVP (v1)", + "core": "Rdzeń", + "coreValue": "Express + Prisma + PostgreSQL" + }, + "blurb": "FitOS to system operacyjny treningu: plany, sesje na żywo, killstreak, trenerzy i siłownie — wszystko na jednym, self-hostedzie.", + "copyright": "© {{year}} FitOS — trening, który się dowozi." +} diff --git a/web/src/i18n/locales/pl/hero.json b/web/src/i18n/locales/pl/hero.json new file mode 100644 index 0000000..832bc91 --- /dev/null +++ b/web/src/i18n/locales/pl/hero.json @@ -0,0 +1,8 @@ +{ + "titleA": "Trening,", + "titleB": "który się", + "titleC": "dowozi.", + "lead": "FitOS to system operacyjny treningu. Od planowania po ostatnią serię.", + "openApp": "Otwórz aplikację", + "adminPanel": "Panel admina" +} diff --git a/web/src/i18n/locales/pl/manifest.json b/web/src/i18n/locales/pl/manifest.json new file mode 100644 index 0000000..e4a6a64 --- /dev/null +++ b/web/src/i18n/locales/pl/manifest.json @@ -0,0 +1,19 @@ +{ + "linesA": [ + "$ fitos --run", + "rdzeń: Express + Prisma + PostgreSQL", + "plan → dzień → sesja → seria", + "killstreak: tylko kompletne treningi" + ], + "linesB": [ + "perspektywy: ćwiczący · trener · właściciel · admin", + "ekosystem: wspólne dane, różne cele", + "dane: self-hosted, zero chmury", + "$ ./sciezka --twoja" + ], + "headlineA": "Plan. Seria. Ciężar. Pomiar.", + "headlineB": "Wszystko w jednym systemie.", + "para1": "FitOS zastępuje chaos kilkunastu aplikacji jedną, bezpieczną platformą self-hosted, instalowaną bezpośrednio w Twojej infrastrukturze.", + "para2": "Połączyliśmy ćwiczących, trenerów i właścicieli siłowni we wspólnym ekosystemie danych. Bez pośredników, bez wycieku prywatności, na tych samych planach i pomiarach.", + "discover": "Poznaj FitOS: sprawdź architekturę ekosystemu, słownik pojęć i dedykowane ścieżki użytkowników." +} diff --git a/web/src/i18n/locales/pl/mock.json b/web/src/i18n/locales/pl/mock.json new file mode 100644 index 0000000..e75c5c1 --- /dev/null +++ b/web/src/i18n/locales/pl/mock.json @@ -0,0 +1,18 @@ +{ + "previewAria": "Podgląd aplikacji FitOS na telefonie: trwa trening, seria 3 na 4, killstreak 23 dni", + "liveSession": "Trwa trening", + "sessionDay": "sesja · dzień {{n}}", + "squats": "Przysiady", + "inclinePress": "Wyciskanie skos", + "barbellPress": "Wyciskanie sztangi", + "setOf": "Seria {{done}}/{{total}}", + "repsValue": "powt. {{n}}", + "rest": "Przerwa", + "goalMet": "Norma spełniona", + "killstreakTile": "Killstreak", + "killstreakInfo": "23 dni · rekord 41", + "progressTile": "Progres", + "progressInfo": "Wyciskanie +20 kg / 12 tyg.", + "nextSession": "Czwartek · Wyciąg i plecy", + "exercisesCount": "4 ćwiczenia" +} diff --git a/web/src/i18n/locales/pl/nav.json b/web/src/i18n/locales/pl/nav.json new file mode 100644 index 0000000..f75ab41 --- /dev/null +++ b/web/src/i18n/locales/pl/nav.json @@ -0,0 +1,12 @@ +{ + "sectionsAria": "Sekcje strony", + "anchors": { + "ekosystem": "Ekosystem", + "slownik": "Słownik", + "sciezki": "Ścieżki" + }, + "launch": "Uruchom", + "langPl": "Polski", + "langEn": "English", + "langSwitchAria": "Zmień język" +} diff --git a/web/src/i18n/locales/pl/tracks.json b/web/src/i18n/locales/pl/tracks.json new file mode 100644 index 0000000..23adbe0 --- /dev/null +++ b/web/src/i18n/locales/pl/tracks.json @@ -0,0 +1,121 @@ +{ + "introTitle": "Wybierz swoją ścieżkę", + "introLead": "Ten sam system z czterech perspektyw. Rozwiń swoją — zobaczysz rolę, moduły i to, jak zazębiają się z siłownią i resztą ekosystemu.", + "process": "proces {{index}}/04", + "expand": "+ otwórz szczegóły", + "collapse": "— zwij", + "detailsAria": "Szczegóły: {{label}}", + "labels": { + "trenujacy": "Ścieżka ćwiczącego", + "trener": "Ścieżka trenera", + "silownia": "Ścieżka siłowni", + "admin": "Ścieżka administratora" + }, + "trackCards": { + "trenujacy": "Dla ćwiczącego", + "trener": "Dla trenera", + "silownia": "Dla siłowni", + "admin": "Dla administratora" + }, + "summaries": { + "trenujacy": "Trenujesz od planu po ostatnią serię — a plan, historia i kalendarz żyją na sprzęcie realnych (albo zweryfikowanych wirtualnych) siłowni.", + "trener": "Prowadzisz podopiecznych od planu po korektę — w kontekście sprzętu i zasad siłowni, w której realnie trenują.", + "silownia": "Siłownia to w FitOS pełnoprawny uczestnik: od wirtualnego odwzorowania po zweryfikowaną halę ze sprzętem, grafikiem i własnym feedem.", + "admin": "Zaplecze, które trzyma ekosystem w ryzach: użytkownicy, siłownie, weryfikacje, katalogi treści i pełny audyt." + }, + "roleTitle": "Rola i uprawnienia", + "roleSummary": { + "trenujacy": "Ćwiczący — zwykły członek siłowni: trenuje i korzysta z planów, a rolę w konkretnej siłowni nadaje mu członkostwo.", + "trener": "Trener — prowadzi podopiecznych i układa im plany treningowe; w siłowni pełni rolę nadaną w członkostwie.", + "silownia": "Właściciel siłowni — zarządza halą; to uprawnienie nadawane w członkostwie, nie osobny typ konta.", + "admin": "Administrator — pełny dostęp do panelu administratora FitOS; rola flagą na koncie." + }, + "gains": { + "trenujacy": [ + "Tworzenie planów i prowadzenie treningów", + "Dostęp do feedu i statystyk siłowni" + ], + "trener": [ + "Zapraszanie podopiecznych i opieka nad nimi", + "Tworzenie i edycja ich planów", + "Wgląd w postępy podopiecznych" + ], + "silownia": [ + "Dane, godziny i adres siłowni", + "Sprzęt, zdjęcia i grafik", + "Zapraszanie ludzi i nadawanie im ról" + ], + "admin": [ + "Zarządzanie wszystkimi użytkownikami i siłowniami", + "Weryfikacja zgłoszeń siłowni", + "Katalogi, komunikaty i logi systemowe" + ] + }, + "moduleTitle": "Moduly", + "linksTitle": "Powiazania", + "modCards": { + "plans": "Plany.app", + "session": "Sesja na zywo", + "killstreak": "Killstreak.app", + "progress": "Postepy.app", + "measurements": "Pomiary.app", + "calendar": "Kalendarz.app", + "trainees": "Podopieczni.app", + "planning": "Planowanie.app", + "messenger": "Komunikator.app", + "invitations": "Zaproszenia.app", + "profile": "Profil.silowni", + "equipment": "Sprzet.hali", + "announcements": "Ogloszenia.feed", + "private": "Prywatna.sala", + "users": "Uzytkownicy", + "gyms": "Silownie", + "verifications": "Weryfikacje", + "dictionaries": "Slowniki", + "logs": "Logi", + "notices": "Ogloszenia" + }, + "bodies": { + "plans": "Cała struktura treningu: tydzień → dzień → sesja → seria. Plan dojrzewa w trybie szkic → aktywny, tygodnie mają aliasy „Deload”. Siłownia ogranicza dobór sprzętu, a daty dni liczą się automatycznie.", + "session": "Wpisujesz powtórzenia, RIR 0–10 i suwak trudności 1–5. Timer przerwy pilnuje przerw, a przycisk „Norma spełniona” domyka serię. Serie ponad plan? Proszę bardzo — jako bonus.", + "killstreak": "Kolejne skuteczne treningi tworzą serię. Reset po pominięciu lub dniu częściowym — bez litości, bez oszukiwania. Widzisz rekord best i kropki z ostatnich 30 dni.", + "progress": "Wykresy szacowanego 1RM i objętości, rekordy i delty. Ćwiczenia dopasowane do Twoich celów i wykluczeń — patrzysz na to, co realnie rośnie.", + "measurements": "Waga i obwody: klatka, talia, biceps L/P i reszta taśmy. System liczy deltę od pierwszego pomiaru, więc postęp widać w liczbach, nie w lustrze.", + "calendar": "Rok treningowy na jednym ekranie: norma, bonus, deficyt w każdym dniu. Historia z komentarzami przy seriach — pamiętasz nie tylko ciężar, ale i dlaczego.", + "trainees": "Kokpit relacji w sześciu zakładkach: Przegląd, Rozmowa, Dyscyplina, Postępy, Kalendarz, Plany. System sam świeci flagami: zerowany streak, brak sesji 7 dni, wysoki deficyt. Serie kolorowane wg zakresu.", + "planning": "Jeden aktywny plan na podopiecznego — zero wersji roboczych w obiegu. W normy wstawiasz „Wyniki podopiecznego”, więc progresja liczy się od realnych ciężarów, nie ze sufitu.", + "messenger": "Relacja trener ↔ podopieczny, osobny wątek na relację. Zamiast zrzutu ekranu załączasz sesję albo konkretne ćwiczenie z wynikami — rozmowa ma kontekst.", + "invitations": "Współpraca trenerska i dostęp do prywatnych siłowni — przez zaproszenia z terminem ważności. Klucz wygasa, dostęp nie zostaje poślizgiem.", + "profile": "Zaczynasz od wirtualnej: społeczność odwzorowuje prawdziwe siłownie, a oceny 👍/👎 mówią, czy opis dobrze oddaje rzeczywistość. Potem realna: adres, galeria z okładką, grafik i pojemność.", + "equipment": "Sprzęt prosto z katalogu: hantle, kettlebell, sztanga, wyciąg, maszyna, ławka, cardio, masa ciała. Każdy wpis ze specyfikacją i zdjęciami — plany ćwiczących liczą się dokładnie z tej listy.", + "announcements": "Ogłoszenie trafia do członków, nie do całego świata:", + "announcementNote": "⚠ Awaria prądu — siłownia nieczynna", + "private": "Chcesz zamkniętą salę? Prywatne siłownie działają wyłącznie z zaproszeniami (termin ważności). Właściciel zaprasza ludzi i nadaje im role.", + "users": "Zarządzanie kontami (dane profilowe i dostęp), członkostwa w siłowniach oraz moderacja: zawieszanie i blokowanie kont.", + "gyms": "Wyznaczanie właściciela, prowadzenie galerii, publikowanie ogłoszeń w imieniu siłowni.", + "verifications": "Zgłoszenia nowej siłowni i weryfikacja wirtualnej. Proces potwierdzania autentyczności obiektu — zatwierdzenie nadaje status REAL i czyni wnioskodawcę właścicielem.", + "dictionaries": "Katalogi treści: rodzaje ćwiczeń z opisami „jak się robi” i częstymi błędami, urządzenia i obszary treningowe.", + "logs": "Pełny audyt czynności — ActivityLog notuje, kto, co i kiedy. W razie sporu nie ma dyskusji, jest wpis.", + "notices": "Komunikaty systemowe dla członków — ten sam mechanizm co ogłoszenia siłowni, inne źródło wpisu." + }, + "links": { + "trenujacy": [ + "Ćwiczysz w siłowni, która limituje twój plan sprzętowo — a jej ogłoszenia (np. awarie) czytasz w Aktualnościach, obok planów od trenera.", + "Chcesz trenować w prywatnej siłowni? Dostajesz zaproszenie z terminem ważności — patrz ścieżka siłowni.", + "Współpracujesz z trenerem? Jego plany, rozmowy i dyscyplina to ścieżka trenera — ten sam kontotok danych." + ], + "trener": [ + "Układasz plany pod sprzęt siłowni, w której trenuje podopieczny — katalog i ograniczenia to ten sam zestaw zazębień co u ćwiczącego.", + "Twoje plany i rozmowy trafiają do podopiecznego przez feed i komunikator — bez osobnej aplikacji do kontaktu.", + "Chcesz trenować na hali jako zewnętrzny trener? Właściciel nadaje Ci rolę przez ścieżka siłowni." + ], + "silownia": [ + "Ćwiczący weryfikują Twoje wirtualne odwzorowanie głosami, a zgłoszenie z dokumentami zatwierdza ścieżka administratora — od tego momentu profil jest REAL.", + "Trenerzy układają plany pod Twój sprzęt (ścieżka trenera), a ich podopieczni przychodzą na halę z gotowym planem." + ], + "admin": [ + "Zatwierdzasz weryfikację i ścieżka siłowni staje się REAL — ze sprzętem i feedem dla swoich członków.", + "Słowniki (ćwiczenia, urządzenia, obszary) to treść, na której ścieżka ćwiczącego i ścieżka trenera budują każdy plan." + ] + } +} diff --git a/web/src/main.tsx b/web/src/main.tsx index d155677..fee54e1 100644 --- a/web/src/main.tsx +++ b/web/src/main.tsx @@ -9,6 +9,7 @@ import '@fontsource/space-grotesk/500.css'; import '@fontsource/space-grotesk/600.css'; import '@fontsource/space-grotesk/700.css'; import App from './App'; +import './i18n'; import './styles.css'; ReactDOM.createRoot(document.getElementById('root')!).render( diff --git a/web/src/sections/Concepts.tsx b/web/src/sections/Concepts.tsx index 95280b0..dcec22d 100644 --- a/web/src/sections/Concepts.tsx +++ b/web/src/sections/Concepts.tsx @@ -1,4 +1,5 @@ import { useEffect, useRef, type ReactNode } from 'react'; +import { Trans, useTranslation } from 'react-i18next'; import { Activity, Dumbbell, @@ -261,23 +262,14 @@ function ChartBackdrop() { // Słownik pojęć — podstawowe cegły systemu wyjaśnione obrazkiem, nie żargonem. // Dla osoby, która widzi FitOS po raz pierwszy: tu dowiaduje się, o co „chodzi”. -const TAGS = [ - 'hantle', - 'kettlebell', - 'sztanga', - 'wyciąg', - 'maszyna', - 'ławka', - 'cardio', - 'masa ciała', -]; - const SPARK_POINTS = '4,11 20,15 36,13 52,17 68,21 84,19 100,23 116,25 132,32 148,36'; function SprzetViz() { + const { t } = useTranslation('concepts'); + const tags = t('tags', { returnObjects: true }) as string[]; return (
- {TAGS.map((tag) => ( + {tags.map((tag) => (
- ćwiczący + + {t('membership.exerciser')} + - rola: trener + {t('membership.coachRole')} - siłownia + + {t('membership.gym')} +
-

- zaproszenie: ważne do 30 lis · po terminie dostęp - wygasa -

+

+ }} + /> +

); } function WeryfikacjaViz() { + const { t } = useTranslation('concepts'); return (
- — czy profil dobrze oddaje prawdziwą osobę + {t('verification.question')}
- - Status: Zweryfikowane - + + {t('verification.status')} +
); } function PomiaryViz() { + const { t } = useTranslation('concepts'); return (
- 82,4 kg - −4,3 kg / 12 tyg. - 78,1 kg + {t('measurements.weightStart')} + {t('measurements.loss')} + {t('measurements.weightEnd')}
); } -const DAYS = [ - { label: 'P', state: 'done' }, - { label: 'W', state: 'done' }, - { label: 'Ś', state: 'planned' }, - { label: 'C', state: 'skipped' }, - { label: 'S', state: 'planned' }, - { label: 'N', state: 'off' }, -] as const; +const DAY_STATES = ['done', 'done', 'planned', 'skipped', 'planned', 'off'] as const; const DAY_STYLE = { done: 'border-accent/50 bg-accent/10 text-accent-text', @@ -373,33 +368,30 @@ const DAY_STYLE = { } as const; function PlanViz() { + const { t } = useTranslation('concepts'); + const days = t('days', { returnObjects: true }) as string[]; return (
- {DAYS.map((d) => ( + {DAY_STATES.map((state, i) => ( - {d.label} + {days[i]} ))}

- plan → dzień w dniu → sesja na żywo:{' '} - w trakcie → ukończona + }} + />

); @@ -410,8 +402,11 @@ function KillstreakViz() {

- każdy kompletny trening dokłada kropkę; pominięty - dzień kasuje serię + }} + />

); @@ -419,67 +414,33 @@ function KillstreakViz() { interface Concept { icon: LucideIcon; - title: string; + id: string; viz: ReactNode; - desc: string; } const CONCEPTS: Concept[] = [ - { - icon: Dumbbell, - title: 'Sprzęt', - viz: , - desc: 'Katalog sprzętu siłowni — ze specyfikacjami i zdjęciami. Plan ćwiczącego liczony jest ze sprzętu, który realnie stoi w hali.', - }, - { - icon: ScrollText, - title: 'Członkostwa', - viz: , - desc: 'Sposób, w jaki ludzie i miejsca łączą się w systemie, umożliwiając bezpieczną współpracę i dostęp do prywatnych stref.', - }, - { - icon: UserRound, - title: 'Weryfikacja', - viz: , - desc: 'System budowania zaufania i autentyczności. Profil siłowni lub trenera może być wirtualnym odwzorowaniem społeczności lub zweryfikowanym obiektem z adresem i grafikiem — za zgodą administratora.', - }, - { - icon: ChartNoAxesColumn, - title: 'Pomiary', - viz: , - desc: 'Parametry ciała w czasie: waga, obwody, zdjęcia. Procenty i masy mięśniowe liczone automatycznie — wykres w aplikacji, nie w arkuszu.', - }, - { - icon: Activity, - title: 'Plan i sesja', - viz: , - desc: 'Plan to tydzień po tygodniu: dni planowane, ukończone i pominięte. Sesja na żywo to zapisany trening — seria po serii, z ciężarami i powtórzeniami.', - }, - { - icon: Zap, - title: 'Killstreak', - viz: , - desc: 'Seria kolejnych skutecznych treningów. Liczą się tylko te kompletne — każda seria zapisana; pominięty lub niedokończony dzień resetuje licznik.', - }, + { icon: Dumbbell, id: 'sprzet', viz: }, + { icon: ScrollText, id: 'czlonkostwa', viz: }, + { icon: UserRound, id: 'weryfikacja', viz: }, + { icon: ChartNoAxesColumn, id: 'pomiary', viz: }, + { icon: Activity, id: 'plan', viz: }, + { icon: Zap, id: 'killstreak', viz: }, ]; /** Sekcja „Słownik” — katalog pojęć jako rejestr systemu: wyrównane wiersze. */ export function Concepts() { + const { t } = useTranslation('concepts'); return (
- +
{CONCEPTS.map((c, i) => ( - +
{c.viz}

- {c.desc} + {t(`items.${c.id}.desc`)}

diff --git a/web/src/sections/Cta.tsx b/web/src/sections/Cta.tsx index 51382f8..2e9dae9 100644 --- a/web/src/sections/Cta.tsx +++ b/web/src/sections/Cta.tsx @@ -1,23 +1,18 @@ import { useRef } from 'react'; +import { useTranslation } from 'react-i18next'; import { ArrowRight, ShieldCheck } from 'lucide-react'; import { Reveal } from '../components/Reveal'; import { adminUrl, appUrl } from '../lib/links'; import { useParallax } from '../lib/useParallax'; import { Section } from './shared'; -const LINES_A = [ - 'gotowe: trening · coaching · siłownie', - 'błędy krytyczne: brak', - 'dane: Twoja infrastruktura', - 'start gotowy — wybieraj modul', -]; - -const LINES_B = ['$ fitos --run', 'port 9002 · self-hosted', '$ ./start --wybierz-modul']; - /** CTA końcowa: „uruchom system” — czarne tło z paralaksą logu startowego. */ export function Cta() { + const { t } = useTranslation('cta'); const rootRef = useRef(null); useParallax(rootRef); + const linesA = t('linesA', { returnObjects: true }) as string[]; + const linesB = t('linesB', { returnObjects: true }) as string[]; return (
@@ -26,7 +21,7 @@ export function Cta() { className="pointer-events-none absolute inset-x-0 -top-8 left-[5%] flex flex-col gap-1 font-mono text-[13px] leading-7 whitespace-nowrap text-dim/10 select-none" data-parallax="0.28" > - {[...LINES_A, ...LINES_A].map((l, i) => ( + {[...linesA, ...linesA].map((l, i) => ( {l} ))}
@@ -35,7 +30,7 @@ export function Cta() { className="pointer-events-none absolute inset-x-0 -bottom-8 right-[5%] flex flex-col items-end gap-1 font-mono text-[13px] leading-7 whitespace-nowrap text-dim/10 select-none" data-parallax="-0.18" > - {[...LINES_B, ...LINES_B].map((l, i) => ( + {[...linesB, ...linesB].map((l, i) => ( {l} ))}
@@ -48,23 +43,21 @@ export function Cta() {

$ fitos --run

-

System gotowy.

-

- Włącz moduł, którego potrzebujesz: trening swój albo trening podopiecznych. -

+

{t('heading')}

+

{t('lead')}

diff --git a/web/src/sections/Ecosystem.tsx b/web/src/sections/Ecosystem.tsx index 0c98ebe..b9cdb1c 100644 --- a/web/src/sections/Ecosystem.tsx +++ b/web/src/sections/Ecosystem.tsx @@ -1,49 +1,25 @@ import { useCallback, useEffect, useRef, useState } from 'react'; +import { useTranslation } from 'react-i18next'; import { Building2, Dumbbell, Shield, UserRound, type LucideIcon } from 'lucide-react'; import { Brandmark } from '../components/Brandmark'; import { Reveal } from '../components/Reveal'; import { cn } from '../lib/utils'; import { Section, SectionHeading } from './shared'; +type ParticipantId = 'cwiczacy' | 'trener' | 'silownia' | 'admin'; + interface Participant { icon: LucideIcon; - role: string; - brings: string; - gets: string; - link: string; + id: ParticipantId; } // Cztery strony rdzenia — FitOS nie ma „użytkowników końcowych”, // każdy uczestnik jednocześnie wnosi wartość i ją pobiera. export const PARTICIPANTS: Participant[] = [ - { - icon: Dumbbell, - role: 'Ćwiczący', - brings: 'zaufanie i realne wyniki treningów — dane, na których trzyma się cała reszta', - gets: 'sprzęt, plan, trener i społeczność w jednym miejscu', - link: 'trenuje w siłowni, której sprzęt limituje jego plan', - }, - { - icon: UserRound, - role: 'Trener', - brings: 'wiedzę: plany, progresje i opiekę nad podopiecznymi', - gets: 'dostęp do hal siłowni i podopiecznych, którzy realnie trenują', - link: 'układa plany pod sprzęt siłowni, w której trenuje jego podopieczny', - }, - { - icon: Building2, - role: 'Siłownia', - brings: 'sprzęt, godziny, zasady i miejsce do trenowania', - gets: 'ludzi, którzy przychodzą po plan, i głos w swoim feedzie', - link: 'dostarcza sprzęt i ogłasza się ludziom, którzy jej potrzebują', - }, - { - icon: Shield, - role: 'Administrator', - brings: 'stabilność: dbałość o jakość danych i bezpieczeństwo ekosystemu', - gets: 'ekosystem, który działa sam — bez domyślnego zaufania i śmieciowych danych', - link: 'nadaje oficjalny status siłowniom po weryfikacji ich autentyczności', - }, + { icon: Dumbbell, id: 'cwiczacy' }, + { icon: UserRound, id: 'trener' }, + { icon: Building2, id: 'silownia' }, + { icon: Shield, id: 'admin' }, ]; interface Wire { @@ -117,7 +93,9 @@ function measureWires( x2: (base.x / cr.width) * 100, y2: (base.y / cr.height) * 100, // połowa podstawy trójkąta jako % wymiaru kontenera w osi rozrzutu - spread: ((t.side === 'left' || t.side === 'right' ? SPREAD_PX / cr.height : SPREAD_PX / cr.width)) * 100, + spread: + (t.side === 'left' || t.side === 'right' ? SPREAD_PX / cr.height : SPREAD_PX / cr.width) * + 100, id: t.id, axis: t.side === 'left' || t.side === 'right' ? 'v' : 'h', }); @@ -207,6 +185,7 @@ function RayDefs({ * obwodzie rdzenia, podstawa na ścianie kafelka. */ function HubDiagram() { + const { t } = useTranslation('ecosystem'); const containerRef = useRef(null); const hubRef = useRef(null); const trenerRef = useRef(null); @@ -269,7 +248,7 @@ function HubDiagram() {

FitOS

-

rdzeń

+

{t('hubLabel')}

@@ -304,6 +283,7 @@ function HubDiagram() { * lub dwie pary nad/pod rdzeniem (tablet sm+: promienie do wszystkich czterech). */ function StackDiagram() { + const { t } = useTranslation('ecosystem'); const containerRef = useRef(null); const hubRef = useRef(null); const cwiczacyRef = useRef(null); @@ -339,7 +319,9 @@ function StackDiagram() { ]; // telefon (1 kolumna): promienie tylko do najbliższych — Trener i Siłownia; // tablet (2 kolumny): rdzeń między parami — promienie do wszystkich czterech - const visible = wide ? targets : targets.filter((t) => t.id === 'trener' || t.id === 'silownia'); + const visible = wide + ? targets + : targets.filter((t) => t.id === 'trener' || t.id === 'silownia'); const measured = measureWires(container, hubEl, visible, HUB_RADIUS_STACK); setWires(measured.wires); setHub(measured.hub); @@ -391,7 +373,7 @@ function StackDiagram() {

FitOS

-

rdzeń

+

{t('hubLabel')}

@@ -413,13 +395,10 @@ function StackDiagram() { /** Sekcja „Ekosystem” — rdzeń (od ogółu): mapa uczestników i legenda zazębień. */ export function Ecosystem() { + const { t } = useTranslation('ecosystem'); return (
- + @@ -436,11 +415,28 @@ function ParticipantCard({ participant: Participant; className?: string; }) { + const { t } = useTranslation('ecosystem'); const Icon = participant.icon; const rows = [ - { key: 'wnosi', text: participant.brings, accent: true }, - { key: 'bierze', text: participant.gets, accent: false }, - { key: 'wiąże', text: participant.link, accent: true, last: true }, + { + key: 'wnosi', + label: t('rows.wnosi'), + text: t(`participants.${participant.id}.brings`), + accent: true, + }, + { + key: 'bierze', + label: t('rows.bierze'), + text: t(`participants.${participant.id}.gets`), + accent: false, + }, + { + key: 'wiaze', + label: t('rows.wiaze'), + text: t(`participants.${participant.id}.link`), + accent: true, + last: true, + }, ]; return (
{rows.map((row) => ( @@ -470,7 +468,7 @@ function ParticipantCard({ row.accent ? 'text-accent' : 'text-dim', )} > - {row.key} + {row.label}
{row.text}
diff --git a/web/src/sections/Footer.tsx b/web/src/sections/Footer.tsx index 04c3a89..410ef9c 100644 --- a/web/src/sections/Footer.tsx +++ b/web/src/sections/Footer.tsx @@ -1,23 +1,24 @@ +import { useTranslation } from 'react-i18next'; import { Brandmark } from '../components/Brandmark'; -const ABOUT: [string, string][] = [ - ['Producent', 'FitOS'], - ['Wersja', 'MVP (v1)'], - ['Rdzeń', 'Express + Prisma + PostgreSQL'], -]; - /** Stopka „O tym systemie” — tabela w stylu About This Computer. */ export function Footer() { + const { t } = useTranslation('footer'); + const about: [string, string][] = [ + [t('about.producer'), t('about.producerValue')], + [t('about.version'), t('about.versionValue')], + [t('about.core'), t('about.coreValue')], + ]; return (
- O tym systemie + {t('aboutTitle')}
- {ABOUT.map(([term, value], i) => ( + {about.map(([term, value], i) => (
-

- FitOS to system operacyjny treningu: plany, sesje na żywo, killstreak, trenerzy i - siłownie — wszystko na jednym, self-hostedzie. -

+

{t('blurb')}

- © {new Date().getFullYear()} FitOS — trening, który się dowozi. + {t('copyright', { year: new Date().getFullYear() })}

diff --git a/web/src/sections/Hero.tsx b/web/src/sections/Hero.tsx index 197eb43..e14dea1 100644 --- a/web/src/sections/Hero.tsx +++ b/web/src/sections/Hero.tsx @@ -1,3 +1,4 @@ +import { useTranslation } from 'react-i18next'; import { ArrowRight, ShieldCheck } from 'lucide-react'; import { BootLog } from '../components/BootLog'; import { PhoneMock } from '../components/PhoneMock'; @@ -5,6 +6,7 @@ import { adminUrl, appUrl } from '../lib/links'; /** Hero jako boot screen: log startowy po lewej, mock telefonu po prawej. */ export function Hero() { + const { t } = useTranslation('hero'); return (
@@ -14,26 +16,24 @@ export function Hero() {

- Trening,
- który się dowozi. + {t('titleA')}
+ {t('titleB')} {t('titleC')}

-

- FitOS to system operacyjny treningu. Od planowania po ostatnią serię. -

+

{t('lead')}

diff --git a/web/src/sections/Manifest.tsx b/web/src/sections/Manifest.tsx index 2de66ba..fd404ba 100644 --- a/web/src/sections/Manifest.tsx +++ b/web/src/sections/Manifest.tsx @@ -1,28 +1,18 @@ import { useRef } from 'react'; +import { useTranslation } from 'react-i18next'; import { Reveal } from '../components/Reveal'; import { useParallax } from '../lib/useParallax'; -const LINES_A = [ - '$ fitos --run', - 'rdzeń: Express + Prisma + PostgreSQL', - 'plan → dzień → sesja → seria', - 'killstreak: tylko kompletne treningi', -]; - -const LINES_B = [ - 'perspektywy: ćwiczący · trener · właściciel · admin', - 'ekosystem: wspólne dane, różne cele', - 'dane: self-hosted, zero chmury', - '$ ./sciezka --twoja', -]; - /** * „Man” — czarna wstęga między hero a ekosystemem: o czym jest FitOS, * z dwuwarstwową paralaksą zapisów terminala w tle. */ export function Manifest() { + const { t } = useTranslation('manifest'); const rootRef = useRef(null); useParallax(rootRef); + const linesA = t('linesA', { returnObjects: true }) as string[]; + const linesB = t('linesB', { returnObjects: true }) as string[]; return (
@@ -31,7 +21,7 @@ export function Manifest() { className="pointer-events-none absolute inset-x-0 -top-10 left-[4%] flex flex-col gap-1 font-mono text-[13px] leading-7 whitespace-nowrap text-dim/10 select-none" data-parallax="0.28" > - {[...LINES_A, ...LINES_A].map((l, i) => ( + {[...linesA, ...linesA].map((l, i) => ( {l} ))}
@@ -40,7 +30,7 @@ export function Manifest() { className="pointer-events-none absolute inset-x-0 -bottom-10 right-[4%] flex flex-col items-end gap-1 font-mono text-[13px] leading-7 whitespace-nowrap text-dim/10 select-none" data-parallax="-0.18" > - {[...LINES_B, ...LINES_B].map((l, i) => ( + {[...linesB, ...linesB].map((l, i) => ( {l} ))}
@@ -54,20 +44,16 @@ export function Manifest() {

$ man FitOS

- Plan. Seria. Ciężar. Pomiar.{' '} - Wszystko w jednym systemie. + {t('headlineA')} {t('headlineB')}

- FitOS zastępuje chaos kilkunastu aplikacji jedną, bezpieczną platformą self-hosted, - instalowaną bezpośrednio w Twojej infrastrukturze. + {t('para1')}

- Połączyliśmy ćwiczących, trenerów i właścicieli siłowni we wspólnym ekosystemie danych. - Bez pośredników, bez wycieku prywatności, na tych samych planach i pomiarach. + {t('para2')}

- $ Poznaj FitOS: sprawdź architekturę ekosystemu, - słownik pojęć i dedykowane ścieżki użytkowników. + $ {t('discover')}

diff --git a/web/src/sections/SiteHeader.tsx b/web/src/sections/SiteHeader.tsx index bbd9b62..1f1724b 100644 --- a/web/src/sections/SiteHeader.tsx +++ b/web/src/sections/SiteHeader.tsx @@ -1,14 +1,21 @@ +import { useTranslation } from 'react-i18next'; import { Brandmark } from '../components/Brandmark'; import { appUrl } from '../lib/links'; +import { changeLanguage } from '../i18n'; +import { cn } from '../lib/utils'; +import type { Language } from '../i18n/language'; -const ANCHORS = [ - { href: '#ekosystem', label: 'Ekosystem' }, - { href: '#slownik', label: 'Słownik' }, - { href: '#sciezki', label: 'Ścieżki' }, -]; +const LANGS: Language[] = ['pl', 'en']; -/** Pasek „systemowy” — sticky, jak topbar apki: znak, wersja, kotwice, CTA. */ +/** Pasek „systemowy” — sticky, jak topbar apki: znak, wersja, kotwice, język, CTA. */ export function SiteHeader() { + const { t, i18n } = useTranslation(['nav', 'common']); + const anchors = [ + { href: '#ekosystem', label: t('nav:anchors.ekosystem') }, + { href: '#slownik', label: t('nav:anchors.slownik') }, + { href: '#sciezki', label: t('nav:anchors.sciezki') }, + ]; + return (
diff --git a/web/src/sections/Track.tsx b/web/src/sections/Track.tsx index dfb6833..0289b27 100644 --- a/web/src/sections/Track.tsx +++ b/web/src/sections/Track.tsx @@ -1,4 +1,5 @@ import type { ReactNode } from 'react'; +import { useTranslation } from 'react-i18next'; import type { LucideIcon } from 'lucide-react'; import { Reveal } from '../components/Reveal'; import { cn } from '../lib/utils'; @@ -29,6 +30,7 @@ export function Track({ summary, children, }: TrackProps) { + const { t } = useTranslation('tracks'); const index = TRACK_IDS.indexOf(trackId); const isOpen = active === trackId; @@ -59,7 +61,7 @@ export function Track({ {label} - proces {String(index + 1).padStart(2, '0')}/04 + {t('process', { index: String(index + 1).padStart(2, '0') })} {summary} @@ -69,7 +71,7 @@ export function Track({ isOpen ? 'text-dim' : 'text-accent', )} > - {isOpen ? '— zwij' : '+ otwórz szczegóły'} + {isOpen ? t('collapse') : t('expand')}