diff --git a/star_lock/images/lan/lan_en.json b/star_lock/images/lan/lan_en.json index 346c6fc1..4afa7f45 100644 --- a/star_lock/images/lan/lan_en.json +++ b/star_lock/images/lan/lan_en.json @@ -743,5 +743,24 @@ "胁迫开门":"Forced door opening", "有人按门铃":"Someone rings the doorbell", "有人出现在门口":"Someone appears at the door", - "提醒方式":"Reminder mode" + "提醒方式":"Reminder mode", + "开门方式":"Opening mode", + "请选择":"Please select", + "家人":"Family", + "保存":"Save", + "APP推送":"APP push", + "管理员":"Administrator", + "未启用":"Not enabled", + "已启用":"Enabled", + "省电模式":"Power saving mode", + "逗留抓拍模式":"Stay capture mode", + "实时监控模式":"Real-time monitoring mode", + "自定义模式":"Custom mode", + "秒":"second", + "猫眼设置":"Cat eye setting", + "猫眼工作模式":"Cat eye working mode", + "自动亮屏":"Automatic bright screen", + "亮屏持续时间":"Screen on time", + "逗留警告":"Stay warning", + "异常警告":"Abnormal warning" } diff --git a/star_lock/images/lan/lan_keys.json b/star_lock/images/lan/lan_keys.json index 523313ff..d939b12b 100644 --- a/star_lock/images/lan/lan_keys.json +++ b/star_lock/images/lan/lan_keys.json @@ -742,5 +742,24 @@ "胁迫开门":"胁迫开门", "有人按门铃":"有人按门铃", "有人出现在门口":"有人出现在门口", - "提醒方式":"提醒方式" + "提醒方式":"提醒方式", + "开门方式":"开门方式", + "请选择":"请选择", + "家人":"家人", + "保存":"保存", + "APP推送":"APP推送", + "管理员":"管理员", + "未启用":"未启用", + "已启用":"已启用", + "省电模式":"省电模式", + "逗留抓拍模式":"逗留抓拍模式", + "实时监控模式":"实时监控模式", + "自定义模式":"自定义模式", + "秒":"秒", + "猫眼设置":"猫眼设置", + "猫眼工作模式":"猫眼工作模式", + "自动亮屏":"自动亮屏", + "亮屏持续时间":"亮屏持续时间", + "逗留警告":"逗留警告", + "异常警告":"异常警告" } diff --git a/star_lock/images/lan/lan_zh.json b/star_lock/images/lan/lan_zh.json index 2a4b4b53..e7e73eac 100644 --- a/star_lock/images/lan/lan_zh.json +++ b/star_lock/images/lan/lan_zh.json @@ -745,5 +745,24 @@ "有人按门铃":"有人按门铃", "有人出现在门口":"有人出现在门口", "提醒方式":"提醒方式", - "电子钥匙":"电子钥匙" + "电子钥匙":"电子钥匙", + "开门方式":"开门方式", + "请选择":"请选择", + "家人":"家人", + "保存":"保存", + "APP推送":"APP推送", + "管理员":"管理员", + "未启用":"未启用", + "已启用":"已启用", + "省电模式":"省电模式", + "逗留抓拍模式":"逗留抓拍模式", + "实时监控模式":"实时监控模式", + "自定义模式":"自定义模式", + "秒":"秒", + "猫眼设置":"猫眼设置", + "猫眼工作模式":"猫眼工作模式", + "自动亮屏":"自动亮屏", + "亮屏持续时间":"亮屏持续时间", + "逗留警告":"逗留警告", + "异常警告":"异常警告" } diff --git a/star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_logic.dart b/star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_logic.dart index b56eabfd..bfcbae3d 100644 --- a/star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_logic.dart +++ b/star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_logic.dart @@ -1,3 +1,4 @@ +import 'package:get/get.dart'; import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart'; import 'package:star_lock/main/lockDetail/lockSet/lockSet/lockSetInfo_entity.dart'; import 'package:star_lock/network/api_repository.dart'; @@ -15,7 +16,7 @@ class CatEyeSetLogic extends BaseGetXController { autoLightScreen: state.isAutoBright.value == true ? 1 : 0, ); if (entity.errorCode!.codeIsSuccessful) { - showToast('设置成功'); + showToast(state.settingSuccess); } } @@ -24,10 +25,10 @@ class CatEyeSetLogic extends BaseGetXController { var entity = await ApiRepository.to.updateLightScreenTimeConfig( lockId: state.lockSetInfoData.value.lockId!, autoLightScreenTime: - int.parse(state.selectBrightDuration.value.replaceAll('秒', '')), + int.parse(state.selectBrightDuration.value.replaceAll('秒'.tr, '')), ); if (entity.errorCode!.codeIsSuccessful) { - showToast('设置成功'); + showToast(state.settingSuccess); } } @@ -38,7 +39,7 @@ class CatEyeSetLogic extends BaseGetXController { stayWarn: state.isStayWarning.value == true ? 1 : 0, ); if (entity.errorCode!.codeIsSuccessful) { - showToast('设置成功'); + showToast(state.settingSuccess); } } @@ -49,7 +50,7 @@ class CatEyeSetLogic extends BaseGetXController { abnormalWarn: state.isExceptionWarning.value == true ? 1 : 0, ); if (entity.errorCode!.codeIsSuccessful) { - showToast('设置成功'); + showToast(state.settingSuccess); } } @@ -83,19 +84,19 @@ class CatEyeSetLogic extends BaseGetXController { if (state.lockSetInfoData.value.lockSettingInfo!.catEyeConfig![0] .catEyeMode == XSConstantMacro.catEyeWorkModePowerSaving) { - state.selectCatEyeWorkMode.value = '省电模式'; + state.selectCatEyeWorkMode.value = '省电模式'.tr; } else if (state.lockSetInfoData.value.lockSettingInfo!.catEyeConfig![0] .catEyeMode == XSConstantMacro.catEyeWorkModeStayCapture) { - state.selectCatEyeWorkMode.value = '逗留抓拍模式'; + state.selectCatEyeWorkMode.value = '逗留抓拍模式'.tr; } else if (state.lockSetInfoData.value.lockSettingInfo!.catEyeConfig![0] .catEyeMode == XSConstantMacro.catEyeWorkModeRealTimeMonitoring) { - state.selectCatEyeWorkMode.value = '实时监控模式'; + state.selectCatEyeWorkMode.value = '实时监控模式'.tr; } else if (state.lockSetInfoData.value.lockSettingInfo!.catEyeConfig![0] .catEyeMode == XSConstantMacro.catEyeWorkModeCustom) { - state.selectCatEyeWorkMode.value = '自定义模式'; + state.selectCatEyeWorkMode.value = '自定义模式'.tr; } } } diff --git a/star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_page.dart b/star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_page.dart index 763619aa..a53cae25 100644 --- a/star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_page.dart +++ b/star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_page.dart @@ -33,13 +33,13 @@ class _CatEyeSetPageState extends State { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, appBar: TitleAppBar( - barTitle: '猫眼设置', + barTitle: '猫眼设置'.tr, haveBack: true, backgroundColor: AppColors.mainColor), body: Column( children: [ Obx(() => CommonItem( - leftTitel: '猫眼工作模式', + leftTitel: '猫眼工作模式'.tr, rightTitle: state.selectCatEyeWorkMode.value, allHeight: 70.h, isHaveLine: true, @@ -58,14 +58,14 @@ class _CatEyeSetPageState extends State { }); })), Obx(() => CommonItem( - leftTitel: '自动亮屏', + leftTitel: '自动亮屏'.tr, rightTitle: "", isHaveLine: true, isHaveDirection: false, isHaveRightWidget: true, rightWidget: _otherToDoSwitch(1))), Obx(() => CommonItem( - leftTitel: '亮屏持续时间', + leftTitel: '亮屏持续时间'.tr, rightTitle: state.selectBrightDuration.value, isHaveLine: true, isHaveDirection: true, @@ -73,14 +73,14 @@ class _CatEyeSetPageState extends State { _openBottomItemSheet(); })), Obx(() => CommonItem( - leftTitel: '逗留警告', + leftTitel: '逗留警告'.tr, rightTitle: "", isHaveLine: true, isHaveRightWidget: true, rightWidget: _otherToDoSwitch(2), )), Obx(() => CommonItem( - leftTitel: '异常警告', + leftTitel: '异常警告'.tr, rightTitle: "", isHaveLine: true, isHaveRightWidget: true, diff --git a/star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_state.dart b/star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_state.dart index 2173b8f6..b1c5dd1c 100644 --- a/star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_state.dart +++ b/star_lock/lib/main/lockDetail/lockSet/catEyeSet/catEyeSet/catEyeSet_state.dart @@ -9,6 +9,7 @@ class CatEyeSetState { var isExceptionWarning = false.obs; //异常警告 var lockSetInfoData = LockSetInfoData().obs; var selectCatEyeWorkMode = ''.obs; //猫眼工作模式 + final String settingSuccess = '设置成功'.tr; CatEyeSetState() { Map map = Get.arguments; diff --git a/star_lock/lib/main/lockDetail/lockSet/liveVideo/liveVideo_logic.dart b/star_lock/lib/main/lockDetail/lockSet/liveVideo/liveVideo_logic.dart index f827690c..4de0b674 100644 --- a/star_lock/lib/main/lockDetail/lockSet/liveVideo/liveVideo_logic.dart +++ b/star_lock/lib/main/lockDetail/lockSet/liveVideo/liveVideo_logic.dart @@ -57,7 +57,7 @@ class LiveVideoLogic extends BaseGetXController { ], ); if (entity.errorCode!.codeIsSuccessful) { - showToast('设置成功'); + showToast('设置成功'.tr); Get.back(); } } diff --git a/star_lock/lib/main/lockDetail/messageWarn/addFamily/addFamily_page.dart b/star_lock/lib/main/lockDetail/messageWarn/addFamily/addFamily_page.dart index 61f12c0e..87421f30 100644 --- a/star_lock/lib/main/lockDetail/messageWarn/addFamily/addFamily_page.dart +++ b/star_lock/lib/main/lockDetail/messageWarn/addFamily/addFamily_page.dart @@ -25,7 +25,7 @@ class _AddFamilyPageState extends State { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, appBar: TitleAppBar( - barTitle: '添加家人', + barTitle: '添加家人'.tr, haveBack: true, backgroundColor: AppColors.mainColor), body: Container( @@ -33,8 +33,9 @@ class _AddFamilyPageState extends State { child: Column( children: [ Obx(() => CommonItem( - leftTitel: '开门方式', - rightTitle: state.lockUserKeys.value.currentKeyTypeStr ?? '请选择', + leftTitel: '开门方式'.tr, + rightTitle: + state.lockUserKeys.value.currentKeyTypeStr ?? '请选择'.tr, isHaveLine: true, isHaveDirection: true, action: () { @@ -48,7 +49,7 @@ class _AddFamilyPageState extends State { }); })), Obx(() => CommonItem( - leftTitel: '家人', + leftTitel: '家人'.tr, rightTitle: state.lockUserKeys.value.currentKeyName ?? '', isHaveLine: true, isHaveRightWidget: @@ -56,7 +57,7 @@ class _AddFamilyPageState extends State { ? true : false, isHaveDirection: false, - rightWidget: getFamilyWidget('请输入'), + rightWidget: getFamilyWidget('请输入'.tr), )), SizedBox( height: 20.h, @@ -67,7 +68,7 @@ class _AddFamilyPageState extends State { child: Column( children: [ CommonItem( - leftTitel: '提醒方式', + leftTitel: '提醒方式'.tr, rightTitle: "", isHaveLine: false, isHaveRightWidget: false, @@ -85,7 +86,7 @@ class _AddFamilyPageState extends State { borderRadius: BorderRadius.circular(6.0.w), ), child: Text( - 'APP推送 管理员', + '${'APP推送'.tr} ${'管理员'.tr}', style: TextStyle(color: Colors.black, fontSize: 20.sp), ), ) @@ -97,7 +98,7 @@ class _AddFamilyPageState extends State { height: 40.h, )), SubmitBtn( - btnName: '保存', + btnName: '保存'.tr, isDisabled: false, onClick: () {}, ), diff --git a/star_lock/lib/main/lockDetail/messageWarn/lockUser/lockUser_page.dart b/star_lock/lib/main/lockDetail/messageWarn/lockUser/lockUser_page.dart index 9ee4e406..1d8af4f9 100644 --- a/star_lock/lib/main/lockDetail/messageWarn/lockUser/lockUser_page.dart +++ b/star_lock/lib/main/lockDetail/messageWarn/lockUser/lockUser_page.dart @@ -119,7 +119,7 @@ class _LockUserPageState extends State { // mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - lockUserKeys.currentKeyName ?? '未知', + lockUserKeys.currentKeyName ?? '', style: TextStyle( fontSize: 24.sp, color: AppColors.blackColor), ), diff --git a/star_lock/lib/main/lockDetail/messageWarn/msgNotification/msgNotification/msgNotification_logic.dart b/star_lock/lib/main/lockDetail/messageWarn/msgNotification/msgNotification/msgNotification_logic.dart index 5beac582..96ad0e36 100644 --- a/star_lock/lib/main/lockDetail/messageWarn/msgNotification/msgNotification/msgNotification_logic.dart +++ b/star_lock/lib/main/lockDetail/messageWarn/msgNotification/msgNotification/msgNotification_logic.dart @@ -13,14 +13,16 @@ class MsgNotificationLogic extends BaseGetXController { ); if (entity.errorCode!.codeIsSuccessful) { state.msgNoticeInfo.value = entity.data!; - state.nDaysNotOpenDoor.value = - entity.data!.dayNotOpenDoorState! == 0 ? '未启用' : '已启用'; //N天未开门 + state.nDaysNotOpenDoor.value = entity.data!.dayNotOpenDoorState! == 0 + ? state.notifyDisable + : state.notifyEnable; //N天未开门 state.isDoorNotShut.value = entity.data!.doorNotCloseState! == 0 ? false : true; //门未关好 state.isTamperAlarm.value = entity.data!.tamperAlarmState! == 0 ? false : true; //防拆报警 - state.isLowBattery.value = - entity.data!.lowElecNoticeState! == 0 ? '未启用' : '已启用'; //低电量提醒 + state.isLowBattery.value = entity.data!.lowElecNoticeState! == 0 + ? state.notifyDisable + : state.notifyEnable; //低电量提醒 state.isSomeoneRing.value = entity.data!.doorbellNoticeState! == 0 ? false : true; //有人按门铃 state.isSomeoneAppeared.value = @@ -36,7 +38,7 @@ class MsgNotificationLogic extends BaseGetXController { doorNotCloseState: state.isDoorNotShut.value ? 1 : 0, ); if (entity.errorCode!.codeIsSuccessful) { - showToast('设置成功'); + showToast(state.settingSuccess); } } @@ -48,7 +50,7 @@ class MsgNotificationLogic extends BaseGetXController { doorbellNoticeState: state.isSomeoneRing.value ? 1 : 0, ); if (entity.errorCode!.codeIsSuccessful) { - showToast('设置成功'); + showToast(state.settingSuccess); } } @@ -60,7 +62,7 @@ class MsgNotificationLogic extends BaseGetXController { someoneAtDoorNoticeState: state.isSomeoneAppeared.value ? 1 : 0, ); if (entity.errorCode!.codeIsSuccessful) { - showToast('设置成功'); + showToast(state.settingSuccess); } } @@ -72,7 +74,7 @@ class MsgNotificationLogic extends BaseGetXController { tamperAlarmState: state.isTamperAlarm.value ? 1 : 0, ); if (entity.errorCode!.codeIsSuccessful) { - showToast('设置成功'); + showToast(state.settingSuccess); } } } diff --git a/star_lock/lib/main/lockDetail/messageWarn/msgNotification/msgNotification/msgNotification_state.dart b/star_lock/lib/main/lockDetail/messageWarn/msgNotification/msgNotification/msgNotification_state.dart index 11e61d47..41c6ae1e 100644 --- a/star_lock/lib/main/lockDetail/messageWarn/msgNotification/msgNotification/msgNotification_state.dart +++ b/star_lock/lib/main/lockDetail/messageWarn/msgNotification/msgNotification/msgNotification_state.dart @@ -12,11 +12,17 @@ class MsgNotificationState { var isDoorNotShut = false.obs; //门未关好 var isSomeoneRing = false.obs; //有人按门铃 var isSomeoneAppeared = false.obs; //有人出现在门口 + final String notifyEnable = '已启用'.tr; + final String notifyDisable = '未启用'.tr; + final String settingSuccess = '设置成功'.tr; MsgNotificationState() { Map map = Get.arguments; if (map['lockId'] != null) { getLockId.value = map['lockId']; } + + nDaysNotOpenDoor.value = notifyEnable; + isLowBattery.value = notifyEnable; } }