fix: 修改国际化bug
This commit is contained in:
parent
03cb9c9451
commit
38f5f429e4
@ -1088,5 +1088,6 @@
|
||||
"购买记录": "Purchase record",
|
||||
"使用记录": "User Record",
|
||||
|
||||
"失效时间要大于当前时间": "The expiration time must be longer than the current time"
|
||||
"失效时间要大于当前时间": "The expiration time must be longer than the current time",
|
||||
"修改名字": "Edit name"
|
||||
}
|
||||
|
||||
@ -583,7 +583,7 @@
|
||||
"虹膜": "Iiris",
|
||||
"手掌": "Palmi",
|
||||
"商城": "Kaubamaja",
|
||||
"我的": "Minu...",
|
||||
"我的": "Minu",
|
||||
"微信公众号推送": "Jutt avalik konto",
|
||||
"开启微信接收报警消息需要先关注斯凯智能锁微信公众号,请保存二维码并使用微信扫一扫设置": "Et avada häiresõnumite vastuvõtmiseks, peate esmalt tähelepanu Skye Smart Locki avalikule kontole, palun salvesta QR koodi ja kasuta seadistuste skaneerimiseks",
|
||||
"蓝牙": "BluetoothName",
|
||||
|
||||
@ -583,7 +583,7 @@
|
||||
"虹膜": "Iiris",
|
||||
"手掌": "Palmu",
|
||||
"商城": "Ostoskeskus",
|
||||
"我的": "Minun...",
|
||||
"我的": "Minun",
|
||||
"微信公众号推送": "Keskustele julkinen tili",
|
||||
"开启微信接收报警消息需要先关注斯凯智能锁微信公众号,请保存二维码并使用微信扫一扫设置": "Voidakseen avata keskustelua hälytysviestien vastaanottamiseksi sinun on kiinnitettävä huomiota Skye Smart Lockin julkiseen keskusteluun. Tallenna QR-koodi ja käytä keskustelua asetusten kartoittamiseen",
|
||||
"蓝牙": "BluetoothName",
|
||||
|
||||
@ -1088,5 +1088,6 @@
|
||||
"购买记录": "购买记录",
|
||||
"使用记录": "使用记录",
|
||||
|
||||
"失效时间要大于当前时间": "失效时间要大于当前时间"
|
||||
"失效时间要大于当前时间": "失效时间要大于当前时间",
|
||||
"修改名字": "修改名字"
|
||||
}
|
||||
|
||||
@ -1088,5 +1088,6 @@
|
||||
"购买记录": "购买记录",
|
||||
"使用记录": "使用记录",
|
||||
|
||||
"失效时间要大于当前时间": "失效时间要大于当前时间"
|
||||
"失效时间要大于当前时间": "失效时间要大于当前时间",
|
||||
"修改名字": "修改名字"
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import '../app_settings/app_settings.dart';
|
||||
@ -31,7 +30,9 @@ class CommandSenderManager {
|
||||
List<int> dataBeforeAddTheUser = <int>[];
|
||||
void _initLockAddUserSucceedEvent() {
|
||||
// 蓝牙协议通知传输跟蓝牙之外的数据传输类不一样 eventBus
|
||||
_passCurrentLockInformationEvent = eventBus.on<LockAddUserSucceedEvent>().listen((LockAddUserSucceedEvent event) {
|
||||
_passCurrentLockInformationEvent = eventBus
|
||||
.on<LockAddUserSucceedEvent>()
|
||||
.listen((LockAddUserSucceedEvent event) {
|
||||
if (event.type == 0) {
|
||||
sendNormalData(dataBeforeAddTheUser);
|
||||
} else {
|
||||
@ -44,7 +45,8 @@ class CommandSenderManager {
|
||||
List<int> dataTransferSmartLock = <int>[];
|
||||
void _initTransferSmartLockSucceedEvent() {
|
||||
// 蓝牙协议通知传输跟蓝牙之外的数据传输类不一样 eventBus
|
||||
_transferSmartLockEvent = eventBus.on<LockInitUserNoEvent>().listen((LockInitUserNoEvent event) {
|
||||
_transferSmartLockEvent =
|
||||
eventBus.on<LockInitUserNoEvent>().listen((LockInitUserNoEvent event) {
|
||||
sendNormalData(dataTransferSmartLock);
|
||||
});
|
||||
}
|
||||
@ -69,8 +71,9 @@ class CommandSenderManager {
|
||||
sendNormalData(value);
|
||||
} else {
|
||||
// 当前锁被转移了 需要更新锁的userid 调用转移锁协议
|
||||
if(CommonDataManage().initUserNo == 1){
|
||||
final List<int> entity = await SenderBeforeDataManage().getTransferSmartLockData();
|
||||
if (CommonDataManage().initUserNo == 1) {
|
||||
final List<int> entity =
|
||||
await SenderBeforeDataManage().getTransferSmartLockData();
|
||||
sendNormalData(entity);
|
||||
dataTransferSmartLock = value;
|
||||
return;
|
||||
@ -78,7 +81,8 @@ class CommandSenderManager {
|
||||
// 添加用户之后调用协议就要判断是否添加用户
|
||||
if (CommonDataManage().currentLockUserNo == 0) {
|
||||
// 如果LockUserNo为0,先添加用户
|
||||
final List<int> entity = await SenderBeforeDataManage().getAddUserKeyData();
|
||||
final List<int> entity =
|
||||
await SenderBeforeDataManage().getAddUserKeyData();
|
||||
sendNormalData(entity);
|
||||
dataBeforeAddTheUser = value;
|
||||
} else {
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@ -37,8 +36,7 @@ class _CheckingInSetPageState extends State<CheckingInSetPage> {
|
||||
body: Column(
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel:
|
||||
'公司名称'.tr,
|
||||
leftTitel: '公司名称'.tr,
|
||||
rightTitle: state.companyName.value ?? '',
|
||||
// isHaveRightWidget: true,
|
||||
// rightWidget: getTFWidget(),
|
||||
@ -53,44 +51,52 @@ class _CheckingInSetPageState extends State<CheckingInSetPage> {
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Get.toNamed(Routers.checkingInStaffManagePage, arguments: <String, Object>{
|
||||
'getKeyInfosData': state.getKeyInfosData.value,
|
||||
'companyId': state.companyId.value
|
||||
});
|
||||
Get.toNamed(Routers.checkingInStaffManagePage,
|
||||
arguments: <String, Object>{
|
||||
'getKeyInfosData': state.getKeyInfosData.value,
|
||||
'companyId': state.companyId.value
|
||||
});
|
||||
})),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: '工作时间'.tr,
|
||||
rightTitle: (state.beginTime.value.isNotEmpty) ? '${state.beginTime.value} - ${state.endTime.value}' : '',
|
||||
rightTitle: (state.beginTime.value.isNotEmpty)
|
||||
? '${state.beginTime.value} - ${state.endTime.value}'
|
||||
: '',
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () async {
|
||||
var data = await Get.toNamed(Routers.checkingInSetWorkTimePage, arguments: <String, Object>{
|
||||
// "getKeyInfosData": state.getKeyInfosData.value,
|
||||
'companyId': state.companyId.value,
|
||||
'pushType': '2',
|
||||
'checkingInSetInfo': state.checkingInSetInfo.value,
|
||||
});
|
||||
if(data != null) {
|
||||
var data = await Get.toNamed(Routers.checkingInSetWorkTimePage,
|
||||
arguments: <String, Object>{
|
||||
// "getKeyInfosData": state.getKeyInfosData.value,
|
||||
'companyId': state.companyId.value,
|
||||
'pushType': '2',
|
||||
'checkingInSetInfo': state.checkingInSetInfo.value,
|
||||
});
|
||||
if (data != null) {
|
||||
setState(logic.getCheckInSetInfoData);
|
||||
}
|
||||
})),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: '工作日设置'.tr,
|
||||
rightTitle: state.isCustom.value == true ? state.weekDaysStr.value : (state.weekDays.value.length == 6 ? '单休' : '双休'),
|
||||
rightTitle: state.isCustom.value == true
|
||||
? state.weekDaysStr.value
|
||||
: (state.weekDays.value.length == 6 ? '单休'.tr : '双休'.tr),
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () async {
|
||||
var data = await Get.toNamed(Routers.checkingInSetWorkdaySet, arguments: <String, Object>{
|
||||
'getKeyInfosData': state.getKeyInfosData.value,
|
||||
'companyId': state.companyId.value,
|
||||
'pushType': '2',
|
||||
'checkingInSetInfo': state.checkingInSetInfo.value,
|
||||
});
|
||||
if(data != null) {
|
||||
var data = await Get.toNamed(Routers.checkingInSetWorkdaySet,
|
||||
arguments: <String, Object>{
|
||||
'getKeyInfosData': state.getKeyInfosData.value,
|
||||
'companyId': state.companyId.value,
|
||||
'pushType': '2',
|
||||
'checkingInSetInfo': state.checkingInSetInfo.value,
|
||||
});
|
||||
if (data != null) {
|
||||
state.isCustom.value = data['attendanceType'];
|
||||
state.weekDays.value = data['weekDays'];
|
||||
state.weekDaysStr.value = state.weekDays.join(',');
|
||||
AppLog.log('state.weekDays.value:${state.weekDays.value} state.weekDaysStr.value:${state.weekDaysStr.value}');
|
||||
AppLog.log(
|
||||
'state.weekDays.value:${state.weekDays.value} state.weekDaysStr.value:${state.weekDaysStr.value}');
|
||||
setState(() {});
|
||||
}
|
||||
})),
|
||||
@ -100,9 +106,10 @@ class _CheckingInSetPageState extends State<CheckingInSetPage> {
|
||||
isHaveLine: false,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Get.toNamed(Routers.checkingInSetHolidaysPage, arguments: <String, String>{
|
||||
'companyId': state.companyId.value
|
||||
});
|
||||
Get.toNamed(Routers.checkingInSetHolidaysPage,
|
||||
arguments: <String, String>{
|
||||
'companyId': state.companyId.value
|
||||
});
|
||||
}),
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
@ -117,7 +124,8 @@ class _CheckingInSetPageState extends State<CheckingInSetPage> {
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w),
|
||||
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
|
||||
onClick: () {
|
||||
ShowTipView().showIosTipWithContentDialog('是否删除?'.tr, logic.deletCompanyData);
|
||||
ShowTipView().showIosTipWithContentDialog(
|
||||
'是否删除?'.tr, logic.deletCompanyData);
|
||||
// showDeletCompanyAlertDialog(context);
|
||||
}),
|
||||
),
|
||||
@ -135,14 +143,14 @@ class _CheckingInSetPageState extends State<CheckingInSetPage> {
|
||||
tipTitle: '',
|
||||
controller: state.changeNameController,
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
LengthLimitingTextInputFormatter(30),
|
||||
LengthLimitingTextInputFormatter(30),
|
||||
],
|
||||
sureClick: () {
|
||||
if(state.changeNameController.text.isEmpty){
|
||||
if (state.changeNameController.text.isEmpty) {
|
||||
logic.showToast('请输入公司名字'.tr);
|
||||
return;
|
||||
}
|
||||
if(state.changeNameController.text.length <6){
|
||||
if (state.changeNameController.text.length < 6) {
|
||||
logic.showToast('公司名字长度不能小于 6 '.tr);
|
||||
return;
|
||||
}
|
||||
@ -151,7 +159,8 @@ class _CheckingInSetPageState extends State<CheckingInSetPage> {
|
||||
},
|
||||
cancelClick: () {
|
||||
Get.back();
|
||||
},);
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@ -175,7 +184,8 @@ class _CheckingInSetPageState extends State<CheckingInSetPage> {
|
||||
FilteringTextInputFormatter.deny('\n'),
|
||||
LengthLimitingTextInputFormatter(30),
|
||||
],
|
||||
style: TextStyle(fontSize: 22.sp, color: AppColors.darkGrayTextColor),
|
||||
style: TextStyle(
|
||||
fontSize: 22.sp, color: AppColors.darkGrayTextColor),
|
||||
controller: state.nameController,
|
||||
autofocus: false,
|
||||
enabled: false,
|
||||
@ -185,10 +195,18 @@ class _CheckingInSetPageState extends State<CheckingInSetPage> {
|
||||
// contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
|
||||
// hintText: state.companyName.value ?? "",
|
||||
hintStyle: TextStyle(fontSize: 22.sp),
|
||||
focusedBorder: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)),
|
||||
disabledBorder: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)),
|
||||
enabledBorder: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)),
|
||||
border: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)),
|
||||
focusedBorder: const OutlineInputBorder(
|
||||
borderSide:
|
||||
BorderSide(width: 0, color: Colors.transparent)),
|
||||
disabledBorder: const OutlineInputBorder(
|
||||
borderSide:
|
||||
BorderSide(width: 0, color: Colors.transparent)),
|
||||
enabledBorder: const OutlineInputBorder(
|
||||
borderSide:
|
||||
BorderSide(width: 0, color: Colors.transparent)),
|
||||
border: const OutlineInputBorder(
|
||||
borderSide:
|
||||
BorderSide(width: 0, color: Colors.transparent)),
|
||||
contentPadding: const EdgeInsets.symmetric(vertical: 0),
|
||||
),
|
||||
),
|
||||
@ -200,5 +218,4 @@ class _CheckingInSetPageState extends State<CheckingInSetPage> {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -6,7 +5,6 @@ import 'package:star_lock/app_settings/app_colors.dart';
|
||||
import 'package:star_lock/main/lockDetail/lockSet/lockSet/lockSetInfo_entity.dart';
|
||||
|
||||
class FaceUnlockState {
|
||||
|
||||
FaceUnlockState() {
|
||||
Map map = Get.arguments;
|
||||
if (map['lockSetInfoData'] != null) {
|
||||
@ -14,25 +12,26 @@ class FaceUnlockState {
|
||||
faceOn.value = lockSetInfoData.value.lockSettingInfo!.faceSwitch != 0;
|
||||
// autoBright.value = lockSetInfoData.value.lockSettingInfo!.faceAutoLightScreen != 0;
|
||||
|
||||
switch(lockSetInfoData.value.lockSettingInfo!.faceInductionDistance!){
|
||||
switch (lockSetInfoData.value.lockSettingInfo!.faceInductionDistance!) {
|
||||
case 1:
|
||||
senseDistance.value = '近距离';
|
||||
senseDistance.value = '近距离'.tr;
|
||||
break;
|
||||
case 2:
|
||||
senseDistance.value = '中距离';
|
||||
senseDistance.value = '中距离'.tr;
|
||||
break;
|
||||
case 3:
|
||||
senseDistance.value = '远距离'.tr;
|
||||
break;
|
||||
case 0:
|
||||
senseDistance.value = '关闭';
|
||||
senseDistance.value = '关闭'.tr;
|
||||
break;
|
||||
}
|
||||
|
||||
antiMisoperation.value = lockSetInfoData.value.lockSettingInfo!.faceEnErrUnlock!;
|
||||
antiMisoperation.value =
|
||||
lockSetInfoData.value.lockSettingInfo!.faceEnErrUnlock!;
|
||||
}
|
||||
|
||||
for(int i = 0; i < 31; i++) {
|
||||
for (int i = 0; i < 31; i++) {
|
||||
antiMisoperationStrList.add(i.toString() + '秒'.tr);
|
||||
}
|
||||
}
|
||||
@ -43,12 +42,8 @@ class FaceUnlockState {
|
||||
// RxBool autoBright = false.obs; //自动亮屏
|
||||
RxString senseDistance = '远距离'.tr.obs; //感应距离
|
||||
RxInt antiMisoperation = 0.obs; //防误开
|
||||
RxList<String> senseDistanceList = <String>[
|
||||
'远距离'.tr,
|
||||
'中距离'.tr,
|
||||
'近距离'.tr,
|
||||
'关闭'.tr
|
||||
].obs;
|
||||
RxList<String> senseDistanceList =
|
||||
<String>['远距离'.tr, '中距离'.tr, '近距离'.tr, '关闭'.tr].obs;
|
||||
// RxList<int> antiMisoperationList = <int>[0, 5, 10, 15, 30, 60].obs;
|
||||
RxList<String> antiMisoperationStrList = <String>[].obs;
|
||||
|
||||
@ -62,12 +57,8 @@ class FaceUnlockState {
|
||||
TextStyle(color: AppColors.placeholderTextColor, fontSize: 22.sp);
|
||||
|
||||
late InlineSpan tipsPreviewSpan = TextSpan(children: <InlineSpan>[
|
||||
TextSpan(
|
||||
text: '${"添加和使用面容开锁时".tr}:\n',
|
||||
style: titleStyle),
|
||||
TextSpan(
|
||||
text: '添加和使用面容开锁时提示'.tr,
|
||||
style: subTipsStyle),
|
||||
TextSpan(text: '${"添加和使用面容开锁时".tr}:\n', style: titleStyle),
|
||||
TextSpan(text: '添加和使用面容开锁时提示'.tr, style: subTipsStyle),
|
||||
]);
|
||||
|
||||
RxBool ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user