From 666d66a339de5e9f834514b78e0ef00b84e2f9d5 Mon Sep 17 00:00:00 2001 From: Sk Shaifat Murshed Date: Wed, 19 Feb 2025 15:27:08 +0530 Subject: [PATCH] Added Localization --- .../appointment-calendar.component.ts | 3 +- .../appointment-calendar.module.ts | 3 +- .../appointment-dialog.component.html | 148 +++++++++--- .../appointment-dialog.component.scss | 6 +- .../appointment-dialog.component.ts | 30 +-- .../src/app/appointment/appointment.module.ts | 2 + .../view-appointment.component.html | 52 ++-- .../view-appointment.component.ts | 9 +- .../view-appointment.module.ts | 2 + .../department-dialog.component.html | 184 ++++++++++---- .../department-dialog.component.scss | 6 +- .../department-dialog.component.ts | 5 +- .../departments/departments.component.html | 49 +++- .../app/departments/departments.component.ts | 2 - .../src/app/departments/departments.module.ts | 2 + .../app/doctors/doctor-dialog.component.html | 30 +-- .../app/doctors/doctor-dialog.component.ts | 10 +- .../src/app/doctors/doctors.component.html | 193 +++++++++------ angular/src/app/doctors/doctors.component.ts | 7 +- angular/src/app/doctors/doctors.module.ts | 2 + .../custom-roles/custom-roles.component.html | 227 ++++++++++-------- .../custom-roles/custom-roles.component.ts | 4 +- .../custom-users/custom-users.component.html | 89 ++++--- .../custom-users/custom-users.component.ts | 3 +- .../app/room-management/rooms.component.html | 3 +- .../HospitalManagementSystem/en.json | 122 +++++++++- 26 files changed, 798 insertions(+), 395 deletions(-) diff --git a/angular/src/app/appointment/appointment-calendar/appointment-calendar.component.ts b/angular/src/app/appointment/appointment-calendar/appointment-calendar.component.ts index 3a344da..5098c46 100644 --- a/angular/src/app/appointment/appointment-calendar/appointment-calendar.component.ts +++ b/angular/src/app/appointment/appointment-calendar/appointment-calendar.component.ts @@ -1,6 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { RouterOutlet } from '@angular/router'; -import { FullCalendarModule } from '@fullcalendar/angular'; + import { CalendarOptions } from '@fullcalendar/core'; // useful for typechecking import dayGridPlugin from '@fullcalendar/daygrid'; import interactionPlugin from '@fullcalendar/interaction'; diff --git a/angular/src/app/appointment/appointment-calendar/appointment-calendar.module.ts b/angular/src/app/appointment/appointment-calendar/appointment-calendar.module.ts index abe8344..4eb00a4 100644 --- a/angular/src/app/appointment/appointment-calendar/appointment-calendar.module.ts +++ b/angular/src/app/appointment/appointment-calendar/appointment-calendar.module.ts @@ -2,8 +2,7 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { RouterOutlet } from '@angular/router'; import { FullCalendarModule } from '@fullcalendar/angular'; -import { CalendarOptions } from '@fullcalendar/core'; // useful for typechecking -import dayGridPlugin from '@fullcalendar/daygrid'; + import { AppointmentCalendarRoutingModule } from './appointment-calendar-routing.module'; import { AppointmentCalendarComponent } from './appointment-calendar.component'; import { AppointmentDialogComponent } from '../appointment-dialog/appointment-dialog.component'; diff --git a/angular/src/app/appointment/appointment-dialog/appointment-dialog.component.html b/angular/src/app/appointment/appointment-dialog/appointment-dialog.component.html index 9a22b72..dcdabf5 100644 --- a/angular/src/app/appointment/appointment-dialog/appointment-dialog.component.html +++ b/angular/src/app/appointment/appointment-dialog/appointment-dialog.component.html @@ -10,9 +10,10 @@ diff --git a/angular/src/app/departments/department-dialog.component.scss b/angular/src/app/departments/department-dialog.component.scss index c1581bc..c60eacb 100644 --- a/angular/src/app/departments/department-dialog.component.scss +++ b/angular/src/app/departments/department-dialog.component.scss @@ -11,13 +11,11 @@ border-color: red !important; } - /* Adjust the z-index of the calendar dropdown */ .p-calendar .p-datepicker { - z-index: 1050 !important; /* Make sure it's above other elements */ + z-index: 1050 !important; } - /* You can also adjust modal z-index if necessary */ .modal { - z-index: 1040; /* Set lower z-index to ensure modal is behind the calendar */ + z-index: 1040; } \ No newline at end of file diff --git a/angular/src/app/departments/department-dialog.component.ts b/angular/src/app/departments/department-dialog.component.ts index 63758a5..e72aeca 100644 --- a/angular/src/app/departments/department-dialog.component.ts +++ b/angular/src/app/departments/department-dialog.component.ts @@ -1,5 +1,4 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DepartmentsRoutingModule } from './departments-routing.module'; import { CommonModule } from '@angular/common'; import { FormsModule, NgForm } from '@angular/forms'; import { ButtonModule } from 'primeng/button'; @@ -13,7 +12,8 @@ import { RadioButtonModule } from 'primeng/radiobutton'; import { TableModule } from 'primeng/table'; import { CreateDepartmentDto } from '@proxy/dtos'; import { DepartmentService } from '@proxy/departments'; -import { ConfirmationService, ToasterService } from '@abp/ng.theme.shared'; +import { ToasterService } from '@abp/ng.theme.shared'; +import { SharedModule } from '../shared/shared.module'; @Component({ selector: 'app-department-dialog', @@ -32,6 +32,7 @@ import { ConfirmationService, ToasterService } from '@abp/ng.theme.shared'; InputTextareaModule, ChipModule, CommonModule, + SharedModule ], templateUrl: './department-dialog.component.html', styleUrl: './department-dialog.component.scss', diff --git a/angular/src/app/departments/departments.component.html b/angular/src/app/departments/departments.component.html index 66c9846..43aaf36 100644 --- a/angular/src/app/departments/departments.component.html +++ b/angular/src/app/departments/departments.component.html @@ -16,7 +16,7 @@ >
-

