diff --git a/lib/blue/io_reply.dart b/lib/blue/io_reply.dart index 856eb0d9..984f43a1 100755 --- a/lib/blue/io_reply.dart +++ b/lib/blue/io_reply.dart @@ -98,7 +98,7 @@ abstract class Reply { case 0x10: // 密码失效 AppLog.log('$logTag ${commandType!.typeName} 0x11 密码失效'); - showErrorMessage('密码失效'); + showErrorMessage('密码失效'.tr); break; case 0x11: // 无效指令 diff --git a/lib/common/safetyVerification/safetyVerification_page.dart b/lib/common/safetyVerification/safetyVerification_page.dart index 425ec3c5..5bbca3a1 100755 --- a/lib/common/safetyVerification/safetyVerification_page.dart +++ b/lib/common/safetyVerification/safetyVerification_page.dart @@ -279,7 +279,7 @@ class _SafetyVerificationPageState extends State with Ti child: Text( _checkSuccess ? '${(_checkMilliseconds / (60.0 * 12)).toStringAsFixed(2)}s${'验证成功'.tr}' - : '验证失败', + : '验证失败'.tr, style: const TextStyle(color: Colors.white), ), ), diff --git a/lib/login/login/starLock_login_page.dart b/lib/login/login/starLock_login_page.dart index a7c57d83..5307a976 100755 --- a/lib/login/login/starLock_login_page.dart +++ b/lib/login/login/starLock_login_page.dart @@ -95,10 +95,10 @@ class _StarLockLoginPageState extends State { child: Column(children: [ Image.asset('images/icon_main_sky_1024.png', width: 110.w, height: 110.w), SizedBox(height: 50.w), - Text(state.emailOrPhone.value.isNotEmpty ? state.emailOrPhone.value : '获取手机号中...'), + Text(state.emailOrPhone.value.isNotEmpty ? state.emailOrPhone.value : '获取手机号中...'.tr), SizedBox(height: 50.w), SubmitBtn( - btnName: '一键登录', + btnName: '一键登录'.tr, fontSize: 28.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), diff --git a/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_page.dart b/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_page.dart index e13c01bd..76d7e0f1 100755 --- a/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_page.dart +++ b/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_page.dart @@ -776,10 +776,10 @@ class _AuthorizedAdminPageState extends State List initBottomSheetList() { final List widgetList = []; - widgetList.add(buildCenter3('images/icon_wechat.png', '微信好友', 0)); - widgetList.add(buildCenter3('images/icon_message.png', '短信', 1)); - widgetList.add(buildCenter3('images/icon_email.png', '邮件', 2)); - widgetList.add(buildCenter3('images/icon_more.png', '更多', 3)); + widgetList.add(buildCenter3('images/icon_wechat.png', '微信好友'.tr, 0)); + widgetList.add(buildCenter3('images/icon_message.png', '短信'.tr, 1)); + widgetList.add(buildCenter3('images/icon_email.png', '邮件'.tr, 2)); + widgetList.add(buildCenter3('images/icon_more.png', '更多'.tr, 3)); return widgetList; } diff --git a/lib/main/lockDetail/card/otherTypeKeyChangeValidityDate/otherTypeKeyChangeValidityDate_logic.dart b/lib/main/lockDetail/card/otherTypeKeyChangeValidityDate/otherTypeKeyChangeValidityDate_logic.dart index 9914d592..93a38ac7 100755 --- a/lib/main/lockDetail/card/otherTypeKeyChangeValidityDate/otherTypeKeyChangeValidityDate_logic.dart +++ b/lib/main/lockDetail/card/otherTypeKeyChangeValidityDate/otherTypeKeyChangeValidityDate_logic.dart @@ -693,7 +693,7 @@ class OtherTypeKeyChangeValidityDateLogic extends BaseGetXController{ faceRight: state.fingerprintItemData.value.faceRight!, ); if (entity.errorCode!.codeIsSuccessful) { - showToast('修改成功', something: () { + showToast('修改成功'.tr, something: () { eventBus.fire(OtherTypeRefreshListEvent()); Get.back(result: { 'starDate':state.starDateTimestamp.value.toString(), @@ -723,7 +723,7 @@ class OtherTypeKeyChangeValidityDateLogic extends BaseGetXController{ palmVeinRight: state.fingerprintItemData.value.palmVeinRight!, ); if (entity.errorCode!.codeIsSuccessful) { - showToast('修改成功', something: () { + showToast('修改成功'.tr, something: () { eventBus.fire(OtherTypeRefreshListEvent()); Get.back(result: { 'starDate':state.starDateTimestamp.value.toString(), diff --git a/lib/main/lockDetail/doorLockLog/week_calendar_view.dart b/lib/main/lockDetail/doorLockLog/week_calendar_view.dart index de4f77c0..d73b57f8 100644 --- a/lib/main/lockDetail/doorLockLog/week_calendar_view.dart +++ b/lib/main/lockDetail/doorLockLog/week_calendar_view.dart @@ -1,4 +1,4 @@ -import 'package:flutter/material.dart'; +fimport 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -136,13 +136,13 @@ class _WeekCalendarViewState extends State { children: [ Text( [ - '简写周日', - '简写周一', - '简写周二', - '简写周三', - '简写周四', - '简写周五', - '简写周六' + '简写周日'.tr, + '简写周一'.tr, + '简写周二'.tr, + '简写周三'.tr, + '简写周四'.tr, + '简写周五'.tr, + '简写周六'.tr ][index] .tr, style: TextStyle( diff --git a/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/massSendReceiverCell.dart b/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/massSendReceiverCell.dart index 540d4a3e..a8582959 100755 --- a/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/massSendReceiverCell.dart +++ b/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/massSendReceiverCell.dart @@ -120,7 +120,7 @@ class _MassSendReceiverCellState extends State { if (text.trim() == '') { errorTxt.value = '请输入姓名'.tr; } else if (text.length > 50) { - errorTxt.value = '姓名长度不能超过50个字符哦'; + errorTxt.value = '姓名长度不能超过50个字符哦'.tr; } }), ], diff --git a/lib/main/lockDetail/electronicKey/sendEmailNotification/sendEmailNotification_state.dart b/lib/main/lockDetail/electronicKey/sendEmailNotification/sendEmailNotification_state.dart index 83103dd0..ebd8f681 100644 --- a/lib/main/lockDetail/electronicKey/sendEmailNotification/sendEmailNotification_state.dart +++ b/lib/main/lockDetail/electronicKey/sendEmailNotification/sendEmailNotification_state.dart @@ -35,7 +35,7 @@ class SendEmailNotificationState { Rx currentNotifyItem = EmailNotificationItem().obs; RxInt getKeyId = 0.obs; //获取钥匙成功得到的keyId RxInt countryCode = 86.obs; - RxString countryName = '中国'.obs; + RxString countryName = '中国'.tr.obs; late Contact contact; final FlutterContactPicker contactPicker = FlutterContactPicker(); RxInt unlockType = 0.obs; //开锁方式 1:电子钥匙 2:密码 diff --git a/lib/main/lockDetail/iris/irisList/irisList_logic.dart b/lib/main/lockDetail/iris/irisList/irisList_logic.dart index 789c20c4..e100c289 100755 --- a/lib/main/lockDetail/iris/irisList/irisList_logic.dart +++ b/lib/main/lockDetail/iris/irisList/irisList_logic.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'package:flutter_blue_plus/flutter_blue_plus.dart'; +import 'package:get/get.dart'; import 'package:star_lock/blue/io_protocol/io_addFace.dart'; import 'package:star_lock/login/login/entity/LoginEntity.dart'; import 'package:star_lock/main/lockDetail/fingerprint/fingerprintList/fingerprintListData_entity.dart'; @@ -242,7 +243,7 @@ class IrisListLogic extends BaseGetXController { lockId: state.lockId.value, ); if (entity.errorCode!.codeIsSuccessful) { - showToast('删除成功'); + showToast('删除成功'.tr); state.isDeletFaceData = false; getIrisListData(); } @@ -260,7 +261,7 @@ class IrisListLogic extends BaseGetXController { lockId: state.lockId.value, ); if (entity.errorCode!.codeIsSuccessful) { - showToast('重置成功'); + showToast('重置成功'.tr); state.isDeletFaceData = false; getIrisListData(); } diff --git a/lib/main/lockDetail/lockSet/catEyeSet/call_target/call_target_select_page.dart b/lib/main/lockDetail/lockSet/catEyeSet/call_target/call_target_select_page.dart index 04d3d9ad..be459069 100644 --- a/lib/main/lockDetail/lockSet/catEyeSet/call_target/call_target_select_page.dart +++ b/lib/main/lockDetail/lockSet/catEyeSet/call_target/call_target_select_page.dart @@ -28,7 +28,7 @@ class _LiveVideoPageState extends State { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, appBar: TitleAppBar( - barTitle: '呼叫目标', + barTitle: '呼叫目标'.tr, haveBack: true, backAction: () { Navigator.pop(context, true); @@ -63,12 +63,12 @@ class _LiveVideoPageState extends State { SizedBox( height: 86.h, ), - _buildTipsView('管理员APP\n', '', 0), + _buildTipsView('${'管理员APP'.tr}\n', '', 0), SizedBox( height: 16.h, ), - _buildTipsView('管理中心\n', - '指定时问内,无论门锁是否发生安全事件或有人按门铃,都能在门锁首页随时查看实时画面;电池续航时问将会缩短。', 1), + _buildTipsView('${'管理中心'.tr}\n'.tr, + '指定时问内,无论门锁是否发生安全事件或有人按门铃,都能在门锁首页随时查看实时画面;电池续航时问将会缩短。'.tr, 1), ], ))); } diff --git a/lib/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_logic.dart b/lib/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_logic.dart index 727ff60a..d37007e2 100755 --- a/lib/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_logic.dart +++ b/lib/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_logic.dart @@ -116,10 +116,10 @@ class CatEyeSetLogic extends BaseGetXController { break; case 0x06: //无权限 - showToast('无权限'); + showToast('无权限'.tr); break; default: - showToast('修改失败'); + showToast('修改失败'.tr); break; } } diff --git a/lib/main/lockDetail/lockSet/configuringWifi/wifiList/wifiList_logic.dart b/lib/main/lockDetail/lockSet/configuringWifi/wifiList/wifiList_logic.dart index 93532323..d8213125 100755 --- a/lib/main/lockDetail/lockSet/configuringWifi/wifiList/wifiList_logic.dart +++ b/lib/main/lockDetail/lockSet/configuringWifi/wifiList/wifiList_logic.dart @@ -155,7 +155,7 @@ class WifiListLogic extends BaseGetXController { } catch (e) { state.sureBtnState.value = 0; cancelBlueConnetctToastTimer(); - showToast('发送获取WiFi列表请求失败:${e.toString()}'.tr); + showToast('${'发送获取WiFi列表请求失败:'.tr}${e.toString()}'); } } else if (connectionState == BluetoothConnectionState.disconnected) { state.sureBtnState.value = 0; diff --git a/lib/main/lockDetail/lockSet/liveVideo/liveVideo_page.dart b/lib/main/lockDetail/lockSet/liveVideo/liveVideo_page.dart index 2f10c0a2..8b43a801 100755 --- a/lib/main/lockDetail/lockSet/liveVideo/liveVideo_page.dart +++ b/lib/main/lockDetail/lockSet/liveVideo/liveVideo_page.dart @@ -64,12 +64,12 @@ class _LiveVideoPageState extends State { height: 86.h, ), _buildTipsView( - '发生事件时查看\n', '仅当门锁发生事件或有人按门铃时,才能在门锁首页查看实时画面。', 0), + '${'发生事件时查看'.tr}\n', '仅当门锁发生事件或有人按门铃时,才能在门锁首页查看实时画面。'.tr, 0), SizedBox( height: 16.h, ), - _buildTipsView('实时查看\n', - '指定时问内,无论门锁是否发生安全事件或有人按门铃,都能在门锁首页随时查看实时画面;电池续航时问将会缩短。', 1), + _buildTipsView('${'实时查看'.tr}\n', + '指定时问内,无论门锁是否发生安全事件或有人按门铃,都能在门锁首页随时查看实时画面;电池续航时问将会缩短。'.tr, 1), ], ))); } diff --git a/lib/main/lockDetail/messageWarn/msgNotification/coerceOpenDoor/coerceFingerprintList/coerceFingerprintList_logic.dart b/lib/main/lockDetail/messageWarn/msgNotification/coerceOpenDoor/coerceFingerprintList/coerceFingerprintList_logic.dart index d6820b63..1492be8c 100755 --- a/lib/main/lockDetail/messageWarn/msgNotification/coerceOpenDoor/coerceFingerprintList/coerceFingerprintList_logic.dart +++ b/lib/main/lockDetail/messageWarn/msgNotification/coerceOpenDoor/coerceFingerprintList/coerceFingerprintList_logic.dart @@ -31,10 +31,10 @@ class CoerceFingerprintListLogic extends BaseGetXController { keyDateTypeStr = '永久'.tr; } else if (fingerprintItemData.fingerprintType! == 2) { keyDateTypeStr = - '${DateTool().dateToYMDHNString(fingerprintItemData.startDate.toString())} - ${DateTool().dateToYMDHNString(fingerprintItemData.endDate.toString())} 限时'; + '${DateTool().dateToYMDHNString(fingerprintItemData.startDate.toString())} - ${DateTool().dateToYMDHNString(fingerprintItemData.endDate.toString())} ${'限时'.tr}'; } else if (fingerprintItemData.fingerprintType! == 4) { keyDateTypeStr = - '${DateTool().dateToYMDString(fingerprintItemData.startDate.toString())}-${DateTool().dateToYMDString(fingerprintItemData.endDate.toString())} 循环'; + '${DateTool().dateToYMDString(fingerprintItemData.startDate.toString())}-${DateTool().dateToYMDString(fingerprintItemData.endDate.toString())} ${'循环'.tr}'; } return keyDateTypeStr; } diff --git a/lib/main/lockDetail/messageWarn/msgNotification/msgNotification/msgNotification_state.dart b/lib/main/lockDetail/messageWarn/msgNotification/msgNotification/msgNotification_state.dart index 61b09b52..ba9ee473 100755 --- a/lib/main/lockDetail/messageWarn/msgNotification/msgNotification/msgNotification_state.dart +++ b/lib/main/lockDetail/messageWarn/msgNotification/msgNotification/msgNotification_state.dart @@ -19,9 +19,9 @@ class MsgNotificationState { Rx msgNoticeInfo = MsgNoticeData().obs; RxInt getLockId = 0.obs; RxBool isCheck = false.obs; - RxString nDaysNotOpenDoor = '已启用'.obs; //N天未开门 + RxString nDaysNotOpenDoor = '已启用'.tr.obs; //N天未开门 RxBool isTamperAlarm = false.obs; //防拆报警 - RxString isLowBattery = '已启用'.obs; //低电量提醒 + RxString isLowBattery = '已启用'.tr.obs; //低电量提醒 RxBool isLeaveHomeOpenDoor = false.obs; //离家开门 RxBool isDoorNotShut = false.obs; //门未关好 RxBool isSomeoneRing = false.obs; //有人按门铃 diff --git a/lib/main/lockDetail/messageWarn/msgNotification/nDaysUnopened/nDaysUnopened_page.dart b/lib/main/lockDetail/messageWarn/msgNotification/nDaysUnopened/nDaysUnopened_page.dart index 3949a419..95e6ed94 100755 --- a/lib/main/lockDetail/messageWarn/msgNotification/nDaysUnopened/nDaysUnopened_page.dart +++ b/lib/main/lockDetail/messageWarn/msgNotification/nDaysUnopened/nDaysUnopened_page.dart @@ -183,7 +183,7 @@ class _NDaysUnopenedPageState extends State { data: dataList, pickerStyle: DefaultPickerStyle(), onConfirm: (p, int position) { state.unOpenDoorTime.value = - int.parse(state.unopenDoorTimeList[position].replaceAll('天', '')); + int.parse(state.unopenDoorTimeList[position].replaceAll('天'.tr, '')); }); } } diff --git a/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_logic.dart b/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_logic.dart index 33b2f2f7..a2f3da48 100755 --- a/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_logic.dart +++ b/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_logic.dart @@ -300,7 +300,7 @@ class PasswordKeyDetailLogic extends BaseGetXController { '\n' + '有效期'.tr + ':${startDateStr.toLocal().toString().substring(0, 16)} -- ${endDateStr.toLocal().toString().substring(0, 16)}\n\n' + - '这是单次密码,只能使用一次\n'; + '${'这是单次密码,只能使用一次'.tr}\n'; break; case 2: //永久 2 从开始时间开始永久有效,必需在开始时间24小时内使用一次,否则将失效 @@ -309,8 +309,8 @@ class PasswordKeyDetailLogic extends BaseGetXController { ':' + '永久'.tr + '\n' + - '\n注:\n' + - '必需在开始时间24小时内使用一次,否则将失效\n'; + '\n${'注:'.tr}\n' + + '${'必需在开始时间24小时内使用一次,否则将失效'.tr}\n'; break; case 3: //限期 3 在开始和结束时间内有效,必需在开始时间24小时内使用一次,否则将失效 @@ -323,8 +323,8 @@ class PasswordKeyDetailLogic extends BaseGetXController { '有效期'.tr + ':${startDateStr.toLocal().toString().substring(0, 16)}-${endDateStr.toLocal().toString().substring(0, 16)}' + '\n' + - '\n注:\n' + - '必需在开始时间24小时内使用一次,否则将失效\n'; + '\n${'注:'.tr}\n' + + '${'必需在开始时间24小时内使用一次,否则将失效'.tr}\n'; break; case 4: //删除 4 在锁上使用后会删除之前在锁上使用过的密码 @@ -453,9 +453,10 @@ class PasswordKeyDetailLogic extends BaseGetXController { default: } // return '您好,您的密码是'.tr + ':${state.itemData.value.keyboardPwd}\n$useDateStr\n${'密码名字'.tr}:${state.itemData.value.keyboardPwdName}'; - return '您好' + - ',\n您的开门密码是' + - ':${state.itemData.value.keyboardPwd}\n$useDateStr\n${'密码名字'.tr}:${state.itemData.value.keyboardPwdName}\n\n开锁时,先激活锁键盘,再输入密码,以#号结束,#号键在键盘右下角,有可能是其他图标'; + return '您好'.tr + + ',\n' + + '您的开门密码是'.tr + + ':${state.itemData.value.keyboardPwd}\n$useDateStr\n${'密码名字'.tr}:${state.itemData.value.keyboardPwdName}\n\n${'开锁时,先激活锁键盘,再输入密码,以#号结束,#号键在键盘右下角,有可能是其他图标'.tr}'; } @override diff --git a/lib/main/lockDetail/passwordKey/passwordKey_perpetual/passwordKey_perpetual_logic.dart b/lib/main/lockDetail/passwordKey/passwordKey_perpetual/passwordKey_perpetual_logic.dart index 2a88cf5c..8c1d82eb 100755 --- a/lib/main/lockDetail/passwordKey/passwordKey_perpetual/passwordKey_perpetual_logic.dart +++ b/lib/main/lockDetail/passwordKey/passwordKey_perpetual/passwordKey_perpetual_logic.dart @@ -519,7 +519,7 @@ class PasswordKeyPerpetualLogic extends BaseGetXController { '\n' + '有效期'.tr + ':${startDateStr.toLocal().toString().substring(0, 16)} -- ${endDateStr.toLocal().toString().substring(0, 16)}\n\n' + - '这是单次密码,只能使用一次\n'; + '${'这是单次密码,只能使用一次'.tr}\n'; break; case 0: //永久 2 从开始时间开始永久有效,必需在开始时间24小时内使用一次,否则将失效 @@ -528,8 +528,8 @@ class PasswordKeyPerpetualLogic extends BaseGetXController { ':' + '永久'.tr + '\n' + - '\n注:\n' + - '必需在开始时间24小时内使用一次,否则将失效\n'; + '\n注:\n'.tr + + '${'必需在开始时间24小时内使用一次,否则将失效'.tr}\n'; break; case 1: //限期 3 在开始和结束时间内有效,必需在开始时间24小时内使用一次,否则将失效 @@ -542,15 +542,15 @@ class PasswordKeyPerpetualLogic extends BaseGetXController { '有效期'.tr + ':${startDateStr.toLocal().toString().substring(0, 16)}-${endDateStr.toLocal().toString().substring(0, 16)}' + '\n' + - '\n注:\n' + - '必需在开始时间24小时内使用一次,否则将失效\n'; + '\n${'注:'.tr}\n' + + '${'必需在开始时间24小时内使用一次,否则将失效'.tr}\n'; break; case 3: //自定义 if (state.isPermanent.value == false) { useDateStr = '类型'.tr + ':' + - '自定义-限时\n${'有效期'.tr}:${state.customBeginTime.value} -- ${state.customEndTime.value}'; + '${'自定义-限时'.tr}\n${'有效期'.tr}:${state.customBeginTime.value} -- ${state.customEndTime.value}'; } else { useDateStr = '类型:自定义-永久'.tr; } @@ -786,9 +786,9 @@ class PasswordKeyPerpetualLogic extends BaseGetXController { default: } // return '您好,您的密码是'.tr + ':${state.itemData.value.keyboardPwd}\n$useDateStr\n${'密码名字'.tr}:${state.itemData.value.keyboardPwdName}'; - return '您好' + - ',\n您的开门密码是' + - ':${state.getPwdStr.value}\n$useDateStr\n${'密码名字'.tr}:${state.pwdNameStr}\n\n开锁时,先激活锁键盘,再输入密码,以#号结束,#号键在键盘右下角,有可能是其他图标'; + return '您好'.tr + + ',\n${'您的开门密码是'.tr}' + + ':${state.getPwdStr.value}\n$useDateStr\n${'密码名字'.tr}:${state.pwdNameStr}\n\n${'开锁时,先激活锁键盘,再输入密码,以#号结束,#号键在键盘右下角,有可能是其他图标'.tr}'; // switch (getPwdType) { // case 0: // // 永久 从开始时间开始永久有效,必需在开始时间24小时内使用一次,否则将失效 diff --git a/lib/main/lockDetail/realTimePicture/realTimePicture_page.dart b/lib/main/lockDetail/realTimePicture/realTimePicture_page.dart index c2518d38..d97eafc0 100755 --- a/lib/main/lockDetail/realTimePicture/realTimePicture_page.dart +++ b/lib/main/lockDetail/realTimePicture/realTimePicture_page.dart @@ -265,7 +265,7 @@ class _RealTimePicturePageState extends State with TickerPr Get.back(); }), bottomBtnItemWidget('images/main/icon_lockDetail_monitoringUnlock.png', - '开锁', AppColors.mainColor, () { + '开锁'.tr, AppColors.mainColor, () { logic.showToast('监视中暂不能开锁'.tr); /* showDeletPasswordAlertDialog(context); diff --git a/lib/main/lockDetail/videoLog/editVideoLog/editVideoLog_page.dart b/lib/main/lockDetail/videoLog/editVideoLog/editVideoLog_page.dart index f4dcfd31..a57d248c 100755 --- a/lib/main/lockDetail/videoLog/editVideoLog/editVideoLog_page.dart +++ b/lib/main/lockDetail/videoLog/editVideoLog/editVideoLog_page.dart @@ -292,7 +292,7 @@ class _EditVideoLogPageState extends State { // 'downloadVideoLogList': state.selectVideoLogList.value // }); } else { - logic.showToast('请选择要下载的视频'); + logic.showToast('请选择要下载的视频'.tr); } } diff --git a/lib/main/lockDetail/videoLog/videoLog/videoLog_page.dart b/lib/main/lockDetail/videoLog/videoLog/videoLog_page.dart index 247ea747..65e34ef9 100755 --- a/lib/main/lockDetail/videoLog/videoLog/videoLog_page.dart +++ b/lib/main/lockDetail/videoLog/videoLog/videoLog_page.dart @@ -267,7 +267,7 @@ class _VideoLogPageState extends State { visible: state.validityPeriodInfo.value != null && state.validityPeriodInfo.value?.status == 1, child: Text( - '过期时间:${state.validityPeriodInfo.value?.validityPeriodEnd}', + '${'过期时间:'.tr}${state.validityPeriodInfo.value?.validityPeriodEnd}', style: TextStyle( fontSize: 24.sp, ), @@ -280,7 +280,7 @@ class _VideoLogPageState extends State { visible: state.validityPeriodInfo.value != null && state.validityPeriodInfo.value?.status == 1, child: Text( - '滚动存储天数:${state.validityPeriodInfo.value?.rollingStorageDays} 天', + '${'滚动存储天数:'.tr}${state.validityPeriodInfo.value?.rollingStorageDays} 天', style: TextStyle( fontSize: 24.sp, ), @@ -293,7 +293,7 @@ class _VideoLogPageState extends State { visible: state.validityPeriodInfo.value != null && state.validityPeriodInfo.value?.status == 1, child: Text( - '剩余天数:${state.validityPeriodInfo.value?.remainingDays} 天', + '${'剩余天数:'.tr}${state.validityPeriodInfo.value?.remainingDays} ${'天'.tr}', style: TextStyle( fontSize: 24.sp, ), diff --git a/lib/main/lockMian/lockMain/lockMain_logic.dart b/lib/main/lockMian/lockMain/lockMain_logic.dart index 3ac67134..18210f05 100755 --- a/lib/main/lockMian/lockMain/lockMain_logic.dart +++ b/lib/main/lockMian/lockMain/lockMain_logic.dart @@ -245,7 +245,7 @@ class LockMainLogic extends BaseGetXController { if (!notificationEnabled) { //推送未开启 ShowTipView().showIosTipWithContentDialog( - '为了让您及时收到重要通知和更新,我们需要获取通知权限。请点击“确定”按钮,然后在设置页面中启用通知权限。', () async { + '为了让您及时收到重要通知和更新,我们需要获取通知权限。请点击“确定”按钮,然后在设置页面中启用通知权限。'.tr, () async { openAppSettings(); }); } diff --git a/lib/mine/gateway/gatewayList/gatewayList_page.dart b/lib/mine/gateway/gatewayList/gatewayList_page.dart index 95b8a9c1..1bd38292 100755 --- a/lib/mine/gateway/gatewayList/gatewayList_page.dart +++ b/lib/mine/gateway/gatewayList/gatewayList_page.dart @@ -141,7 +141,7 @@ class _GatewayListPageState extends State { width: 10.w, ), Text( - getewayItemData.isOnline == 1 ? '在线' : '离线', + getewayItemData.isOnline == 1 ? '在线'.tr : '离线'.tr, style: TextStyle(fontSize: 18.sp), ), SizedBox( diff --git a/lib/mine/message/messageList/messageList_page.dart b/lib/mine/message/messageList/messageList_page.dart index a198a6d6..0b05ec43 100755 --- a/lib/mine/message/messageList/messageList_page.dart +++ b/lib/mine/message/messageList/messageList_page.dart @@ -153,13 +153,13 @@ class _MessageListPageState extends State mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text('开启消息通知开关,及时获取通知', + Text('开启消息通知开关,及时获取通知'.tr, style: TextStyle( color: Colors.black, fontSize: 20.sp)), Row(children: [ !_pushNotificationEnabled.value - ? GestureDetector(child: Text('去开启', + ? GestureDetector(child: Text('去开启'.tr, style: TextStyle( color: Colors.blue, fontSize: 20.sp)), @@ -189,7 +189,7 @@ class _MessageListPageState extends State mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text('告警', + Text('告警'.tr, style: TextStyle( fontWeight: FontWeight.w600, fontSize: 30.sp)), @@ -340,7 +340,7 @@ class _MessageListPageState extends State backgroundColor: Colors.red, foregroundColor: Colors.white, icon: Icons.delete, - label: '删除', + label: '删除'.tr, ), ], ), child: Container( @@ -366,7 +366,7 @@ class _MessageListPageState extends State ? AppColors.blackColor : AppColors.placeholderTextColor))]) ), Container(margin: EdgeInsets.only(top: 10.h), child: GestureDetector( - child: Text('点击查看', style: TextStyle(fontWeight: FontWeight.w500, fontSize: 22.sp, color: AppColors.mainColor),), + child: Text('点击查看'.tr, style: TextStyle(fontWeight: FontWeight.w500, fontSize: 22.sp, color: AppColors.mainColor),), ),alignment: Alignment.centerRight)], )))), ), diff --git a/lib/mine/mineSet/authorityManagement/authorityManagement_page.dart b/lib/mine/mineSet/authorityManagement/authorityManagement_page.dart index 50c93a16..dacf0c3c 100755 --- a/lib/mine/mineSet/authorityManagement/authorityManagement_page.dart +++ b/lib/mine/mineSet/authorityManagement/authorityManagement_page.dart @@ -102,13 +102,13 @@ class _AuthorityManagementPageState extends State child: ListView.separated( itemBuilder: (BuildContext context, int index) { if (index == 0) { - return _buildNameExpandedList(context, index, '张三'); + return _buildNameExpandedList(context, index, '张三'.tr); } else if (index == 1) { - return _buildNameExpandedList(context, index, '李四'); + return _buildNameExpandedList(context, index, '李四'.tr); } else if (index == 2) { - return _buildNameExpandedList(context, index, '王二'); + return _buildNameExpandedList(context, index, '王二'.tr); } else { - return _buildNameExpandedList(context, index, '麻子'); + return _buildNameExpandedList(context, index, '麻子'.tr); } }, separatorBuilder: (BuildContext context, int index) { @@ -140,13 +140,13 @@ class _AuthorityManagementPageState extends State child: ListView.separated( itemBuilder: (BuildContext context, int index) { if (index == 0) { - return _buildDeviceExpandedList(context, index, '大门锁'); + return _buildDeviceExpandedList(context, index, '大门锁'.tr); } else if (index == 1) { - return _buildDeviceExpandedList(context, index, '办公室锁'); + return _buildDeviceExpandedList(context, index, '办公室锁'.tr); } else if (index == 2) { - return _buildDeviceExpandedList(context, index, '会议室锁'); + return _buildDeviceExpandedList(context, index, '会议室锁'.tr); } else { - return _buildDeviceExpandedList(context, index, '宴会厅锁'); + return _buildDeviceExpandedList(context, index, '宴会厅锁'.tr); } }, separatorBuilder: (BuildContext context, int index) { @@ -184,16 +184,16 @@ class _AuthorityManagementPageState extends State itemBuilder: (_, int index) { if (index == 0) { return _buildNameWidget( - context, index, 'images/icon_password.png', '张三'); + context, index, 'images/icon_password.png', '张三'.tr); } else if (index == 1) { return _buildNameWidget( - context, index, 'images/icon_card.png', '李四'); + context, index, 'images/icon_card.png', '李四'.tr); } else if (index == 2) { return _buildNameWidget( - context, index, 'images/icon_fingerprint.png', '王二'); + context, index, 'images/icon_fingerprint.png', '王二'.tr); } else if (index == 3) { return _buildNameWidget( - context, index, 'images/icon_card.png', '麻子'); + context, index, 'images/icon_card.png', '麻子'.tr); } else { return null; } @@ -225,16 +225,16 @@ class _AuthorityManagementPageState extends State itemBuilder: (_, int index) { if (index == 0) { return _buildDeviceWidget( - context, index, 'images/icon_lock.png', '大门锁'); + context, index, 'images/icon_lock.png', '大门锁'.tr); } else if (index == 1) { return _buildDeviceWidget( - context, index, 'images/icon_lock.png', '办公室锁'); + context, index, 'images/icon_lock.png', '办公室锁'.tr); } else if (index == 2) { return _buildDeviceWidget( - context, index, 'images/icon_lock.png', '会议室锁'); + context, index, 'images/icon_lock.png', '会议室锁'.tr); } else { return _buildDeviceWidget( - context, index, 'images/icon_lock.png', '宴会厅锁'); + context, index, 'images/icon_lock.png', '宴会厅锁'.tr); } }, separatorBuilder: (BuildContext context, int index) { diff --git a/lib/mine/mineSet/authorityManagement/getDeviceList_page.dart b/lib/mine/mineSet/authorityManagement/getDeviceList_page.dart index 9c1bc1eb..95b5c54c 100755 --- a/lib/mine/mineSet/authorityManagement/getDeviceList_page.dart +++ b/lib/mine/mineSet/authorityManagement/getDeviceList_page.dart @@ -53,16 +53,16 @@ class _GetDeviceListPageState extends State { itemBuilder: (BuildContext context, int index) { if (index == 0) { return _buildDeviceWidget( - context, index, 'images/icon_lock.png', '大门锁'); + context, index, 'images/icon_lock.png', '大门锁'.tr); } else if (index == 1) { return _buildDeviceWidget( - context, index, 'images/icon_lock.png', '办公室锁'); + context, index, 'images/icon_lock.png', '办公室锁'.tr); } else if (index == 2) { return _buildDeviceWidget( - context, index, 'images/icon_lock.png', '会议室锁'); + context, index, 'images/icon_lock.png', '会议室锁'.tr); } else { return _buildDeviceWidget( - context, index, 'images/icon_lock.png', '宴会厅锁'); + context, index, 'images/icon_lock.png', '宴会厅锁'.tr); } }, separatorBuilder: (BuildContext context, int index) { diff --git a/lib/mine/mineSet/authorityManagement/getNameList_page.dart b/lib/mine/mineSet/authorityManagement/getNameList_page.dart index d74e907f..b0b1f039 100755 --- a/lib/mine/mineSet/authorityManagement/getNameList_page.dart +++ b/lib/mine/mineSet/authorityManagement/getNameList_page.dart @@ -53,16 +53,16 @@ class _GetNameListPageState extends State { itemBuilder: (context, index) { if (index == 0) { return _buildNameWidget( - context, index, 'images/controls_user.png', '张三'); + context, index, 'images/controls_user.png', '张三'.tr); } else if (index == 1) { return _buildNameWidget( - context, index, 'images/controls_user.png', '李四'); + context, index, 'images/controls_user.png', '李四'.tr); } else if (index == 2) { return _buildNameWidget( - context, index, 'images/controls_user.png', '王二'); + context, index, 'images/controls_user.png', '王二'.tr); } else if (index == 3) { return _buildNameWidget( - context, index, 'images/controls_user.png', '麻子'); + context, index, 'images/controls_user.png', '麻子'.tr); } return null; }, diff --git a/lib/mine/mineSet/google_home/google_home_state.dart b/lib/mine/mineSet/google_home/google_home_state.dart index a49b7994..058f157f 100644 --- a/lib/mine/mineSet/google_home/google_home_state.dart +++ b/lib/mine/mineSet/google_home/google_home_state.dart @@ -7,9 +7,9 @@ class GoogleHomeState { if (map['isGoogleHome'] != null) { isGoogleHome.value = map['isGoogleHome']; if (isGoogleHome.value) { - isOpenedText.value = '关闭'; + isOpenedText.value = '关闭'.tr; } else { - isOpenedText.value = '开启'; + isOpenedText.value = '开启'.tr; } } if (map['googleHomeData'] != null) { @@ -18,6 +18,6 @@ class GoogleHomeState { } RxBool isGoogleHome = false.obs; - RxString isOpenedText = '开启'.obs; + RxString isOpenedText = '开启'.tr.obs; Rx googleHomeData = GoogleHome().obs; } diff --git a/lib/mine/mineSet/transferSmartLock/recipientInformation/recipientInformation_state.dart b/lib/mine/mineSet/transferSmartLock/recipientInformation/recipientInformation_state.dart index 4cac0c2e..6e3eb4d0 100755 --- a/lib/mine/mineSet/transferSmartLock/recipientInformation/recipientInformation_state.dart +++ b/lib/mine/mineSet/transferSmartLock/recipientInformation/recipientInformation_state.dart @@ -16,7 +16,7 @@ class RecipientInformationState{ TextEditingController passwordTF = TextEditingController(); - final RxString countryName = '中国'.obs; + final RxString countryName = '中国'.tr.obs; final RxString countryCode = '86'.obs; final RxInt isFromType = 1.obs; // 1从转移智能锁过来 2 转移网关 final RxList idList = [].obs; diff --git a/lib/mine/mineSet/transferSmartLock/selectBranch/selectBranch_page.dart b/lib/mine/mineSet/transferSmartLock/selectBranch/selectBranch_page.dart index 52dab0dd..d43b808b 100755 --- a/lib/mine/mineSet/transferSmartLock/selectBranch/selectBranch_page.dart +++ b/lib/mine/mineSet/transferSmartLock/selectBranch/selectBranch_page.dart @@ -172,7 +172,7 @@ class _SelectBranchPageState extends State { child: Container( width: 80.w, color: Colors.red, - child: Center(child: Text(state.type.value == 1 ? '个人用户' : '星寓', style: TextStyle(fontSize: 18.sp, color: Colors.white))), + child: Center(child: Text(state.type.value == 1 ? '个人用户'.tr : '星寓'.tr, style: TextStyle(fontSize: 18.sp, color: Colors.white))), ), ) ], @@ -180,7 +180,7 @@ class _SelectBranchPageState extends State { SizedBox(height: 8.h), Text(recipientInformationData.userid!, style: TextStyle(fontSize: 22.sp)), SizedBox(height: 8.h), - Text('本次共转移${state.idList.value.length}把智能锁', style: TextStyle(fontSize: 20.sp)), + Text('${'转移'.tr}${state.idList.value.length}${'把智能锁'.tr}', style: TextStyle(fontSize: 20.sp)), SizedBox(height: 20.h), Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, @@ -207,7 +207,7 @@ class _SelectBranchPageState extends State { borderRadius: BorderRadius.all(Radius.circular(2)), ), ), - child: Text('确认', style: TextStyle(fontSize: 22.sp)), + child: Text('确认'.tr, style: TextStyle(fontSize: 22.sp)), ), ], ) diff --git a/lib/mine/mineSet/transferSmartLock/selectBranch/selectBranch_state.dart b/lib/mine/mineSet/transferSmartLock/selectBranch/selectBranch_state.dart index 2e5213e5..ea177229 100755 --- a/lib/mine/mineSet/transferSmartLock/selectBranch/selectBranch_state.dart +++ b/lib/mine/mineSet/transferSmartLock/selectBranch/selectBranch_state.dart @@ -11,7 +11,7 @@ class SelectBranchState{ RxInt type = 1.obs;// 1、个人用户 2、星寓用户 final RxString receiverNumber = ''.obs; - final RxString countryName = '中国'.obs; + final RxString countryName = '中国'.tr.obs; final RxString countryCode = '86'.obs; final RxList idList = [].obs; } \ No newline at end of file diff --git a/lib/mine/valueAddedServices/cloudStorage/cloud_storage_state.dart b/lib/mine/valueAddedServices/cloudStorage/cloud_storage_state.dart index 93879f8a..3ea3ca66 100644 --- a/lib/mine/valueAddedServices/cloudStorage/cloud_storage_state.dart +++ b/lib/mine/valueAddedServices/cloudStorage/cloud_storage_state.dart @@ -5,9 +5,9 @@ class CloudStorageState { RxInt selectedIndex = 0.obs; // 选项卡标题 - final List tabs = ['7天滚动存储', '30天滚动存储']; + final List tabs = ['7天滚动存储'.tr, '30天滚动存储'.tr]; final List> tabContent = [ - {'title': '连续包月', 'price': '1', 'price2': '188', 'discount': '立省188元'}, - {'title': '连续包月', 'price': '1', 'price2': '188', 'discount': '立省188元'} + {'title': '连续包月'.tr, 'price': '1', 'price2': '188', 'discount': '立省188元'.tr}, + {'title': '连续包月'.tr, 'price': '1', 'price2': '188', 'discount': '立省188元'.tr} ]; } diff --git a/lib/mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesAddSMSTemplate/newSMSTemplate_logic.dart b/lib/mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesAddSMSTemplate/newSMSTemplate_logic.dart index c240ed18..1cce3408 100644 --- a/lib/mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesAddSMSTemplate/newSMSTemplate_logic.dart +++ b/lib/mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesAddSMSTemplate/newSMSTemplate_logic.dart @@ -37,7 +37,7 @@ class NewSMSTemplateLogic extends BaseGetXController { //新建模板-- 1:电子钥匙 2:密码 Future addSMSTemplate() async { if (state.templateNameTf.text.isEmpty) { - showToast('请输入模板名称'); + showToast('请输入模板名称'.tr); return; } final LoginEntity entity = await ApiRepository.to.addTemplateService( diff --git a/lib/network/api_provider_base.dart b/lib/network/api_provider_base.dart index 7fdb032e..3a81bf71 100755 --- a/lib/network/api_provider_base.dart +++ b/lib/network/api_provider_base.dart @@ -132,7 +132,7 @@ class BaseProvider extends GetConnect with Api { Get.offNamedUntil(Routers.starLockLoginPage, (route) => false); break; case 500: - EasyLoading.showToast('服务器错误', duration: 2000.milliseconds); + EasyLoading.showToast('服务器错误'.tr, duration: 2000.milliseconds); break; case 421: case 422: diff --git a/lib/talk/starChart/views/imageTransmission/image_transmission_page.dart b/lib/talk/starChart/views/imageTransmission/image_transmission_page.dart index 2ba567f5..d8340f60 100644 --- a/lib/talk/starChart/views/imageTransmission/image_transmission_page.dart +++ b/lib/talk/starChart/views/imageTransmission/image_transmission_page.dart @@ -223,7 +223,7 @@ class _ImageTransmissionPageState extends State innerColor: Colors.amber, outerColor: Colors.amber.withOpacity(0.15), sliderButtonIcon: Icon(Icons.lock, color: Colors.white, size: 40.w), - text: '滑动解锁', + text: '滑动解锁'.tr, textStyle: TextStyle( fontSize: 26.sp, color: Colors.black54, diff --git a/lib/tools/menuItem/xsDropDownWidget.dart b/lib/tools/menuItem/xsDropDownWidget.dart index 50c8135a..bdcf21cc 100755 --- a/lib/tools/menuItem/xsDropDownWidget.dart +++ b/lib/tools/menuItem/xsDropDownWidget.dart @@ -32,7 +32,7 @@ class XSDropDownWidget extends StatefulWidget { } class _XSDropDownWidgetState extends State { - String label = '请选择'; + String label = '请选择'.tr; // 是否展开下拉按钮 bool isExpand = false; // 当前的值