国际化--文字.tr
This commit is contained in:
parent
96f0bf7623
commit
1cd149aff7
@ -98,7 +98,7 @@ abstract class Reply {
|
||||
case 0x10:
|
||||
// 密码失效
|
||||
AppLog.log('$logTag ${commandType!.typeName} 0x11 密码失效');
|
||||
showErrorMessage('密码失效');
|
||||
showErrorMessage('密码失效'.tr);
|
||||
break;
|
||||
case 0x11:
|
||||
// 无效指令
|
||||
|
||||
@ -279,7 +279,7 @@ class _SafetyVerificationPageState extends State<SafetyVerificationPage> with Ti
|
||||
child: Text(
|
||||
_checkSuccess
|
||||
? '${(_checkMilliseconds / (60.0 * 12)).toStringAsFixed(2)}s${'验证成功'.tr}'
|
||||
: '验证失败',
|
||||
: '验证失败'.tr,
|
||||
style: const TextStyle(color: Colors.white),
|
||||
),
|
||||
),
|
||||
|
||||
@ -95,10 +95,10 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
|
||||
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),
|
||||
|
||||
@ -776,10 +776,10 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
List<Widget> initBottomSheetList() {
|
||||
final List<Widget> widgetList = <Widget>[];
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@ -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: <String, Object>{
|
||||
'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: <String, Object>{
|
||||
'starDate':state.starDateTimestamp.value.toString(),
|
||||
|
||||
@ -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<WeekCalendarView> {
|
||||
children: [
|
||||
Text(
|
||||
[
|
||||
'简写周日',
|
||||
'简写周一',
|
||||
'简写周二',
|
||||
'简写周三',
|
||||
'简写周四',
|
||||
'简写周五',
|
||||
'简写周六'
|
||||
'简写周日'.tr,
|
||||
'简写周一'.tr,
|
||||
'简写周二'.tr,
|
||||
'简写周三'.tr,
|
||||
'简写周四'.tr,
|
||||
'简写周五'.tr,
|
||||
'简写周六'.tr
|
||||
][index]
|
||||
.tr,
|
||||
style: TextStyle(
|
||||
|
||||
@ -120,7 +120,7 @@ class _MassSendReceiverCellState extends State<MassSendReceiverCell> {
|
||||
if (text.trim() == '') {
|
||||
errorTxt.value = '请输入姓名'.tr;
|
||||
} else if (text.length > 50) {
|
||||
errorTxt.value = '姓名长度不能超过50个字符哦';
|
||||
errorTxt.value = '姓名长度不能超过50个字符哦'.tr;
|
||||
}
|
||||
}),
|
||||
],
|
||||
|
||||
@ -35,7 +35,7 @@ class SendEmailNotificationState {
|
||||
Rx<EmailNotificationItem> 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:密码
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ class _LiveVideoPageState extends State<LiveVideoPage> {
|
||||
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<LiveVideoPage> {
|
||||
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),
|
||||
],
|
||||
)));
|
||||
}
|
||||
|
||||
@ -116,10 +116,10 @@ class CatEyeSetLogic extends BaseGetXController {
|
||||
break;
|
||||
case 0x06:
|
||||
//无权限
|
||||
showToast('无权限');
|
||||
showToast('无权限'.tr);
|
||||
break;
|
||||
default:
|
||||
showToast('修改失败');
|
||||
showToast('修改失败'.tr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -64,12 +64,12 @@ class _LiveVideoPageState extends State<LiveVideoPage> {
|
||||
height: 86.h,
|
||||
),
|
||||
_buildTipsView(
|
||||
'发生事件时查看\n', '仅当门锁发生事件或有人按门铃时,才能在门锁首页查看实时画面。', 0),
|
||||
'${'发生事件时查看'.tr}\n', '仅当门锁发生事件或有人按门铃时,才能在门锁首页查看实时画面。'.tr, 0),
|
||||
SizedBox(
|
||||
height: 16.h,
|
||||
),
|
||||
_buildTipsView('实时查看\n',
|
||||
'指定时问内,无论门锁是否发生安全事件或有人按门铃,都能在门锁首页随时查看实时画面;电池续航时问将会缩短。', 1),
|
||||
_buildTipsView('${'实时查看'.tr}\n',
|
||||
'指定时问内,无论门锁是否发生安全事件或有人按门铃,都能在门锁首页随时查看实时画面;电池续航时问将会缩短。'.tr, 1),
|
||||
],
|
||||
)));
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -19,9 +19,9 @@ class MsgNotificationState {
|
||||
Rx<MsgNoticeData> 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; //有人按门铃
|
||||
|
||||
@ -183,7 +183,7 @@ class _NDaysUnopenedPageState extends State<NDaysUnopenedPage> {
|
||||
data: dataList,
|
||||
pickerStyle: DefaultPickerStyle(), onConfirm: (p, int position) {
|
||||
state.unOpenDoorTime.value =
|
||||
int.parse(state.unopenDoorTimeList[position].replaceAll('天', ''));
|
||||
int.parse(state.unopenDoorTimeList[position].replaceAll('天'.tr, ''));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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小时内使用一次,否则将失效
|
||||
|
||||
@ -265,7 +265,7 @@ class _RealTimePicturePageState extends State<RealTimePicturePage> with TickerPr
|
||||
Get.back();
|
||||
}),
|
||||
bottomBtnItemWidget('images/main/icon_lockDetail_monitoringUnlock.png',
|
||||
'开锁', AppColors.mainColor, () {
|
||||
'开锁'.tr, AppColors.mainColor, () {
|
||||
logic.showToast('监视中暂不能开锁'.tr);
|
||||
/*
|
||||
showDeletPasswordAlertDialog(context);
|
||||
|
||||
@ -292,7 +292,7 @@ class _EditVideoLogPageState extends State<EditVideoLogPage> {
|
||||
// 'downloadVideoLogList': state.selectVideoLogList.value
|
||||
// });
|
||||
} else {
|
||||
logic.showToast('请选择要下载的视频');
|
||||
logic.showToast('请选择要下载的视频'.tr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -267,7 +267,7 @@ class _VideoLogPageState extends State<VideoLogPage> {
|
||||
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<VideoLogPage> {
|
||||
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<VideoLogPage> {
|
||||
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,
|
||||
),
|
||||
|
||||
@ -245,7 +245,7 @@ class LockMainLogic extends BaseGetXController {
|
||||
if (!notificationEnabled) {
|
||||
//推送未开启
|
||||
ShowTipView().showIosTipWithContentDialog(
|
||||
'为了让您及时收到重要通知和更新,我们需要获取通知权限。请点击“确定”按钮,然后在设置页面中启用通知权限。', () async {
|
||||
'为了让您及时收到重要通知和更新,我们需要获取通知权限。请点击“确定”按钮,然后在设置页面中启用通知权限。'.tr, () async {
|
||||
openAppSettings();
|
||||
});
|
||||
}
|
||||
|
||||
@ -141,7 +141,7 @@ class _GatewayListPageState extends State<GatewayListPage> {
|
||||
width: 10.w,
|
||||
),
|
||||
Text(
|
||||
getewayItemData.isOnline == 1 ? '在线' : '离线',
|
||||
getewayItemData.isOnline == 1 ? '在线'.tr : '离线'.tr,
|
||||
style: TextStyle(fontSize: 18.sp),
|
||||
),
|
||||
SizedBox(
|
||||
|
||||
@ -153,13 +153,13 @@ class _MessageListPageState extends State<MessageListPage>
|
||||
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<MessageListPage>
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text('告警',
|
||||
Text('告警'.tr,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 30.sp)),
|
||||
@ -340,7 +340,7 @@ class _MessageListPageState extends State<MessageListPage>
|
||||
backgroundColor: Colors.red,
|
||||
foregroundColor: Colors.white,
|
||||
icon: Icons.delete,
|
||||
label: '删除',
|
||||
label: '删除'.tr,
|
||||
),
|
||||
],
|
||||
), child: Container(
|
||||
@ -366,7 +366,7 @@ class _MessageListPageState extends State<MessageListPage>
|
||||
? 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)],
|
||||
)))),
|
||||
),
|
||||
|
||||
@ -102,13 +102,13 @@ class _AuthorityManagementPageState extends State<AuthorityManagementPage>
|
||||
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<AuthorityManagementPage>
|
||||
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<AuthorityManagementPage>
|
||||
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<AuthorityManagementPage>
|
||||
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) {
|
||||
|
||||
@ -53,16 +53,16 @@ class _GetDeviceListPageState extends State<GetDeviceListPage> {
|
||||
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) {
|
||||
|
||||
@ -53,16 +53,16 @@ class _GetNameListPageState extends State<GetNameListPage> {
|
||||
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;
|
||||
},
|
||||
|
||||
@ -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<GoogleHome> googleHomeData = GoogleHome().obs;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -172,7 +172,7 @@ class _SelectBranchPageState extends State<SelectBranchPage> {
|
||||
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<SelectBranchPage> {
|
||||
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<SelectBranchPage> {
|
||||
borderRadius: BorderRadius.all(Radius.circular(2)),
|
||||
),
|
||||
),
|
||||
child: Text('确认', style: TextStyle(fontSize: 22.sp)),
|
||||
child: Text('确认'.tr, style: TextStyle(fontSize: 22.sp)),
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
@ -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;
|
||||
}
|
||||
@ -5,9 +5,9 @@ class CloudStorageState {
|
||||
RxInt selectedIndex = 0.obs;
|
||||
|
||||
// 选项卡标题
|
||||
final List<String> tabs = ['7天滚动存储', '30天滚动存储'];
|
||||
final List<String> tabs = ['7天滚动存储'.tr, '30天滚动存储'.tr];
|
||||
final List<Map<String, dynamic>> 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}
|
||||
];
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ class NewSMSTemplateLogic extends BaseGetXController {
|
||||
//新建模板-- 1:电子钥匙 2:密码
|
||||
Future<void> addSMSTemplate() async {
|
||||
if (state.templateNameTf.text.isEmpty) {
|
||||
showToast('请输入模板名称');
|
||||
showToast('请输入模板名称'.tr);
|
||||
return;
|
||||
}
|
||||
final LoginEntity entity = await ApiRepository.to.addTemplateService(
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -223,7 +223,7 @@ class _ImageTransmissionPageState extends State<ImageTransmissionPage>
|
||||
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,
|
||||
|
||||
@ -32,7 +32,7 @@ class XSDropDownWidget extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _XSDropDownWidgetState extends State<XSDropDownWidget> {
|
||||
String label = '请选择';
|
||||
String label = '请选择'.tr;
|
||||
// 是否展开下拉按钮
|
||||
bool isExpand = false;
|
||||
// 当前的值
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user