Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add missed trnaslation for client-stepper file inside clients modlue #2157

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import { InputBase } from 'app/shared/form-dialog/formfield/model/input-base';
import { SelectBase } from 'app/shared/form-dialog/formfield/model/select-base';

/** Custom Dialogs */
import { FormDialogComponent } from 'app/shared/form-dialog/form-dialog.component';
import { TranslateService } from '@ngx-translate/core';
import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.component';
import { FormDialogComponent } from 'app/shared/form-dialog/form-dialog.component';

/**
* Client Address Step Component
Expand All @@ -31,8 +32,10 @@ export class ClientAddressStepComponent {

/**
* @param {MatDialog} dialog Mat Dialog
* @param {TranslateService} translateService Translate Service.
*/
constructor(private dialog: MatDialog) {
constructor(private dialog: MatDialog,
private translateService: TranslateService) {
this.clientAddressData = [];
}

Expand All @@ -41,7 +44,7 @@ export class ClientAddressStepComponent {
*/
addAddress() {
const data = {
title: 'Add Client Address',
title: this.translateService.instant('labels.buttons.Add') + ' ' + this.translateService.instant('labels.catalogs.Client') + ' ' + this.translateService.instant('labels.heading.Address'),
formfields: this.getAddressFormFields()
};
const addAddressDialogRef = this.dialog.open(FormDialogComponent, { data, width: '50rem' });
Expand Down Expand Up @@ -131,81 +134,86 @@ export class ClientAddressStepComponent {
*/
getAddressFormFields(address?: any) {
let formfields: FormfieldBase[] = [];

for (let index = 0; index < this.clientTemplate.address[0].addressTypeIdOptions.length; index++) {
this.clientTemplate.address[0].addressTypeIdOptions[index].name = this.translateService.instant(`labels.catalogs.${this.clientTemplate.address[0].addressTypeIdOptions[index].name}`)
}

formfields.push(this.isFieldEnabled('addressType') ? new SelectBase({
controlName: 'addressTypeId',
label: 'Address Type',
label: this.translateService.instant('labels.inputs.Address Type'),
value: address ? address.addressTypeId : '',
options: { label: 'name', value: 'id', data: this.clientTemplate.address[0].addressTypeIdOptions },
order: 1,
required: true
}) : null);
formfields.push(this.isFieldEnabled('street') ? new InputBase({
controlName: 'street',
label: 'Street',
label: this.translateService.instant('labels.inputs.Street'),
value: address ? address.street : '',
type: 'text',
required: true,
order: 2
}) : null);
formfields.push(this.isFieldEnabled('addressLine1') ? new InputBase({
controlName: 'addressLine1',
label: 'Address Line 1',
label: this.translateService.instant('labels.inputs.Address Line') + ' 1',
value: address ? address.addressLine1 : '',
type: 'text',
order: 3
}) : null);
formfields.push(this.isFieldEnabled('addressLine2') ? new InputBase({
controlName: 'addressLine2',
label: 'Address Line 2',
label: this.translateService.instant('labels.inputs.Address Line') + ' 2',
value: address ? address.addressLine2 : '',
type: 'text',
order: 4
}) : null);
formfields.push(this.isFieldEnabled('addressLine3') ? new InputBase({
controlName: 'addressLine3',
label: 'Address Line 3',
label: this.translateService.instant('labels.inputs.Address Line') + ' 3',
value: address ? address.addressLine3 : '',
type: 'text',
order: 5
}) : null);
formfields.push(this.isFieldEnabled('townVillage') ? new InputBase({
controlName: 'townVillage',
label: 'Town / Village',
label: this.translateService.instant('labels.inputs.Town / Village'),
value: address ? address.townVillage : '',
type: 'text',
order: 6
}) : null);
formfields.push(this.isFieldEnabled('city') ? new InputBase({
controlName: 'city',
label: 'City',
label: this.translateService.instant('labels.inputs.City'),
value: address ? address.city : '',
type: 'text',
order: 7
}) : null);
formfields.push(this.isFieldEnabled('stateProvinceId') ? new SelectBase({
controlName: 'stateProvinceId',
label: 'State / Province',
label: this.translateService.instant('labels.inputs.State / Province'),
value: address ? address.stateProvinceId : '',
options: { label: 'name', value: 'id', data: this.clientTemplate.address[0].stateProvinceIdOptions },
order: 8
}) : null);
formfields.push(this.isFieldEnabled('countyDistrict') ? new InputBase({
controlName: 'countryDistrict',
label: 'Country District',
label: this.translateService.instant('labels.inputs.Country District'),
value: address ? address.countyDistrict : '',
type: 'text',
order: 11
}) : null);
formfields.push(this.isFieldEnabled('countryId') ? new SelectBase({
controlName: 'countryId',
label: 'Country',
label: this.translateService.instant('labels.inputs.Country'),
value: address ? address.countryId : '',
options: { label: 'name', value: 'id', data: this.clientTemplate.address[0].countryIdOptions },
order: 10
}) : null);
formfields.push(this.isFieldEnabled('postalCode') ? new InputBase({
controlName: 'postalCode',
label: 'Postal Code',
label: this.translateService.instant('labels.inputs.Postal Code'),
value: address ? address.postalCode : '',
type: 'text',
order: 11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ <h1 mat-dialog-title>{{ data.context }} {{"labels.heading.Family Member" | trans
<mat-label>{{"labels.inputs.Relationship" | translate}}</mat-label>
<mat-select formControlName="relationshipId" required>
<mat-option *ngFor="let relation of data.options.relationshipIdOptions" [value]="relation.id">
{{ relation.name }}
{{ relation.name | translateKey:'catalogs' }}
</mat-option>
</mat-select>
<mat-error *ngIf="familyMemberForm.controls.relationshipId.hasError('required')">
Expand All @@ -56,7 +56,7 @@ <h1 mat-dialog-title>{{ data.context }} {{"labels.heading.Family Member" | trans
<mat-label>{{"labels.inputs.Gender" | translate}}</mat-label>
<mat-select formControlName="genderId" required>
<mat-option *ngFor="let gender of data.options.genderIdOptions" [value]="gender.id">
{{ gender.name }}
{{ gender.name | translateKey:'catalogs' }}
</mat-option>
</mat-select>
<mat-error *ngIf="familyMemberForm.controls.genderId.hasError('required')">
Expand All @@ -68,7 +68,7 @@ <h1 mat-dialog-title>{{ data.context }} {{"labels.heading.Family Member" | trans
<mat-label>{{"labels.inputs.Profession" | translate}}</mat-label>
<mat-select formControlName="professionId">
<mat-option *ngFor="let profession of data.options.professionIdOptions" [value]="profession.id">
{{ profession.name }}
{{ profession.name | translateKey:'catalogs' }}
</mat-option>
</mat-select>
</mat-form-field>
Expand All @@ -78,7 +78,7 @@ <h1 mat-dialog-title>{{ data.context }} {{"labels.heading.Family Member" | trans
<mat-select formControlName="maritalStatusId">
<mat-option *ngFor="let maritalStatus of data.options.maritalStatusIdOptions"
[value]="maritalStatus.id">
{{ maritalStatus.name }}
{{ maritalStatus.name | translateKey:'catalogs' }}
</mat-option>
</mat-select>
</mat-form-field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Component, Input } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';

/** Custom Components */
import { TranslateService } from '@ngx-translate/core';
import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.component';
import { ClientFamilyMemberDialogComponent } from './client-family-member-dialog/client-family-member-dialog.component';

Expand All @@ -23,16 +24,18 @@ export class ClientFamilyMembersStepComponent {

/**
* @param {MatDialog} dialog Mat Dialog
* @param {TranslateService} translateService Translate Service.
*/
constructor(public dialog: MatDialog) { }
constructor(public dialog: MatDialog,
private translateService: TranslateService) { }

/**
* Adds a family member.
*/
addFamilyMember() {
const addFamilyMemberDialogRef = this.dialog.open(ClientFamilyMemberDialogComponent, {
data: {
context: 'Add',
context: this.translateService.instant('labels.buttons.Add'),
options: this.clientTemplate.familyMemberOptions,
},
width: '50rem'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<mat-label>{{"labels.inputs.Legal Form" | translate}}</mat-label>
<mat-select required formControlName="legalFormId">
<mat-option *ngFor="let legalForm of legalFormOptions" [value]="legalForm.id">
{{ legalForm.value }}
{{ legalForm.value | translateKey:'inputs'}}
</mat-option>
</mat-select>
</mat-form-field>
Expand Down Expand Up @@ -122,7 +122,7 @@
<mat-label>{{"labels.inputs.Gender" | translate}}</mat-label>
<mat-select formControlName="genderId">
<mat-option *ngFor="let gender of genderOptions" [value]="gender.id">
{{ gender.name }}
{{ gender.name | translateKey:'catalogs' }}
</mat-option>
</mat-select>
</mat-form-field>
Expand Down Expand Up @@ -159,7 +159,7 @@
<mat-label>{{"labels.inputs.Client Type" | translate}}</mat-label>
<mat-select formControlName="clientTypeId">
<mat-option *ngFor="let clientType of clientTypeOptions" [value]="clientType.id">
{{ clientType.name }}
{{ clientType.name | translateKey:'catalogs' }}
</mat-option>
</mat-select>
</mat-form-field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ <h3 class="mat-h3" fxFlexFill>{{"labels.heading.General" | translate}}</h3>
</div>

<div fxFlexFill>
<span fxFlex="40%">{{"labels.inputs.Is Staff" | translate}}?</span>
<span fxFlex="40%">{{"labels.inputs.Is staff" | translate}}?</span>
<span fxFlex="60%">{{ client.isStaff | yesNo }}</span>
</div>

Expand Down
13 changes: 13 additions & 0 deletions src/assets/translations/cs-CS.json
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,17 @@
"Re-Invest Maturity Amount": "Částka splatnosti znovu investovat",
"Re-Invest Principal Only": "Pouze reinvestice jistiny",
"Interest refund": "Vrácení úroků",
"male": "mužský",
"female": "ženský",
"New": "Nový",
"spouse": "manžel",
"father": "otec",
"self employed": "na volné noze",
"salaried employ": "zaměstnávat na mzdu",
"married": "ženatý",
"unmarried": "svobodný",
"office address": "adresa kanceláře",
"residential address": "adresa bydliště",
"Transfer to Savings": "Převod do Úspory"
},
"commons": {
Expand Down Expand Up @@ -1162,6 +1173,7 @@
"Added On": "Přidáno na",
"Address": "Adresa",
"Address Line": "Řádek adresy",
"Address Type": "Typ adresy",
"Adjust advance payments toward future installments": "Upravte zálohové platby směrem k budoucím splátkám",
"Adjust interest rates for remainder of loan": "Upravte úrokové sazby pro zbytek půjčky",
"Advance payments adjustment type": "Typ úpravy záloh",
Expand Down Expand Up @@ -1364,6 +1376,7 @@
"Core Report": "Základní zpráva",
"Count": "Počet",
"Country": "Země",
"Country District": "Country District",
"Country Code": "Kód země",
"Cover Image": "Titulní obrázek",
"Create Fixed Deposit Product": "Vytvořte produkt s pevným vkladem",
Expand Down
13 changes: 13 additions & 0 deletions src/assets/translations/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,17 @@
"Re-Invest Maturity Amount": "Fälligkeitsbetrag reinvestieren",
"Re-Invest Principal Only": "Nur Kapital reinvestieren",
"Interest refund": "Zinsrückerstattung",
"male": "männlich",
"female": "weiblich",
"New": "Neu",
"spouse": "Ehepartner",
"father": "Vater",
"self employed": "selbstständig",
"salaried employ": "Angestellter",
"married": "verheiratet",
"unmarried": "unverheiratet",
"office address": "Büro adresse",
"residential address": "Wohnadresse",
"Transfer to Savings": "Übertragen auf Ersparnisse"
},
"commons": {
Expand Down Expand Up @@ -1162,6 +1173,7 @@
"Added On": "Hinzugefügt zu",
"Address": "Adresse",
"Address Line": "Adresszeile",
"Address Type": "Adresstyp",
"Adjust advance payments toward future installments": "Passen Sie Vorauszahlungen an zukünftige Raten an",
"Adjust interest rates for remainder of loan": "Passen Sie die Zinssätze für die Restlaufzeit des Darlehens an",
"Advance payments adjustment type": "Art der Anpassung der Vorauszahlungen",
Expand Down Expand Up @@ -1364,6 +1376,7 @@
"Core Report": "Kernbericht",
"Count": "Zählen",
"Country": "Land",
"Country District": "Landbezirk",
"Country Code": "Landesvorwahl",
"Cover Image": "Titelbild",
"Create Fixed Deposit Product": "Erstellen Sie ein Festgeldprodukt",
Expand Down
13 changes: 13 additions & 0 deletions src/assets/translations/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,17 @@
"Re-Invest Maturity Amount": "Re-Invest Maturity Amount",
"Re-Invest Principal Only": "Re-Invest Principal Only",
"Interest refund": "Interest refund",
"male": "male",
"female": "female",
"New": "New",
"spouse": "spouse",
"father": "father",
"self employed": "self employed",
"salaried employ": "salaried employ",
"married": "married",
"unmarried": "unmarried",
"office address": "office address",
"residential address": "residential address",
"Transfer to Savings": "Transfer to Savings"
},
"commons": {
Expand Down Expand Up @@ -1163,6 +1174,7 @@
"Added On": "Added On",
"Address": "Address",
"Address Line": "Address Line",
"Address Type":"Address Type",
"Adjust advance payments toward future installments": "Adjust advance payments toward future installments",
"Adjust interest rates for remainder of loan": "Adjust interest rates for remainder of loan",
"Advance payments adjustment type": "Advance payments adjustment type",
Expand Down Expand Up @@ -1365,6 +1377,7 @@
"Core Report": "Core Report",
"Count": "Count",
"Country": "Country",
"Country District": "Country District",
"Country Code": "Country Code",
"Cover Image": "Cover Image",
"Create Fixed Deposit Product": "Create Fixed Deposit Product",
Expand Down
13 changes: 13 additions & 0 deletions src/assets/translations/es-MX.json
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,17 @@
"Re-Invest Maturity Amount": "Reinvertir el monto al vencimiento",
"Re-Invest Principal Only": "Reinvertir solo el capital",
"Interest refund": "Reembolso de intereses",
"male": "masculino",
"female": "femenino",
"New": "Nuevo",
"spouse": "cónyuge",
"father": "padre",
"self employed": "Trabajadores por cuenta propia",
"salaried employ": "empleo asalariado",
"married": "casado",
"unmarried": "soltero",
"office address": "Dirección de la oficina",
"residential address": "dirección residencial",
"Transfer to Savings": "Transferir a Ahorros"
},
"commons": {
Expand Down Expand Up @@ -1161,6 +1172,7 @@
"Added On": "Añadido",
"Address": "Domicilio",
"Address Line": "Dirección",
"Address Type": "Tipo de dirección",
"Adjust advance payments toward future installments": "Ajustar los pagos por adelantado a cuotas futuras",
"Adjust interest rates for remainder of loan": "Ajustar las tasas de interés para el resto del Crédito",
"Advance payments adjustment type": "Tipo de ajuste de pagos anticipados",
Expand Down Expand Up @@ -1363,6 +1375,7 @@
"Core Report": "Reporte base",
"Count": "Contar",
"Country": "País",
"Country District": "Distrito rural",
"Country Code": "Código de país",
"Cover Image": "Imagen principal",
"Create Fixed Deposit Product": "Crear producto de Depósito Fijo",
Expand Down
Loading
Loading