WEB-593 Translate account types in the Transfer Details Page#3019
Conversation
|
Note
|
| Cohort / File(s) | Summary |
|---|---|
Account Transfer View Template src/app/account-transfers/view-account-transfer/view-account-transfer.component.html |
Replace direct display of fromAccountType.value and toAccountType.value with i18n-translated keys using the composition 'labels.catalogs.' + value. Conditional rendering (*ngIf) added to show spans only when value exists. (+6/-2) |
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
Suggested reviewers
- IOhacker
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The pull request title clearly summarizes the main change: adding i18n translation support for account types on the Transfer Details Page, which directly aligns with the code changes showing translation key mapping. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In
`@src/app/account-transfers/view-account-transfer/view-account-transfer.component.html`:
- Around line 70-72: The template currently builds a translation key with
'labels.catalogs.' + (viewAccountTransferData.fromAccountType?.value || '')
which yields an invalid key when value is missing; update the span to only call
the translate pipe when viewAccountTransferData.fromAccountType?.value exists
(e.g., use an *ngIf or a ternary expression) so that the translate pipe is not
given the bare 'labels.catalogs.' key and the UI shows an empty string when the
value is null; locate the span using
viewAccountTransferData.fromAccountType?.value in
view-account-transfer.component.html and replace the expression with a
conditional that only forms and translates 'labels.catalogs.<value>' when
<value> is truthy.
- Around line 103-105: The span currently builds a translation key with
(viewAccountTransferData.toAccountType?.value || '') which can produce an empty
key; change to the same conditional rendering used elsewhere: only render the
span when viewAccountTransferData.toAccountType?.value is truthy (e.g. using
*ngIf="viewAccountTransferData.toAccountType?.value") and inside interpolate the
key without the || fallback, so the translate pipe is only invoked with a valid
key; locate the span referencing viewAccountTransferData.toAccountType?.value in
view-account-transfer.component.html and apply this pattern.
src/app/account-transfers/view-account-transfer/view-account-transfer.component.html
Outdated
Show resolved
Hide resolved
src/app/account-transfers/view-account-transfer/view-account-transfer.component.html
Outdated
Show resolved
Hide resolved
7576dbf to
33a27b1
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In
`@src/app/account-transfers/view-account-transfer/view-account-transfer.component.html`:
- Around line 103-105: The component uses viewAccountTransferData typed as any;
create a proper interface (e.g., AccountTransferViewData) that includes at least
toAccountType?: { value: string } and any other fields used in the template,
then update the ViewAccountTransferComponent property signature from
viewAccountTransferData: any to viewAccountTransferData: AccountTransferViewData
(or make it nullable/optional as appropriate) and adjust any callers/assignments
to conform to the new type so the template binding ('labels.catalogs.' +
viewAccountTransferData.toAccountType.value | translate) is type-checked.
src/app/account-transfers/view-account-transfer/view-account-transfer.component.html
Show resolved
Hide resolved
|
@IOhacker Thank You for the review |
Changes Made :-
-Add i18n translation support for account types ("Savings Account" and "Loan Account") on the Transfer Details Page.
WEB-593
Before :-

After :-

Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.