添加部分国际化
This commit is contained in:
parent
4a6a4077af
commit
d36f170889
@ -685,6 +685,8 @@
|
||||
"近距离": "Short distance",
|
||||
"锁时间更新成功": "Lock time update success",
|
||||
"锁用户": "Lock user",
|
||||
"请选择常开日期": "Please select the open date",
|
||||
"结束时间不能小于开始时间哦": "The end time cannot be less than the start time",
|
||||
|
||||
"相机": "camera",
|
||||
"相册": "photos",
|
||||
|
||||
@ -684,6 +684,8 @@
|
||||
"近距离": "近距离",
|
||||
"锁时间更新成功": "锁时间更新成功",
|
||||
"锁用户": "锁用户",
|
||||
"请选择常开日期": "请选择常开日期",
|
||||
"结束时间不能小于开始时间哦": "结束时间不能小于开始时间哦",
|
||||
|
||||
"相机": "相机",
|
||||
"相册": "相册",
|
||||
|
||||
@ -686,6 +686,8 @@
|
||||
"近距离": "近距离",
|
||||
"锁时间更新成功": "锁时间更新成功",
|
||||
"锁用户": "锁用户",
|
||||
"请选择常开日期": "请选择常开日期",
|
||||
"结束时间不能小于开始时间哦": "结束时间不能小于开始时间哦",
|
||||
|
||||
"相机": "相机",
|
||||
"相册": "相册",
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
|
||||
import '../../../../network/api_repository.dart';
|
||||
@ -19,7 +20,7 @@ class MarkedHouseStateLogic extends BaseGetXController{
|
||||
|
||||
state.lockSetInfoData.value.lockStatus!.roomStatus = state.roomStatus.value;
|
||||
eventBus.fire(PassCurrentLockInformationEvent(state.lockSetInfoData.value));
|
||||
showToast("操作成功");
|
||||
showToast("操作成功".tr);
|
||||
}else if(entity.errorCode! == 1){
|
||||
// 跳转到高级功能界面 需要开通高级功能
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ import 'dart:async';
|
||||
// import 'package:flutter_reactive_ble/flutter_reactive_ble.dart';
|
||||
|
||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../../blue/blue_manage.dart';
|
||||
import '../../../../blue/io_protocol/io_setSupportFunctionsNoParameters.dart';
|
||||
@ -30,7 +31,7 @@ class MotorPowerLogic extends BaseGetXController {
|
||||
|
||||
state.lockSetInfoData.value.lockSettingInfo!.openDirectionValue = state.motorTorsion.value;
|
||||
eventBus.fire(PassCurrentLockInformationEvent(state.lockSetInfoData.value));
|
||||
showToast("操作成功");
|
||||
showToast("操作成功".tr);
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,29 +83,25 @@ class MotorPowerLogic extends BaseGetXController {
|
||||
int status = reply.data[2];
|
||||
switch(status){
|
||||
case 0x00:
|
||||
//成功
|
||||
print("${reply.commandType}数据解析成功");
|
||||
//成功
|
||||
Get.log("${reply.commandType}数据解析成功");
|
||||
_setLockSetGeneralSetting();
|
||||
break;
|
||||
case 0x06:
|
||||
//无权限
|
||||
print("${reply.commandType}需要鉴权");
|
||||
|
||||
//无权限
|
||||
Get.log("${reply.commandType}需要鉴权");
|
||||
break;
|
||||
case 0x07:
|
||||
//无权限
|
||||
print("${reply.commandType}用户无权限");
|
||||
|
||||
//无权限
|
||||
Get.log("${reply.commandType}用户无权限");
|
||||
break;
|
||||
case 0x09:
|
||||
// 权限校验错误
|
||||
print("${reply.commandType}权限校验错误");
|
||||
|
||||
// 权限校验错误
|
||||
Get.log("${reply.commandType}权限校验错误");
|
||||
break;
|
||||
default:
|
||||
//失败
|
||||
print("${reply.commandType}失败");
|
||||
|
||||
//失败
|
||||
Get.log("${reply.commandType}失败");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -166,7 +163,6 @@ class MotorPowerLogic extends BaseGetXController {
|
||||
void onReady() {
|
||||
// TODO: implement onReady
|
||||
super.onReady();
|
||||
print("onReady()");
|
||||
|
||||
_initReplySubscription();
|
||||
}
|
||||
@ -175,7 +171,6 @@ class MotorPowerLogic extends BaseGetXController {
|
||||
void onInit() {
|
||||
// TODO: implement onInit
|
||||
super.onInit();
|
||||
print("onInit()");
|
||||
|
||||
_readSupportFunctionsNoParameters();
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
|
||||
import '../../../../blue/blue_manage.dart';
|
||||
@ -21,12 +22,12 @@ class NormallyOpenModeLogic extends BaseGetXController{
|
||||
// 配置锁的常开模式设置
|
||||
void configPassageMode() async{
|
||||
if(state.weekDays.value.isEmpty){
|
||||
showToast("请选择常开日期");
|
||||
showToast("请选择常开日期".tr);
|
||||
return;
|
||||
}
|
||||
|
||||
if(state.endTimeMinute.value < state.beginTimeMinute.value){
|
||||
showToast("结束时间不能小于开始时间哦");
|
||||
showToast("结束时间不能小于开始时间哦".tr);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -46,7 +47,7 @@ class NormallyOpenModeLogic extends BaseGetXController{
|
||||
passageModeConfig: passageModeConfig,
|
||||
);
|
||||
if(entity.errorCode!.codeIsSuccessful){
|
||||
showToast("操作成功", something: (){
|
||||
showToast("操作成功".tr, something: (){
|
||||
eventBus.fire(RefreshLockListInfoDataEvent());
|
||||
|
||||
state.lockSetInfoData.value.lockSettingInfo!.passageMode = state.isOpenNormallyOpenMode.value == true ? 1:0;
|
||||
@ -109,32 +110,28 @@ class NormallyOpenModeLogic extends BaseGetXController{
|
||||
int status = reply.data[2];
|
||||
switch(status){
|
||||
case 0x00:
|
||||
//成功
|
||||
print("${reply.commandType}数据解析成功");
|
||||
//成功
|
||||
Get.log("${reply.commandType}数据解析成功");
|
||||
state.sureBtnState.value = 0;
|
||||
cancelBlueConnetctToastTimer();
|
||||
dismissEasyLoading();
|
||||
configPassageMode();
|
||||
break;
|
||||
case 0x06:
|
||||
//无权限
|
||||
print("${reply.commandType}需要鉴权");
|
||||
|
||||
//无权限
|
||||
Get.log("${reply.commandType}需要鉴权");
|
||||
break;
|
||||
case 0x07:
|
||||
//无权限
|
||||
print("${reply.commandType}用户无权限");
|
||||
|
||||
//无权限
|
||||
Get.log("${reply.commandType}用户无权限");
|
||||
break;
|
||||
case 0x09:
|
||||
// 权限校验错误
|
||||
print("${reply.commandType}权限校验错误");
|
||||
|
||||
// 权限校验错误
|
||||
Get.log("${reply.commandType}权限校验错误");
|
||||
break;
|
||||
default:
|
||||
//失败
|
||||
print("${reply.commandType}失败");
|
||||
|
||||
//失败
|
||||
Get.log("${reply.commandType}失败");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -167,7 +164,6 @@ class NormallyOpenModeLogic extends BaseGetXController{
|
||||
int index = day % 7; // 将周日的索引转换为 0
|
||||
weekStr = '${weekStr.substring(0, index)}1${weekStr.substring(index + 1)}';
|
||||
}
|
||||
// print("weekStrweekStrweekStr:$weekStr");
|
||||
int number = int.parse(weekStr, radix: 2);
|
||||
|
||||
List<int> list = [];
|
||||
@ -187,12 +183,10 @@ class NormallyOpenModeLogic extends BaseGetXController{
|
||||
int end2 = endTime % 256;
|
||||
list.add(end1);
|
||||
list.add(end2);
|
||||
// list.add(state.endTimeMinute.value);
|
||||
|
||||
list.add(state.isAllDay.value == 1 ? 1:0);
|
||||
list.add(number);
|
||||
list.add(0);
|
||||
// print("listlistlistlist:$list");
|
||||
|
||||
IoSenderManage.setSupportFunctionsWithParametersCommand(
|
||||
keyID: state.lockSetInfoData.value.lockBasicInfo!.keyId.toString(),
|
||||
@ -219,7 +213,6 @@ class NormallyOpenModeLogic extends BaseGetXController{
|
||||
void onReady() {
|
||||
// TODO: implement onReady
|
||||
super.onReady();
|
||||
print("onReady()");
|
||||
|
||||
_initReplySubscription();
|
||||
}
|
||||
@ -228,7 +221,6 @@ class NormallyOpenModeLogic extends BaseGetXController{
|
||||
void onInit() {
|
||||
// TODO: implement onInit
|
||||
super.onInit();
|
||||
print("onInit()");
|
||||
|
||||
// _readSupportFunctionsWithParameters();
|
||||
}
|
||||
|
||||
@ -341,14 +341,14 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> with RouteA
|
||||
// TODO: implement didChangeDependencies
|
||||
super.didChangeDependencies();
|
||||
|
||||
/// 路由订阅
|
||||
// 路由订阅
|
||||
AppRouteObserver().routeObserver.subscribe(this, ModalRoute.of(context)!);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
/// 取消路由订阅
|
||||
// 取消路由订阅
|
||||
AppRouteObserver().routeObserver.unsubscribe(this);
|
||||
super.dispose();
|
||||
}
|
||||
@ -357,7 +357,6 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> with RouteA
|
||||
@override
|
||||
void didPush() {
|
||||
super.didPush();
|
||||
print("lockSet===didPush");
|
||||
state.ifCurrentScreen.value = true;
|
||||
}
|
||||
|
||||
@ -365,7 +364,6 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> with RouteA
|
||||
@override
|
||||
void didPop() {
|
||||
super.didPop();
|
||||
print("lockSet===didPop");
|
||||
logic.cancelBlueConnetctToastTimer();
|
||||
if (EasyLoading.isShow) EasyLoading.dismiss(animation: true);
|
||||
BlueManage().stopScan();
|
||||
@ -377,7 +375,6 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> with RouteA
|
||||
@override
|
||||
void didPopNext() {
|
||||
super.didPopNext();
|
||||
print("lockSet===didPopNext");
|
||||
state.ifCurrentScreen.value = true;
|
||||
}
|
||||
|
||||
@ -385,7 +382,6 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> with RouteA
|
||||
@override
|
||||
void didPushNext() {
|
||||
super.didPushNext();
|
||||
print("lockSet===didPushNext");
|
||||
logic.cancelBlueConnetctToastTimer();
|
||||
if (EasyLoading.isShow) EasyLoading.dismiss(animation: true);
|
||||
BlueManage().stopScan();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user