[8.2.8][i18n] 所有吐司 中文抽取

This commit is contained in:
xinfengkun
2025-11-12 19:35:55 +08:00
parent 08a5352df5
commit 8f6e8de77e
119 changed files with 1217 additions and 430 deletions

View File

@@ -40,6 +40,7 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapDataCollectorManager
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
import com.mogo.eagle.core.function.call.telematic.CallerTelematicStatusListenerManager
import com.mogo.eagle.core.function.datacenter.R
import com.mogo.eagle.core.function.datacenter.autopilot.adapter.MoGoAdasListenerImpl
import com.mogo.eagle.core.function.datacenter.autopilot.adapter.MoGoAdasMsgConnectStatusListenerImpl
import com.mogo.eagle.core.function.datacenter.autopilot.server.AsyncDataToAutopilotServer
@@ -156,7 +157,8 @@ class MoGoAutopilotControlProvider :
}
override fun onStartServer() {
ToastUtils.showShort("司机端服务启动成功!")
// ToastUtils.showShort("司机端服务启动成功!")
ToastUtils.showShort(R.string.module_mogo_core_function_datacenter_driver_service_started_successfully)
if (timer == null) {
timer = Timer()
}
@@ -175,7 +177,8 @@ class MoGoAutopilotControlProvider :
}
override fun onStopServer() {
ToastUtils.showLong("司机端服务停止!")
// ToastUtils.showLong("司机端服务停止!")
ToastUtils.showLong(R.string.module_mogo_core_function_datacenter_driver_service_stop)
timer?.cancel()
timer = null
invokeNettyConnResult("司机端服务停止!")
@@ -258,7 +261,8 @@ class MoGoAutopilotControlProvider :
AsyncDataToAutopilotServer.INSTANCE.initServer()
}.onFailure { throwable ->
if (DebugConfig.isDebug()) {
ToastUtils.showLong("AutoPilot出现异常请立即处理!")
// ToastUtils.showLong("AutoPilot出现异常请立即处理!")
ToastUtils.showLong(R.string.module_mogo_core_function_datacenter_autopilot_exception)
}
throwable.printStackTrace()
}

View File

