Web: wielojezycznosc — cala tresc wizytowki przez t()/Trans z locales pl/en w src/i18n (i18next + react-i18next), domyslny jezyk z przegladarki, przelacznik PL/EN w naglowku z zapisem w localStorage fitos-web-lang, aktualizacja html lang / document.title / meta description przy zmianie jezyka; testy unit 8 i e2e 7 przechodza (nowy spec jezykowy), AGENTS.md: zakres i18n obejmuje tez web
This commit is contained in:
16
AGENTS.md
16
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 `<html lang>` oraz `document.title` w `i18n/index.ts`.
|
||||
- Zasoby: `app|admin/src/i18n/locales/{pl,en}/<ns>.json`.
|
||||
- Wykrywanie języka: `localStorage['fitos-lang']` (web: `fitos-web-lang`) -> `navigator.language` -> domyślnie `pl`.
|
||||
- Aktualizacja `<html lang>` oraz `document.title` w `i18n/index.ts` (web additionally aktualizuje `meta[name=description]`).
|
||||
- Zasoby: `app|admin|web/src/i18n/locales/{pl,en}/<ns>.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.
|
||||
|
||||
78
web/package-lock.json
generated
78
web/package-lock.json
generated
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 (
|
||||
<pre
|
||||
aria-label="Log startowy FitOS"
|
||||
aria-label={t('logAria')}
|
||||
className="m-0 font-mono text-[12.5px] leading-6 text-dim sm:text-[13px]"
|
||||
>
|
||||
{LINES.map((l, i) => {
|
||||
|
||||
@@ -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 (
|
||||
<div
|
||||
className="relative mx-auto w-[300px]"
|
||||
role="img"
|
||||
aria-label="Podgląd aplikacji FitOS na telefonie: trwa trening, seria 3 na 4, killstreak 23 dni"
|
||||
>
|
||||
<div className="relative mx-auto w-[300px]" role="img" aria-label={t('previewAria')}>
|
||||
<SideButtons />
|
||||
<div className="rounded-[3.4rem] bg-(image:--metal-frame) p-[3px] shadow-[0_30px_80px_-30px_rgb(0_0_0/0.85),0_0_0_1px_rgb(0_0_0/0.6)]">
|
||||
<div className="rounded-[3.28rem] bg-black p-[9px]">
|
||||
@@ -100,9 +98,11 @@ export function PhoneMock() {
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="flex items-center gap-2 text-sm font-semibold text-ink">
|
||||
<span className="live-dot" />
|
||||
Trwa trening
|
||||
{t('liveSession')}
|
||||
</span>
|
||||
<span className="font-mono text-[10px] text-dim">
|
||||
{t('sessionDay', { n: 3 })}
|
||||
</span>
|
||||
<span className="font-mono text-[10px] text-dim">sesja · dzień 3</span>
|
||||
</div>
|
||||
|
||||
<div className="mt-2.5 flex flex-col gap-1.5 border-b border-line pb-2.5 text-[11.5px]">
|
||||
@@ -111,7 +111,7 @@ export function PhoneMock() {
|
||||
<span aria-hidden="true" className="text-accent">
|
||||
✓
|
||||
</span>{' '}
|
||||
Przysiady
|
||||
{t('squats')}
|
||||
</span>
|
||||
<span className="font-mono text-[10.5px]">4 × 8 @ 100 kg</span>
|
||||
</span>
|
||||
@@ -120,46 +120,46 @@ export function PhoneMock() {
|
||||
<span aria-hidden="true" className="text-accent">
|
||||
✓
|
||||
</span>{' '}
|
||||
Wyciskanie skos
|
||||
{t('inclinePress')}
|
||||
</span>
|
||||
<span className="font-mono text-[10.5px]">3 × 10 @ 60 kg</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<p className="mt-2.5 font-display text-[15px] font-semibold text-ink">
|
||||
Wyciskanie sztangi
|
||||
{t('barbellPress')}
|
||||
</p>
|
||||
<p className="font-mono text-[11px] text-dim">4 x 8 @ 80 kg · RIR 2</p>
|
||||
|
||||
<div className="mt-2.5 flex items-center justify-between text-[11px] text-dim">
|
||||
<span>Seria 3/4</span>
|
||||
<span className="font-mono text-accent">powt. 8</span>
|
||||
<span>{t('setOf', { done: 3, total: 4 })}</span>
|
||||
<span className="font-mono text-accent">{t('repsValue', { n: 8 })}</span>
|
||||
</div>
|
||||
<div className="mt-1.5 h-1.5 overflow-hidden rounded-full bg-input">
|
||||
<div className="h-full w-3/4 rounded-full bg-(image:--btn-grad)" />
|
||||
</div>
|
||||
|
||||
<div className="mt-2.5 flex items-center justify-between rounded-md border border-line bg-input px-2.5 py-2">
|
||||
<span className="text-[11px] text-dim">Przerwa</span>
|
||||
<span className="text-[11px] text-dim">{t('rest')}</span>
|
||||
<span className="font-mono text-sm font-semibold text-accent tabular-nums">
|
||||
{przerwa}
|
||||
{rest}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div className="mt-2.5 h-8 rounded-md bg-(image:--btn-grad) text-center font-sans text-[12.5px] font-bold leading-8 text-accent-ink shadow-(--btn-shadow)">
|
||||
Norma spełniona
|
||||
{t('goalMet')}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* dwa kafelki: killstreak i pomiary */}
|
||||
<div className="mx-3 grid grid-cols-2 gap-2.5">
|
||||
<div className="rounded-xl border border-line bg-card p-3">
|
||||
<span className="text-[11px] font-semibold text-ink">Killstreak</span>
|
||||
<span className="text-[11px] font-semibold text-ink">{t('killstreakTile')}</span>
|
||||
<StreakDots total={10} filled={8} className="mt-2 gap-[3px]" />
|
||||
<p className="mt-1.5 font-mono text-[10px] text-accent">23 dni · rekord 41</p>
|
||||
<p className="mt-1.5 font-mono text-[10px] text-accent">{t('killstreakInfo')}</p>
|
||||
</div>
|
||||
<div className="rounded-xl border border-line bg-card p-3">
|
||||
<span className="text-[11px] font-semibold text-ink">Progres</span>
|
||||
<span className="text-[11px] font-semibold text-ink">{t('progressTile')}</span>
|
||||
<svg viewBox="0 0 90 26" className="mt-1.5 h-6 w-full" aria-hidden="true">
|
||||
{[26, 38, 34, 50, 46, 62, 58, 78].map((h, i) => (
|
||||
<rect
|
||||
@@ -174,9 +174,7 @@ export function PhoneMock() {
|
||||
/>
|
||||
))}
|
||||
</svg>
|
||||
<p className="mt-1 font-mono text-[10px] text-accent">
|
||||
Wyciskanie +20 kg / 12 tyg.
|
||||
</p>
|
||||
<p className="mt-1 font-mono text-[10px] text-accent">{t('progressInfo')}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -184,9 +182,9 @@ export function PhoneMock() {
|
||||
<div className="mx-3 flex items-center justify-between rounded-xl border border-line bg-card px-3.5 py-2.5">
|
||||
<span className="flex items-center gap-2 text-[11.5px] text-ink">
|
||||
<CalendarClock size={13} aria-hidden="true" className="text-accent" />
|
||||
Czwartek · Wyciąg i plecy
|
||||
{t('nextSession')}
|
||||
</span>
|
||||
<span className="font-mono text-[10px] text-dim">4 ćwiczenia</span>
|
||||
<span className="font-mono text-[10px] text-dim">{t('exercisesCount')}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
112
web/src/i18n/index.ts
Normal file
112
web/src/i18n/index.ts
Normal file
@@ -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);
|
||||
|
||||
// <html lang>, 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;
|
||||
35
web/src/i18n/language.ts
Normal file
35
web/src/i18n/language.ts
Normal file
@@ -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;
|
||||
}
|
||||
10
web/src/i18n/locales/en/boot.json
Normal file
10
web/src/i18n/locales/en/boot.json
Normal file
@@ -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" }
|
||||
]
|
||||
}
|
||||
5
web/src/i18n/locales/en/common.json
Normal file
5
web/src/i18n/locales/en/common.json
Normal file
@@ -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"
|
||||
}
|
||||
64
web/src/i18n/locales/en/concepts.json
Normal file
64
web/src/i18n/locales/en/concepts.json
Normal file
@@ -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: <hl>valid until Nov 30</hl> · 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: <hl>in progress → completed</hl>",
|
||||
"streakNote": "every <hl>complete</hl> 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."
|
||||
}
|
||||
}
|
||||
}
|
||||
13
web/src/i18n/locales/en/cta.json
Normal file
13
web/src/i18n/locales/en/cta.json
Normal file
@@ -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"
|
||||
}
|
||||
36
web/src/i18n/locales/en/ecosystem.json
Normal file
36
web/src/i18n/locales/en/ecosystem.json
Normal file
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
13
web/src/i18n/locales/en/footer.json
Normal file
13
web/src/i18n/locales/en/footer.json
Normal file
@@ -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."
|
||||
}
|
||||
8
web/src/i18n/locales/en/hero.json
Normal file
8
web/src/i18n/locales/en/hero.json
Normal file
@@ -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"
|
||||
}
|
||||
19
web/src/i18n/locales/en/manifest.json
Normal file
19
web/src/i18n/locales/en/manifest.json
Normal file
@@ -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."
|
||||
}
|
||||
18
web/src/i18n/locales/en/mock.json
Normal file
18
web/src/i18n/locales/en/mock.json
Normal file
@@ -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"
|
||||
}
|
||||
12
web/src/i18n/locales/en/nav.json
Normal file
12
web/src/i18n/locales/en/nav.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"sectionsAria": "Site sections",
|
||||
"anchors": {
|
||||
"ekosystem": "Ecosystem",
|
||||
"slownik": "Glossary",
|
||||
"sciezki": "Tracks"
|
||||
},
|
||||
"launch": "Launch",
|
||||
"langPl": "Polski",
|
||||
"langEn": "English",
|
||||
"langSwitchAria": "Change language"
|
||||
}
|
||||
118
web/src/i18n/locales/en/tracks.json
Normal file
118
web/src/i18n/locales/en/tracks.json
Normal file
@@ -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: <ink>week → day → session → set</ink>. 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, <ink>RIR 0–10</ink> and a difficulty slider <ink>1–5</ink>. 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 <ink>effective workouts</ink> form a streak. It resets after a skipped or partial day — no mercy, no cheating. You see your <mono>best</mono> record and dots from the last 30 days.",
|
||||
"progress": "Charts of estimated <ink>1RM and volume</ink>, records and deltas. Exercises matched to your goals and exclusions — you watch what actually grows.",
|
||||
"measurements": "Weight and circumferences: <ink>chest, waist, biceps L/R</ink> 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: <ink>goal, bonus, deficit</ink> on every day. History with comments on sets — you remember not only the weight but also why.",
|
||||
"trainees": "A relationship cockpit in six tabs: <ink>Overview, Conversation, Discipline, Progress, Calendar, Plans</ink>. The system lights up flags itself: <accent>reset streak</accent>, <accent>no session for 7 days</accent>, <accent>high deficit</accent>. Sets colored by range.",
|
||||
"planning": "One <ink>active plan</ink> per client — zero draft versions in circulation. Put <em>“Client results”</em> into the norms, so progression is computed from real weights, not from thin air.",
|
||||
"messenger": "A <ink>coach ↔ client</ink> relationship, a separate thread per relationship. Instead of a screenshot you attach a <ink>session</ink> or a specific <ink>exercise with results</ink> — the conversation has context.",
|
||||
"invitations": "Coaching cooperation and access to <ink>private gyms</ink> — via invitations with an <ink>expiry date</ink>. The key expires, access doesn't linger by accident.",
|
||||
"profile": "You start <ink>virtual</ink>: the community reflects real gyms, and 👍/👎 ratings say how well the description matches reality. Then <ink>real</ink>: address, gallery with a cover, schedule and <ink>capacity</ink>.",
|
||||
"equipment": "Equipment straight from the catalogue: <ink>dumbbells, kettlebell, barbell, cable, machine, bench, cardio, bodyweight</ink>. Every entry with a spec and photos — exercisers' plans are computed exactly from this list.",
|
||||
"announcements": "An announcement reaches <ink>members</ink>, not the whole world:",
|
||||
"announcementNote": "⚠ Power outage — gym closed",
|
||||
"private": "Want a closed room? <ink>Private gyms</ink> work exclusively with <ink>invitations</ink> (expiry date). The owner invites people and grants them roles.",
|
||||
"users": "<ink>Account management</ink> (profile data and access), gym memberships and <ink>moderation</ink>: suspending and blocking accounts.",
|
||||
"gyms": "Assigning the <ink>owner</ink>, running the gallery, publishing <ink>announcements on the gym's behalf</ink>.",
|
||||
"verifications": "<ink>New gym</ink> submissions and <ink>virtual verification</ink>. A process of confirming a venue's authenticity — approval grants <mono>REAL</mono> status and makes the applicant the owner.",
|
||||
"dictionaries": "Content catalogues: <ink>exercise types</ink> with “how it's done” descriptions and common mistakes, machines and training areas.",
|
||||
"logs": "<ink>Full activity audit</ink> — ActivityLog records who, what and when. In a dispute there's no discussion, there's an entry.",
|
||||
"notices": "System notices for <ink>members</ink> — the same mechanism as gym announcements, a different source of the entry."
|
||||
},
|
||||
"links": {
|
||||
"trenujacy": [
|
||||
"You train in a gym whose <aGlossary>equipment limits your plan</aGlossary> — and you read its announcements (e.g. breakdowns) in <ink>News</ink>, next to your coach's plans.",
|
||||
"Want to train in a <ink>private gym</ink>? You get an invitation with an expiry date — see <linkSilownia>gym track</linkSilownia>.",
|
||||
"Working with a coach? Their plans, conversations and discipline are the <linkTrener>coach track</linkTrener> — the same data pipeline."
|
||||
],
|
||||
"trener": [
|
||||
"You write plans <ink>around the gym's equipment</ink> where your client trains — the catalogue and constraints are the same <aGlossary>set of interlocks</aGlossary> as for the exerciser.",
|
||||
"Your plans and conversations reach the client through the <ink>feed</ink> 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 <linkSilownia>gym track</linkSilownia>."
|
||||
],
|
||||
"silownia": [
|
||||
"Exercisers verify your <ink>virtual reflection</ink> with votes, and a document-backed submission is approved by the <linkAdmin>administrator track</linkAdmin> — from that moment the profile is <mono>REAL</mono>.",
|
||||
"Coaches write plans around your equipment (see <linkTrener>coach track</linkTrener>), and their clients come to the floor <ink>with a ready plan</ink>."
|
||||
],
|
||||
"admin": [
|
||||
"You approve a verification and the <linkSilownia>gym track</linkSilownia> becomes <mono>REAL</mono> — with equipment and a feed for its members.",
|
||||
"The catalogues (exercises, machines, areas) are the content on which the <linkTrenujacy>exerciser track</linkTrenujacy> and the <linkTrener>coach track</linkTrener> build every plan."
|
||||
]
|
||||
}
|
||||
}
|
||||
10
web/src/i18n/locales/pl/boot.json
Normal file
10
web/src/i18n/locales/pl/boot.json
Normal file
@@ -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" }
|
||||
]
|
||||
}
|
||||
5
web/src/i18n/locales/pl/common.json
Normal file
5
web/src/i18n/locales/pl/common.json
Normal file
@@ -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"
|
||||
}
|
||||
55
web/src/i18n/locales/pl/concepts.json
Normal file
55
web/src/i18n/locales/pl/concepts.json
Normal file
@@ -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: <hl>ważne do 30 lis</hl> · 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: <hl>w trakcie → ukończona</hl>",
|
||||
"streakNote": "każdy <hl>kompletny</hl> 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."
|
||||
}
|
||||
}
|
||||
}
|
||||
13
web/src/i18n/locales/pl/cta.json
Normal file
13
web/src/i18n/locales/pl/cta.json
Normal file
@@ -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"
|
||||
}
|
||||
36
web/src/i18n/locales/pl/ecosystem.json
Normal file
36
web/src/i18n/locales/pl/ecosystem.json
Normal file
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
13
web/src/i18n/locales/pl/footer.json
Normal file
13
web/src/i18n/locales/pl/footer.json
Normal file
@@ -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."
|
||||
}
|
||||
8
web/src/i18n/locales/pl/hero.json
Normal file
8
web/src/i18n/locales/pl/hero.json
Normal file
@@ -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"
|
||||
}
|
||||
19
web/src/i18n/locales/pl/manifest.json
Normal file
19
web/src/i18n/locales/pl/manifest.json
Normal file
@@ -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."
|
||||
}
|
||||
18
web/src/i18n/locales/pl/mock.json
Normal file
18
web/src/i18n/locales/pl/mock.json
Normal file
@@ -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"
|
||||
}
|
||||
12
web/src/i18n/locales/pl/nav.json
Normal file
12
web/src/i18n/locales/pl/nav.json
Normal file
@@ -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"
|
||||
}
|
||||
121
web/src/i18n/locales/pl/tracks.json
Normal file
121
web/src/i18n/locales/pl/tracks.json
Normal file
@@ -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: <ink>tydzień → dzień → sesja → seria</ink>. 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, <ink>RIR 0–10</ink> i suwak trudności <ink>1–5</ink>. Timer przerwy pilnuje przerw, a przycisk „Norma spełniona” domyka serię. Serie ponad plan? Proszę bardzo — jako bonus.",
|
||||
"killstreak": "Kolejne <ink>skuteczne treningi</ink> tworzą serię. Reset po pominięciu lub dniu częściowym — bez litości, bez oszukiwania. Widzisz rekord <mono>best</mono> i kropki z ostatnich 30 dni.",
|
||||
"progress": "Wykresy szacowanego <ink>1RM i objętości</ink>, rekordy i delty. Ćwiczenia dopasowane do Twoich celów i wykluczeń — patrzysz na to, co realnie rośnie.",
|
||||
"measurements": "Waga i obwody: <ink>klatka, talia, biceps L/P</ink> 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: <ink>norma, bonus, deficyt</ink> 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: <ink>Przegląd, Rozmowa, Dyscyplina, Postępy, Kalendarz, Plany</ink>. System sam świeci flagami: <accent>zerowany streak</accent>, <accent>brak sesji 7 dni</accent>, <accent>wysoki deficyt</accent>. Serie kolorowane wg zakresu.",
|
||||
"planning": "Jeden <ink>aktywny plan</ink> na podopiecznego — zero wersji roboczych w obiegu. W normy wstawiasz <em>„Wyniki podopiecznego”</em>, więc progresja liczy się od realnych ciężarów, nie ze sufitu.",
|
||||
"messenger": "Relacja <ink>trener ↔ podopieczny</ink>, osobny wątek na relację. Zamiast zrzutu ekranu załączasz <ink>sesję</ink> albo konkretne <ink>ćwiczenie z wynikami</ink> — rozmowa ma kontekst.",
|
||||
"invitations": "Współpraca trenerska i dostęp do <ink>prywatnych siłowni</ink> — przez zaproszenia z <ink>terminem ważności</ink>. Klucz wygasa, dostęp nie zostaje poślizgiem.",
|
||||
"profile": "Zaczynasz od <ink>wirtualnej</ink>: społeczność odwzorowuje prawdziwe siłownie, a oceny 👍/👎 mówią, czy opis dobrze oddaje rzeczywistość. Potem <ink>realna</ink>: adres, galeria z okładką, grafik i <ink>pojemność</ink>.",
|
||||
"equipment": "Sprzęt prosto z katalogu: <ink>hantle, kettlebell, sztanga, wyciąg, maszyna, ławka, cardio, masa ciała</ink>. Każdy wpis ze specyfikacją i zdjęciami — plany ćwiczących liczą się dokładnie z tej listy.",
|
||||
"announcements": "Ogłoszenie trafia do <ink>członków</ink>, nie do całego świata:",
|
||||
"announcementNote": "⚠ Awaria prądu — siłownia nieczynna",
|
||||
"private": "Chcesz zamkniętą salę? <ink>Prywatne siłownie</ink> działają wyłącznie z <ink>zaproszeniami</ink> (termin ważności). Właściciel zaprasza ludzi i nadaje im role.",
|
||||
"users": "<ink>Zarządzanie kontami</ink> (dane profilowe i dostęp), członkostwa w siłowniach oraz <ink>moderacja</ink>: zawieszanie i blokowanie kont.",
|
||||
"gyms": "Wyznaczanie <ink>właściciela</ink>, prowadzenie galerii, publikowanie <ink>ogłoszeń w imieniu siłowni</ink>.",
|
||||
"verifications": "Zgłoszenia <ink>nowej siłowni</ink> i <ink>weryfikacja wirtualnej</ink>. Proces potwierdzania autentyczności obiektu — zatwierdzenie nadaje status <mono>REAL</mono> i czyni wnioskodawcę właścicielem.",
|
||||
"dictionaries": "Katalogi treści: <ink>rodzaje ćwiczeń</ink> z opisami „jak się robi” i częstymi błędami, urządzenia i obszary treningowe.",
|
||||
"logs": "<ink>Pełny audyt czynności</ink> — ActivityLog notuje, kto, co i kiedy. W razie sporu nie ma dyskusji, jest wpis.",
|
||||
"notices": "Komunikaty systemowe dla <ink>członków</ink> — ten sam mechanizm co ogłoszenia siłowni, inne źródło wpisu."
|
||||
},
|
||||
"links": {
|
||||
"trenujacy": [
|
||||
"Ćwiczysz w siłowni, która <aGlossary>limituje twój plan</aGlossary> sprzętowo — a jej ogłoszenia (np. awarie) czytasz w <ink>Aktualnościach</ink>, obok planów od trenera.",
|
||||
"Chcesz trenować w <ink>prywatnej siłowni</ink>? Dostajesz zaproszenie z terminem ważności — patrz <linkSilownia>ścieżka siłowni</linkSilownia>.",
|
||||
"Współpracujesz z trenerem? Jego plany, rozmowy i dyscyplina to <linkTrener>ścieżka trenera</linkTrener> — ten sam kontotok danych."
|
||||
],
|
||||
"trener": [
|
||||
"Układasz plany <ink>pod sprzęt siłowni</ink>, w której trenuje podopieczny — katalog i ograniczenia to ten sam <aGlossary>zestaw zazębień</aGlossary> co u ćwiczącego.",
|
||||
"Twoje plany i rozmowy trafiają do podopiecznego przez <ink>feed</ink> i komunikator — bez osobnej aplikacji do kontaktu.",
|
||||
"Chcesz trenować na hali jako zewnętrzny trener? Właściciel nadaje Ci rolę przez <linkSilownia>ścieżka siłowni</linkSilownia>."
|
||||
],
|
||||
"silownia": [
|
||||
"Ćwiczący weryfikują Twoje <ink>wirtualne odwzorowanie</ink> głosami, a zgłoszenie z dokumentami zatwierdza <linkAdmin>ścieżka administratora</linkAdmin> — od tego momentu profil jest <mono>REAL</mono>.",
|
||||
"Trenerzy układają plany pod Twój sprzęt (<linkTrener>ścieżka trenera</linkTrener>), a ich podopieczni przychodzą na halę <ink>z gotowym planem</ink>."
|
||||
],
|
||||
"admin": [
|
||||
"Zatwierdzasz weryfikację i <linkSilownia>ścieżka siłowni</linkSilownia> staje się <mono>REAL</mono> — ze sprzętem i feedem dla swoich członków.",
|
||||
"Słowniki (ćwiczenia, urządzenia, obszary) to treść, na której <linkTrenujacy>ścieżka ćwiczącego</linkTrenujacy> i <linkTrener>ścieżka trenera</linkTrener> budują każdy plan."
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -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(
|
||||
|
||||
@@ -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 (
|
||||
<div className="flex flex-wrap gap-1.5">
|
||||
{TAGS.map((tag) => (
|
||||
{tags.map((tag) => (
|
||||
<span
|
||||
key={tag}
|
||||
className="rounded-md border border-line bg-input px-2 py-0.5 font-mono text-[11px] text-dim"
|
||||
@@ -290,50 +282,60 @@ function SprzetViz() {
|
||||
}
|
||||
|
||||
function CzlonkostwaViz() {
|
||||
const { t } = useTranslation('concepts');
|
||||
return (
|
||||
<div className="font-mono text-[11.5px] leading-relaxed">
|
||||
<div className="flex items-center gap-x-1 whitespace-nowrap">
|
||||
<span className="rounded border border-line bg-input px-1 py-0.5 text-ink">ćwiczący</span>
|
||||
<span className="rounded border border-line bg-input px-1 py-0.5 text-ink">
|
||||
{t('membership.exerciser')}
|
||||
</span>
|
||||
<span aria-hidden="true" className="text-dim">
|
||||
─
|
||||
</span>
|
||||
<span className="rounded border border-accent/40 bg-accent/10 px-1 py-0.5 text-accent-text">
|
||||
rola: trener
|
||||
{t('membership.coachRole')}
|
||||
</span>
|
||||
<span aria-hidden="true" className="text-dim">
|
||||
─
|
||||
</span>
|
||||
<span className="rounded border border-line bg-input px-1 py-0.5 text-ink">siłownia</span>
|
||||
<span className="rounded border border-line bg-input px-1 py-0.5 text-ink">
|
||||
{t('membership.gym')}
|
||||
</span>
|
||||
</div>
|
||||
<p className="mt-2 text-dim">
|
||||
zaproszenie: <span className="text-accent-text">ważne do 30 lis</span> · po terminie dostęp
|
||||
wygasa
|
||||
</p>
|
||||
<p className="mt-2 text-dim">
|
||||
<Trans
|
||||
ns="concepts"
|
||||
i18nKey="membership.inviteLine"
|
||||
components={{ hl: <span className="text-accent-text" /> }}
|
||||
/>
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function WeryfikacjaViz() {
|
||||
const { t } = useTranslation('concepts');
|
||||
return (
|
||||
<div className="flex flex-col gap-1.5 font-mono text-[11.5px]">
|
||||
<div className="flex flex-wrap items-center gap-2">
|
||||
<span aria-hidden="true">👍 👎 🥇 🍺</span>
|
||||
<span className="text-dim">— czy profil dobrze oddaje prawdziwą osobę</span>
|
||||
<span className="text-dim">{t('verification.question')}</span>
|
||||
</div>
|
||||
<div className="flex flex-wrap items-center gap-2">
|
||||
<span aria-hidden="true">📄</span>
|
||||
<span aria-hidden="true" className="text-dim">
|
||||
→
|
||||
</span>
|
||||
<span className="rounded border border-accent/40 bg-accent/10 px-1.5 py-0.5 text-accent-text">
|
||||
Status: Zweryfikowane
|
||||
</span>
|
||||
<span className="rounded border border-accent/40 bg-accent/10 px-1.5 py-0.5 text-accent-text">
|
||||
{t('verification.status')}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function PomiaryViz() {
|
||||
const { t } = useTranslation('concepts');
|
||||
return (
|
||||
<div className="flex flex-col gap-1">
|
||||
<svg viewBox="0 0 152 40" className="h-10 w-full" aria-hidden="true">
|
||||
@@ -348,22 +350,15 @@ function PomiaryViz() {
|
||||
<circle cx="148" cy="36" r="2" fill="var(--accent)" />
|
||||
</svg>
|
||||
<div className="flex justify-between font-mono text-[11px] text-dim">
|
||||
<span>82,4 kg</span>
|
||||
<span className="text-accent-text">−4,3 kg / 12 tyg.</span>
|
||||
<span>78,1 kg</span>
|
||||
<span>{t('measurements.weightStart')}</span>
|
||||
<span className="text-accent-text">{t('measurements.loss')}</span>
|
||||
<span>{t('measurements.weightEnd')}</span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
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 (
|
||||
<div className="font-mono text-[11.5px]">
|
||||
<div className="flex flex-wrap items-center gap-1.5">
|
||||
{DAYS.map((d) => (
|
||||
{DAY_STATES.map((state, i) => (
|
||||
<span
|
||||
key={d.label}
|
||||
title={
|
||||
d.state === 'done'
|
||||
? 'ukończony'
|
||||
: d.state === 'planned'
|
||||
? 'planowany'
|
||||
: d.state === 'skipped'
|
||||
? 'pominięty'
|
||||
: 'dzień wolny'
|
||||
}
|
||||
key={`${state}-${i}`}
|
||||
title={t(`states.${state}`)}
|
||||
className={cn(
|
||||
'grid size-6 place-items-center rounded border text-[10.5px]',
|
||||
DAY_STYLE[d.state],
|
||||
DAY_STYLE[state],
|
||||
)}
|
||||
>
|
||||
{d.label}
|
||||
{days[i]}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
<p className="mt-2 text-dim">
|
||||
plan → dzień w dniu → sesja na żywo:{' '}
|
||||
<span className="text-accent-text">w trakcie → ukończona</span>
|
||||
<Trans
|
||||
ns="concepts"
|
||||
i18nKey="planFlow"
|
||||
components={{ hl: <span className="text-accent-text" /> }}
|
||||
/>
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
@@ -410,8 +402,11 @@ function KillstreakViz() {
|
||||
<div className="flex flex-col gap-1.5">
|
||||
<StreakDots total={14} filled={9} />
|
||||
<p className="font-mono text-[11px] text-dim">
|
||||
każdy <span className="text-accent-text">kompletny</span> trening dokłada kropkę; pominięty
|
||||
dzień kasuje serię
|
||||
<Trans
|
||||
ns="concepts"
|
||||
i18nKey="streakNote"
|
||||
components={{ hl: <span className="text-accent-text" /> }}
|
||||
/>
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
@@ -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: <SprzetViz />,
|
||||
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: <CzlonkostwaViz />,
|
||||
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: <WeryfikacjaViz />,
|
||||
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: <PomiaryViz />,
|
||||
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: <PlanViz />,
|
||||
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: <KillstreakViz />,
|
||||
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: <SprzetViz /> },
|
||||
{ icon: ScrollText, id: 'czlonkostwa', viz: <CzlonkostwaViz /> },
|
||||
{ icon: UserRound, id: 'weryfikacja', viz: <WeryfikacjaViz /> },
|
||||
{ icon: ChartNoAxesColumn, id: 'pomiary', viz: <PomiaryViz /> },
|
||||
{ icon: Activity, id: 'plan', viz: <PlanViz /> },
|
||||
{ icon: Zap, id: 'killstreak', viz: <KillstreakViz /> },
|
||||
];
|
||||
|
||||
/** Sekcja „Słownik” — katalog pojęć jako rejestr systemu: wyrównane wiersze. */
|
||||
export function Concepts() {
|
||||
const { t } = useTranslation('concepts');
|
||||
return (
|
||||
<Section id="slownik">
|
||||
<div className="relative">
|
||||
<ChartBackdrop />
|
||||
|
||||
<div className="relative z-10">
|
||||
<SectionHeading
|
||||
kicker="/slownik"
|
||||
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."
|
||||
/>
|
||||
<SectionHeading kicker="/slownik" title={t('title')} lead={t('lead')} />
|
||||
|
||||
<div className="mt-12 grid gap-5 sm:grid-cols-2 xl:grid-cols-3">
|
||||
{CONCEPTS.map((c, i) => (
|
||||
<Reveal key={c.title} delayMs={(i % 3) * 60} className="h-full">
|
||||
<Reveal key={c.id} delayMs={(i % 3) * 60} className="h-full">
|
||||
<article className="window-glow flex h-full flex-col overflow-hidden rounded-lg border border-line bg-(image:--card-grad) shadow-card">
|
||||
<header className="flex items-center gap-2.5 border-b border-line bg-input px-4 py-3">
|
||||
<span aria-hidden="true" className="flex items-center gap-1.5">
|
||||
@@ -489,14 +450,16 @@ export function Concepts() {
|
||||
</span>
|
||||
<span className="ml-1 flex items-center gap-1.5 text-accent">
|
||||
<c.icon size={14} aria-hidden="true" />
|
||||
<span className="font-mono text-xs tracking-wide text-dim">{c.title}</span>
|
||||
<span className="font-mono text-xs tracking-wide text-dim">
|
||||
{t(`items.${c.id}.title`)}
|
||||
</span>
|
||||
</span>
|
||||
</header>
|
||||
<div className="flex h-32 flex-col justify-center border-b border-line bg-bg/70 px-4">
|
||||
{c.viz}
|
||||
</div>
|
||||
<p className="min-h-[110px] px-4 py-4 text-[12.5px] leading-relaxed text-dim">
|
||||
{c.desc}
|
||||
{t(`items.${c.id}.desc`)}
|
||||
</p>
|
||||
</article>
|
||||
</Reveal>
|
||||
|
||||
@@ -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<HTMLDivElement>(null);
|
||||
useParallax(rootRef);
|
||||
const linesA = t('linesA', { returnObjects: true }) as string[];
|
||||
const linesB = t('linesB', { returnObjects: true }) as string[];
|
||||
|
||||
return (
|
||||
<div ref={rootRef} className="relative overflow-hidden border-y border-line bg-terminal">
|
||||
@@ -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) => (
|
||||
<span key={i}>{l}</span>
|
||||
))}
|
||||
</div>
|
||||
@@ -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) => (
|
||||
<span key={i}>{l}</span>
|
||||
))}
|
||||
</div>
|
||||
@@ -48,23 +43,21 @@ export function Cta() {
|
||||
<Section id="start" className="relative">
|
||||
<Reveal className="mx-auto max-w-3xl text-center">
|
||||
<p className="font-mono text-xs tracking-widest text-accent">$ fitos --run</p>
|
||||
<h2 className="mt-3 text-3xl font-bold text-ink sm:text-4xl">System gotowy.</h2>
|
||||
<p className="mt-3 text-[15px] leading-relaxed text-dim">
|
||||
Włącz moduł, którego potrzebujesz: trening swój albo trening podopiecznych.
|
||||
</p>
|
||||
<h2 className="mt-3 text-3xl font-bold text-ink sm:text-4xl">{t('heading')}</h2>
|
||||
<p className="mt-3 text-[15px] leading-relaxed text-dim">{t('lead')}</p>
|
||||
<div className="mt-7 flex flex-wrap items-center justify-center gap-3">
|
||||
<a
|
||||
href={appUrl()}
|
||||
className="inline-flex items-center gap-2 rounded-lg border-0 bg-(image:--btn-grad) px-5 py-2.5 text-sm font-bold text-accent-ink shadow-(--btn-shadow) transition-transform hover:-translate-y-px"
|
||||
>
|
||||
Otwórz aplikację <ArrowRight size={16} aria-hidden="true" />
|
||||
{t('openApp')} <ArrowRight size={16} aria-hidden="true" />
|
||||
</a>
|
||||
<a
|
||||
href={adminUrl()}
|
||||
className="inline-flex items-center gap-2 rounded-lg border border-line bg-card px-5 py-2.5 text-sm font-semibold text-ink transition-colors hover:border-accent/50"
|
||||
>
|
||||
<ShieldCheck size={16} aria-hidden="true" className="text-accent" />
|
||||
Panel admina
|
||||
{t('adminPanel')}
|
||||
</a>
|
||||
</div>
|
||||
</Reveal>
|
||||
|
||||
@@ -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<HTMLDivElement>(null);
|
||||
const hubRef = useRef<HTMLDivElement>(null);
|
||||
const trenerRef = useRef<HTMLDivElement>(null);
|
||||
@@ -269,7 +248,7 @@ function HubDiagram() {
|
||||
<div className="text-center">
|
||||
<Brandmark size={40} className="mx-auto" />
|
||||
<p className="mt-2 font-display text-sm font-bold text-ink">FitOS</p>
|
||||
<p className="font-mono text-[10px] text-accent">rdzeń</p>
|
||||
<p className="font-mono text-[10px] text-accent">{t('hubLabel')}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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<HTMLDivElement>(null);
|
||||
const hubRef = useRef<HTMLDivElement>(null);
|
||||
const cwiczacyRef = useRef<HTMLDivElement>(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() {
|
||||
<div className="text-center">
|
||||
<Brandmark size={34} className="mx-auto" />
|
||||
<p className="mt-1.5 font-display text-sm font-bold text-ink">FitOS</p>
|
||||
<p className="font-mono text-[10px] text-accent">rdzeń</p>
|
||||
<p className="font-mono text-[10px] text-accent">{t('hubLabel')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</Reveal>
|
||||
@@ -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 (
|
||||
<Section id="ekosystem">
|
||||
<SectionHeading
|
||||
kicker="/rdzen"
|
||||
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."
|
||||
/>
|
||||
<SectionHeading kicker="/rdzen" title={t('title')} lead={t('lead')} />
|
||||
|
||||
<HubDiagram />
|
||||
|
||||
@@ -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 (
|
||||
<div
|
||||
@@ -453,7 +449,9 @@ function ParticipantCard({
|
||||
<span className="grid size-8 place-items-center rounded-md border border-line bg-input text-accent">
|
||||
<Icon size={15} aria-hidden="true" />
|
||||
</span>
|
||||
<span className="font-display text-[15px] font-bold text-ink">{participant.role}</span>
|
||||
<span className="font-display text-[15px] font-bold text-ink">
|
||||
{t(`participants.${participant.id}.role`)}
|
||||
</span>
|
||||
</div>
|
||||
<dl className="mt-4 border-t border-line pt-3.5 text-[13px] leading-relaxed">
|
||||
{rows.map((row) => (
|
||||
@@ -470,7 +468,7 @@ function ParticipantCard({
|
||||
row.accent ? 'text-accent' : 'text-dim',
|
||||
)}
|
||||
>
|
||||
{row.key}
|
||||
{row.label}
|
||||
</dt>
|
||||
<dd className={row.accent ? 'text-dim' : 'text-ink'}>{row.text}</dd>
|
||||
</div>
|
||||
|
||||
@@ -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 (
|
||||
<footer className="border-t border-line">
|
||||
<div className="mx-auto grid w-full max-w-6xl gap-10 px-5 py-14 md:grid-cols-2">
|
||||
<div>
|
||||
<div className="flex items-center gap-2.5">
|
||||
<Brandmark size={24} />
|
||||
<span className="font-display text-sm font-bold text-ink">O tym systemie</span>
|
||||
<span className="font-display text-sm font-bold text-ink">{t('aboutTitle')}</span>
|
||||
</div>
|
||||
<dl className="mt-4 overflow-hidden rounded-lg border border-line">
|
||||
{ABOUT.map(([term, value], i) => (
|
||||
{about.map(([term, value], i) => (
|
||||
<div
|
||||
key={term}
|
||||
className={`grid grid-cols-[8rem_1fr] gap-2 px-4 py-2.5 text-[12.5px] ${
|
||||
@@ -31,12 +32,9 @@ export function Footer() {
|
||||
</dl>
|
||||
</div>
|
||||
<div className="flex flex-col justify-between gap-6">
|
||||
<p className="max-w-sm text-[13px] leading-relaxed text-dim">
|
||||
FitOS to system operacyjny treningu: plany, sesje na żywo, killstreak, trenerzy i
|
||||
siłownie — wszystko na jednym, self-hostedzie.
|
||||
</p>
|
||||
<p className="max-w-sm text-[13px] leading-relaxed text-dim">{t('blurb')}</p>
|
||||
<p className="font-mono text-[11px] text-dim">
|
||||
© {new Date().getFullYear()} FitOS — trening, który się dowozi.
|
||||
{t('copyright', { year: new Date().getFullYear() })}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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 (
|
||||
<section className="relative mx-auto w-full max-w-6xl px-5 pb-16 pt-14 sm:pb-24 sm:pt-20">
|
||||
<div className="grid items-center gap-12 lg:grid-cols-[1.15fr_0.85fr]">
|
||||
@@ -14,26 +16,24 @@ export function Hero() {
|
||||
</div>
|
||||
|
||||
<h1 className="mt-8 text-4xl font-bold leading-[1.08] tracking-tight text-ink sm:text-6xl">
|
||||
Trening, <br />
|
||||
który się <span className="text-accent">dowozi.</span>
|
||||
{t('titleA')} <br />
|
||||
{t('titleB')} <span className="text-accent">{t('titleC')}</span>
|
||||
</h1>
|
||||
<p className="mt-4 max-w-md text-[16.5px] leading-relaxed text-dim">
|
||||
FitOS to system operacyjny treningu. Od planowania po ostatnią serię.
|
||||
</p>
|
||||
<p className="mt-4 max-w-md text-[16.5px] leading-relaxed text-dim">{t('lead')}</p>
|
||||
|
||||
<div className="mt-7 flex flex-wrap items-center gap-3">
|
||||
<a
|
||||
href={appUrl()}
|
||||
className="inline-flex items-center gap-2 rounded-lg border-0 bg-(image:--btn-grad) px-5 py-2.5 text-sm font-bold text-accent-ink shadow-(--btn-shadow) transition-transform hover:-translate-y-px"
|
||||
>
|
||||
Otwórz aplikację <ArrowRight size={16} aria-hidden="true" />
|
||||
{t('openApp')} <ArrowRight size={16} aria-hidden="true" />
|
||||
</a>
|
||||
<a
|
||||
href={adminUrl()}
|
||||
className="inline-flex items-center gap-2 rounded-lg border border-line bg-card px-5 py-2.5 text-sm font-semibold text-ink transition-colors hover:border-accent/50"
|
||||
>
|
||||
<ShieldCheck size={16} aria-hidden="true" className="text-accent" />
|
||||
Panel admina
|
||||
{t('adminPanel')}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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<HTMLDivElement>(null);
|
||||
useParallax(rootRef);
|
||||
const linesA = t('linesA', { returnObjects: true }) as string[];
|
||||
const linesB = t('linesB', { returnObjects: true }) as string[];
|
||||
|
||||
return (
|
||||
<div ref={rootRef} className="relative overflow-hidden border-y border-line bg-terminal">
|
||||
@@ -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) => (
|
||||
<span key={i}>{l}</span>
|
||||
))}
|
||||
</div>
|
||||
@@ -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) => (
|
||||
<span key={i}>{l}</span>
|
||||
))}
|
||||
</div>
|
||||
@@ -54,20 +44,16 @@ export function Manifest() {
|
||||
<Reveal>
|
||||
<p className="font-mono text-xs tracking-widest text-accent">$ man FitOS</p>
|
||||
<p className="mt-5 text-2xl leading-snug font-bold text-ink sm:text-[2rem]">
|
||||
Plan. Seria. Ciężar. Pomiar.{' '}
|
||||
<span className="text-accent">Wszystko w jednym systemie.</span>
|
||||
{t('headlineA')} <span className="text-accent">{t('headlineB')}</span>
|
||||
</p>
|
||||
<p className="mx-auto mt-5 max-w-xl text-[14.5px] leading-relaxed text-dim">
|
||||
FitOS zastępuje chaos kilkunastu aplikacji jedną, bezpieczną platformą self-hosted,
|
||||
instalowaną bezpośrednio w Twojej infrastrukturze.
|
||||
{t('para1')}
|
||||
</p>
|
||||
<p className="mx-auto mt-3 max-w-xl text-[14.5px] leading-relaxed text-dim">
|
||||
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')}
|
||||
</p>
|
||||
<p className="mt-6 font-mono text-[12.5px] text-dim">
|
||||
<span className="text-accent">$</span> Poznaj FitOS: sprawdź architekturę ekosystemu,
|
||||
słownik pojęć i dedykowane ścieżki użytkowników.
|
||||
<span className="text-accent">$</span> {t('discover')}
|
||||
</p>
|
||||
</Reveal>
|
||||
</div>
|
||||
|
||||
@@ -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 (
|
||||
<header className="sticky top-0 z-50 border-b border-line bg-bg/85 backdrop-blur-md">
|
||||
<div className="mx-auto flex h-14 w-full max-w-6xl items-center gap-3 px-5">
|
||||
@@ -16,11 +23,14 @@ export function SiteHeader() {
|
||||
<Brandmark size={26} />
|
||||
<span className="font-display text-[15px] font-bold tracking-tight">FitOS</span>
|
||||
<span className="rounded-full border border-line bg-input px-2 py-0.5 font-mono text-[10px] text-dim">
|
||||
v1 · MVP
|
||||
{t('common:brandVersion')}
|
||||
</span>
|
||||
</a>
|
||||
<nav aria-label="Sekcje strony" className="ml-auto hidden items-center gap-5 sm:flex">
|
||||
{ANCHORS.map((a) => (
|
||||
<nav
|
||||
aria-label={t('nav:sectionsAria')}
|
||||
className="ml-auto hidden items-center gap-5 sm:flex"
|
||||
>
|
||||
{anchors.map((a) => (
|
||||
<a
|
||||
key={a.href}
|
||||
href={a.href}
|
||||
@@ -30,11 +40,32 @@ export function SiteHeader() {
|
||||
</a>
|
||||
))}
|
||||
</nav>
|
||||
<div
|
||||
role="group"
|
||||
aria-label={t('nav:langSwitchAria')}
|
||||
className="ml-auto flex items-center gap-1.5 sm:ml-0"
|
||||
>
|
||||
{LANGS.map((lang) => (
|
||||
<button
|
||||
key={lang}
|
||||
type="button"
|
||||
aria-pressed={i18n.language === lang}
|
||||
aria-label={lang === 'pl' ? t('nav:langPl') : t('nav:langEn')}
|
||||
onClick={() => changeLanguage(lang)}
|
||||
className={cn(
|
||||
'font-mono text-[11px] font-semibold uppercase transition-colors',
|
||||
i18n.language === lang ? 'text-ink' : 'text-dim hover:text-ink',
|
||||
)}
|
||||
>
|
||||
{lang}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
<a
|
||||
href={appUrl()}
|
||||
className="ml-auto inline-flex items-center gap-1 rounded-md border-0 bg-(image:--btn-grad) px-3.5 py-1.5 text-[13px] font-bold text-accent-ink shadow-(--btn-shadow) transition-transform hover:-translate-y-px sm:ml-0"
|
||||
className="inline-flex items-center gap-1 rounded-md border-0 bg-(image:--btn-grad) px-3.5 py-1.5 text-[13px] font-bold text-accent-ink shadow-(--btn-shadow) transition-transform hover:-translate-y-px"
|
||||
>
|
||||
Uruchom <span aria-hidden="true">▸</span>
|
||||
{t('nav:launch')} <span aria-hidden="true">▸</span>
|
||||
</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@@ -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({
|
||||
<span className="flex flex-wrap items-baseline gap-x-3">
|
||||
<span className="font-display text-lg font-bold text-ink">{label}</span>
|
||||
<span className="font-mono text-[10px] text-dim">
|
||||
proces {String(index + 1).padStart(2, '0')}/04
|
||||
{t('process', { index: String(index + 1).padStart(2, '0') })}
|
||||
</span>
|
||||
</span>
|
||||
<span className="mt-1 block text-[13.5px] leading-relaxed text-dim">{summary}</span>
|
||||
@@ -69,7 +71,7 @@ export function Track({
|
||||
isOpen ? 'text-dim' : 'text-accent',
|
||||
)}
|
||||
>
|
||||
{isOpen ? '— zwij' : '+ otwórz szczegóły'}
|
||||
{isOpen ? t('collapse') : t('expand')}
|
||||
</span>
|
||||
</span>
|
||||
<span
|
||||
@@ -86,7 +88,7 @@ export function Track({
|
||||
<div
|
||||
id={`sciezka-panel-${trackId}`}
|
||||
role="region"
|
||||
aria-label={`Szczegóły: ${label}`}
|
||||
aria-label={t('detailsAria', { label })}
|
||||
hidden={!isOpen}
|
||||
>
|
||||
<div className="border-t border-line px-5 pb-8 pt-6 sm:px-6">{children}</div>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { useCallback, useEffect, useState } from 'react';
|
||||
import { useCallback, useEffect, useState, type ReactNode } from 'react';
|
||||
import { Trans, useTranslation } from 'react-i18next';
|
||||
import {
|
||||
BadgeCheck,
|
||||
BookOpenText,
|
||||
@@ -24,33 +25,26 @@ import { parseTrackFromHash, type TrackId } from '../lib/tracks';
|
||||
import { Track, TrackBlock } from './Track';
|
||||
import { Section } from './shared';
|
||||
|
||||
/** Link wewnątrzzakładkowy — przełącza ścieżkę przez hash bez przeładowania. */
|
||||
function to(track: TrackId) {
|
||||
return (
|
||||
<a href={`#/sciezka/${track}`} className="text-accent-text hover:underline">
|
||||
{labelOf(track).toLowerCase()}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
type TagProps = { children?: ReactNode };
|
||||
|
||||
function labelOf(track: TrackId): string {
|
||||
switch (track) {
|
||||
case 'trenujacy':
|
||||
return 'Ścieżka ćwiczącego';
|
||||
case 'trener':
|
||||
return 'Ścieżka trenera';
|
||||
case 'silownia':
|
||||
return 'Ścieżka siłowni';
|
||||
case 'admin':
|
||||
return 'Ścieżka administratora';
|
||||
}
|
||||
}
|
||||
const Ink = ({ children }: TagProps) => <span className="text-ink">{children}</span>;
|
||||
const Accent = ({ children }: TagProps) => <span className="text-accent">{children}</span>;
|
||||
const Mono = ({ children }: TagProps) => <span className="font-mono text-accent">{children}</span>;
|
||||
const GlossaryLink = ({ children }: TagProps) => (
|
||||
<a href="#slownik" className="text-accent-text hover:underline">
|
||||
{children}
|
||||
</a>
|
||||
);
|
||||
|
||||
/** Rola w tej ścieżce — definicja i uprawnienia; jedno miejsce, bez osobnej sekcji. */
|
||||
function RoleBlock({ summary, gains }: { summary: string; gains: string[] }) {
|
||||
function RoleBlock({ trackId }: { trackId: TrackId }) {
|
||||
const { t } = useTranslation('tracks');
|
||||
const gains = t(`gains.${trackId}`, { returnObjects: true }) as string[];
|
||||
return (
|
||||
<TrackBlock title="Rola i uprawnienia">
|
||||
<p className="max-w-2xl text-[13.5px] leading-relaxed text-dim">{summary}</p>
|
||||
<TrackBlock title={t('roleTitle')}>
|
||||
<p className="max-w-2xl text-[13.5px] leading-relaxed text-dim">
|
||||
{t(`roleSummary.${trackId}`)}
|
||||
</p>
|
||||
<ul className="mt-4 grid gap-2 sm:grid-cols-2 lg:grid-cols-3">
|
||||
{gains.map((g) => (
|
||||
<li key={g} className="flex gap-2 text-[13px] leading-snug text-dim">
|
||||
@@ -69,6 +63,7 @@ function RoleBlock({ summary, gains }: { summary: string; gains: string[] }) {
|
||||
* `#/sciezka/<id>`, więc linki z rdzenia i między ścieżkami działają jak nawigacja.
|
||||
*/
|
||||
export function Tracks() {
|
||||
const { t } = useTranslation('tracks');
|
||||
const [active, setActive] = useState<TrackId | null>(() =>
|
||||
parseTrackFromHash(window.location.hash),
|
||||
);
|
||||
@@ -89,15 +84,50 @@ export function Tracks() {
|
||||
setActive((prev) => (prev === id ? null : id));
|
||||
}, []);
|
||||
|
||||
// Link wewnątrzzakładkowy — przełącza ścieżkę przez hash bez przeładowania.
|
||||
const trackLink = (id: TrackId) => (
|
||||
<a href={`#/sciezka/${id}`} className="text-accent-text hover:underline">
|
||||
{t(`labels.${id}`).toLowerCase()}
|
||||
</a>
|
||||
);
|
||||
|
||||
const rich = {
|
||||
ink: <Ink />,
|
||||
accent: <Accent />,
|
||||
mono: <Mono />,
|
||||
aGlossary: <GlossaryLink />,
|
||||
linkTrenujacy: trackLink('trenujacy'),
|
||||
linkTrener: trackLink('trener'),
|
||||
linkSilownia: trackLink('silownia'),
|
||||
linkAdmin: trackLink('admin'),
|
||||
};
|
||||
|
||||
const body = (key: string) => <Trans ns="tracks" i18nKey={`bodies.${key}`} components={rich} />;
|
||||
|
||||
const linkList = (trackId: TrackId) => {
|
||||
const items = t(`links.${trackId}`, { returnObjects: true }) as string[];
|
||||
return (
|
||||
<TrackBlock title={t('linksTitle')}>
|
||||
<ul className="flex flex-col gap-3.5 text-[13px] leading-relaxed text-dim">
|
||||
{items.map((_, i) => (
|
||||
<li key={i} className="flex gap-2">
|
||||
<Link2 size={14} aria-hidden="true" className="mt-0.5 flex-none text-accent" />
|
||||
<span>
|
||||
<Trans ns="tracks" i18nKey={`links.${trackId}.${i}`} components={rich} />
|
||||
</span>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</TrackBlock>
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<Section id="sciezki">
|
||||
<div className="mx-auto max-w-2xl text-center">
|
||||
<p className="font-mono text-xs tracking-widest text-accent">/sciezka</p>
|
||||
<h2 className="mt-2 text-3xl font-bold text-ink sm:text-4xl">Wybierz swoją ścieżkę</h2>
|
||||
<p className="mt-3 text-[15px] leading-relaxed text-dim">
|
||||
Ten sam system z czterech perspektyw. Rozwiń swoją — zobaczysz rolę, moduły i to, jak
|
||||
zazębiają się z siłownią i resztą ekosystemu.
|
||||
</p>
|
||||
<h2 className="mt-2 text-3xl font-bold text-ink sm:text-4xl">{t('introTitle')}</h2>
|
||||
<p className="mt-3 text-[15px] leading-relaxed text-dim">{t('introLead')}</p>
|
||||
</div>
|
||||
|
||||
<div className="mt-10 flex flex-col gap-4">
|
||||
@@ -106,93 +136,33 @@ export function Tracks() {
|
||||
active={active}
|
||||
onOpen={open}
|
||||
icon={Dumbbell}
|
||||
label="Dla ćwiczącego"
|
||||
summary="Trenujesz od planu po ostatnią serię — a plan, historia i kalendarz żyją na sprzęcie realnych (albo zweryfikowanych wirtualnych) siłowni."
|
||||
label={t('trackCards.trenujacy')}
|
||||
summary={t('summaries.trenujacy')}
|
||||
>
|
||||
<RoleBlock
|
||||
summary="Ćwiczący — zwykły członek siłowni: trenuje i korzysta z planów, a rolę w konkretnej siłowni nadaje mu członkostwo."
|
||||
gains={[
|
||||
'Tworzenie planów i prowadzenie treningów',
|
||||
'Dostęp do feedu i statystyk siłowni',
|
||||
]}
|
||||
/>
|
||||
<TrackBlock title="Moduly">
|
||||
<RoleBlock trackId="trenujacy" />
|
||||
<TrackBlock title={t('moduleTitle')}>
|
||||
<div className="grid gap-5 md:grid-cols-2 xl:grid-cols-3">
|
||||
<WindowCard icon={ClipboardList} title="Plany.app">
|
||||
<p>
|
||||
Cała struktura treningu:{' '}
|
||||
<span className="text-ink">tydzień → dzień → sesja → seria</span>. Plan dojrzewa w
|
||||
trybie szkic → aktywny, tygodnie mają aliasy („Deload”). Siłownia
|
||||
ogranicza dobór sprzętu, a daty dni liczą się automatycznie.
|
||||
</p>
|
||||
<WindowCard icon={ClipboardList} title={t('modCards.plans')}>
|
||||
<p>{body('plans')}</p>
|
||||
</WindowCard>
|
||||
<WindowCard icon={Timer} title="Sesja na zywo">
|
||||
<p>
|
||||
Wpisujesz powtórzenia, <span className="text-ink">RIR 0–10</span> i suwak
|
||||
trudności <span className="text-ink">1–5</span>. Timer przerwy pilnuje przerw, a
|
||||
przycisk „Norma spełniona” domyka serię. Serie ponad plan? Proszę
|
||||
bardzo — jako bonus.
|
||||
</p>
|
||||
<WindowCard icon={Timer} title={t('modCards.session')}>
|
||||
<p>{body('session')}</p>
|
||||
</WindowCard>
|
||||
<WindowCard icon={Flame} title="Killstreak.app">
|
||||
<p>
|
||||
Kolejne <span className="text-ink">skuteczne treningi</span> tworzą serię. Reset
|
||||
po pominięciu lub dniu częściowym — bez litości, bez oszukiwania. Widzisz rekord{' '}
|
||||
<span className="font-mono text-accent">best</span> i kropki z ostatnich 30 dni.
|
||||
</p>
|
||||
<WindowCard icon={Flame} title={t('modCards.killstreak')}>
|
||||
<p>{body('killstreak')}</p>
|
||||
</WindowCard>
|
||||
<WindowCard icon={TrendingUp} title="Postepy.app">
|
||||
<p>
|
||||
Wykresy szacowanego <span className="text-ink">1RM i objętości</span>, rekordy i
|
||||
delty. Ćwiczenia dopasowane do Twoich celów i wykluczeń — patrzysz na to, co
|
||||
realnie rośnie.
|
||||
</p>
|
||||
<WindowCard icon={TrendingUp} title={t('modCards.progress')}>
|
||||
<p>{body('progress')}</p>
|
||||
</WindowCard>
|
||||
<WindowCard icon={Ruler} title="Pomiary.app">
|
||||
<p>
|
||||
Waga i obwody: <span className="text-ink">klatka, talia, biceps L/P</span> i
|
||||
reszta taśmy. System liczy deltę od pierwszego pomiaru, więc postęp widać w
|
||||
liczbach, nie w lustrze.
|
||||
</p>
|
||||
<WindowCard icon={Ruler} title={t('modCards.measurements')}>
|
||||
<p>{body('measurements')}</p>
|
||||
</WindowCard>
|
||||
<WindowCard icon={CalendarCheck2} title="Kalendarz.app">
|
||||
<p>
|
||||
Rok treningowy na jednym ekranie:{' '}
|
||||
<span className="text-ink">norma, bonus, deficyt</span> w każdym dniu. Historia z
|
||||
komentarzami przy seriach — pamiętasz nie tylko ciężar, ale i dlaczego.
|
||||
</p>
|
||||
<WindowCard icon={CalendarCheck2} title={t('modCards.calendar')}>
|
||||
<p>{body('calendar')}</p>
|
||||
</WindowCard>
|
||||
</div>
|
||||
</TrackBlock>
|
||||
<TrackBlock title="Powiazania">
|
||||
<ul className="flex flex-col gap-3.5 text-[13px] leading-relaxed text-dim">
|
||||
<li className="flex gap-2">
|
||||
<Link2 size={14} aria-hidden="true" className="mt-0.5 flex-none text-accent" />
|
||||
<span>
|
||||
Ćwiczysz w siłowni, która{' '}
|
||||
<a href="#slownik" className="text-accent-text hover:underline">
|
||||
limituje twój plan
|
||||
</a>{' '}
|
||||
sprzętowo — a jej ogłoszenia (np. awarie) czytasz w{' '}
|
||||
<span className="text-ink">Aktualnościach</span>, obok planów od trenera.
|
||||
</span>
|
||||
</li>
|
||||
<li className="flex gap-2">
|
||||
<Link2 size={14} aria-hidden="true" className="mt-0.5 flex-none text-accent" />
|
||||
<span>
|
||||
Chcesz trenować w <span className="text-ink">prywatnej siłowni</span>? Dostajesz
|
||||
zaproszenie z terminem ważności — patrz {to('silownia')}.
|
||||
</span>
|
||||
</li>
|
||||
<li className="flex gap-2">
|
||||
<Link2 size={14} aria-hidden="true" className="mt-0.5 flex-none text-accent" />
|
||||
<span>
|
||||
Współpracujesz z trenerem? Jego plany, rozmowy i dyscyplina to {to('trener')} —
|
||||
ten sam kontotok danych.
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</TrackBlock>
|
||||
{linkList('trenujacy')}
|
||||
</Track>
|
||||
|
||||
<Track
|
||||
@@ -200,86 +170,27 @@ export function Tracks() {
|
||||
active={active}
|
||||
onOpen={open}
|
||||
icon={UserRound}
|
||||
label="Dla trenera"
|
||||
summary="Prowadzisz podopiecznych od planu po korektę — w kontekście sprzętu i zasad siłowni, w której realnie trenują."
|
||||
label={t('trackCards.trener')}
|
||||
summary={t('summaries.trener')}
|
||||
>
|
||||
<RoleBlock
|
||||
summary="Trener — prowadzi podopiecznych i układa im plany treningowe; w siłowni pełni rolę nadaną w członkostwie."
|
||||
gains={[
|
||||
'Zapraszanie podopiecznych i opieka nad nimi',
|
||||
'Tworzenie i edycja ich planów',
|
||||
'Wgląd w postępy podopiecznych',
|
||||
]}
|
||||
/>
|
||||
<TrackBlock title="Moduly">
|
||||
<RoleBlock trackId="trener" />
|
||||
<TrackBlock title={t('moduleTitle')}>
|
||||
<div className="grid gap-5 md:grid-cols-2">
|
||||
<WindowCard icon={Users} title="Podopieczni.app">
|
||||
<p>
|
||||
Kokpit relacji w sześciu zakładkach:{' '}
|
||||
<span className="text-ink">
|
||||
Przegląd, Rozmowa, Dyscyplina, Postępy, Kalendarz, Plany
|
||||
</span>
|
||||
. System sam świeci flagami: <span className="text-accent">zerowany streak</span>,{' '}
|
||||
<span className="text-accent">brak sesji 7 dni</span>,{' '}
|
||||
<span className="text-accent">wysoki deficyt</span>. Serie kolorowane wg zakresu.
|
||||
</p>
|
||||
<WindowCard icon={Users} title={t('modCards.trainees')}>
|
||||
<p>{body('trainees')}</p>
|
||||
</WindowCard>
|
||||
<WindowCard icon={UserRoundCog} title="Planowanie.app">
|
||||
<p>
|
||||
Jeden <span className="text-ink">aktywny plan</span> na podopiecznego — zero
|
||||
wersji roboczych w obiegu. W normy wstawiasz{' '}
|
||||
<em>„Wyniki podopiecznego”</em>, więc progresja liczy się od realnych
|
||||
ciężarów, nie ze sufitu.
|
||||
</p>
|
||||
<WindowCard icon={UserRoundCog} title={t('modCards.planning')}>
|
||||
<p>{body('planning')}</p>
|
||||
</WindowCard>
|
||||
<WindowCard icon={MessagesSquare} title="Komunikator.app">
|
||||
<p>
|
||||
Relacja <span className="text-ink">trener ↔ podopieczny</span>, osobny wątek na
|
||||
relację. Zamiast zrzutu ekranu załączasz <span className="text-ink">sesję</span>{' '}
|
||||
albo konkretne <span className="text-ink">ćwiczenie z wynikami</span> — rozmowa ma
|
||||
kontekst.
|
||||
</p>
|
||||
<WindowCard icon={MessagesSquare} title={t('modCards.messenger')}>
|
||||
<p>{body('messenger')}</p>
|
||||
</WindowCard>
|
||||
<WindowCard icon={CalendarCheck2} title="Zaproszenia.app">
|
||||
<p>
|
||||
Współpraca trenerska i dostęp do{' '}
|
||||
<span className="text-ink">prywatnych siłowni</span> — przez zaproszenia z{' '}
|
||||
<span className="text-ink">terminem ważności</span>. Klucz wygasa, dostęp nie
|
||||
zostaje poślizgiem.
|
||||
</p>
|
||||
<WindowCard icon={CalendarCheck2} title={t('modCards.invitations')}>
|
||||
<p>{body('invitations')}</p>
|
||||
</WindowCard>
|
||||
</div>
|
||||
</TrackBlock>
|
||||
<TrackBlock title="Powiazania">
|
||||
<ul className="flex flex-col gap-3.5 text-[13px] leading-relaxed text-dim">
|
||||
<li className="flex gap-2">
|
||||
<Link2 size={14} aria-hidden="true" className="mt-0.5 flex-none text-accent" />
|
||||
<span>
|
||||
Układasz plany <span className="text-ink">pod sprzęt siłowni</span>, w której
|
||||
trenuje podopieczny — katalog i ograniczenia to ten sam{' '}
|
||||
<a href="#slownik" className="text-accent-text hover:underline">
|
||||
zestaw zazębień
|
||||
</a>{' '}
|
||||
co u ćwiczącego.
|
||||
</span>
|
||||
</li>
|
||||
<li className="flex gap-2">
|
||||
<Link2 size={14} aria-hidden="true" className="mt-0.5 flex-none text-accent" />
|
||||
<span>
|
||||
Twoje plany i rozmowy trafiają do podopiecznego przez{' '}
|
||||
<span className="text-ink">feed</span> i komunikator — bez osobnej aplikacji do
|
||||
kontaktu.
|
||||
</span>
|
||||
</li>
|
||||
<li className="flex gap-2">
|
||||
<Link2 size={14} aria-hidden="true" className="mt-0.5 flex-none text-accent" />
|
||||
<span>
|
||||
Chcesz trenować na hali jako zewnętrzny trener? Właściciel nadaje Ci rolę przez{' '}
|
||||
{to('silownia')}.
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</TrackBlock>
|
||||
{linkList('trener')}
|
||||
</Track>
|
||||
|
||||
<Track
|
||||
@@ -287,74 +198,30 @@ export function Tracks() {
|
||||
active={active}
|
||||
onOpen={open}
|
||||
icon={Building2}
|
||||
label="Dla siłowni"
|
||||
summary="Siłownia to w FitOS pełnoprawny uczestnik: od wirtualnego odwzorowania po zweryfikowaną halę ze sprzętem, grafikiem i własnym feedem."
|
||||
label={t('trackCards.silownia')}
|
||||
summary={t('summaries.silownia')}
|
||||
>
|
||||
<RoleBlock
|
||||
summary="Właściciel siłowni — zarządza halą; to uprawnienie nadawane w członkostwie, nie osobny typ konta."
|
||||
gains={[
|
||||
'Dane, godziny i adres siłowni',
|
||||
'Sprzęt, zdjęcia i grafik',
|
||||
'Zapraszanie ludzi i nadawanie im ról',
|
||||
]}
|
||||
/>
|
||||
<TrackBlock title="Moduly">
|
||||
<RoleBlock trackId="silownia" />
|
||||
<TrackBlock title={t('moduleTitle')}>
|
||||
<div className="grid gap-5 md:grid-cols-2">
|
||||
<WindowCard icon={Building2} title="Profil.silowni">
|
||||
<p>
|
||||
Zaczynasz od <span className="text-ink">wirtualnej</span>: społeczność odwzorowuje
|
||||
prawdziwe siłownie, a oceny 👍/👎 mówią, czy opis dobrze oddaje rzeczywistość.
|
||||
Potem <span className="text-ink">realna</span>: adres, galeria z okładką, grafik i{' '}
|
||||
<span className="text-ink">pojemność</span>.
|
||||
</p>
|
||||
<WindowCard icon={Building2} title={t('modCards.profile')}>
|
||||
<p>{body('profile')}</p>
|
||||
</WindowCard>
|
||||
<WindowCard icon={Dumbbell} title="Sprzet.hali">
|
||||
<p>
|
||||
Sprzęt prosto z katalogu:{' '}
|
||||
<span className="text-ink">
|
||||
hantle, kettlebell, sztanga, wyciąg, maszyna, ławka, cardio, masa ciała
|
||||
</span>
|
||||
. Każdy wpis ze specyfikacją i zdjęciami — plany ćwiczących liczą się dokładnie z
|
||||
tej listy.
|
||||
</p>
|
||||
<WindowCard icon={Dumbbell} title={t('modCards.equipment')}>
|
||||
<p>{body('equipment')}</p>
|
||||
</WindowCard>
|
||||
<WindowCard icon={Megaphone} title="Ogloszenia.feed">
|
||||
<p>
|
||||
Ogłoszenie trafia do <span className="text-ink">członków</span>, nie do całego
|
||||
świata:
|
||||
</p>
|
||||
<WindowCard icon={Megaphone} title={t('modCards.announcements')}>
|
||||
<p>{body('announcements')}</p>
|
||||
<p className="rounded-md border border-line bg-input px-3 py-2 font-mono text-xs text-ink">
|
||||
⚠ Awaria prądu — siłownia nieczynna
|
||||
{t('bodies.announcementNote')}
|
||||
</p>
|
||||
</WindowCard>
|
||||
<WindowCard icon={Shield} title="Prywatna.sala">
|
||||
<p>
|
||||
Chcesz zamkniętą salę? <span className="text-ink">Prywatne siłownie</span>{' '}
|
||||
działają wyłącznie z <span className="text-ink">zaproszeniami</span> (termin
|
||||
ważności). Właściciel zaprasza ludzi i nadaje im role.
|
||||
</p>
|
||||
<WindowCard icon={Shield} title={t('modCards.private')}>
|
||||
<p>{body('private')}</p>
|
||||
</WindowCard>
|
||||
</div>
|
||||
</TrackBlock>
|
||||
<TrackBlock title="Powiazania">
|
||||
<ul className="flex flex-col gap-3.5 text-[13px] leading-relaxed text-dim">
|
||||
<li className="flex gap-2">
|
||||
<Link2 size={14} aria-hidden="true" className="mt-0.5 flex-none text-accent" />
|
||||
<span>
|
||||
Ćwiczący weryfikują Twoje <span className="text-ink">wirtualne odwzorowanie</span>{' '}
|
||||
głosami, a zgłoszenie z dokumentami zatwierdza {to('admin')} — od tego momentu
|
||||
profil jest <span className="font-mono text-accent">REAL</span>.
|
||||
</span>
|
||||
</li>
|
||||
<li className="flex gap-2">
|
||||
<Link2 size={14} aria-hidden="true" className="mt-0.5 flex-none text-accent" />
|
||||
<span>
|
||||
Trenerzy układają plany pod Twój sprzęt ({to('trener')}), a ich podopieczni
|
||||
przychodzą na halę <span className="text-ink">z gotowym planem</span>.
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</TrackBlock>
|
||||
{linkList('silownia')}
|
||||
</Track>
|
||||
|
||||
<Track
|
||||
@@ -362,78 +229,33 @@ export function Tracks() {
|
||||
active={active}
|
||||
onOpen={open}
|
||||
icon={Shield}
|
||||
label="Dla administratora"
|
||||
summary="Zaplecze, które trzyma ekosystem w ryzach: użytkownicy, siłownie, weryfikacje, katalogi treści i pełny audyt."
|
||||
label={t('trackCards.admin')}
|
||||
summary={t('summaries.admin')}
|
||||
>
|
||||
<RoleBlock
|
||||
summary="Administrator — pełny dostęp do panelu administratora FitOS; rola flagą na koncie."
|
||||
gains={[
|
||||
'Zarządzanie wszystkimi użytkownikami i siłowniami',
|
||||
'Weryfikacja zgłoszeń siłowni',
|
||||
'Katalogi, komunikaty i logi systemowe',
|
||||
]}
|
||||
/>
|
||||
<TrackBlock title="Moduly">
|
||||
<RoleBlock trackId="admin" />
|
||||
<TrackBlock title={t('moduleTitle')}>
|
||||
<div className="grid gap-5 md:grid-cols-2 xl:grid-cols-3">
|
||||
<WindowCard icon={Users} title="Uzytkownicy">
|
||||
<p>
|
||||
<span className="text-ink">Zarządzanie kontami</span> (dane profilowe i dostęp), członkostwa w siłowniach oraz{' '}
|
||||
<span className="text-ink">moderacja</span>: zawieszanie i blokowanie kont.
|
||||
</p>
|
||||
<WindowCard icon={Users} title={t('modCards.users')}>
|
||||
<p>{body('users')}</p>
|
||||
</WindowCard>
|
||||
<WindowCard icon={Building2} title="Silownie">
|
||||
<p>
|
||||
Wyznaczanie <span className="text-ink">właściciela</span>, prowadzenie galerii,
|
||||
publikowanie <span className="text-ink">ogłoszeń w imieniu siłowni</span>.
|
||||
</p>
|
||||
<WindowCard icon={Building2} title={t('modCards.gyms')}>
|
||||
<p>{body('gyms')}</p>
|
||||
</WindowCard>
|
||||
<WindowCard icon={BadgeCheck} title="Weryfikacje">
|
||||
<p>
|
||||
Zgłoszenia <span className="text-ink">nowej siłowni</span> i{' '}
|
||||
<span className="text-ink">weryfikacja wirtualnej</span>. Proces potwierdzania
|
||||
autentyczności obiektu — zatwierdzenie nadaje status{' '}
|
||||
<span className="font-mono text-accent">REAL</span> i czyni wnioskodawcę właścicielem.
|
||||
</p>
|
||||
</WindowCard>
|
||||
<WindowCard icon={BookOpenText} title="Slowniki">
|
||||
<p>
|
||||
Katalogi treści: <span className="text-ink">rodzaje ćwiczeń</span> z opisami
|
||||
„jak się robi” i częstymi błędami, urządzenia i obszary treningowe.
|
||||
</p>
|
||||
<WindowCard icon={BadgeCheck} title={t('modCards.verifications')}>
|
||||
<p>{body('verifications')}</p>
|
||||
</WindowCard>
|
||||
<WindowCard icon={ScrollText} title="Logi">
|
||||
<p>
|
||||
<span className="text-ink">Pełny audyt czynności</span> — ActivityLog notuje, kto,
|
||||
co i kiedy. W razie sporu nie ma dyskusji, jest wpis.
|
||||
</p>
|
||||
<WindowCard icon={BookOpenText} title={t('modCards.dictionaries')}>
|
||||
<p>{body('dictionaries')}</p>
|
||||
</WindowCard>
|
||||
<WindowCard icon={Megaphone} title="Ogloszenia">
|
||||
<p>
|
||||
Komunikaty systemowe dla <span className="text-ink">członków</span> — ten sam
|
||||
mechanizm co ogłoszenia siłowni, inne źródło wpisu.
|
||||
</p>
|
||||
<WindowCard icon={ScrollText} title={t('modCards.logs')}>
|
||||
<p>{body('logs')}</p>
|
||||
</WindowCard>
|
||||
<WindowCard icon={Megaphone} title={t('modCards.notices')}>
|
||||
<p>{body('notices')}</p>
|
||||
</WindowCard>
|
||||
</div>
|
||||
</TrackBlock>
|
||||
<TrackBlock title="Powiazania">
|
||||
<ul className="flex flex-col gap-3.5 text-[13px] leading-relaxed text-dim">
|
||||
<li className="flex gap-2">
|
||||
<Link2 size={14} aria-hidden="true" className="mt-0.5 flex-none text-accent" />
|
||||
<span>
|
||||
Zatwierdzasz weryfikację i {to('silownia')} staje się{' '}
|
||||
<span className="font-mono text-accent">REAL</span> — ze sprzętem i feedem dla
|
||||
swoich członków.
|
||||
</span>
|
||||
</li>
|
||||
<li className="flex gap-2">
|
||||
<Link2 size={14} aria-hidden="true" className="mt-0.5 flex-none text-accent" />
|
||||
<span>
|
||||
Słowniki (ćwiczenia, urządzenia, obszary) to treść, na której {to('trenujacy')} i{' '}
|
||||
{to('trener')} budują każdy plan.
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</TrackBlock>
|
||||
{linkList('admin')}
|
||||
</Track>
|
||||
</div>
|
||||
</Section>
|
||||
|
||||
39
web/test/e2e/language.spec.ts
Normal file
39
web/test/e2e/language.spec.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import { expect, test } from './fixtures';
|
||||
|
||||
test('przełącznik PL/EN: zmiana języka, tytułu i persistencja po przeładowaniu', async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto('/');
|
||||
await expect(page.getByRole('heading', { level: 1 })).toHaveText('Trening, który się dowozi.');
|
||||
await expect(page.locator('html')).toHaveAttribute('lang', 'pl');
|
||||
|
||||
await page.getByRole('button', { name: 'English' }).click();
|
||||
await expect(page.getByRole('heading', { level: 1 })).toHaveText(
|
||||
'Training, that actually delivers.',
|
||||
);
|
||||
await expect(page).toHaveTitle('FitOS — Training that delivers.');
|
||||
await expect(page.locator('html')).toHaveAttribute('lang', 'en');
|
||||
await expect(page.getByRole('button', { name: 'English' })).toHaveAttribute('aria-pressed', 'true');
|
||||
|
||||
await page.reload();
|
||||
await expect(page.getByRole('heading', { level: 1 })).toHaveText(
|
||||
'Training, that actually delivers.',
|
||||
);
|
||||
|
||||
await page.getByRole('button', { name: 'Polski' }).click();
|
||||
await expect(page.getByRole('heading', { level: 1 })).toHaveText('Trening, który się dowozi.');
|
||||
await expect(page.locator('html')).toHaveAttribute('lang', 'pl');
|
||||
});
|
||||
|
||||
test.describe('język przeglądarki jako domyślny', () => {
|
||||
test.use({ locale: 'en-US' });
|
||||
|
||||
test('przeglądarka en-US uruchamia stronę po angielsku', async ({ page }) => {
|
||||
await page.goto('/');
|
||||
await expect(page.getByRole('heading', { level: 1 })).toHaveText(
|
||||
'Training, that actually delivers.',
|
||||
);
|
||||
await expect(page).toHaveTitle('FitOS — Training that delivers.');
|
||||
await expect(page.locator('html')).toHaveAttribute('lang', 'en');
|
||||
});
|
||||
});
|
||||
@@ -74,4 +74,14 @@ describe('strona-wizytówka FitOS', () => {
|
||||
fireEvent.click(trenerBtn);
|
||||
expect(trenerBtn).toHaveAttribute('aria-expanded', 'false');
|
||||
});
|
||||
|
||||
it('przełącznik PL/EN zmienia język interfejsu i zapisuje wybór', () => {
|
||||
render(<App />);
|
||||
fireEvent.click(screen.getByRole('button', { name: 'English' }));
|
||||
expect(
|
||||
screen.getByRole('heading', { level: 1, name: 'Training, that actually delivers.' }),
|
||||
).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: 'English' })).toHaveAttribute('aria-pressed', 'true');
|
||||
expect(screen.getByRole('button', { name: 'Polski' })).toHaveAttribute('aria-pressed', 'false');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -2,8 +2,15 @@ import '@testing-library/jest-dom/vitest';
|
||||
import { afterEach } from 'vitest';
|
||||
import { cleanup } from '@testing-library/react';
|
||||
|
||||
const { i18n } = await import('../src/i18n');
|
||||
|
||||
// testy jednostkowe asercjonują stringi PL — wymuszamy język wprost, bo
|
||||
// jsdom zgłasza navigator.language = en-US i detekcja inicjalna wybrałaby en
|
||||
await i18n.changeLanguage('pl');
|
||||
|
||||
// vitest działa z globals:false, więc auto-cleanup RTL nie jest rejestrowany
|
||||
// automatycznie; sprzątamy DOM po każdym teście.
|
||||
afterEach(() => {
|
||||
// automatycznie; sprzątamy DOM po każdym teście i przywracamy język PL.
|
||||
afterEach(async () => {
|
||||
cleanup();
|
||||
if (i18n.language !== 'pl') await i18n.changeLanguage('pl');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user