From 4e2c955b09da41b93c4b15fc2f32350c4f69cd50 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Sun, 6 Dec 2020 17:42:44 +0200 Subject: [PATCH] add missing translation --- ios/Flutter/.last_build_id | 2 +- lib/config/localized_values.dart | 99 ++++++++++++++++++- .../all_habib_medical_service_page.dart | 22 +++-- lib/pages/ContactUs/findus/findus_page.dart | 7 +- .../insurance/insurance_approval_screen.dart | 62 ++++++------ .../medical/balance/my_balance_page.dart | 9 +- .../medical/reports/report_home_page.dart | 12 +-- lib/pages/paymentService/payment_service.dart | 4 +- lib/uitl/translations_delegate_base.dart | 24 +++++ 9 files changed, 179 insertions(+), 62 deletions(-) diff --git a/ios/Flutter/.last_build_id b/ios/Flutter/.last_build_id index b5ed87ba..6bca0336 100644 --- a/ios/Flutter/.last_build_id +++ b/ios/Flutter/.last_build_id @@ -1 +1 @@ -a30437b5671472a3d6a8672edcfc504b \ No newline at end of file +f4a819c27119d0f472892c1088ad1ca3 \ No newline at end of file diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index e6be280b..044f5573 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -522,11 +522,11 @@ const Map localizedValues = { "PaymentOnline": {"en": "Service", "ar": "الالكتروني"}, "OnlineCheckIn": {"en": "Online Check-In", "ar": "مدفوعات معلقة"}, "MyBalances": {"en": "My Balances", "ar": "رصيدي"}, - "BalanceAmount": {"en": "Balance Amount", "ar": "رصيدالحساب"}, - "TotalBalance": {"en": "Total Balance", "ar": "الرصيد الكلي"}, + "BalanceAmount": { "en": "Wallet Amount", "ar": "مبلغ المحفظة"}, + "TotalBalance": { "en": "Total Amount", "ar": "المبلغ الإجمالي"}, "CreateAdvancedPayment": { - "en": "Create Advanced Payment", - "ar": "إنشاء دفعة مقدمة" + "en": "Recharge Wallet", + "ar": "إعادة شحن المحفظة" }, "AdvancePayment": {"en": "Advance Payment", "ar": "الدفع مقدما"}, "AdvancePaymentLabel": { @@ -1044,5 +1044,96 @@ const Map localizedValues = { "Through this service, you will be able to link your family medical files to your medical file so that you can manage their records by login to your medical file.", "ar": "هذه الخدمة تم تصميمها لتتمكن من ربط الملفات الطبية للعائلة بملفك الطبي حتى تتمكن من إدارة سجلاتهم عن طريق تسجيل الدخول إلى ملفك الطبي." + }, + "covid-test-all-services": { + "en": "Covid-19 Drive-Thru Test", + "ar": "فحص كورونا من داخل السيارة" + }, + "pharmacy": { + "en": "Pharmacy", + "ar": "الصيدلية" + }, + "ereferral": { + "en": "E-Referral", + "ar": "طلب التحويل" + }, + "child-vaccine": { + "en": "Child Vaccines", + "ar": "تطعيمات الأطفال" + }, + "calculators": { + "en": "Health Calculators", + "ar": "الحاسبات الصحية" + }, + "converters": { + "en": "Health Converter", + "ar": "تحويل القياسات" + }, + "h2o": { + "en": "Water Tracker", + "ar": "حساب كمية الماء" + }, + "v-tour": { + "en": "Virtual Tour", + "ar": "جولة إفتراضية" + }, + "hmg-news": { + "en": "HMG News", + "ar": "أخبار المجموعة" + }, + "blood-d": { + "en": "Blood Donation", + "ar": "تبرع بالدم" + }, + "symptomCheckerTitle": { + "en": "Symptom Checker", + "ar": "مدقق الأعراض" + }, + "latest-news": { + "en": "Latest News", + "ar": "أحدث الأخبار" + }, + "our-location": { + "en": "Our Locations", + "ar": "موقعنا" + }, + "pharmacies": { + "en": "Pharmacies", + "ar": "الصيدليات" + }, + "hospitals": { + "en": "Hospitals", + "ar": "المستشفيات" + }, + "wallet": { + "en": "Wallet", + "ar": "محفظة نقود" + }, + "hmg": { + "en": "Al Habib", + "ar": "الحبيب" + }, + + "requested": { + "en": "Requested", + "ar": "مطلوب" + }, + "ready": { + "en": "Ready", + "ar": "جاهز" + }, + "completed": { + "en": "Completed", + "ar": "مكتمل" + }, + "cancelled": { + "en": "Cancelled", + "ar": "ملغى" + }, + + "request-medical-report": { + "en": "Request medical report", + "ar": "طلب تقرير طبي" } + }; diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart index 6c03f6ba..316a2437 100644 --- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart +++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart @@ -48,6 +48,7 @@ class _AllHabibMedicalServiceState extends State { AuthenticatedUser authUser = new AuthenticatedUser(); LocationUtils locationUtils; var weather = '--'; + @override void initState() { WidgetsBinding.instance.addPostFrameCallback((timeStamp) { @@ -201,7 +202,7 @@ class _AllHabibMedicalServiceState extends State { ), imageLocation: 'assets/images/new-design/family_menu_icon_red.png', - title: 'My Family', + title: TranslationBase.of(context).family, ), ServicesContainer( onTap: () => Navigator.push( @@ -230,20 +231,23 @@ class _AllHabibMedicalServiceState extends State { "https://hmgwebservices.com/vt_mobile/html/index.html"), imageLocation: 'assets/images/new-design/virtual_tour_icon.png', - title: 'Virtual Tour', + title: TranslationBase.of(context).vTour, ), ServicesContainer( onTap: () { - Navigator.of(context).push(MaterialPageRoute( + Navigator.of(context).push( + MaterialPageRoute( builder: (BuildContext context) => MyWebView( - title: "HMG News", - selectedUrl: - "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live", - ))); + title: TranslationBase.of(context).hmgNews, + selectedUrl: + "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live", + ), + ), + ); }, imageLocation: 'assets/images/new-design/twitter_dashboard_icon.png', - title: 'Latest News', + title: TranslationBase.of(context).latestNews, ), ServicesContainer( onTap: () => Navigator.push( @@ -253,7 +257,7 @@ class _AllHabibMedicalServiceState extends State { ), ), imageLocation: 'assets/images/new-design/find_us_icon.png', - title: 'Find Us', + title: TranslationBase.of(context).findUs, ), ], ), diff --git a/lib/pages/ContactUs/findus/findus_page.dart b/lib/pages/ContactUs/findus/findus_page.dart index 807ac1c7..f920de9f 100644 --- a/lib/pages/ContactUs/findus/findus_page.dart +++ b/lib/pages/ContactUs/findus/findus_page.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model import 'package:diplomaticquarterapp/pages/ContactUs/findus/hospitrals_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/findus/pharmacies_page.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -39,7 +40,7 @@ class _FindUsPageState extends State builder: (_, model, w) => AppScaffold( isShowAppBar: true, isShowDecPage: false, - appBarTitle: 'Locations', + appBarTitle: TranslationBase.of(context).ourLocation, baseViewModel: model, body: Scaffold( extendBodyBehindAppBar: true, @@ -90,13 +91,13 @@ class _FindUsPageState extends State Container( width: MediaQuery.of(context).size.width * 0.30, child: Center( - child: Texts(' Hospitals '), + child: Texts(TranslationBase.of(context).hospitals), ), ), Container( width: MediaQuery.of(context).size.width * 0.30, child: Center( - child: Texts(' Pharmacies '), + child: Texts(TranslationBase.of(context).pharmacies), ), ), ], diff --git a/lib/pages/insurance/insurance_approval_screen.dart b/lib/pages/insurance/insurance_approval_screen.dart index b62c2b43..d21e06a5 100644 --- a/lib/pages/insurance/insurance_approval_screen.dart +++ b/lib/pages/insurance/insurance_approval_screen.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart'; import 'package:flutter/cupertino.dart'; @@ -20,10 +21,19 @@ class InsuranceApproval extends StatefulWidget { class _InsuranceApprovalState extends State { List imagesInfo = List(); + @override Widget build(BuildContext context) { - imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/0.png')); - imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/1.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/1.png')); + imagesInfo.add(ImagesInfo( + imageEn: + 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/0.png', + imageAr: + 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/0.png')); + imagesInfo.add(ImagesInfo( + imageEn: + 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/1.png', + imageAr: + 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/1.png')); return BaseView( onModelReady: widget.appointmentNo != null ? (model) => @@ -63,10 +73,10 @@ class _InsuranceApprovalState extends State { ), if (model.insuranceApproval.length > 0) Container( - width: SizeConfig.widthMultiplier * 18.0, - height: SizeConfig.heightMultiplier * 2.8, + width: 60, + height: 35, decoration: BoxDecoration( - color: Color(0xffC5272D), + color: Theme.of(context).primaryColor, borderRadius: BorderRadius.circular(19.0)), child: Center( child: Text( @@ -92,29 +102,21 @@ class _InsuranceApprovalState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ - model.insuranceApproval[index] - .patientDescription == - "In Patient" + model.insuranceApproval[index].patientDescription == "In Patient" ? Container( decoration: BoxDecoration( - color: Color(0xffB8372C), + color: Theme.of(context).primaryColor, borderRadius: BorderRadius.circular( 16.0)), - width: 95.0, + width: 115.0, padding: EdgeInsets.only(left: 11.5), - child: Text( - model.insuranceApproval[index] - .patientDescription == - null - ? '' - : model - .insuranceApproval[ - index] - .patientDescription, - style: TextStyle( - color: Colors.white), + child: Center( + child: Texts( + TranslationBase.of(context).inPatient, + color: Colors.white, + ), ), ) : Container( @@ -123,20 +125,14 @@ class _InsuranceApprovalState extends State { borderRadius: BorderRadius.circular( 16.0)), - width: 95.0, + width: 115.0, padding: EdgeInsets.only(left: 11.5), - child: Text( - model.insuranceApproval[index] - .patientDescription == - null - ? '' - : model - .insuranceApproval[ - index] - .patientDescription, - style: TextStyle( - color: Colors.white), + child: Center( + child: Texts( + TranslationBase.of(context).outpatient, + color: Colors.white, + ), ), ), Padding( diff --git a/lib/pages/medical/balance/my_balance_page.dart b/lib/pages/medical/balance/my_balance_page.dart index e6bc6352..2fb8c51c 100644 --- a/lib/pages/medical/balance/my_balance_page.dart +++ b/lib/pages/medical/balance/my_balance_page.dart @@ -57,7 +57,7 @@ class MyBalancePage extends StatelessWidget { color: Colors.white, ), Texts( - '${model.totalAdvanceBalanceAmount ?? 0} SAR', + '${model.totalAdvanceBalanceAmount ?? 0} '+ TranslationBase.of(context).sar, color: Colors.white, bold: true, ), @@ -81,12 +81,13 @@ class MyBalancePage extends StatelessWidget { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Texts(model.patientAdvanceBalanceAmountList[index] - .projectDescription), + Texts( - '${model.patientAdvanceBalanceAmountList[index].patientAdvanceBalanceAmount} SAR', + '${model.patientAdvanceBalanceAmountList[index].patientAdvanceBalanceAmount} '+TranslationBase.of(context).sar, bold: true, ), + Texts(model.patientAdvanceBalanceAmountList[index] + .projectDescription), ], ), ), diff --git a/lib/pages/medical/reports/report_home_page.dart b/lib/pages/medical/reports/report_home_page.dart index 2bf6d1b8..636d4e00 100644 --- a/lib/pages/medical/reports/report_home_page.dart +++ b/lib/pages/medical/reports/report_home_page.dart @@ -86,32 +86,32 @@ class _HomeReportPageState extends State controller: _tabController, indicatorWeight: 5.0, indicatorSize: TabBarIndicatorSize.label, - indicatorColor: Colors.red[800], + indicatorColor: Theme.of(context).primaryColor, labelColor: Theme.of(context).primaryColor, unselectedLabelColor: Colors.grey[800], tabs: [ Container( width: MediaQuery.of(context).size.width * 0.22, child: Center( - child: Texts('Requested'), + child: Texts(TranslationBase.of(context).requested), ), ), Container( width: MediaQuery.of(context).size.width * 0.22, child: Center( - child: Texts('Ready'), + child: Texts(TranslationBase.of(context).ready), ), ), Container( width: MediaQuery.of(context).size.width * 0.22, child: Center( - child: Texts('Completed'), + child: Texts(TranslationBase.of(context).completed), ), ), Container( width: MediaQuery.of(context).size.width * 0.22, child: Center( - child: Texts('Cancelled'), + child: Texts(TranslationBase.of(context).cancelled), ), ), ], @@ -152,7 +152,7 @@ class _HomeReportPageState extends State height: 90, margin: EdgeInsets.all(8.0), child: Button( - label: 'Resend order & deliver', + label: TranslationBase.of(context).requestMedicalReport, backgroundColor: Colors.grey[800], onTap: () => Navigator.push( context, diff --git a/lib/pages/paymentService/payment_service.dart b/lib/pages/paymentService/payment_service.dart index c31981f7..cc2fd7ca 100644 --- a/lib/pages/paymentService/payment_service.dart +++ b/lib/pages/paymentService/payment_service.dart @@ -115,12 +115,12 @@ class PaymentService extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Texts( - 'My Balances', + TranslationBase.of(context).hmg, color: HexColor('#B61422'), bold: true, ), Texts( - TranslationBase.of(context).payment, + TranslationBase.of(context).wallet, fontSize: 14, fontWeight: FontWeight.normal, ), diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 2cb521d9..f14c456d 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -912,6 +912,30 @@ String get fileno => localizedValues['fileno'][locale.languageCode]; String get infoTodo => localizedValues['info-todo'][locale.languageCode]; String get familyInfo => localizedValues['family-info'][locale.languageCode]; + String get covidTestAllServices => localizedValues['covid-test-all-services'][locale.languageCode]; + String get pharmacy => localizedValues['pharmacy'][locale.languageCode]; + String get ereferral => localizedValues['ereferral'][locale.languageCode]; + String get childVaccine => localizedValues['child-vaccine'][locale.languageCode]; + String get calculators => localizedValues['calculators'][locale.languageCode]; + String get converters => localizedValues['converters'][locale.languageCode]; + String get h2o => localizedValues['h2o'][locale.languageCode]; + String get vTour => localizedValues['v-tour'][locale.languageCode]; + String get hmgNews => localizedValues['hmg-news'][locale.languageCode]; + String get bloodD => localizedValues['blood-d'][locale.languageCode]; + String get symptomCheckerTitle => localizedValues['symptomCheckerTitle'][locale.languageCode]; + String get latestNews => localizedValues['latest-news'][locale.languageCode]; + String get ourLocation => localizedValues['our-location'][locale.languageCode]; + String get pharmacies => localizedValues['pharmacies'][locale.languageCode]; + String get hospitals => localizedValues['hospitals'][locale.languageCode]; + String get wallet => localizedValues['wallet'][locale.languageCode]; + String get hmg => localizedValues['hmg'][locale.languageCode]; + String get requested => localizedValues['requested'][locale.languageCode]; + String get ready => localizedValues['ready'][locale.languageCode]; + String get completed => localizedValues['completed'][locale.languageCode]; + String get cancelled => localizedValues['cancelled'][locale.languageCode]; + String get requestMedicalReport => localizedValues['request-medical-report'][locale.languageCode]; + + } class TranslationBaseDelegate extends LocalizationsDelegate {