From 058e287b2552fdbd7c602c8f3b2ca74701c8504e Mon Sep 17 00:00:00 2001 From: Fatimah Alshammari Date: Sun, 7 Aug 2022 11:28:41 +0300 Subject: [PATCH] fix translation --- lib/ui/landing/today_attendance_screen.dart | 4 ++-- lib/ui/screens/mowadhafhi/mowadhafhi_hr_request.dart | 4 ++-- lib/widgets/qr_scanner_dialog.dart | 4 +++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/ui/landing/today_attendance_screen.dart b/lib/ui/landing/today_attendance_screen.dart index 04ee4b1..9346773 100644 --- a/lib/ui/landing/today_attendance_screen.dart +++ b/lib/ui/landing/today_attendance_screen.dart @@ -163,14 +163,14 @@ class _TodayAttendanceScreenState extends State { Row( children: [ commonStatusView(LocaleKeys.checkIn.tr(), (model.attendanceTracking!.pSwipeIn) ?? "- - : - -"), - commonStatusView("Check Out", (model.attendanceTracking!.pSwipeOut) ?? "- - : - -") + commonStatusView(LocaleKeys.checkOut.tr(), (model.attendanceTracking!.pSwipeOut) ?? "- - : - -") ], ), 21.height, Row( children: [ commonStatusView(LocaleKeys.lateIn.tr(), (model.attendanceTracking!.pLateInHours) ?? "- - : - -"), - commonStatusView("Regular", (model.attendanceTracking!.pScheduledHours) ?? "- - : - -") + commonStatusView(LocaleKeys.regular.tr(), (model.attendanceTracking!.pScheduledHours) ?? "- - : - -") ], ), ], diff --git a/lib/ui/screens/mowadhafhi/mowadhafhi_hr_request.dart b/lib/ui/screens/mowadhafhi/mowadhafhi_hr_request.dart index b557ab9..7ac6c43 100644 --- a/lib/ui/screens/mowadhafhi/mowadhafhi_hr_request.dart +++ b/lib/ui/screens/mowadhafhi/mowadhafhi_hr_request.dart @@ -253,7 +253,7 @@ class _MowadhafhiHRRequestState extends State { children: [ title.toText16().expanded, 6.width, - SimpleButton("Add", () async { + SimpleButton(LocaleKeys.add.tr(), () async { FilePickerResult? result = await FilePicker.platform.pickFiles(allowMultiple: true); if (result != null) { attachmentFiles = attachmentFiles + result.paths.map((path) => File(path!)).toList(); @@ -377,7 +377,7 @@ class _MowadhafhiHRRequestState extends State { } int? messageStatus = await MowadhafhiApiClient().submitRequest(selectedDepartment?.projectDepartmentId, description, projectID, selectedSection?.departmentSectionId.toString(), selectedTopic?.sectionTopicId.toString(), int.parse(selectedServiceType), list); - Utils.showToast("Request created successfully"); + Utils.showToast(LocaleKeys.requestCreatedSuccessfully.tr()); Utils.hideLoading(context); Navigator.pop(context); } catch (ex) { diff --git a/lib/widgets/qr_scanner_dialog.dart b/lib/widgets/qr_scanner_dialog.dart index a3adb79..6082d4c 100644 --- a/lib/widgets/qr_scanner_dialog.dart +++ b/lib/widgets/qr_scanner_dialog.dart @@ -1,4 +1,6 @@ +import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; import 'package:qr_code_scanner/qr_code_scanner.dart'; import 'package:mohem_flutter_app/widgets/button/default_button.dart'; @@ -42,7 +44,7 @@ class _QrScannerDialogState extends State { Padding( padding: const EdgeInsets.all(12.0), child: DefaultButton( - "Cancel", + LocaleKeys.cancel.tr(), () { Navigator.pop(context); },