Browse Source

fix(蓝牙): 添加蓝牙耳机状态错误提示并更新相关翻译

当蓝牙编解码打开失败时,显示更明确的错误提示信息
newdev_shunjiawei
lxm 10 months ago
parent
commit
5568b6a5bb
  1. 2
      lib/core/translations/language/en_us.dart
  2. 1
      lib/core/translations/language/zh_cn.dart
  3. 2
      lib/modules/translation/controllers/translation_controller.dart

2
lib/core/translations/language/en_us.dart

@ -1205,6 +1205,8 @@ const Map<String, String> enUS = {
"selectTargetLanguage": "Select Target Language",
"me": "Me", //我
"counterPart": "Counterpart", //对方
"bluetoothCallStateError":
"Please make sure the Bluetooth headset is connected to the phone and in a call state", //请确保蓝牙耳机已连接到手机并处于通话状态
// 通用对话按钮与选项(用于统一语言选择弹窗等)
// 翻译键代表的中文文本内容:取消/确认/自动检测

1
lib/core/translations/language/zh_cn.dart

@ -1107,6 +1107,7 @@ const Map<String, String> zhCN = {
"selectTargetLanguage": "选择目标语言",
"me": "我",
"counterPart": "对方",
"bluetoothCallStateError": "请确保蓝牙耳机已连接到手机并处于通话状态",
// 通用对话按钮与选项(用于统一语言选择弹窗等)
// 以下翻译键的中文文本内容如注释所示

2
lib/modules/translation/controllers/translation_controller.dart

@ -953,7 +953,7 @@ class TranslationController extends GetxController with WidgetsBindingObserver {
}
isPreparing.value = false;
if (!bleManager.isCodecActive) {
Get.snackbar('tip'.tr, 'operationFailedPleaseRetry'.tr);
Get.snackbar('tip'.tr, 'bluetoothCallStateError'.tr);
throw Exception('lxm--BLE编解码打开失败');
}
_audioSourceType = true;

Loading…
Cancel
Save