@@ -7,19 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88## [ Unreleased]
99
10+ ### Changed
11+ - ** i18n route self-registration** — Moved i18n REST endpoint registration from ` RestServer ` to
12+ ` I18nServicePlugin ` (and kernel fallback). The i18n plugin now self-registers ` /api/v1/i18n/* `
13+ routes via the ` kernel:ready ` hook, following the same autonomous plugin pattern used by
14+ ` AuthPlugin ` , ` WorkflowPlugin ` , and other service plugins. ` RestServer ` no longer registers or
15+ manages any i18n endpoints, keeping it strictly a protocol-driven gateway.
16+ - Removed ` enableI18n ` flag from ` RestApiConfig ` schema (` rest-server.zod.ts ` ) — i18n endpoints
17+ are now controlled by the i18n service plugin's own ` registerRoutes ` option (default: ` true ` ).
18+ - Removed ` registerI18nEndpoints() ` method from ` RestServer ` class.
19+ - ` I18nServicePlugin ` now accepts ` registerRoutes ` and ` basePath ` options for HTTP route control.
20+ - i18n endpoints now work independently of ` RestServer ` , enabling MSW/mock test environments
21+ to serve i18n routes without any REST API gateway dependency.
22+
1023### Added
1124- ** i18n as core built-in service** — The i18n service is now a ` core ` criticality service with
1225 automatic in-memory fallback. When no plugin (e.g. ` I18nServicePlugin ` ) registers an i18n service,
1326 the kernel auto-injects ` createMemoryI18n ` (in-memory Map-backed II18nService implementation)
1427 during ` validateSystemRequirements() ` . This ensures ` /api/v1/i18n/* ` routes and discovery always
1528 report i18n as available, even without ` plugin-i18n ` installed.
16- - ** REST i18n route auto-registration** — ` RestServer.registerRoutes() ` now automatically registers
17- ` /api/v1/i18n/locales ` and ` /api/v1/i18n/translations/:locale ` endpoints, controlled by the new
18- ` enableI18n ` config flag (default: ` true ` ).
1929- ` createMemoryI18n ` fallback factory in ` @objectstack/core ` (packages/core/src/fallbacks/memory-i18n.ts)
2030 implementing ` II18nService ` contract with translation loading, dot-notation key resolution, parameter
2131 interpolation, and locale management.
22- - ` enableI18n ` flag in ` RestApiConfig ` schema (` rest-server.zod.ts ` ) for toggling i18n API endpoints.
2332
2433### Changed
2534- ` ServiceRequirementDef.i18n ` upgraded from ` 'optional' ` to ` 'core' ` — kernel now warns (instead
0 commit comments