fix(i18n): add missing translations and apply translate pipes across web-app (#2934)
fix: address code review issues fix: translate accessibility attributes and fix translation errors
This commit is contained in:
+8
-6
@@ -32,6 +32,7 @@ import { MatFormField, MatLabel, MatError, MatHint } from '@angular/material/for
|
||||
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||
import { FindPipe } from '../../../pipes/find.pipe';
|
||||
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
/**
|
||||
* Create Loan Provisioning Criteria Component.
|
||||
@@ -64,6 +65,7 @@ export class CreateLoanProvisioningCriteriaComponent implements OnInit {
|
||||
private router = inject(Router);
|
||||
dialog = inject(MatDialog);
|
||||
private route = inject(ActivatedRoute);
|
||||
private translateService = inject(TranslateService);
|
||||
|
||||
/** Loan Provisioning Criteria form. */
|
||||
provisioningCriteriaForm: UntypedFormGroup;
|
||||
@@ -145,7 +147,7 @@ export class CreateLoanProvisioningCriteriaComponent implements OnInit {
|
||||
*/
|
||||
editDefinition(definition: any) {
|
||||
const data = {
|
||||
title: 'Edit Criteria Definition',
|
||||
title: this.translateService.instant('labels.heading.Edit Criteria Definition'),
|
||||
formfields: this.getDefinitionFormFields(definition),
|
||||
layout: { addButtonText: 'Confirm' }
|
||||
};
|
||||
@@ -173,7 +175,7 @@ export class CreateLoanProvisioningCriteriaComponent implements OnInit {
|
||||
formfields.push(
|
||||
new InputBase({
|
||||
controlName: 'minAge',
|
||||
label: 'Min Age',
|
||||
label: this.translateService.instant('labels.inputs.Min Age'),
|
||||
value: definition ? definition.minAge : '',
|
||||
type: 'number',
|
||||
required: true,
|
||||
@@ -183,7 +185,7 @@ export class CreateLoanProvisioningCriteriaComponent implements OnInit {
|
||||
formfields.push(
|
||||
new InputBase({
|
||||
controlName: 'maxAge',
|
||||
label: 'Max Age',
|
||||
label: this.translateService.instant('labels.inputs.Max Age'),
|
||||
value: definition ? definition.maxAge : '',
|
||||
type: 'number',
|
||||
required: true,
|
||||
@@ -193,7 +195,7 @@ export class CreateLoanProvisioningCriteriaComponent implements OnInit {
|
||||
formfields.push(
|
||||
new InputBase({
|
||||
controlName: 'provisioningPercentage',
|
||||
label: 'Percentage (%)',
|
||||
label: this.translateService.instant('labels.inputs.Percentage') + ' (%)',
|
||||
value: definition ? definition.provisioningPercentage : '',
|
||||
type: 'number',
|
||||
required: true,
|
||||
@@ -203,7 +205,7 @@ export class CreateLoanProvisioningCriteriaComponent implements OnInit {
|
||||
formfields.push(
|
||||
new SelectBase({
|
||||
controlName: 'liabilityAccount',
|
||||
label: 'Liability Account',
|
||||
label: this.translateService.instant('labels.inputs.Liability Account'),
|
||||
value: definition ? definition.liabilityAccount : '',
|
||||
options: { label: 'name', value: 'id', data: this.liabilityAccounts },
|
||||
required: true,
|
||||
@@ -213,7 +215,7 @@ export class CreateLoanProvisioningCriteriaComponent implements OnInit {
|
||||
formfields.push(
|
||||
new SelectBase({
|
||||
controlName: 'expenseAccount',
|
||||
label: 'Expense Account',
|
||||
label: this.translateService.instant('labels.inputs.Expense Account'),
|
||||
value: definition ? definition.expenseAccount : '',
|
||||
options: { label: 'name', value: 'id', data: this.expenseAccounts },
|
||||
required: true,
|
||||
|
||||
+8
-6
@@ -32,6 +32,7 @@ import { MatFormField, MatLabel, MatError, MatHint } from '@angular/material/for
|
||||
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||
import { FindPipe } from '../../../pipes/find.pipe';
|
||||
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
/**
|
||||
* Edit Loan Provisioning Criteria Component.
|
||||
@@ -64,6 +65,7 @@ export class EditLoanProvisioningCriteriaComponent implements OnInit {
|
||||
private settingsService = inject(SettingsService);
|
||||
dialog = inject(MatDialog);
|
||||
private route = inject(ActivatedRoute);
|
||||
private translateService = inject(TranslateService);
|
||||
|
||||
/** Loan Provisioning Criteria form. */
|
||||
provisioningCriteriaForm: UntypedFormGroup;
|
||||
@@ -155,7 +157,7 @@ export class EditLoanProvisioningCriteriaComponent implements OnInit {
|
||||
*/
|
||||
editDefinition(definition: any) {
|
||||
const data = {
|
||||
title: 'Edit Criteria Definition',
|
||||
title: this.translateService.instant('labels.heading.Edit Criteria Definition'),
|
||||
formfields: this.getDefinitionFormFields(definition),
|
||||
layout: { addButtonText: 'Confirm' }
|
||||
};
|
||||
@@ -181,7 +183,7 @@ export class EditLoanProvisioningCriteriaComponent implements OnInit {
|
||||
formfields.push(
|
||||
new InputBase({
|
||||
controlName: 'minAge',
|
||||
label: 'Min Age',
|
||||
label: this.translateService.instant('labels.inputs.Min Age'),
|
||||
value: definition ? definition.minAge : '',
|
||||
type: 'number',
|
||||
required: true,
|
||||
@@ -191,7 +193,7 @@ export class EditLoanProvisioningCriteriaComponent implements OnInit {
|
||||
formfields.push(
|
||||
new InputBase({
|
||||
controlName: 'maxAge',
|
||||
label: 'Max Age',
|
||||
label: this.translateService.instant('labels.inputs.Max Age'),
|
||||
value: definition ? definition.maxAge : '',
|
||||
type: 'number',
|
||||
required: true,
|
||||
@@ -201,7 +203,7 @@ export class EditLoanProvisioningCriteriaComponent implements OnInit {
|
||||
formfields.push(
|
||||
new InputBase({
|
||||
controlName: 'provisioningPercentage',
|
||||
label: 'Percentage (%)',
|
||||
label: this.translateService.instant('labels.inputs.Percentage') + ' (%)',
|
||||
value: definition ? definition.provisioningPercentage : '',
|
||||
type: 'number',
|
||||
required: true,
|
||||
@@ -211,7 +213,7 @@ export class EditLoanProvisioningCriteriaComponent implements OnInit {
|
||||
formfields.push(
|
||||
new SelectBase({
|
||||
controlName: 'liabilityAccount',
|
||||
label: 'Liability Account',
|
||||
label: this.translateService.instant('labels.inputs.Liability Account'),
|
||||
value: definition ? definition.liabilityAccount : '',
|
||||
options: { label: 'name', value: 'id', data: this.liabilityAccounts },
|
||||
required: true,
|
||||
@@ -221,7 +223,7 @@ export class EditLoanProvisioningCriteriaComponent implements OnInit {
|
||||
formfields.push(
|
||||
new SelectBase({
|
||||
controlName: 'expenseAccount',
|
||||
label: 'Expense Account',
|
||||
label: this.translateService.instant('labels.inputs.Expense Account'),
|
||||
value: definition ? definition.expenseAccount : '',
|
||||
options: { label: 'name', value: 'id', data: this.expenseAccounts },
|
||||
required: true,
|
||||
|
||||
Reference in New Issue
Block a user