apache / apache/fineract-backoffice-ui
Land the I18N adapter boundary before bumping ngx-translate to v18
- Dominant language
- TypeScript
- Stars
- 15
- Forks
- 60
- Avg merge
- 10h 15m
- Merged PRs (30d)
- 108
Description
Split out of #442. #207 bumps `@ngx-translate/core` to v18. That is a major, and today it would touch 317 files. This is the work that makes it touch three.
**Drop a dead dependency first.** `@ngx-translate/http-loader` is still in `package.json` and nothing imports it. #437 replaced it; only a comment at `app.config.ts:132` remains.
**The boundary exists on paper only.** ADR-0003 puts ngx-translate behind the `I18N` token, but 317 files import `@ngx-translate/core` directly and only 3 are in `core/adapters/`. Lint already forbids it; the other 312 sit in `eslint-suppressions.json`. Note the templates are inline in the `.ts` files.
Order:
1. `| translate` to `| appTranslate`, dropping `TranslateModule` from each component's imports. 2,860 sites, 604 already done. **Not a good first issue**, unlike #442.
2. Move the 40 `TranslateService` injections onto the `I18N` token.
3. Then #207, confined to `ngx-translate-i18n.adapter.ts`, `deployment-translate.loader.ts` and `app.config.ts`.
Acceptance: `http-loader` gone, no `@ngx-translate/core` import outside the adapter, no `no-restricted-imports` suppressions left for it, and lint, both unit suites and the `mocked` and `mobile` Playwright projects green.
Counts measured on `main` at `b1d9280`. Background: `DOCS/adr/0003-adapter-boundary.md`.
Contributor guide
Research direction
Read DOCS/adr/0003-adapter-boundary.md, then inspect core/adapters/, ngx-translate-i18n.adapter.ts, deployment-translate.loader.ts, app.config.ts, and eslint-suppressions.json. Follow the stated order across the translation templates and TranslateService injections before assessing #207. Done means the HTTP loader and remaining direct imports and suppressions are gone, with lint, both unit suites, and the mocked and mobile Playwright projects green.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend, internationalization
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100