You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -71,6 +72,7 @@ Route tree regenerates automatically when the APX dev server is running (it runs
71
72
-**Lucide React** — icons
72
73
-**Motion** — animations
73
74
-**Sonner** — toast notifications
75
+
-**react-i18next** — internationalization (see [Internationalization (i18n)](#internationalization-i18n))
74
76
-**js-yaml** — YAML parsing for config editing
75
77
76
78
## Commands
@@ -124,6 +126,15 @@ npm run preview # Preview production build
124
126
- Use `cn()` from `@/lib/utils` for conditional class merging
125
127
- Wrap async data components in `Suspense` + error boundaries
126
128
129
+
### Internationalization (i18n)
130
+
131
+
The UI is fully localized with **react-i18next**. Locale bundles live in `lib/i18n/locales/*.json`. **Any user-facing string must be translated — never hard-code display text.**
132
+
133
+
-**Use `t()` for all display text.** Get it from `useTranslation()` (`const { t } = useTranslation()`); reference strings by key (`t("discovery.title")`), never as literals in JSX. This includes `toast` messages, `aria-label`s, placeholders, and error strings.
134
+
-**Add every new key to all four locales** — `en.json`, `pt-BR.json`, `it.json`, `es.json`. `en.json` is the source of truth. A key present in `en` but missing from the others falls back to English at runtime (a silent partial-translation bug), so keep the key sets in sync and translate the value in each file — don't leave the English string behind in a non-English file.
135
+
-**Pluralize with native i18next, not string concatenation.** Use `_one` / `_other` suffix keys with `{{count}}` (e.g. `columnsCount_one` / `columnsCount_other`). Never build plurals with a hard-coded `"s"` suffix or an interpolated `{{somethingPlural}}` placeholder — that bakes English grammar into the translation layer and breaks other locales.
136
+
-**Adding a new language:** add it to `SUPPORTED_LANGUAGES` and register a loader in `localeLoaders` (both in `lib/i18n/index.ts`), then create the matching `locales/<code>.json`. Only `en` ships in the initial JS bundle; other locales lazy-load on demand via `ensureLocaleLoaded`, so don't statically import them.
137
+
127
138
## Vite Config Notes
128
139
129
140
-**APX Dev Proxy Guard**: Validates `x-apx-dev-proxy` header in dev mode
0 commit comments