Enhance internationalization support by integrating language selection for school names, updating UI components for localization, and revising documentation. Implement locale-aware formatting for dates and strings, ensuring a seamless user experience in both Russian and English. Update tests to cover new language features.
ci / server (push) Failing after 3m33s
ci / client (push) Successful in 15s

This commit is contained in:
Leonid Pershin
2026-08-18 12:43:14 +03:00
parent b9ddc018d3
commit cc9efca891
24 changed files with 640 additions and 140 deletions
+7 -5
View File
@@ -13,7 +13,7 @@ way; this file is *how to work in them*.
| what the socket carries | `src/HSchool.Protocol` **and** `src/HSchool.Client/src/net/protocol.ts` **and** `docs/protocol.md` |
| connection handling, the loop | `src/HSchool.Server` |
| what runs locally | `src/HSchool.AppHost/AppHost.cs` |
| screens, dialogs, formatting | `src/HSchool.Client/src` |
| screens, dialogs, formatting, UI language | `src/HSchool.Client/src` |
## Commands
@@ -85,10 +85,11 @@ say so explicitly in the change description.
- `strict` is on, no `any`, no non-null `!` assertions.
- Relative imports carry the `.ts` extension (bundler resolution is configured for it).
- Modules stay thin: `net/` speaks to the server, `ui/` renders, `format/` formats, `main.ts`
wires them together.
- Modules stay thin: `net/` speaks to the server, `ui/` renders, `format/` formats, `i18n/`
holds the RU/EN dictionaries, `main.ts` wires them together.
- No framework, plain DOM. `ui/dom.ts` is the whole helper budget.
- UI strings are Russian; game dates are formatted through `format/gameTime.ts`, never inline.
- UI strings go through `t(...)` in `i18n/strings.ts`, never inline. Game dates go through
`format/gameTime.ts`, which follows the active locale.
**Both**
@@ -105,7 +106,8 @@ say so explicitly in the change description.
- Those tests also share one server, so schools survive between them: start each test by clearing
the list (`SchoolApiTests.ResetAsync`) instead of assuming it is empty.
- The screens have no unit tests — a DOM environment would cost a dependency the project does not
have. Verify UI changes by running the app.
have. Verify UI changes by running the app. Dictionaries and date formatting are covered in
Vitest (`i18n/strings.test.ts`, `format/gameTime.test.ts`).
## Dependencies