Aman-Mittal opened a new issue, #172:
URL: https://github.com/apache/fineract-consumer-facing/issues/172

   Tracking issue for the I18N and STORAGE adapter boundary in the Angular 
client.
   
   **Background:** the adapter boundary 
(`docs/frontend/architecture/adapter-boundary.adoc`, from #168/#169) already 
covers the generated BFF client and Ionic's overlay controllers. The follow-up 
PR extends it to ngx-translate (`I18N`, the `| appTranslate` pipe) and to 
`localStorage`/`sessionStorage` (`STORAGE`), as apache/fineract-backoffice-ui 
does.
   
   **The baseline:** the 34 files that already used either directly are 
recorded in `frontend/eslint-suppressions.json` rather than migrated in one go.
   - A new direct use anywhere fails `npm run lint`.
   - A migrated file also fails lint until its baseline entry is removed with 
`npm run lint:prune`.
   - So the baseline can only shrink, and this issue is done when the file is 
empty.
   
   ## How to migrate a component
   
   1. In the component, replace `import { TranslatePipe } from 
'@ngx-translate/core';` with the `TranslatePipe` from `core/adapters` (the 
relative path to `src/app/core/adapters`).
   2. In its template, rename every `| translate` to `| appTranslate`. 
Parameters are passed the same way: `| appTranslate: { name: x }`.
   3. In its spec, if it has one, replace `provideTranslateService()` from 
`@ngx-translate/core` with `provideI18nTesting()` from 
`src/app/testing/i18n-testing`.
   4. Run `npm run lint:prune` and commit the smaller 
`eslint-suppressions.json` with the change. Then run `npm run lint`, `npm test` 
and `npm run i18n:check`.
   
   This changes no behaviour: the pipe resolves the same keys through the same 
catalogue. Each PR should keep to one area, so it is quick to review.
   
   ## Areas
   
   Sub-issues are attached below, one per area.


-- 
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