Department List

+

{{ '::departmentList' | abpLocalization }}

@@ -26,8 +26,8 @@ class="form-control" (input)="dt2.filterGlobal($event.target.value, 'contains')" [(ngModel)]="globalFilter" - placeholder="Search keyword" - /> + placeholder="{{ '::searchKeyword' | abpLocalization }}" + />
@@ -35,6 +35,8 @@ pButton class="p-button-rounded p-button-secondary ml-2" (click)="loaddepartments($event)" + [title]="'::refresh' | abpLocalization" + > @@ -42,7 +44,8 @@ pButton class="p-button-rounded p-button-success ml-2" (click)="openNewDepartmentDialog()" - pTooltip="Add Department" + pTooltip="{{ '::addDepartment' | abpLocalization }}" + tooltipPosition="left" > @@ -51,6 +54,8 @@ pButton class="p-button-rounded p-button-warning ml-2" (click)="exportDepartments()" + [title]="'::export' | abpLocalization" + > @@ -59,13 +64,31 @@ - Department Number - Department Name - Description - Date - Department Head - Status - Actions + + {{ '::departmentNumber' | abpLocalization }} + + + + {{ '::departmentName' | abpLocalization }} + + + + {{ '::description' | abpLocalization }} + + + + {{ '::date' | abpLocalization }} + + + + {{ '::departmentHead' | abpLocalization }} + + + + {{ '::status' | abpLocalization }} + + + {{ '::actions' | abpLocalization }} @@ -94,4 +117,6 @@
+[visible]="isModalVisible"*ngIf="isModalVisible" +[name]="'::department' | abpLocalization" +(close)="closeDialog()"> diff --git a/angular/src/app/departments/departments.component.ts b/angular/src/app/departments/departments.component.ts index 51109c7..888cb68 100644 --- a/angular/src/app/departments/departments.component.ts +++ b/angular/src/app/departments/departments.component.ts @@ -1,5 +1,4 @@ import { Confirmation, ConfirmationService, ToasterService } from '@abp/ng.theme.shared'; -import { HttpClient } from '@angular/common/http'; import { Component, OnInit } from '@angular/core'; import { DepartmentService } from '@proxy/departments'; import { PagingSortResultDto } from '@proxy/dto'; @@ -29,7 +28,6 @@ export class DepartmentsComponent implements OnInit { } constructor( private DepartmentService: DepartmentService, - private http: HttpClient, private confirmation: ConfirmationService, private toaster: ToasterService diff --git a/angular/src/app/departments/departments.module.ts b/angular/src/app/departments/departments.module.ts index d5d15be..de06926 100644 --- a/angular/src/app/departments/departments.module.ts +++ b/angular/src/app/departments/departments.module.ts @@ -14,12 +14,14 @@ import { InputTextareaModule } from 'primeng/inputtextarea'; import { RadioButtonModule } from 'primeng/radiobutton'; import { TableModule } from 'primeng/table'; import { DepartmentDialogComponent } from "./department-dialog.component"; +import { SharedModule } from '../shared/shared.module'; @NgModule({ declarations: [DepartmentsComponent], imports: [ CommonModule, + SharedModule, DepartmentsRoutingModule, TableModule, DialogModule, diff --git a/angular/src/app/doctors/doctor-dialog.component.html b/angular/src/app/doctors/doctor-dialog.component.html index 3a8f097..c4ffa4b 100644 --- a/angular/src/app/doctors/doctor-dialog.component.html +++ b/angular/src/app/doctors/doctor-dialog.component.html @@ -269,7 +269,6 @@ Joining Date is required.
-

+ -
- +
+
+ +
- + + + - - +
-
- - + + +
+

{{ '::doctorList' | abpLocalization }}

+
+
+ +
- - - - Name - Mobile - Email - Specialization - Experience - Rating - Actions - - - - - Dr. {{ doctor.firstName }} {{ doctor.lastName }} - {{ doctor.mobile }} - {{ doctor.email }} - {{ doctor.specialization }} - {{ doctor.experience }} years - {{ doctor.rating }} - - - - - - - - +
+ + + +
+
+
+ + + + {{ '::name' | abpLocalization }} + + + + {{ '::mobile' | abpLocalization }} + + + + {{ '::email' | abpLocalization }} + + + + {{ '::specialization' | abpLocalization }} + + + + {{ '::experience' | abpLocalization }} + + + + {{ '::rating' | abpLocalization }} + + + {{ '::actions' | abpLocalization }} + + + + + {{ '::doctorPrefix' | abpLocalization }} {{ doctor.firstName }} {{ doctor.lastName }} + {{ doctor.mobile }} + {{ doctor.email }} + {{ doctor.specialization }} + {{ doctor.experience }} {{ '::years' | abpLocalization }} + {{ doctor.rating }} + + + + + + + +
- - + + diff --git a/angular/src/app/doctors/doctors.component.ts b/angular/src/app/doctors/doctors.component.ts index d0bc2a1..4252605 100644 --- a/angular/src/app/doctors/doctors.component.ts +++ b/angular/src/app/doctors/doctors.component.ts @@ -1,5 +1,4 @@ -import { ConfirmationService, ToasterService } from '@abp/ng.theme.shared'; -import { HttpClient } from '@angular/common/http'; + import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { DoctorService } from '@proxy/doctors'; @@ -31,9 +30,7 @@ export class DoctorsComponent implements OnInit { } constructor( private DoctorService: DoctorService, - private http: HttpClient, - private confirmation: ConfirmationService, - private toaster: ToasterService, + private router: Router ) {} workSchedule = Object.keys(workScheduleOptions) diff --git a/angular/src/app/doctors/doctors.module.ts b/angular/src/app/doctors/doctors.module.ts index 0649ee2..f5714a2 100644 --- a/angular/src/app/doctors/doctors.module.ts +++ b/angular/src/app/doctors/doctors.module.ts @@ -15,6 +15,7 @@ import { RadioButtonModule } from 'primeng/radiobutton'; import { TableModule } from 'primeng/table'; import { DoctorDialogComponent } from './doctor-dialog.component'; import { ShiftManagementComponent } from './shift-management/shift-management.component'; +import { SharedModule } from '../shared/shared.module'; @NgModule({ declarations: [DoctorsComponent,ShiftManagementComponent], @@ -34,6 +35,7 @@ import { ShiftManagementComponent } from './shift-management/shift-management.co InputTextareaModule, ChipModule, DoctorDialogComponent, + SharedModule diff --git a/angular/src/app/modules/custom-identity/custom-roles/custom-roles.component.html b/angular/src/app/modules/custom-identity/custom-roles/custom-roles.component.html index 6024e0d..654e8db 100644 --- a/angular/src/app/modules/custom-identity/custom-roles/custom-roles.component.html +++ b/angular/src/app/modules/custom-identity/custom-roles/custom-roles.component.html @@ -1,111 +1,141 @@ -
-
- -
- -
- - - - Role name - - Actions - - - - - - {{ role.name }} - - - - - - - - - - - +
+
+ + + + + {{ 'AbpIdentity::RoleName' | abpLocalization }} + + + {{ 'AbpIdentity::Actions' | abpLocalization }} + + + + + + {{ role.name }} + + + + + + + + +
- - - -

{{ (selected?.id ? 'AbpIdentity::Edit' : 'AbpIdentity::NewRole') | abpLocalization }}

-
- - - -
- -
- - - Name is required -
- - -
- - -
- - -
- - -
-
- {{ - 'AbpIdentity::Save' | abpLocalization - }} -
-
- - - - +
+ + + + {{ 'AbpIdentity::NameIsRequired' | abpLocalization }} + +
+ + +
+ + +
+ + +
+ + +
+
+ {{ + 'AbpIdentity::Save' | abpLocalization + }} + +
+ + + + - -
- - - - - \ No newline at end of file + (abpInit)="init(abpPermissionManagement)" + > + + diff --git a/angular/src/app/modules/custom-identity/custom-roles/custom-roles.component.ts b/angular/src/app/modules/custom-identity/custom-roles/custom-roles.component.ts index 27e206d..c163e7d 100644 --- a/angular/src/app/modules/custom-identity/custom-roles/custom-roles.component.ts +++ b/angular/src/app/modules/custom-identity/custom-roles/custom-roles.component.ts @@ -33,6 +33,7 @@ import { PermissionManagementModule } from '@abp/ng.permission-management'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; import { MenuItem } from 'primeng/api'; import { Dropdown, DropdownModule } from 'primeng/dropdown'; +import { SharedModule } from 'src/app/shared/shared.module'; @Component({ selector: 'app-custom-roles', @@ -50,7 +51,8 @@ import { Dropdown, DropdownModule } from 'primeng/dropdown'; PermissionManagementModule, CoreModule, NgbNavModule, - DropdownModule + DropdownModule, + SharedModule ], templateUrl: './custom-roles.component.html', providers: [ diff --git a/angular/src/app/modules/custom-identity/custom-users/custom-users.component.html b/angular/src/app/modules/custom-identity/custom-users/custom-users.component.html index 779d8d7..82e2fc5 100644 --- a/angular/src/app/modules/custom-identity/custom-users/custom-users.component.html +++ b/angular/src/app/modules/custom-identity/custom-users/custom-users.component.html @@ -15,7 +15,7 @@ @@ -47,13 +47,28 @@ > - Username - First Name - Last Name - Email - Phone No - Status - Actions + + {{ '::username' | abpLocalization }} + + + + {{ '::firstName' | abpLocalization }} + + + + {{ '::lastName' | abpLocalization }} + + + + {{ '::email' | abpLocalization }} + + + + {{ '::phoneNumber' | abpLocalization }} + + + {{ '::status' | abpLocalization }} + {{ '::actions' | abpLocalization }} @@ -73,7 +88,7 @@
{{ 'AbpIdentity::UserInformations' | abpLocalization }}
- +
- User Name is required + {{ '::userNameIsRequired' | abpLocalization }}
-
- +
- Password is required + {{ '::passwordIsRequired' | abpLocalization }}
-
- +
-
- +
- +
- Valid Email is required + {{ '::validEmailIsRequired' | abpLocalization }}
-
- +
-
- +
-
- +
-
  • {{ 'AbpIdentity::Roles' | abpLocalization }} @@ -296,14 +316,17 @@
    - +