fix:调整对讲时的国际化内容

This commit is contained in:
liyi 2025-01-20 14:13:56 +08:00
parent 3503de0207
commit 6d8451ae9f
15 changed files with 43 additions and 24 deletions

View File

@ -1121,5 +1121,9 @@
"分简称": "M",
"跟随系统": "Follow system",
"重置后,该锁的指纹都将被删除哦,确认要重置吗?": "After reset, the lock's fingerprints will be deleted. Are you sure you want to reset it?",
"通话未接通,已挂断": "Call not connected, hung up",
"通话异常中断": "Abnormal call interruption",
"通话连接失败": "Call connection failed",
"已挂断": "Hanging up",
"重置后,该锁的遥控都将被删除哦,确认要重置吗?": "After reset, the remote control of the lock will be deleted. Do you want to reset it?"
}

View File

@ -1121,5 +1121,9 @@
"分简称": "分简称",
"跟随系统": "跟随系统",
"重置后,该锁的指纹都将被删除哦,确认要重置吗?": "重置后,该锁的指纹都将被删除哦,确认要重置吗?",
"通话未接通,已挂断": "通话未接通,已挂断",
"通话异常中断": "通话异常中断",
"通话连接失败": "通话连接失败",
"已挂断": "已挂断",
"重置后,该锁的遥控都将被删除哦,确认要重置吗?": "重置后,该锁的遥控都将被删除哦,确认要重置吗?"
}

View File

@ -1121,5 +1121,9 @@
"分简称": "分",
"跟随系统": "跟随系统",
"重置后,该锁的指纹都将被删除哦,确认要重置吗?": "重置后,该锁的指纹都将被删除哦,确认要重置吗?",
"通话未接通,已挂断": "通话未接通,已挂断",
"通话异常中断": "通话异常中断",
"通话连接失败": "通话连接失败",
"已挂断": "已挂断",
"重置后,该锁的遥控都将被删除哦,确认要重置吗?": "重置后,该锁的遥控都将被删除哦,确认要重置吗?"
}

View File

@ -4,6 +4,7 @@ import 'dart:io';
import 'dart:typed_data';
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:get/get.dart';
import 'package:network_info_plus/network_info_plus.dart';
import 'package:permission_handler/permission_handler.dart';
@ -151,11 +152,6 @@ class ConfiguringWifiLogic extends BaseGetXController {
}
state.sureBtnState.value = 1;
showBlueConnetctToastTimer(action: () {
dismissEasyLoading();
state.sureBtnState.value = 0;
});
final GetGatewayConfigurationEntity entity =
await ApiRepository.to.getGatewayConfiguration(timeout: 60);
if (entity.errorCode!.codeIsSuccessful) {
@ -191,6 +187,7 @@ class ConfiguringWifiLogic extends BaseGetXController {
//
state.getGatewayConfigurationStr = "{\"userPeerld\": \"$appPeerId\"}";
}
BlueManage().blueSendData(BlueManage().connectDeviceName,
(BluetoothConnectionState connectionState) async {
if (connectionState == BluetoothConnectionState.connected) {
@ -199,11 +196,7 @@ class ConfiguringWifiLogic extends BaseGetXController {
password: state.wifiPWDController.text,
gatewayConfigurationStr: state.getGatewayConfigurationStr,
);
} else if (connectionState == BluetoothConnectionState.disconnected) {
state.sureBtnState.value = 0;
if (state.ifCurrentScreen.value == true) {
showBlueConnetctToast();
}
EasyLoading.show();
}
}, isAddEquipment: true);
}

View File

@ -14,6 +14,15 @@ class VideoLogLogic extends BaseGetXController {
);
if (entity.errorCode!.codeIsSuccessful) {
state.videoLogList.value = entity.data!;
// state.videoLogList.value.forEach((element) {
// // imagesUrl videoUrl null
// element.recordList = element.recordList!
// .where((record) =>
// (record.imagesUrl != null && record.imagesUrl!.isNotEmpty) ||
// (record.videoUrl != null && record.videoUrl!.isNotEmpty))
// .toList();
// });
state.videoLogList.refresh();
}
}

View File

@ -345,6 +345,14 @@ class _VideoLogPageState extends State<VideoLogPage> {
return Image.network(
recordData.imagesUrl!,
fit: BoxFit.cover,
errorBuilder:
(BuildContext context, Object error, StackTrace? stackTrace) {
//
return Image.asset(
'images/icon_unHaveData.png', //
fit: BoxFit.cover,
);
},
);
}
}

View File