@@ -25,6 +25,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerIpcConnectStateToastMan
import com.mogo.eagle.core.function.call.autopilot.CallerParallelDrivingActionsListenerManager
import com.mogo.eagle.core.function.call.cloud.CallerCloudListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.datacenter.R
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_D_C
@@ -74,7 +75,7 @@ class MoGoAdasMsgConnectStatusListenerImpl :
CallerAutopilotCarConfigListenerManager.invokeAutopilotCertFileResult(certificationResult)
}
private fun connectToast(reason: String) {
private fun connectToast(reason: Int) {
if (CallerIpcConnectStateToastManager.isToast) {
ToastUtils.showShort(reason)
}
@@ -124,7 +125,8 @@ class MoGoAdasMsgConnectStatusListenerImpl :
AdasConstants.IpcConnectionStatus.CONNECTED -> {
connectStatusDescribe = "已连接"
CallerLogger.d("$M_D_C$TAG", connectStatusDescribe)
connectToast("域控已连接")
// connectToast("域控已连接")
connectToast(R.string.module_core_ipc_connection_status_connected)
CallerIpcConnectStateToastManager.ipcConnected()
// 初始化自动驾驶状态信息
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().connectIP =
@@ -182,19 +184,22 @@ class MoGoAdasMsgConnectStatusListenerImpl :
AdasConstants.IpcConnectionStatus.CONNECTING -> {
connectStatusDescribe = "连接中"
CallerLogger.d("$M_D_C$TAG", connectStatusDescribe)
connectToast("域控连接中")
// connectToast("域控连接中")
connectToast(R.string.module_core_ipc_connection_status_connecting)
}
AdasConstants.IpcConnectionStatus.RECONNECTING_TIMER -> {
connectStatusDescribe = "重连中(定时器)"
CallerLogger.d("$M_D_C$TAG", connectStatusDescribe)
connectToast("域控重连中")
// connectToast("域控重连中")
connectToast(R.string.module_core_ipc_connection_status_reconnecting)
}
AdasConstants.IpcConnectionStatus.RECONNECTING_NETWORK -> {
connectStatusDescribe = "重连中(网络监听)"
CallerLogger.d("$M_D_C$TAG", connectStatusDescribe)
connectToast("域控重连中")
// connectToast("域控重连中")
connectToast(R.string.module_core_ipc_connection_status_reconnecting)
}
AdasConstants.IpcConnectionStatus.CONNECT_EXCEPTION -> {
@@ -215,7 +220,8 @@ class MoGoAdasMsgConnectStatusListenerImpl :
connectStatusDescribe
)
resetArgs()
connectToast("非法域控地址")
// connectToast("非法域控地址")
connectToast(R.string.module_core_ipc_connection_status_illegal_address)
}
AdasConstants.IpcConnectionStatus.SEARCH_ADDRESS -> {
@@ -224,7 +230,8 @@ class MoGoAdasMsgConnectStatusListenerImpl :
"$M_D_C$TAG",
connectStatusDescribe
)
connectToast("正在搜索域控地址")
// connectToast("正在搜索域控地址")
connectToast(R.string.module_core_ipc_connection_status_search_address)
}
AdasConstants.IpcConnectionStatus.NOT_FOUND_ADDRESS -> {

View File

@@ -32,6 +32,7 @@ import com.mogo.eagle.core.function.call.och.CallerOchBizFunctionCall4EagleManag
import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
import com.mogo.eagle.core.function.datacenter.R
import com.mogo.eagle.core.utilcode.kotlin.lifeCycleScope
import com.mogo.eagle.core.utilcode.kotlin.scope
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
@@ -518,7 +519,8 @@ class TeleMsgHandler : IMsgHandler {
CallerTelematicListenerManager.invokeReceivedMsg(TelematicConstant.DRIVE_SEAT_VIDEO_STREAM_RSP, it.body)
}
TelematicConstant.PASSENGER_APP_REBOOT -> {
ToastUtils.showLong("乘客屏已收到重启命令")
// ToastUtils.showLong("乘客屏已收到重启命令")
ToastUtils.showLong(R.string.module_mogo_core_function_datacenter_passenger_received_restart_command)
}
else -> {
}
@@ -550,7 +552,8 @@ class TeleMsgHandler : IMsgHandler {
isReceiveSN = false
}
// AdasManager.getInstance().startDispatchHandler()
ToastUtils.showShort("连接司机屏成功!")
// ToastUtils.showShort("连接司机屏成功!")
ToastUtils.showShort(R.string.module_mogo_core_function_datacenter_passenger_link_driver_success)
invokeReqStatusLog(mapOf("dpConnectStatus" to true))
val byteArray = byteArrayOf(0)
NSDNettyManager.getInstance().sendMogoProtocolMsgToServer(
@@ -567,7 +570,8 @@ class TeleMsgHandler : IMsgHandler {
isFirstDisc = false
AppConfigInfo.plateNumber = ""
AppConfigInfo.iPCMacAddress = ""
ToastUtils.showLong("断开和司机屏的连接!")
// ToastUtils.showLong("断开和司机屏的连接!")
ToastUtils.showLong(R.string.module_mogo_core_function_datacenter_passenger_disconnect_driver)
invokeReqStatusLog(mapOf("dpConnectStatus" to false))
AdasManager.getInstance().stopDispatchHandler()
}
@@ -575,7 +579,8 @@ class TeleMsgHandler : IMsgHandler {
ConnectState.STATUS_CONNECT_ERROR -> {
AppConfigInfo.plateNumber = ""
ToastUtils.showLong("和司机端连接异常!")
// ToastUtils.showLong("和司机端连接异常!")
ToastUtils.showLong(R.string.module_mogo_core_function_datacenter_passenger_connect_driver_error)
invokeReqStatusLog(mapOf("dpConnectErrorMsg" to "$content"))
AdasManager.getInstance().stopDispatchHandler()
}