feat(client): add i18n with i18next and react-i18next

- install i18next and react-i18next
- create src/i18n/index.ts bootstrapping i18next with initReactI18next
- add src/i18n/locales/en.json with keys for nav, all pages, and ThemeSwitcher
- replace hardcoded English strings in App, all pages, and ThemeSwitcher with t()
- move static column definitions inside components where useTranslation is available
This commit is contained in:
ars9 committed 2026-04-09 10:03:54 +03:00
1 parent aefa1db2bd
commit 876b1518da
11 files changed
+207 -56

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import en from './locales/en.json';
i18n
.use(initReactI18next)
.init({
resources: { en: { translation: en } },
lng: 'en',
fallbackLng: 'en',
interpolation: { escapeValue: false },
});
export default i18n;
+45
View File
@@ -0,0 +1,45 @@
{
"nav": {
"environments": "Environments",
"keys": "Keys",
"sessions": "Sessions",
"scenarios": "Scenarios"
},
"environments": {
"title": "Environments",
"col_id": "ID",
"col_name": "Name",
"col_urls": "URLs",
"col_updated": "Updated",
"empty": "No environments yet."
},
"keys": {
"title": "Keys",
"col_name": "Key name",
"empty": "No key files found."
},
"sessions": {
"title": "Sessions",
"col_id": "ID",
"col_name": "Name",
"col_status": "Status",
"col_lastUsed": "Last Used",
"empty": "No sessions yet.",
"action_delete": "Delete"
},
"scenarios": {
"title": "Scenarios",
"col_id": "ID",
"col_name": "Name",
"col_updated": "Updated",
"empty": "No scenarios yet.",
"action_run": "Run",
"action_delete": "Delete"
},
"theme": {
"switch_to_light": "Switch to light theme",
"switch_to_dark": "Switch to dark theme",
"light_mode": "Light mode",
"dark_mode": "Dark mode"
}
}