shivaansh0610-LUFFY opened a new pull request, #685:
URL: https://github.com/apache/fineract-backoffice-ui/pull/685

   ## What and why
   
   Part of #683 — migrates 10 of the issue's 53 remaining `@ngx-translate/core` 
usages onto Fineract's `I18N`/`appTranslate` adapter, across two cohesive 
feature areas: **Working Capital** (5 files) and **System** (5 files). The 
issue asks for a few feature areas per PR rather than all 53 at once, so this 
is one such batch.
   
   Each file gets the same mechanical edit the adapter's own docblock 
describes: the import moves from `@ngx-translate/core` to `core/adapters`, `| 
translate` in templates becomes `| appTranslate`, and 
`TranslateService.instant(key)` call sites become `i18n.translate(key)`. Two 
files (`bulk-import.component.ts`, `scheduler-jobs-list.component.ts`) were 
already half-migrated — they carried the adapter's `TranslatePipe` import 
alongside a still-active aliased vendor one (`TranslatePipe as 
NgxTranslatePipe`) — so those just needed the leftover vendor import and 
template references cleaned up.
   
   Left untouched, matching the issue's own scope: the 11 Ionic-controller 
violations, which are a separate boundary; `data-table.component.ts`, which the 
issue explicitly calls out as intentionally still using the vendor pipe 
internally; and `app.component.ts` / `testing/i18n-testing.ts`, which aren't 
flagged by the lint rule at all (bootstrap config and test infrastructure, not 
leaf consumers).
   
   ## Verification
   
   - `npm run lint` — clean (flagged only stale suppressions to prune).
   - `npm run lint:prune` — `no-restricted-imports` dropped from 60 files / 64 
violations to 50 files / 54 violations, exactly the 10 files touched here.
   - `npm run format:check` — clean.
   - `npm run i18n:check` — clean.
   - `npm run build` — clean (one pre-existing, unrelated CSS-budget warning on 
`header.component.ts`).
   - Unit tests for the 6 of these 10 files that have existing coverage — 38/38 
passing, unchanged.
   - No mocked or real-backend Playwright run: this is a same-output 
pipe/import substitution with nothing to observe in the browser, so there's no 
UI behavior for an e2e spec to exercise.
   
   ## Screenshots
   
   Not applicable — internal i18n-adapter refactor. `appTranslate` resolves the 
same keys against the same catalogue as the vendor pipe, so rendered output is 
unchanged.
   
   ## AI assistance (optional)
   
   - Tool / model:
   - Harness / workflow:
   
   ## Checklist
   
   - [x] I did not hand-edit generated files under `src/app/api/`.
   - [x] New component or service code uses the adapter boundary in 
`src/app/core/adapters/` instead of direct browser globals or imperative 
third-party APIs. *(No new component or service code — this migrates existing 
components onto the existing `I18N` adapter.)*
   - [x] User-facing strings use translation keys. *(No new strings; existing 
keys were moved onto the application's adapter, not changed.)*
   - [x] I added or updated tests appropriate to this change, or explained why 
tests were not needed. *(No test files were changed. The substitution is 
output-identical — `appTranslate` resolves the same key against the same 
catalogue the vendor pipe did — so the existing suite is the test: all tests 
covering the 6 of 10 touched files with coverage still pass unchanged.)*
   - [x] UI workflow changes include suitable e2e coverage, including 
real-backend testing where relevant. *(N/A — internal 
translation-infrastructure refactor, not a UI workflow change; no backend 
behavior touched.)*
   - [ ] Commits are signed — see [Commit 
Signing](CONTRIBUTING.md#commit-signing) in CONTRIBUTING.md. *(Not committed 
yet — sign when you commit, then confirm with `git log --show-signature`.)*
   - [x] I followed the [AI-assisted contributions 
guidance](CONTRIBUTING.md#ai-assisted-contributions).
   - [x] If this adds a feature or changes a workflow, I raised it on 
[[email protected]](https://lists.apache.org/[email protected])
 first — or it is a bug fix, refactor or test change, where that does not 
apply. *(Refactor — no mailing-list proposal needed.)*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to