@ -11,7 +11,7 @@ class StartChartApi extends BaseProvider {
// url
final String _startChartHost = 'http://sls1-scd.star-lock.cn:8080';
static StartChartApi get to => Get.find<StartChartApi>();
static StartChartApi get to => Get.put(StartChartApi());
// --
Future<StarChartRegisterNodeEntity> starChartRegisterNode({
@ -68,6 +68,4 @@ class StartChartApi extends BaseProvider {
);
return response;
}
}

View File

@ -29,7 +29,6 @@ class UdpTalkAcceptHandler extends ScpMessageBaseHandle
//
final GenericResp genericResp = scpMessage.Payload;
if (checkGenericRespSuccess(genericResp)) {
print('收到同意接听的回复');
//
startChartManage.stopTalkAcceptTimer();
//

View File

@ -109,7 +109,7 @@ class UdpTalkDataHandler extends ScpMessageBaseHandle
void _handleVideoH264(TalkData talkData) {
final TalkDataH264Frame talkDataH264Frame = TalkDataH264Frame();
talkDataH264Frame.mergeFromBuffer(talkData.content);
AppLog.log('H264 TalkData :$talkDataH264Frame');
// AppLog.log('H264 TalkData :$talkDataH264Frame');
talkDataRepository.addTalkData(talkData);
}

View File

@ -21,7 +21,7 @@ class UdpTalkHangUpHandler extends ScpMessageBaseHandle
// //
// return;
// }
print('收到通话中挂断请求');
//
replySuccessMessage(scpMessage);
talkStatus.setHangingUpDuring();
@ -34,7 +34,7 @@ class UdpTalkHangUpHandler extends ScpMessageBaseHandle
talkePingOverTimeTimerManager.cancel();
talkDataOverTimeTimerManager.cancel();
EasyLoading.showToast('已挂断');
EasyLoading.showToast('已挂断'.tr);
Get.back();
}

View File

@ -28,7 +28,7 @@ class TalkDataOverTimeTimerManager {
//
static void _handleTalkeDataOverTime() {
EasyLoading.showToast('通话连接失败', duration: 2000.milliseconds);
EasyLoading.showToast('通话连接失败'.tr, duration: 2000.milliseconds);
//
StartChartManage().sendTalkHangupMessage();
StartChartManage().stopTalkPingMessageTimer();

View File

@ -28,7 +28,7 @@ class TalkePingOverTimeTimerManager {
//
static void _handleTalkePingOverTime() {
if (talkStatus.status == TalkStatus.answeredSuccessfully) {
EasyLoading.showToast('通话异常中断', duration: 2000.milliseconds);
EasyLoading.showToast('通话异常中断'.tr, duration: 2000.milliseconds);
//
StartChartManage().stopTalkPingMessageTimer();
StartChartManage().stopTalkExpectMessageTimer();

View File

@ -29,7 +29,7 @@ class TalkeRequestOverTimeTimerManager {
static void _handleTalkeRequestOverTime() {
if (talkStatus.status == TalkStatus.passiveCallWaitingAnswer ||
talkStatus.status == TalkStatus.proactivelyCallWaitingAnswer) {
EasyLoading.showToast('通话未接通,以挂断', duration: 2000.milliseconds);
EasyLoading.showToast('通话未接通,已挂断'.tr, duration: 2000.milliseconds);
//
StartChartManage().sendTalkRejectMessage();
talkStatus.setInitializationCompleted();

View File

@ -303,7 +303,7 @@ class TalkViewLogic extends BaseGetXController {
bluetoothDeviceName: BlueManage().connectDeviceName,
openLockCommand: messageDetail,
);
showToast('已发送开门通知');
showToast('正在开锁中...'.tr);
}
int _getUTCNetTime() {

View File

@ -307,13 +307,13 @@ class _TalkViewPageState extends State<TalkViewPage>
Colors.white,
longPress: () async {
if (state.talkStatus.value == TalkStatus.answeredSuccessfully) {
print('开始录音');
//
logic.startProcessingAudio();
state.isLongPressing.value = true;
}
},
longPressUp: () async {
print('停止录音');
//
logic.stopProcessingAudio();
state.isLongPressing.value = false;
},
@ -334,7 +334,7 @@ class _TalkViewPageState extends State<TalkViewPage>
}),
bottomBtnItemWidget(
'images/main/icon_lockDetail_monitoringUnlock.png',
'开锁',
'开锁'.tr,
AppColors.mainColor,
onClick: () {
// if (UDPManage().remoteUnlock == 1) {