From 9ef70a250d639dfeeee948faf0f641049cb750be Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 18 Jan 2026 13:34:24 +0300 Subject: [PATCH] translation updates --- assets/langs/ar-SA.json | 10 +++- assets/langs/en-US.json | 9 ++- lib/core/api_consts.dart | 2 +- lib/generated/locale_keys.g.dart | 7 +++ .../home/data/landing_page_data.dart | 56 ++++++++++--------- lib/presentation/home/landing_page.dart | 8 +-- .../home/widgets/habib_wallet_card.dart | 8 +-- .../widgets/ancillary_orders_list.dart | 12 ++-- 8 files changed, 68 insertions(+), 44 deletions(-) diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json index 9c1c962f..6f25fb56 100644 --- a/assets/langs/ar-SA.json +++ b/assets/langs/ar-SA.json @@ -1499,5 +1499,13 @@ "selectTime": "حدد الوقت", "pleaseWaitYouWillBeCalledForVitalSigns": "يرجى الانتظار! سيتم استدعاؤك لقياس العلامات الحيوية", "pleaseVisitRoomForVitalSigns": "يرجى زيارة الغرفة {roomNumber} لقياس العلامات الحيوية", - "pleaseVisitRoomToTheDoctor": "يرجى زيارة الغرفة {roomNumber} لمقابلة الطبيب" + "pleaseVisitRoomToTheDoctor": "يرجى زيارة الغرفة {roomNumber} لمقابلة الطبيب", + + "erOnlineCheckInRequest": "ER Online Check-In Request", + "indoor": "داخلي", + "navigation": "الملاحة", + "health": "الصحة", + "calculators": "الحاسبات", + "converters": "المحولات", + "guide": "الدليل" } diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json index 5f356bac..cec6bf3b 100644 --- a/assets/langs/en-US.json +++ b/assets/langs/en-US.json @@ -1490,5 +1490,12 @@ "selectTime": "Select Time", "pleaseWaitYouWillBeCalledForVitalSigns": "Please wait! you will be called for vital signs", "pleaseVisitRoomForVitalSigns": "Please visit Room {roomNumber} for vital signs", - "pleaseVisitRoomToTheDoctor": "Please visit Room {roomNumber} to the Doctor" + "pleaseVisitRoomToTheDoctor": "Please visit Room {roomNumber} to the Doctor", + "erOnlineCheckInRequest": "ER Online Check-In Request", + "indoor": "Indoor", + "navigation": "Navigation", + "health": "Health", + "calculators": "Calculators", + "converters": "Converters", + "guide": "Guide" } diff --git a/lib/core/api_consts.dart b/lib/core/api_consts.dart index efefee18..720fda7a 100644 --- a/lib/core/api_consts.dart +++ b/lib/core/api_consts.dart @@ -680,7 +680,7 @@ const DASHBOARD = 'Services/Patients.svc/REST/PatientDashboard'; class ApiConsts { static const maxSmallScreen = 660; - static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.prod; + static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.uat; // static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT diff --git a/lib/generated/locale_keys.g.dart b/lib/generated/locale_keys.g.dart index b3b2edf3..3ab0ee43 100644 --- a/lib/generated/locale_keys.g.dart +++ b/lib/generated/locale_keys.g.dart @@ -1488,5 +1488,12 @@ abstract class LocaleKeys { static const pleaseWaitYouWillBeCalledForVitalSigns = 'pleaseWaitYouWillBeCalledForVitalSigns'; static const pleaseVisitRoomForVitalSigns = 'pleaseVisitRoomForVitalSigns'; static const pleaseVisitRoomToTheDoctor = 'pleaseVisitRoomToTheDoctor'; + static const erOnlineCheckInRequest = 'erOnlineCheckInRequest'; + static const indoor = 'indoor'; + static const navigation = 'navigation'; + static const health = 'health'; + static const calculators = 'calculators'; + static const converters = 'converters'; + static const guide = 'guide'; } diff --git a/lib/presentation/home/data/landing_page_data.dart b/lib/presentation/home/data/landing_page_data.dart index ef2832b1..74fd096b 100644 --- a/lib/presentation/home/data/landing_page_data.dart +++ b/lib/presentation/home/data/landing_page_data.dart @@ -1,4 +1,6 @@ +import 'package:easy_localization/easy_localization.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart'; +import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/presentation/home/data/service_card_data.dart'; import 'package:hmg_patient_app_new/theme/colors.dart'; @@ -7,8 +9,8 @@ class LandingPageData { ServiceCardData( serviceName: "emergency", icon: AppAssets.emergency_services_icon, - title: "Emergency", - subtitle: "Services", + title: LocaleKeys.emergency.tr(), + subtitle: LocaleKeys.services2.tr(), backgroundColor: AppColors.primaryRedColor, iconColor: AppColors.whiteColor, textColor: AppColors.whiteColor, @@ -17,8 +19,8 @@ class LandingPageData { ServiceCardData( serviceName: "indoor_navigation", icon: AppAssets.indoor_nav_icon, - title: "Indoor", - subtitle: "Navigation", + title: LocaleKeys.indoor.tr(), + subtitle: LocaleKeys.navigation.tr(), backgroundColor: AppColors.whiteColor, iconColor: AppColors.blackColor, textColor: AppColors.blackColor, @@ -27,8 +29,8 @@ class LandingPageData { ServiceCardData( serviceName: "search_doctor", icon: AppAssets.search_doctor_icon, - title: "Search", - subtitle: "Doctor", + title: LocaleKeys.search.tr(), + subtitle: LocaleKeys.doctor.tr(), backgroundColor: AppColors.whiteColor, iconColor: AppColors.blackColor, textColor: AppColors.blackColor, @@ -37,8 +39,8 @@ class LandingPageData { ServiceCardData( serviceName: "health_calculators_and_converts", icon: AppAssets.health_calculators_icon, - title: "Health", - subtitle: "Calculators", + title: LocaleKeys.health.tr(), + subtitle: LocaleKeys.calculators.tr(), backgroundColor: AppColors.whiteColor, iconColor: AppColors.blackColor, textColor: AppColors.blackColor, @@ -47,8 +49,8 @@ class LandingPageData { ServiceCardData( serviceName: "health_converters", icon: AppAssets.health_converters_icon, - title: "Health", - subtitle: "Converters", + title: LocaleKeys.health.tr(), + subtitle: LocaleKeys.converters.tr(), backgroundColor: AppColors.whiteColor, iconColor: AppColors.blackColor, textColor: AppColors.blackColor, @@ -57,8 +59,8 @@ class LandingPageData { ServiceCardData( serviceName: "parking_guide", icon: AppAssets.car_parking_icon, - title: "Parking", - subtitle: "Guide", + title: LocaleKeys.parking.tr(), + subtitle: LocaleKeys.guide.tr(), backgroundColor: AppColors.whiteColor, iconColor: AppColors.blackColor, textColor: AppColors.blackColor, @@ -70,8 +72,8 @@ class LandingPageData { ServiceCardData( serviceName: "emergency", icon: AppAssets.emergency_services_icon, - title: "Emergency", - subtitle: "Services", + title: LocaleKeys.emergency.tr(), + subtitle: LocaleKeys.services2.tr(), backgroundColor: AppColors.primaryRedColor, iconColor: AppColors.whiteColor, textColor: AppColors.whiteColor, @@ -80,8 +82,8 @@ class LandingPageData { ServiceCardData( serviceName: "lab_results", icon: AppAssets.home_lab_result_icon, - title: "Lab", - subtitle: "Results", + title: LocaleKeys.lab.tr(), + subtitle: LocaleKeys.labSubtitle.tr(), backgroundColor: AppColors.whiteColor, iconColor: AppColors.blackColor, textColor: AppColors.blackColor, @@ -90,8 +92,8 @@ class LandingPageData { ServiceCardData( serviceName: "radiology_results", icon: AppAssets.my_radiology_icon, - title: "Radiology", - subtitle: "Results", + title: LocaleKeys.radiology.tr(), + subtitle: LocaleKeys.radiologySubtitle.tr(), backgroundColor: AppColors.whiteColor, iconColor: AppColors.blackColor, textColor: AppColors.blackColor, @@ -100,8 +102,8 @@ class LandingPageData { ServiceCardData( serviceName: "prescriptions", icon: AppAssets.my_prescription_icon, - title: "Prescriptions", - subtitle: "Details", + title: LocaleKeys.medicinesSubtitle.tr(), + subtitle: LocaleKeys.details.tr(), backgroundColor: AppColors.whiteColor, iconColor: AppColors.blackColor, textColor: AppColors.blackColor, @@ -110,8 +112,8 @@ class LandingPageData { ServiceCardData( serviceName: "insurance_update", icon: AppAssets.insurance_update_icon, - title: "Insurance", - subtitle: "Details", + title: LocaleKeys.insurance.tr(), + subtitle: LocaleKeys.details.tr(), backgroundColor: AppColors.whiteColor, iconColor: AppColors.blackColor, textColor: AppColors.blackColor, @@ -130,8 +132,8 @@ class LandingPageData { ServiceCardData( serviceName: "sick_leaves", icon: AppAssets.my_sick_leave_icon, - title: "Sick", - subtitle: "Leaves", + title: LocaleKeys.sick.tr(), + subtitle: LocaleKeys.sickSubtitle.tr(), backgroundColor: AppColors.whiteColor, iconColor: AppColors.blackColor, textColor: AppColors.blackColor, @@ -143,7 +145,7 @@ class LandingPageData { ServiceCardData( serviceName: "livecare", icon: AppAssets.small_livecare_icon, - title: "LiveCare", + title: LocaleKeys.liveCare.tr(), subtitle: "Explore our app, View our services and offers", largeCardIcon: AppAssets.liveCareService, backgroundColor: AppColors.successColor, @@ -161,7 +163,7 @@ class LandingPageData { ServiceCardData( serviceName: "home_health_care", icon: AppAssets.homeBottom, - title: "Home Health Care", + title: LocaleKeys.homeHealthCare.tr(), subtitle: "Explore our app, View our services and offers", largeCardIcon: AppAssets.homeHealthCareService, backgroundColor: AppColors.primaryRedColor, @@ -171,7 +173,7 @@ class LandingPageData { ServiceCardData( serviceName: "pharmacy", icon: AppAssets.pharmacy_icon, //359846 - title: "Pharmacy", + title: LocaleKeys.hmgPharmacy.tr(), subtitle: "Explore our app, View our services and offers", largeCardIcon: AppAssets.pharmacyService, backgroundColor: AppColors.pharmacyBGColor, diff --git a/lib/presentation/home/landing_page.dart b/lib/presentation/home/landing_page.dart index fc400c44..f8cd1595 100644 --- a/lib/presentation/home/landing_page.dart +++ b/lib/presentation/home/landing_page.dart @@ -305,7 +305,7 @@ class _LandingPageState extends State { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - "Appointments & Visits".toText16(isBold: true), + LocaleKeys.appointmentsAndVisits.tr(context: context).toText16(isBold: true), Row( children: [ LocaleKeys.viewAll.tr(context: context).toText12(color: AppColors.primaryRedColor), @@ -465,7 +465,7 @@ class _LandingPageState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ AppCustomChipWidget( - labelText: "ER Online Check-In Request", + labelText: LocaleKeys.erOnlineCheckInRequest.tr(context: context), backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.10), textColor: AppColors.primaryRedColor, ), @@ -597,10 +597,10 @@ class _LandingPageState extends State { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - "Services".toText16(isBold: true), + LocaleKeys.services2.tr(context: context).toText16(isBold: true), Row( children: [ - "View all services".toText12(color: AppColors.primaryRedColor), + LocaleKeys.viewAllServices.tr(context: context).toText12(color: AppColors.primaryRedColor), SizedBox(width: 2.h), Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 10.h), ], diff --git a/lib/presentation/home/widgets/habib_wallet_card.dart b/lib/presentation/home/widgets/habib_wallet_card.dart index 9058c8f5..fb04baf3 100644 --- a/lib/presentation/home/widgets/habib_wallet_card.dart +++ b/lib/presentation/home/widgets/habib_wallet_card.dart @@ -23,10 +23,10 @@ class HabibWalletCard extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - "My Balance".toText16(isBold: true), + LocaleKeys.myBalance.tr(context: context).toText16(isBold: true), Row( children: [ - "View all services".toText12(color: AppColors.primaryRedColor), + LocaleKeys.viewAllServices.tr(context: context).toText12(color: AppColors.primaryRedColor), SizedBox(width: 2.h), Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 10.h), ], @@ -54,7 +54,7 @@ class HabibWalletCard extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - "Habib Wallet".toText15(isBold: true), + LocaleKeys.habibWallet.tr(context: context).toText15(isBold: true), Container( height: 40.h, width: 40.h, @@ -94,7 +94,7 @@ class HabibWalletCard extends StatelessWidget { padding: EdgeInsets.symmetric(horizontal: 50.h), child: Row( children: [ - "View details".toText12(color: AppColors.primaryRedColor), + LocaleKeys.viewDetails.tr(context: context).toText12(color: AppColors.primaryRedColor), SizedBox(width: 2.h), Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 10.h), ], diff --git a/lib/presentation/todo_section/widgets/ancillary_orders_list.dart b/lib/presentation/todo_section/widgets/ancillary_orders_list.dart index aa4d0bab..71d2cf03 100644 --- a/lib/presentation/todo_section/widgets/ancillary_orders_list.dart +++ b/lib/presentation/todo_section/widgets/ancillary_orders_list.dart @@ -145,7 +145,7 @@ class AncillaryOrderCard extends StatelessWidget { if (!isLoading) ...[ Image.network( "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", - width: 63.w, + width: 63.h, height: 63.h, fit: BoxFit.cover, ).circle(100.r), @@ -177,11 +177,11 @@ class AncillaryOrderCard extends StatelessWidget { labelText: order.projectName ?? '-', ).toShimmer2(isShow: isLoading), // orderNo - // if (order.orderNo != null || isLoading) - // AppCustomChipWidget( - // // icon: AppAssets.calendar, - // labelText: "${"Order# :".needTranslation}${order.orderNo ?? '-'}", - // ).toShimmer2(isShow: isLoading), + if (order.orderNo != null || isLoading) + AppCustomChipWidget( + // icon: AppAssets.calendar, + labelText: "${LocaleKeys.orderNumber.tr(context: context)}${order.orderNo ?? '-'}", + ).toShimmer2(isShow: isLoading), // Appointment Date if (order.appointmentDate != null || isLoading)