From cce0a8377cf39e6b2b83e05b5456463707a0582f Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Thu, 25 Nov 2021 15:59:34 +0200 Subject: [PATCH 1/3] small fix --- .../patients/profile/discharge_summary/discharge_summary.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/screens/patients/profile/discharge_summary/discharge_summary.dart b/lib/screens/patients/profile/discharge_summary/discharge_summary.dart index 31935fcf..0878994a 100644 --- a/lib/screens/patients/profile/discharge_summary/discharge_summary.dart +++ b/lib/screens/patients/profile/discharge_summary/discharge_summary.dart @@ -98,7 +98,7 @@ class _DoctorReplyScreenState extends State tabWidget( screenSize, _activeTab == 0, - "Pending", + TranslationBase.of(context).pending, ), tabWidget( screenSize, From 92ceb9921215773d126bd4288fa62b1f41b3d1fb Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Thu, 25 Nov 2021 16:55:53 +0200 Subject: [PATCH 2/3] translation for in patient --- lib/config/localized_values.dart | 11 +++++++++++ .../RegisterConfirmationPatientPage.dart | 6 +++--- .../register_patient/RegisterPatientPage.dart | 6 +++--- .../RegisterSearchPatientPage.dart | 16 ++++++++-------- .../register_patient/VerifyMethodPage.dart | 2 +- lib/util/translations_delegate_base.dart | 11 +++++++++++ 6 files changed, 37 insertions(+), 15 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 6a536fae..0e24363d 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -738,4 +738,15 @@ const Map> localizedValues = { "postOperationDiagnosis": {"en": "Post Operation Diagnosis", "ar": "تشخيص ما بعد العملية"}, "surgeon": {"en": "surgeon", "ar": "دكتور جراح"}, "assistant": {"en": "assistant", "ar": "مساعد"}, + "askForIdentification": {"en": "Please enter a mobile number or Identification number", "ar": "الرجاء إدخال رقم الهاتف المحمول أو رقم التعريف"}, + "iDNumber": {"en": "ID Number", "ar": "رقم معرف"}, + "calender": {"en": "Calender", "ar": "التقويم"}, + "gregorian": {"en": "Gregorian", "ar": "ميلادي"}, + "hijri": {"en": "Hijri", "ar": "هجري"}, + "birthdate": {"en": "Birthdate", "ar": "تاريخ الولادة"}, + "activation": {"en": "Activation", "ar": "تفعيل"}, + "confirmation": {"en": "Confirmation", "ar": "تفعيل"}, + "firstNameInAr": {"en": "First Name In Arabic", "ar": "الاسم الاول بالعربية"}, + "middleNameInAr": {"en": "Middle Name In Arabic", "ar": "الاسم الأوسط بالعربية"}, + "lastNameInAr": {"en": "Last Name In Arabic", "ar": "الاسم الأخير بالعربية"}, }; diff --git a/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart b/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart index c03c6f96..be79162b 100644 --- a/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart +++ b/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart @@ -134,7 +134,7 @@ class _RegisterConfirmationPatientPageState CustomEditableText( controller: firstNameAr, isSubmitted: isSubmitted, - hint: "First Name Arabic"), + hint: TranslationBase.of(context).firstNameInAr), SizedBox( height: 4, ), @@ -142,14 +142,14 @@ class _RegisterConfirmationPatientPageState controller: middleNameAr, isEditable: middleNameN.text.isEmpty, isSubmitted: isSubmitted, - hint: "Middle Name Arabic"), + hint: TranslationBase.of(context).middleNameInAr), SizedBox( height: 4, ), CustomEditableText( controller: lastNameAr, isSubmitted: isSubmitted, - hint: "Last Name Arabic"), + hint: TranslationBase.of(context).lastNameInAr), SizedBox( height: 20, ), diff --git a/lib/screens/patients/register_patient/RegisterPatientPage.dart b/lib/screens/patients/register_patient/RegisterPatientPage.dart index 231ff3d1..28e44c6a 100644 --- a/lib/screens/patients/register_patient/RegisterPatientPage.dart +++ b/lib/screens/patients/register_patient/RegisterPatientPage.dart @@ -80,9 +80,9 @@ class _RegisterPatientPageState extends State currentStepIndex: _currentIndex + 1, screenSize: screenSize, stepsTitles: [ - "Search", - "Activation", - "Confirmation", + TranslationBase.of(context).search, + TranslationBase.of(context).activation, + TranslationBase.of(context).confirmation, ], ), SizedBox( diff --git a/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart b/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart index 57d436f5..0d2e398c 100644 --- a/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart +++ b/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart @@ -131,7 +131,7 @@ class _RegisterSearchPatientPageState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - "Please enter mobile number or Identification number", + TranslationBase.of(context).askForIdentification, fontFamily: 'Poppins', fontSize: SizeConfig.textMultiplier * 2.2, fontWeight: FontWeight.w800, @@ -164,7 +164,7 @@ class _RegisterSearchPatientPageState extends State { width: MediaQuery.of(context).size.width * 0.28, child: AppTextFieldCustom( height: screenSize.height * 0.075, - hintText: "Code", + hintText: TranslationBase.of(context).codeNo, inputType: TextInputType.phone, controller: _phoneCode, validationError: phoneError, @@ -185,7 +185,7 @@ class _RegisterSearchPatientPageState extends State { // width: MediaQuery.of(context).size.width*0.7, child: AppTextFieldCustom( height: screenSize.height * 0.075, - hintText: "Phone Number", + hintText: TranslationBase.of(context).phoneNumber, inputType: TextInputType.phone, controller: _phoneController, validationError: @@ -202,7 +202,7 @@ class _RegisterSearchPatientPageState extends State { ), AppTextFieldCustom( height: screenSize.height * 0.075, - hintText: "ID Number", + hintText: TranslationBase.of(context).iDNumber, inputType: TextInputType.phone, controller: _idController, validationError: _idController.text.isEmpty && isSubmitted @@ -213,7 +213,7 @@ class _RegisterSearchPatientPageState extends State { height: 12, ), AppText( - "Calender", + TranslationBase.of(context).calender, fontSize: SizeConfig.textMultiplier * 1.8, fontWeight: FontWeight.w800, ), @@ -224,7 +224,7 @@ class _RegisterSearchPatientPageState extends State { children: [ Expanded( child: RadioListTile( - title: AppText("Gregorian"), + title: AppText(TranslationBase.of(context).gregorian), value: CalenderType.Gregorian, groupValue: calenderType, onChanged: (CalenderType value) { @@ -236,7 +236,7 @@ class _RegisterSearchPatientPageState extends State { ), Expanded( child: RadioListTile( - title: AppText("Hijri"), + title: AppText(TranslationBase.of(context).hijri), value: CalenderType.Hijri, groupValue: calenderType, onChanged: (CalenderType value) { @@ -253,7 +253,7 @@ class _RegisterSearchPatientPageState extends State { ), AppTextFieldCustom( height: screenSize.height * 0.075, - hintText: "Birthdate", + hintText:TranslationBase.of(context).birthdate, dropDownText: getBirthdate(), enabled: false, isTextFieldHasSuffix: true, diff --git a/lib/screens/patients/register_patient/VerifyMethodPage.dart b/lib/screens/patients/register_patient/VerifyMethodPage.dart index 8634e76e..1bbb5edd 100644 --- a/lib/screens/patients/register_patient/VerifyMethodPage.dart +++ b/lib/screens/patients/register_patient/VerifyMethodPage.dart @@ -462,7 +462,7 @@ class _ActivationPageState extends State { if (widget.model.state == ViewState.ErrorLocal) { Helpers.showErrorToast(widget.model.error); //TODO Elham* remove this - //widget.changePageViewIndex(2); + widget.changePageViewIndex(2); GifLoaderDialogUtils.hideDialog(context); } else { GifLoaderDialogUtils.hideDialog(context); diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index d6410f5e..762d5242 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -114,10 +114,13 @@ class TranslationBase { String get referredOn => localizedValues['referredOn'][locale.languageCode]; String get firstName => localizedValues['firstName'][locale.languageCode]; + String get firstNameInAr => localizedValues['firstNameInAr'][locale.languageCode]; String get middleName => localizedValues['middleName'][locale.languageCode]; + String get middleNameInAr => localizedValues['middleNameInAr'][locale.languageCode]; String get lastName => localizedValues['lastName'][locale.languageCode]; + String get lastNameInAr => localizedValues['lastNameInAr'][locale.languageCode]; String get phoneNumber => localizedValues['phoneNumber'][locale.languageCode]; @@ -1133,6 +1136,14 @@ class TranslationBase { String get postOperationDiagnosis => localizedValues['postOperationDiagnosis'][locale.languageCode]; String get surgeon => localizedValues['surgeon'][locale.languageCode]; String get assistant => localizedValues['assistant'][locale.languageCode]; + String get askForIdentification => localizedValues['askForIdentification'][locale.languageCode]; + String get iDNumber => localizedValues['iDNumber'][locale.languageCode]; + String get calender => localizedValues['calender'][locale.languageCode]; + String get gregorian => localizedValues['gregorian'][locale.languageCode]; + String get hijri => localizedValues['hijri'][locale.languageCode]; + String get birthdate => localizedValues['birthdate'][locale.languageCode]; + String get activation => localizedValues['activation'][locale.languageCode]; + String get confirmation => localizedValues['confirmation'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { From e31fadc9befa36da389bbb75178d933fabe4830b Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Thu, 25 Nov 2021 17:08:01 +0200 Subject: [PATCH 3/3] small fix --- lib/util/translations_delegate_base.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index 762d5242..407bb198 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -1144,6 +1144,8 @@ class TranslationBase { String get birthdate => localizedValues['birthdate'][locale.languageCode]; String get activation => localizedValues['activation'][locale.languageCode]; String get confirmation => localizedValues['confirmation'][locale.languageCode]; + String get diabetic => localizedValues['diabetic'][locale.languageCode]; + String get chart => localizedValues['chart'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate {