国际化--文字.tr

This commit is contained in:
sky.min 2026-02-03 09:34:38 +08:00
parent 96f0bf7623
commit 1cd149aff7
36 changed files with 107 additions and 105 deletions

View File

@ -98,7 +98,7 @@ abstract class Reply {
case 0x10: case 0x10:
// //
AppLog.log('$logTag ${commandType!.typeName} 0x11 密码失效'); AppLog.log('$logTag ${commandType!.typeName} 0x11 密码失效');
showErrorMessage('密码失效'); showErrorMessage('密码失效'.tr);
break; break;
case 0x11: case 0x11:
// //

View File

@ -279,7 +279,7 @@ class _SafetyVerificationPageState extends State<SafetyVerificationPage> with Ti
child: Text( child: Text(
_checkSuccess _checkSuccess
? '${(_checkMilliseconds / (60.0 * 12)).toStringAsFixed(2)}s${'验证成功'.tr}' ? '${(_checkMilliseconds / (60.0 * 12)).toStringAsFixed(2)}s${'验证成功'.tr}'
: '验证失败', : '验证失败'.tr,
style: const TextStyle(color: Colors.white), style: const TextStyle(color: Colors.white),
), ),
), ),

View File

@ -95,10 +95,10 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
child: Column(children: [ child: Column(children: [
Image.asset('images/icon_main_sky_1024.png', width: 110.w, height: 110.w), Image.asset('images/icon_main_sky_1024.png', width: 110.w, height: 110.w),
SizedBox(height: 50.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), SizedBox(height: 50.w),
SubmitBtn( SubmitBtn(
btnName: '一键登录', btnName: '一键登录'.tr,
fontSize: 28.sp, fontSize: 28.sp,
borderRadius: 20.w, borderRadius: 20.w,
padding: EdgeInsets.only(top: 25.w, bottom: 25.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),

View File

@ -776,10 +776,10 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
List<Widget> initBottomSheetList() { List<Widget> initBottomSheetList() {
final List<Widget> widgetList = <Widget>[]; final List<Widget> widgetList = <Widget>[];
widgetList.add(buildCenter3('images/icon_wechat.png', '微信好友', 0)); widgetList.add(buildCenter3('images/icon_wechat.png', '微信好友'.tr, 0));
widgetList.add(buildCenter3('images/icon_message.png', '短信', 1)); widgetList.add(buildCenter3('images/icon_message.png', '短信'.tr, 1));
widgetList.add(buildCenter3('images/icon_email.png', '邮件', 2)); widgetList.add(buildCenter3('images/icon_email.png', '邮件'.tr, 2));
widgetList.add(buildCenter3('images/icon_more.png', '更多', 3)); widgetList.add(buildCenter3('images/icon_more.png', '更多'.tr, 3));
return widgetList; return widgetList;
} }

View File

@ -693,7 +693,7 @@ class OtherTypeKeyChangeValidityDateLogic extends BaseGetXController{
faceRight: state.fingerprintItemData.value.faceRight!, faceRight: state.fingerprintItemData.value.faceRight!,
); );
if (entity.errorCode!.codeIsSuccessful) { if (entity.errorCode!.codeIsSuccessful) {
showToast('修改成功', something: () { showToast('修改成功'.tr, something: () {
eventBus.fire(OtherTypeRefreshListEvent()); eventBus.fire(OtherTypeRefreshListEvent());
Get.back(result: <String, Object>{ Get.back(result: <String, Object>{
'starDate':state.starDateTimestamp.value.toString(), 'starDate':state.starDateTimestamp.value.toString(),
@ -723,7 +723,7 @@ class OtherTypeKeyChangeValidityDateLogic extends BaseGetXController{
palmVeinRight: state.fingerprintItemData.value.palmVeinRight!, palmVeinRight: state.fingerprintItemData.value.palmVeinRight!,
); );
if (entity.errorCode!.codeIsSuccessful) { if (entity.errorCode!.codeIsSuccessful) {
showToast('修改成功', something: () { showToast('修改成功'.tr, something: () {
eventBus.fire(OtherTypeRefreshListEvent()); eventBus.fire(OtherTypeRefreshListEvent());
Get.back(result: <String, Object>{ Get.back(result: <String, Object>{
'starDate':state.starDateTimestamp.value.toString(), 'starDate':state.starDateTimestamp.value.toString(),

View File

@ -1,4 +1,4 @@
import 'package:flutter/material.dart'; fimport 'package:flutter/material.dart';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
@ -136,13 +136,13 @@ class _WeekCalendarViewState extends State<WeekCalendarView> {
children: [ children: [
Text( Text(
[ [
'简写周日', '简写周日'.tr,
'简写周一', '简写周一'.tr,
'简写周二', '简写周二'.tr,
'简写周三', '简写周三'.tr,
'简写周四', '简写周四'.tr,
'简写周五', '简写周五'.tr,
'简写周六' '简写周六'.tr
][index] ][index]
.tr, .tr,
style: TextStyle( style: TextStyle(

View File

@ -120,7 +120,7 @@ class _MassSendReceiverCellState extends State<MassSendReceiverCell> {
if (text.trim() == '') { if (text.trim() == '') {
errorTxt.value = '请输入姓名'.tr; errorTxt.value = '请输入姓名'.tr;
} else if (text.length > 50) { } else if (text.length > 50) {
errorTxt.value = '姓名长度不能超过50个字符哦'; errorTxt.value = '姓名长度不能超过50个字符哦'.tr;
} }
}), }),
], ],

View File

@ -35,7 +35,7 @@ class SendEmailNotificationState {
Rx<EmailNotificationItem> currentNotifyItem = EmailNotificationItem().obs; Rx<EmailNotificationItem> currentNotifyItem = EmailNotificationItem().obs;
RxInt getKeyId = 0.obs; //keyId RxInt getKeyId = 0.obs; //keyId
RxInt countryCode = 86.obs; RxInt countryCode = 86.obs;
RxString countryName = '中国'.obs; RxString countryName = '中国'.tr.obs;
late Contact contact; late Contact contact;
final FlutterContactPicker contactPicker = FlutterContactPicker(); final FlutterContactPicker contactPicker = FlutterContactPicker();
RxInt unlockType = 0.obs; // 1: 2 RxInt unlockType = 0.obs; // 1: 2

View File

@ -1,6 +1,7 @@
import 'dart:async'; import 'dart:async';
import 'package:flutter_blue_plus/flutter_blue_plus.dart'; 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/blue/io_protocol/io_addFace.dart';
import 'package:star_lock/login/login/entity/LoginEntity.dart'; import 'package:star_lock/login/login/entity/LoginEntity.dart';
import 'package:star_lock/main/lockDetail/fingerprint/fingerprintList/fingerprintListData_entity.dart'; import 'package:star_lock/main/lockDetail/fingerprint/fingerprintList/fingerprintListData_entity.dart';
@ -242,7 +243,7 @@ class IrisListLogic extends BaseGetXController {
lockId: state.lockId.value, lockId: state.lockId.value,
); );
if (entity.errorCode!.codeIsSuccessful) { if (entity.errorCode!.codeIsSuccessful) {
showToast('删除成功'); showToast('删除成功'.tr);
state.isDeletFaceData = false; state.isDeletFaceData = false;
getIrisListData(); getIrisListData();
} }
@ -260,7 +261,7 @@ class IrisListLogic extends BaseGetXController {
lockId: state.lockId.value, lockId: state.lockId.value,
); );
if (entity.errorCode!.codeIsSuccessful) { if (entity.errorCode!.codeIsSuccessful) {
showToast('重置成功'); showToast('重置成功'.tr);
state.isDeletFaceData = false; state.isDeletFaceData = false;
getIrisListData(); getIrisListData();
} }

View File

@ -28,7 +28,7 @@ class _LiveVideoPageState extends State<LiveVideoPage> {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar( appBar: TitleAppBar(
barTitle: '呼叫目标', barTitle: '呼叫目标'.tr,
haveBack: true, haveBack: true,
backAction: () { backAction: () {
Navigator.pop(context, true); Navigator.pop(context, true);
@ -63,12 +63,12 @@ class _LiveVideoPageState extends State<LiveVideoPage> {
SizedBox( SizedBox(
height: 86.h, height: 86.h,
), ),
_buildTipsView('管理员APP\n', '', 0), _buildTipsView('${'管理员APP'.tr}\n', '', 0),
SizedBox( SizedBox(
height: 16.h, height: 16.h,
), ),
_buildTipsView('管理中心\n', _buildTipsView('${'管理中心'.tr}\n'.tr,
'指定时问内,无论门锁是否发生安全事件或有人按门铃,都能在门锁首页随时查看实时画面;电池续航时问将会缩短。', 1), '指定时问内,无论门锁是否发生安全事件或有人按门铃,都能在门锁首页随时查看实时画面;电池续航时问将会缩短。'.tr, 1),
], ],
))); )));
} }

View File

@ -116,10 +116,10 @@ class CatEyeSetLogic extends BaseGetXController {
break; break;
case 0x06: case 0x06:
// //
showToast('无权限'); showToast('无权限'.tr);
break; break;
default: default:
showToast('修改失败'); showToast('修改失败'.tr);
break; break;
} }
} }

View File

@ -155,7 +155,7 @@ class WifiListLogic extends BaseGetXController {
} catch (e) { } catch (e) {
state.sureBtnState.value = 0; state.sureBtnState.value = 0;
cancelBlueConnetctToastTimer(); cancelBlueConnetctToastTimer();
showToast('发送获取WiFi列表请求失败${e.toString()}'.tr); showToast('${'发送获取WiFi列表请求失败'.tr}${e.toString()}');
} }
} else if (connectionState == BluetoothConnectionState.disconnected) { } else if (connectionState == BluetoothConnectionState.disconnected) {
state.sureBtnState.value = 0; state.sureBtnState.value = 0;

View File

@ -64,12 +64,12 @@ class _LiveVideoPageState extends State<LiveVideoPage> {
height: 86.h, height: 86.h,
), ),
_buildTipsView( _buildTipsView(
'发生事件时查看\n', '仅当门锁发生事件或有人按门铃时,才能在门锁首页查看实时画面。', 0), '${'发生事件时查看'.tr}\n', '仅当门锁发生事件或有人按门铃时,才能在门锁首页查看实时画面。'.tr, 0),
SizedBox( SizedBox(
height: 16.h, height: 16.h,
), ),
_buildTipsView('实时查看\n', _buildTipsView('${'实时查看'.tr}\n',
'指定时问内,无论门锁是否发生安全事件或有人按门铃,都能在门锁首页随时查看实时画面;电池续航时问将会缩短。', 1), '指定时问内,无论门锁是否发生安全事件或有人按门铃,都能在门锁首页随时查看实时画面;电池续航时问将会缩短。'.tr, 1),
], ],
))); )));
} }

View File

@ -31,10 +31,10 @@ class CoerceFingerprintListLogic extends BaseGetXController {
keyDateTypeStr = '永久'.tr; keyDateTypeStr = '永久'.tr;
} else if (fingerprintItemData.fingerprintType! == 2) { } else if (fingerprintItemData.fingerprintType! == 2) {
keyDateTypeStr = 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) { } else if (fingerprintItemData.fingerprintType! == 4) {
keyDateTypeStr = keyDateTypeStr =
'${DateTool().dateToYMDString(fingerprintItemData.startDate.toString())}-${DateTool().dateToYMDString(fingerprintItemData.endDate.toString())} 循环'; '${DateTool().dateToYMDString(fingerprintItemData.startDate.toString())}-${DateTool().dateToYMDString(fingerprintItemData.endDate.toString())} ${'循环'.tr}';
} }
return keyDateTypeStr; return keyDateTypeStr;
} }

View File

@ -19,9 +19,9 @@ class MsgNotificationState {
Rx<MsgNoticeData> msgNoticeInfo = MsgNoticeData().obs; Rx<MsgNoticeData> msgNoticeInfo = MsgNoticeData().obs;
RxInt getLockId = 0.obs; RxInt getLockId = 0.obs;
RxBool isCheck = false.obs; RxBool isCheck = false.obs;
RxString nDaysNotOpenDoor = '已启用'.obs; //N天未开门 RxString nDaysNotOpenDoor = '已启用'.tr.obs; //N天未开门
RxBool isTamperAlarm = false.obs; // RxBool isTamperAlarm = false.obs; //
RxString isLowBattery = '已启用'.obs; // RxString isLowBattery = '已启用'.tr.obs; //
RxBool isLeaveHomeOpenDoor = false.obs; // RxBool isLeaveHomeOpenDoor = false.obs; //
RxBool isDoorNotShut = false.obs; // RxBool isDoorNotShut = false.obs; //
RxBool isSomeoneRing = false.obs; // RxBool isSomeoneRing = false.obs; //

View File

@ -183,7 +183,7 @@ class _NDaysUnopenedPageState extends State<NDaysUnopenedPage> {
data: dataList, data: dataList,
pickerStyle: DefaultPickerStyle(), onConfirm: (p, int position) { pickerStyle: DefaultPickerStyle(), onConfirm: (p, int position) {
state.unOpenDoorTime.value = state.unOpenDoorTime.value =
int.parse(state.unopenDoorTimeList[position].replaceAll('', '')); int.parse(state.unopenDoorTimeList[position].replaceAll(''.tr, ''));
}); });
} }
} }

View File

@ -300,7 +300,7 @@ class PasswordKeyDetailLogic extends BaseGetXController {
'\n' + '\n' +
'有效期'.tr + '有效期'.tr +
':${startDateStr.toLocal().toString().substring(0, 16)} -- ${endDateStr.toLocal().toString().substring(0, 16)}\n\n' + ':${startDateStr.toLocal().toString().substring(0, 16)} -- ${endDateStr.toLocal().toString().substring(0, 16)}\n\n' +
'这是单次密码,只能使用一次\n'; '${'这是单次密码,只能使用一次'.tr}\n';
break; break;
case 2: case 2:
// 2 24使 // 2 24使
@ -309,8 +309,8 @@ class PasswordKeyDetailLogic extends BaseGetXController {
':' + ':' +
'永久'.tr + '永久'.tr +
'\n' + '\n' +
'\n注:\n' + '\n${'注:'.tr}\n' +
'必需在开始时间24小时内使用一次否则将失效\n'; '${'必需在开始时间24小时内使用一次否则将失效'.tr}\n';
break; break;
case 3: case 3:
// 3 24使 // 3 24使
@ -323,8 +323,8 @@ class PasswordKeyDetailLogic extends BaseGetXController {
'有效期'.tr + '有效期'.tr +
':${startDateStr.toLocal().toString().substring(0, 16)}-${endDateStr.toLocal().toString().substring(0, 16)}' + ':${startDateStr.toLocal().toString().substring(0, 16)}-${endDateStr.toLocal().toString().substring(0, 16)}' +
'\n' + '\n' +
'\n注:\n' + '\n${'注:'.tr}\n' +
'必需在开始时间24小时内使用一次否则将失效\n'; '${'必需在开始时间24小时内使用一次否则将失效'.tr}\n';
break; break;
case 4: case 4:
// 4 使使 // 4 使使
@ -453,9 +453,10 @@ class PasswordKeyDetailLogic extends BaseGetXController {
default: default:
} }
// return '您好,您的密码是'.tr + ':${state.itemData.value.keyboardPwd}\n$useDateStr\n${'密码名字'.tr}:${state.itemData.value.keyboardPwdName}'; // return '您好,您的密码是'.tr + ':${state.itemData.value.keyboardPwd}\n$useDateStr\n${'密码名字'.tr}:${state.itemData.value.keyboardPwdName}';
return '您好' + return '您好'.tr +
',\n您的开门密码是' + ',\n' +
':${state.itemData.value.keyboardPwd}\n$useDateStr\n${'密码名字'.tr}:${state.itemData.value.keyboardPwdName}\n\n开锁时,先激活锁键盘,再输入密码,以#号结束,#号键在键盘右下角,有可能是其他图标'; '您的开门密码是'.tr +
':${state.itemData.value.keyboardPwd}\n$useDateStr\n${'密码名字'.tr}:${state.itemData.value.keyboardPwdName}\n\n${'开锁时,先激活锁键盘,再输入密码,以#号结束,#号键在键盘右下角,有可能是其他图标'.tr}';
} }
@override @override

View File

@ -519,7 +519,7 @@ class PasswordKeyPerpetualLogic extends BaseGetXController {
'\n' + '\n' +
'有效期'.tr + '有效期'.tr +
':${startDateStr.toLocal().toString().substring(0, 16)} -- ${endDateStr.toLocal().toString().substring(0, 16)}\n\n' + ':${startDateStr.toLocal().toString().substring(0, 16)} -- ${endDateStr.toLocal().toString().substring(0, 16)}\n\n' +
'这是单次密码,只能使用一次\n'; '${'这是单次密码,只能使用一次'.tr}\n';
break; break;
case 0: case 0:
// 2 24使 // 2 24使
@ -528,8 +528,8 @@ class PasswordKeyPerpetualLogic extends BaseGetXController {
':' + ':' +
'永久'.tr + '永久'.tr +
'\n' + '\n' +
'\n注:\n' + '\n注:\n'.tr +
'必需在开始时间24小时内使用一次否则将失效\n'; '${'必需在开始时间24小时内使用一次否则将失效'.tr}\n';
break; break;
case 1: case 1:
// 3 24使 // 3 24使
@ -542,15 +542,15 @@ class PasswordKeyPerpetualLogic extends BaseGetXController {
'有效期'.tr + '有效期'.tr +
':${startDateStr.toLocal().toString().substring(0, 16)}-${endDateStr.toLocal().toString().substring(0, 16)}' + ':${startDateStr.toLocal().toString().substring(0, 16)}-${endDateStr.toLocal().toString().substring(0, 16)}' +
'\n' + '\n' +
'\n注:\n' + '\n${'注:'.tr}\n' +
'必需在开始时间24小时内使用一次否则将失效\n'; '${'必需在开始时间24小时内使用一次否则将失效'.tr}\n';
break; break;
case 3: case 3:
// //
if (state.isPermanent.value == false) { if (state.isPermanent.value == false) {
useDateStr = '类型'.tr + useDateStr = '类型'.tr +
':' + ':' +
'自定义-限时\n${'有效期'.tr}:${state.customBeginTime.value} -- ${state.customEndTime.value}'; '${'自定义-限时'.tr}\n${'有效期'.tr}:${state.customBeginTime.value} -- ${state.customEndTime.value}';
} else { } else {
useDateStr = '类型:自定义-永久'.tr; useDateStr = '类型:自定义-永久'.tr;
} }
@ -786,9 +786,9 @@ class PasswordKeyPerpetualLogic extends BaseGetXController {
default: default:
} }
// return '您好,您的密码是'.tr + ':${state.itemData.value.keyboardPwd}\n$useDateStr\n${'密码名字'.tr}:${state.itemData.value.keyboardPwdName}'; // return '您好,您的密码是'.tr + ':${state.itemData.value.keyboardPwd}\n$useDateStr\n${'密码名字'.tr}:${state.itemData.value.keyboardPwdName}';
return '您好' + return '您好'.tr +
',\n您的开门密码是' + ',\n${'您的开门密码是'.tr}' +
':${state.getPwdStr.value}\n$useDateStr\n${'密码名字'.tr}:${state.pwdNameStr}\n\n开锁时,先激活锁键盘,再输入密码,以#号结束,#号键在键盘右下角,有可能是其他图标'; ':${state.getPwdStr.value}\n$useDateStr\n${'密码名字'.tr}:${state.pwdNameStr}\n\n${'开锁时,先激活锁键盘,再输入密码,以#号结束,#号键在键盘右下角,有可能是其他图标'.tr}';
// switch (getPwdType) { // switch (getPwdType) {
// case 0: // case 0:
// // 24使 // // 24使

View File

@ -265,7 +265,7 @@ class _RealTimePicturePageState extends State<RealTimePicturePage> with TickerPr
Get.back(); Get.back();
}), }),
bottomBtnItemWidget('images/main/icon_lockDetail_monitoringUnlock.png', bottomBtnItemWidget('images/main/icon_lockDetail_monitoringUnlock.png',
'开锁', AppColors.mainColor, () { '开锁'.tr, AppColors.mainColor, () {
logic.showToast('监视中暂不能开锁'.tr); logic.showToast('监视中暂不能开锁'.tr);
/* /*
showDeletPasswordAlertDialog(context); showDeletPasswordAlertDialog(context);

View File

@ -292,7 +292,7 @@ class _EditVideoLogPageState extends State<EditVideoLogPage> {
// 'downloadVideoLogList': state.selectVideoLogList.value // 'downloadVideoLogList': state.selectVideoLogList.value
// }); // });
} else { } else {
logic.showToast('请选择要下载的视频'); logic.showToast('请选择要下载的视频'.tr);
} }
} }

View File

@ -267,7 +267,7 @@ class _VideoLogPageState extends State<VideoLogPage> {
visible: state.validityPeriodInfo.value != null && visible: state.validityPeriodInfo.value != null &&
state.validityPeriodInfo.value?.status == 1, state.validityPeriodInfo.value?.status == 1,
child: Text( child: Text(
'过期时间:${state.validityPeriodInfo.value?.validityPeriodEnd}', '${'过期时间:'.tr}${state.validityPeriodInfo.value?.validityPeriodEnd}',
style: TextStyle( style: TextStyle(
fontSize: 24.sp, fontSize: 24.sp,
), ),
@ -280,7 +280,7 @@ class _VideoLogPageState extends State<VideoLogPage> {
visible: state.validityPeriodInfo.value != null && visible: state.validityPeriodInfo.value != null &&
state.validityPeriodInfo.value?.status == 1, state.validityPeriodInfo.value?.status == 1,
child: Text( child: Text(
'滚动存储天数:${state.validityPeriodInfo.value?.rollingStorageDays}', '${'滚动存储天数:'.tr}${state.validityPeriodInfo.value?.rollingStorageDays}',
style: TextStyle( style: TextStyle(
fontSize: 24.sp, fontSize: 24.sp,
), ),
@ -293,7 +293,7 @@ class _VideoLogPageState extends State<VideoLogPage> {
visible: state.validityPeriodInfo.value != null && visible: state.validityPeriodInfo.value != null &&
state.validityPeriodInfo.value?.status == 1, state.validityPeriodInfo.value?.status == 1,
child: Text( child: Text(
'剩余天数:${state.validityPeriodInfo.value?.remainingDays} ', '${'剩余天数:'.tr}${state.validityPeriodInfo.value?.remainingDays} ${''.tr}',
style: TextStyle( style: TextStyle(
fontSize: 24.sp, fontSize: 24.sp,
), ),

View File

@ -245,7 +245,7 @@ class LockMainLogic extends BaseGetXController {
if (!notificationEnabled) { if (!notificationEnabled) {
// //
ShowTipView().showIosTipWithContentDialog( ShowTipView().showIosTipWithContentDialog(
'为了让您及时收到重要通知和更新,我们需要获取通知权限。请点击“确定”按钮,然后在设置页面中启用通知权限。', () async { '为了让您及时收到重要通知和更新,我们需要获取通知权限。请点击“确定”按钮,然后在设置页面中启用通知权限。'.tr, () async {
openAppSettings(); openAppSettings();
}); });
} }

View File

@ -141,7 +141,7 @@ class _GatewayListPageState extends State<GatewayListPage> {
width: 10.w, width: 10.w,
), ),
Text( Text(
getewayItemData.isOnline == 1 ? '在线' : '离线', getewayItemData.isOnline == 1 ? '在线'.tr : '离线'.tr,
style: TextStyle(fontSize: 18.sp), style: TextStyle(fontSize: 18.sp),
), ),
SizedBox( SizedBox(

View File

@ -153,13 +153,13 @@ class _MessageListPageState extends State<MessageListPage>
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment.spaceBetween,
children: [ children: [
Text('开启消息通知开关,及时获取通知', Text('开启消息通知开关,及时获取通知'.tr,
style: TextStyle( style: TextStyle(
color: Colors.black, color: Colors.black,
fontSize: 20.sp)), fontSize: 20.sp)),
Row(children: [ Row(children: [
!_pushNotificationEnabled.value !_pushNotificationEnabled.value
? GestureDetector(child: Text('去开启', ? GestureDetector(child: Text('去开启'.tr,
style: TextStyle( style: TextStyle(
color: Colors.blue, color: Colors.blue,
fontSize: 20.sp)), fontSize: 20.sp)),
@ -189,7 +189,7 @@ class _MessageListPageState extends State<MessageListPage>
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment.spaceBetween,
children: [ children: [
Text('告警', Text('告警'.tr,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 30.sp)), fontSize: 30.sp)),
@ -340,7 +340,7 @@ class _MessageListPageState extends State<MessageListPage>
backgroundColor: Colors.red, backgroundColor: Colors.red,
foregroundColor: Colors.white, foregroundColor: Colors.white,
icon: Icons.delete, icon: Icons.delete,
label: '删除', label: '删除'.tr,
), ),
], ],
), child: Container( ), child: Container(
@ -366,7 +366,7 @@ class _MessageListPageState extends State<MessageListPage>
? AppColors.blackColor : AppColors.placeholderTextColor))]) ? AppColors.blackColor : AppColors.placeholderTextColor))])
), ),
Container(margin: EdgeInsets.only(top: 10.h), child: GestureDetector( 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)], ),alignment: Alignment.centerRight)],
)))), )))),
), ),

View File

@ -102,13 +102,13 @@ class _AuthorityManagementPageState extends State<AuthorityManagementPage>
child: ListView.separated( child: ListView.separated(
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
if (index == 0) { if (index == 0) {
return _buildNameExpandedList(context, index, '张三'); return _buildNameExpandedList(context, index, '张三'.tr);
} else if (index == 1) { } else if (index == 1) {
return _buildNameExpandedList(context, index, '李四'); return _buildNameExpandedList(context, index, '李四'.tr);
} else if (index == 2) { } else if (index == 2) {
return _buildNameExpandedList(context, index, '王二'); return _buildNameExpandedList(context, index, '王二'.tr);
} else { } else {
return _buildNameExpandedList(context, index, '麻子'); return _buildNameExpandedList(context, index, '麻子'.tr);
} }
}, },
separatorBuilder: (BuildContext context, int index) { separatorBuilder: (BuildContext context, int index) {
@ -140,13 +140,13 @@ class _AuthorityManagementPageState extends State<AuthorityManagementPage>
child: ListView.separated( child: ListView.separated(
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
if (index == 0) { if (index == 0) {
return _buildDeviceExpandedList(context, index, '大门锁'); return _buildDeviceExpandedList(context, index, '大门锁'.tr);
} else if (index == 1) { } else if (index == 1) {
return _buildDeviceExpandedList(context, index, '办公室锁'); return _buildDeviceExpandedList(context, index, '办公室锁'.tr);
} else if (index == 2) { } else if (index == 2) {
return _buildDeviceExpandedList(context, index, '会议室锁'); return _buildDeviceExpandedList(context, index, '会议室锁'.tr);
} else { } else {
return _buildDeviceExpandedList(context, index, '宴会厅锁'); return _buildDeviceExpandedList(context, index, '宴会厅锁'.tr);
} }
}, },
separatorBuilder: (BuildContext context, int index) { separatorBuilder: (BuildContext context, int index) {
@ -184,16 +184,16 @@ class _AuthorityManagementPageState extends State<AuthorityManagementPage>
itemBuilder: (_, int index) { itemBuilder: (_, int index) {
if (index == 0) { if (index == 0) {
return _buildNameWidget( return _buildNameWidget(
context, index, 'images/icon_password.png', '张三'); context, index, 'images/icon_password.png', '张三'.tr);
} else if (index == 1) { } else if (index == 1) {
return _buildNameWidget( return _buildNameWidget(
context, index, 'images/icon_card.png', '李四'); context, index, 'images/icon_card.png', '李四'.tr);
} else if (index == 2) { } else if (index == 2) {
return _buildNameWidget( return _buildNameWidget(
context, index, 'images/icon_fingerprint.png', '王二'); context, index, 'images/icon_fingerprint.png', '王二'.tr);
} else if (index == 3) { } else if (index == 3) {
return _buildNameWidget( return _buildNameWidget(
context, index, 'images/icon_card.png', '麻子'); context, index, 'images/icon_card.png', '麻子'.tr);
} else { } else {
return null; return null;
} }
@ -225,16 +225,16 @@ class _AuthorityManagementPageState extends State<AuthorityManagementPage>
itemBuilder: (_, int index) { itemBuilder: (_, int index) {
if (index == 0) { if (index == 0) {
return _buildDeviceWidget( return _buildDeviceWidget(
context, index, 'images/icon_lock.png', '大门锁'); context, index, 'images/icon_lock.png', '大门锁'.tr);
} else if (index == 1) { } else if (index == 1) {
return _buildDeviceWidget( return _buildDeviceWidget(
context, index, 'images/icon_lock.png', '办公室锁'); context, index, 'images/icon_lock.png', '办公室锁'.tr);
} else if (index == 2) { } else if (index == 2) {
return _buildDeviceWidget( return _buildDeviceWidget(
context, index, 'images/icon_lock.png', '会议室锁'); context, index, 'images/icon_lock.png', '会议室锁'.tr);
} else { } else {
return _buildDeviceWidget( return _buildDeviceWidget(
context, index, 'images/icon_lock.png', '宴会厅锁'); context, index, 'images/icon_lock.png', '宴会厅锁'.tr);
} }
}, },
separatorBuilder: (BuildContext context, int index) { separatorBuilder: (BuildContext context, int index) {

View File

@ -53,16 +53,16 @@ class _GetDeviceListPageState extends State<GetDeviceListPage> {
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
if (index == 0) { if (index == 0) {
return _buildDeviceWidget( return _buildDeviceWidget(
context, index, 'images/icon_lock.png', '大门锁'); context, index, 'images/icon_lock.png', '大门锁'.tr);
} else if (index == 1) { } else if (index == 1) {
return _buildDeviceWidget( return _buildDeviceWidget(
context, index, 'images/icon_lock.png', '办公室锁'); context, index, 'images/icon_lock.png', '办公室锁'.tr);
} else if (index == 2) { } else if (index == 2) {
return _buildDeviceWidget( return _buildDeviceWidget(
context, index, 'images/icon_lock.png', '会议室锁'); context, index, 'images/icon_lock.png', '会议室锁'.tr);
} else { } else {
return _buildDeviceWidget( return _buildDeviceWidget(
context, index, 'images/icon_lock.png', '宴会厅锁'); context, index, 'images/icon_lock.png', '宴会厅锁'.tr);
} }
}, },
separatorBuilder: (BuildContext context, int index) { separatorBuilder: (BuildContext context, int index) {

View File

@ -53,16 +53,16 @@ class _GetNameListPageState extends State<GetNameListPage> {
itemBuilder: (context, index) { itemBuilder: (context, index) {
if (index == 0) { if (index == 0) {
return _buildNameWidget( return _buildNameWidget(
context, index, 'images/controls_user.png', '张三'); context, index, 'images/controls_user.png', '张三'.tr);
} else if (index == 1) { } else if (index == 1) {
return _buildNameWidget( return _buildNameWidget(
context, index, 'images/controls_user.png', '李四'); context, index, 'images/controls_user.png', '李四'.tr);
} else if (index == 2) { } else if (index == 2) {
return _buildNameWidget( return _buildNameWidget(
context, index, 'images/controls_user.png', '王二'); context, index, 'images/controls_user.png', '王二'.tr);
} else if (index == 3) { } else if (index == 3) {
return _buildNameWidget( return _buildNameWidget(
context, index, 'images/controls_user.png', '麻子'); context, index, 'images/controls_user.png', '麻子'.tr);
} }
return null; return null;
}, },

View File

@ -7,9 +7,9 @@ class GoogleHomeState {
if (map['isGoogleHome'] != null) { if (map['isGoogleHome'] != null) {
isGoogleHome.value = map['isGoogleHome']; isGoogleHome.value = map['isGoogleHome'];
if (isGoogleHome.value) { if (isGoogleHome.value) {
isOpenedText.value = '关闭'; isOpenedText.value = '关闭'.tr;
} else { } else {
isOpenedText.value = '开启'; isOpenedText.value = '开启'.tr;
} }
} }
if (map['googleHomeData'] != null) { if (map['googleHomeData'] != null) {
@ -18,6 +18,6 @@ class GoogleHomeState {
} }
RxBool isGoogleHome = false.obs; RxBool isGoogleHome = false.obs;
RxString isOpenedText = '开启'.obs; RxString isOpenedText = '开启'.tr.obs;
Rx<GoogleHome> googleHomeData = GoogleHome().obs; Rx<GoogleHome> googleHomeData = GoogleHome().obs;
} }

View File

@ -16,7 +16,7 @@ class RecipientInformationState{
TextEditingController passwordTF = TextEditingController(); TextEditingController passwordTF = TextEditingController();
final RxString countryName = '中国'.obs; final RxString countryName = '中国'.tr.obs;
final RxString countryCode = '86'.obs; final RxString countryCode = '86'.obs;
final RxInt isFromType = 1.obs; // 1 2 final RxInt isFromType = 1.obs; // 1 2
final RxList idList = [].obs; final RxList idList = [].obs;

View File

@ -172,7 +172,7 @@ class _SelectBranchPageState extends State<SelectBranchPage> {
child: Container( child: Container(
width: 80.w, width: 80.w,
color: Colors.red, 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), SizedBox(height: 8.h),
Text(recipientInformationData.userid!, style: TextStyle(fontSize: 22.sp)), Text(recipientInformationData.userid!, style: TextStyle(fontSize: 22.sp)),
SizedBox(height: 8.h), 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), SizedBox(height: 20.h),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
@ -207,7 +207,7 @@ class _SelectBranchPageState extends State<SelectBranchPage> {
borderRadius: BorderRadius.all(Radius.circular(2)), borderRadius: BorderRadius.all(Radius.circular(2)),
), ),
), ),
child: Text('确认', style: TextStyle(fontSize: 22.sp)), child: Text('确认'.tr, style: TextStyle(fontSize: 22.sp)),
), ),
], ],
) )

View File

@ -11,7 +11,7 @@ class SelectBranchState{
RxInt type = 1.obs;// 1 2 RxInt type = 1.obs;// 1 2
final RxString receiverNumber = ''.obs; final RxString receiverNumber = ''.obs;
final RxString countryName = '中国'.obs; final RxString countryName = '中国'.tr.obs;
final RxString countryCode = '86'.obs; final RxString countryCode = '86'.obs;
final RxList idList = [].obs; final RxList idList = [].obs;
} }

View File

@ -5,9 +5,9 @@ class CloudStorageState {
RxInt selectedIndex = 0.obs; RxInt selectedIndex = 0.obs;
// //
final List<String> tabs = ['7天滚动存储', '30天滚动存储']; final List<String> tabs = ['7天滚动存储'.tr, '30天滚动存储'.tr];
final List<Map<String, dynamic>> tabContent = [ final List<Map<String, dynamic>> tabContent = [
{'title': '连续包月', 'price': '1', 'price2': '188', 'discount': '立省188元'}, {'title': '连续包月'.tr, 'price': '1', 'price2': '188', 'discount': '立省188元'.tr},
{'title': '连续包月', 'price': '1', 'price2': '188', 'discount': '立省188元'} {'title': '连续包月'.tr, 'price': '1', 'price2': '188', 'discount': '立省188元'.tr}
]; ];
} }

View File

@ -37,7 +37,7 @@ class NewSMSTemplateLogic extends BaseGetXController {
//-- 1: 2: //-- 1: 2:
Future<void> addSMSTemplate() async { Future<void> addSMSTemplate() async {
if (state.templateNameTf.text.isEmpty) { if (state.templateNameTf.text.isEmpty) {
showToast('请输入模板名称'); showToast('请输入模板名称'.tr);
return; return;
} }
final LoginEntity entity = await ApiRepository.to.addTemplateService( final LoginEntity entity = await ApiRepository.to.addTemplateService(

View File

@ -132,7 +132,7 @@ class BaseProvider extends GetConnect with Api {
Get.offNamedUntil(Routers.starLockLoginPage, (route) => false); Get.offNamedUntil(Routers.starLockLoginPage, (route) => false);
break; break;
case 500: case 500:
EasyLoading.showToast('服务器错误', duration: 2000.milliseconds); EasyLoading.showToast('服务器错误'.tr, duration: 2000.milliseconds);
break; break;
case 421: case 421:
case 422: case 422:

View File

@ -223,7 +223,7 @@ class _ImageTransmissionPageState extends State<ImageTransmissionPage>
innerColor: Colors.amber, innerColor: Colors.amber,
outerColor: Colors.amber.withOpacity(0.15), outerColor: Colors.amber.withOpacity(0.15),
sliderButtonIcon: Icon(Icons.lock, color: Colors.white, size: 40.w), sliderButtonIcon: Icon(Icons.lock, color: Colors.white, size: 40.w),
text: '滑动解锁', text: '滑动解锁'.tr,
textStyle: TextStyle( textStyle: TextStyle(
fontSize: 26.sp, fontSize: 26.sp,
color: Colors.black54, color: Colors.black54,

View File

@ -32,7 +32,7 @@ class XSDropDownWidget extends StatefulWidget {
} }
class _XSDropDownWidgetState extends State<XSDropDownWidget> { class _XSDropDownWidgetState extends State<XSDropDownWidget> {
String label = '请选择'; String label = '请选择'.tr;
// //
bool isExpand = false; bool isExpand = false;
// //