From 038d2d6bb6a14715f6a7e3e0e4dad2fb8fed3d1f Mon Sep 17 00:00:00 2001 From: xinfengkun Date: Wed, 19 Nov 2025 16:07:05 +0800 Subject: [PATCH] =?UTF-8?q?[8.2.8][i18n]=20CloudControlManager=E4=B8=AD?= =?UTF-8?q?=E6=96=87=E6=8A=BD=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cloudcontrol/CloudControlManager.kt | 156 ++++++++++++------ .../src/main/res/values/string.xml | 103 ++++++++---- 2 files changed, 185 insertions(+), 74 deletions(-) diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/cloudcontrol/CloudControlManager.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/cloudcontrol/CloudControlManager.kt index 08bf8a366d..ec5f379ab8 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/cloudcontrol/CloudControlManager.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/cloudcontrol/CloudControlManager.kt @@ -11,6 +11,7 @@ import com.mogo.eagle.core.function.api.devatools.INDECloudListener import com.mogo.eagle.core.function.call.devatools.CallerNDECloudManager import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils +import com.mogo.eagle.core.utilcode.util.StringUtils import com.zhjt.mogo.adas.common.cloud.AdviceEvwType import com.zhjt.mogo.adas.common.cloud.AdviceType import com.zhjt.mogo.adas.data.bean.cloud.info.AdviceAvwInfo @@ -21,6 +22,7 @@ import com.zhjt.mogo.adas.data.bean.cloud.info.AdviceLaneSpdLmtInfo import com.zhjt.mogo.adas.data.bean.cloud.info.AstFuncTlmInfo import com.zhjt.mogo.adas.data.bean.cloud.pojo.AdvicePojo import com.zhjt.mogo.adas.data.bean.cloud.pojo.AstFuncPojo +import com.zhjt.mogo_core_function_devatools.R /** * 云控基础平台信息管理 @@ -56,9 +58,16 @@ object CloudControlManager: INDECloudListener{ val speedMax = adviceGlosaInfo.spdExps[0].spdMax*3.6 val num = adviceGlosaInfo.spdExps[0].numIntersection val desc = if(num ==0 || num == 255){ - "建议车速${speedMin}km/h-${speedMax}km/h" +// "建议车速${speedMin}km/h-${speedMax}km/h" + "${StringUtils.getString(R.string.module_core_suggest_speed1)}${speedMin}km/h-${speedMax}km/h" }else{ - "建议车速${speedMin}km/h-${speedMax}km/h,可绿灯通过前方${num}个路口" +// "建议车速${speedMin}km/h-${speedMax}km/h,可绿灯通过前方${num}个路口" + "${StringUtils.getString(R.string.module_core_suggest_speed1)}${speedMin}km/h-${speedMax}km/h${ + StringUtils.getString( + R.string.module_core_hint_green_wave_pass_intersection, + num + ) + }" } CallerMsgBoxManager.saveMsgBox( MsgBoxBean( @@ -101,7 +110,8 @@ object CloudControlManager: INDECloudListener{ MsgBoxType.CLOUD, CloudControlMsg(EventTypeEnumNew.CLOUD_RED_LIGHT_WARN.poiType, EventTypeEnumNew.CLOUD_RED_LIGHT_WARN.poiTypeStr, - "存在闯红灯风险" +// "存在闯红灯风险" + StringUtils.getString(R.string.module_core_warning_running_red_light_risk) ) ) ) @@ -109,9 +119,11 @@ object CloudControlManager: INDECloudListener{ //行驶车道建议 6031,6032->{ if(it.adviceRsiLaneProposalInfo.tagLaneDataNum > 0){ - var desc = "推荐车道:" +// var desc = "推荐车道:" + var desc = StringUtils.getString(R.string.module_core_hint_recommended_lane) it.adviceRsiLaneProposalInfo.tagLaneData.forEach {lane-> - desc += "第${lane.tagLaneSeq}车道 " +// desc += "第${lane.tagLaneSeq}车道 " + desc += StringUtils.getString(R.string.module_core_lane_sequence_number, lane.tagLaneSeq) } CallerMsgBoxManager.saveMsgBox( MsgBoxBean( @@ -128,7 +140,11 @@ object CloudControlManager: INDECloudListener{ 6061->{ //eventLevel 2:拥堵; 3:重拥堵 if(it.adviceRsiTrafficJamInfo.eventLevel ==2 || it.adviceRsiTrafficJamInfo.eventLevel == 3){ - val desc = "前方${it.adviceRsiTrafficJamInfo.queueLength}米${it.adviceRsiTrafficJamInfo.roadIdNum}车道拥堵" +// val desc = "前方${it.adviceRsiTrafficJamInfo.queueLength}米${it.adviceRsiTrafficJamInfo.roadIdNum}车道拥堵" + val desc = StringUtils.getString( + R.string.module_core_front_have_block, + it.adviceRsiTrafficJamInfo.queueLength, + it.adviceRsiTrafficJamInfo.roadIdNum) CallerMsgBoxManager.saveMsgBox( MsgBoxBean( MsgBoxType.CLOUD, @@ -146,9 +162,16 @@ object CloudControlManager: INDECloudListener{ if(it.adviceRsiRoadDangerHintInfo.laneOfEventNum > 0){ var lane = "" it.adviceRsiRoadDangerHintInfo.laneOfEvent.forEach { - lane += "第${it}" +// lane += "第${it}" + lane += "${StringUtils.getString(R.string.module_core_di)}${it}" } - val desc = "前方${it.eventRadius}米有${getAlterType(it.adviceRsiRoadDangerHintInfo.alterType)},影响${lane}车道通行" +// val desc = "前方${it.eventRadius}米有${getAlterType(it.adviceRsiRoadDangerHintInfo.alterType)},影响${lane}车道通行" + val desc = StringUtils.getString( + R.string.module_core_front_have_alter, + it.eventRadius, + getAlterType(it.adviceRsiRoadDangerHintInfo.alterType), + lane + ) CallerMsgBoxManager.saveMsgBox( MsgBoxBean( MsgBoxType.CLOUD, @@ -164,7 +187,11 @@ object CloudControlManager: INDECloudListener{ //超视距弱势交通参与者提醒 6051->{ if(it.adviceRsiOverSightDistanceInfo.valid == 1){ - val desc = "前方${it.adviceRsiOverSightDistanceInfo.distance}米有${getWeakType(it.adviceRsiOverSightDistanceInfo.type)}" +// val desc = "前方${it.adviceRsiOverSightDistanceInfo.distance}米有${getWeakType(it.adviceRsiOverSightDistanceInfo.type)}" + val desc = StringUtils.getString( + R.string.module_core_front_have_rsi, + it.adviceRsiOverSightDistanceInfo.distance, + getWeakType(it.adviceRsiOverSightDistanceInfo.type)) CallerMsgBoxManager.saveMsgBox( MsgBoxBean( MsgBoxType.CLOUD, @@ -180,9 +207,11 @@ object CloudControlManager: INDECloudListener{ 6041->{ if(it.adviceRsiOtherCarBreakReadWarningInfo.valid == 1){ val desc = if(it.adviceRsiOtherCarBreakReadWarningInfo.d2StopLine == -1.0){ - "路口内有他车闯红灯" +// "路口内有他车闯红灯" + StringUtils.getString(R.string.module_core_warning_other_vehicle_running_red_light_in_intersection) }else{ - "路口前有他车闯红灯" +// "路口前有他车闯红灯" + StringUtils.getString(R.string.module_core_warning_other_vehicle_running_red_light_before_intersection) } CallerMsgBoxManager.saveMsgBox( MsgBoxBean( @@ -201,9 +230,11 @@ object CloudControlManager: INDECloudListener{ if(it.adviceRsiAbandonInfo.laneOfEventNum > 0){ var lane = "" it.adviceRsiAbandonInfo.lanOfEvent.forEach {lan-> - lane = "$lane${lan}车道" +// lane = "$lane${lan}车道" + lane = "$lane${lan}${StringUtils.getString(R.string.module_core_lane)}" } - val desc = "前方${it.adviceRsiAbandonInfo.distance}米${lane}存在障碍物,影响${lane}通行" +// val desc = "前方${it.adviceRsiAbandonInfo.distance}米${lane}存在障碍物,影响${lane}通行" + val desc = StringUtils.getString(R.string.module_core_front_have_barrier, it.adviceRsiAbandonInfo.distance, lane, lane) CallerMsgBoxManager.saveMsgBox( MsgBoxBean( MsgBoxType.CLOUD, @@ -219,7 +250,8 @@ object CloudControlManager: INDECloudListener{ //能见度预警 6071->{ if(it.adviceRsiVisibilityInfo.valid == 1){ - val desc = "当前能见度为${it.adviceRsiVisibilityInfo.visibilityDis}米" +// val desc = "当前能见度为${it.adviceRsiVisibilityInfo.visibilityDis}米" + val desc = StringUtils.getString(R.string.module_core_current_visibility_distance, it.adviceRsiVisibilityInfo.visibilityDis) CallerMsgBoxManager.saveMsgBox( MsgBoxBean( MsgBoxType.CLOUD, @@ -246,9 +278,11 @@ object CloudControlManager: INDECloudListener{ //紧急车辆优先通行 TODO 没有具体车道 if(adviceEvwInfo.valid == 1){ val desc = if(adviceEvwInfo.alertRadius == 6553.5){ - "前方有${getVehicleType(adviceEvwInfo.type.desc)}" +// "前方有${getVehicleType(adviceEvwInfo.type.desc)}" + StringUtils.getString(R.string.module_core_ahead_has, getVehicleType(adviceEvwInfo.type.desc)) }else{ - "后方${adviceEvwInfo.alertRadius}米有${getVehicleType(adviceEvwInfo.type.desc)}" +// "后方${adviceEvwInfo.alertRadius}米有${getVehicleType(adviceEvwInfo.type.desc)}" + StringUtils.getString(R.string.module_core_behind_has, adviceEvwInfo.alertRadius, getVehicleType(adviceEvwInfo.type.desc)) } CallerMsgBoxManager.saveMsgBox( MsgBoxBean( @@ -273,7 +307,8 @@ object CloudControlManager: INDECloudListener{ ) { //动态限速信息 if(adviceLaneSpdLmtInfo.valid == 1){ - val desc = "道路限速${adviceLaneSpdLmtInfo.speedLmt[0].speedLimit}km/h" +// val desc = "道路限速${adviceLaneSpdLmtInfo.speedLmt[0].speedLimit}km/h" + val desc = "${StringUtils.getString(R.string.module_core_road_speed_limit)}${adviceLaneSpdLmtInfo.speedLmt[0].speedLimit}km/h" CallerMsgBoxManager.saveMsgBox( MsgBoxBean( MsgBoxType.CLOUD, @@ -294,7 +329,8 @@ object CloudControlManager: INDECloudListener{ override fun onNdeCloudAdviceAvw(advicePojo: AdvicePojo, adviceAvwInfo: AdviceAvwInfo) { //异常车辆预警 if(adviceAvwInfo.valid == 1){ - val desc = "前方${adviceAvwInfo.distance}米${adviceAvwInfo.rsiLaneId}车道存在异常车辆" +// val desc = "前方${adviceAvwInfo.distance}米${adviceAvwInfo.rsiLaneId}车道存在异常车辆" + val desc = StringUtils.getString(R.string.module_core_warning_abnormal_vehicle_ahead_lane, adviceAvwInfo.distance, adviceAvwInfo.rsiLaneId) CallerMsgBoxManager.saveMsgBox( MsgBoxBean( MsgBoxType.CLOUD, @@ -322,7 +358,8 @@ object CloudControlManager: INDECloudListener{ AdviceEvwType.FIRE_TRUCK.desc } else->{ - "应急车辆" +// "应急车辆" + StringUtils.getString(R.string.module_core_emergency_vehicle) } } } @@ -330,76 +367,100 @@ object CloudControlManager: INDECloudListener{ private fun getAlterType(alterType: Int): String{ return when(alterType){ 5501->{ - "行人提醒" +// "行人提醒" + StringUtils.getString(R.string.module_core_warning_pedestrian_ahead) } 5502->{ - "非机动车提醒" +// "非机动车提醒" + StringUtils.getString(R.string.module_core_warning_non_motor_vehicle_ahead) } 5503->{ - "紧急制动预警" +// "紧急制动预警" + StringUtils.getString(R.string.module_core_warning_emergency_braking) } 5504->{ - "倒车预警" +// "倒车预警" + StringUtils.getString(R.string.module_core_warning_reverse_alert) } 5505->{ - "逆行预警" +// "逆行预警" + StringUtils.getString(R.string.module_core_warning_opposite_direction_traffic) } 5506->{ - "异常低速预警" +// "异常低速预警" + StringUtils.getString(R.string.module_core_warning_abnormal_low_speed) } 5507->{ - "异常停车预警" +// "异常停车预警" + StringUtils.getString(R.string.module_core_warning_abnormal_parking) } 5508->{ - "超速预" +// "超速预警" + StringUtils.getString(R.string.module_core_warning_speed_exceed_limit) } 5509->{ - "交通拥堵预警" +// "交通拥堵预警" + StringUtils.getString(R.string.module_core_warning_traffic_congestion) } 5510->{ - "特殊车辆预警" +// "特殊车辆预警" + StringUtils.getString(R.string.module_core_warning_special_vehicle_approaching) } 5511->{ - "紧急车辆预警" +// "紧急车辆预警" + StringUtils.getString(R.string.module_core_warning_emergency_vehicle_approaching) } 5512->{ - "车辆状态异常预警" +// "车辆状态异常预警" + StringUtils.getString(R.string.module_core_warning_vehicle_status_abnormal) } 5513->{ - "连续并道预警" +// "连续并道预警" + StringUtils.getString(R.string.module_core_warning_continuous_lane_changing) } 5514->{ - "匝道退回主路预警" +// "匝道退回主路预警" + StringUtils.getString(R.string.module_core_warning_ramp_return_to_main_road) } 5515->{ - "交通管控预警" +// "交通管控预警" + StringUtils.getString(R.string.module_core_warning_traffic_control_implemented) } 5516->{ - "路面低摩阻预警" +// "路面低摩阻预警" + StringUtils.getString(R.string.module_core_warning_road_low_friction) } 5517->{ - "动态车道级限速预警" +// "动态车道级限速预警" + StringUtils.getString(R.string.module_core_warning_dynamic_lane_speed_limit) } 5518->{ - "障碍物提醒" +// "障碍物提醒" + StringUtils.getString(R.string.module_core_warning_obstacle_ahead) } 5519->{ - "红绿灯故障预警" +// "红绿灯故障预警" + StringUtils.getString(R.string.module_core_warning_traffic_light_fault) } 5520->{ - "弱势交通参与者预警" +// "弱势交通参与者预警" + StringUtils.getString(R.string.module_core_warning_vulnerable_road_user_ahead) } 5521->{ - "闯红灯" +// "闯红灯" + StringUtils.getString(R.string.module_core_warning_red_light_run_imminent) } 5522->{ - "机动车压实线变道" +// "机动车压实线变道" + StringUtils.getString(R.string.module_core_notice_solid_line_lane_change) } 5523->{ - "机动车不按导向标识行驶" +// "机动车不按导向标识行驶" + StringUtils.getString(R.string.module_core_notice_incorrect_guide_sign_driving) } else->{ - "预警" +// "预警" + StringUtils.getString(R.string.module_core_warning) } } } @@ -410,13 +471,16 @@ object CloudControlManager: INDECloudListener{ private fun getWeakType(type: Int): String{ return when(type){ 0->{ - "未知" +// "未知" + StringUtils.getString(R.string.module_core_unknown) } 1->{ - "行人" +// "行人" + StringUtils.getString(R.string.module_core_pedestrian) } 2->{ - "非机动车" +// "非机动车" + StringUtils.getString(R.string.module_core_non_motor_vehicle) } else->{ "" diff --git a/core/mogo-core-res/src/main/res/values/string.xml b/core/mogo-core-res/src/main/res/values/string.xml index 1bc9d6f6c3..f60fd6422b 100644 --- a/core/mogo-core-res/src/main/res/values/string.xml +++ b/core/mogo-core-res/src/main/res/values/string.xml @@ -386,12 +386,12 @@ 连接成功的乘客屏SN为: 乘客屏车牌号: Mac地址为: - - - - - - + + + + + + 连接异常 域控未连接或主动断开连接 域控连接异常 @@ -411,27 +411,74 @@ 红灯即将变绿 识别故障即将停车,请注意观察,小心接管 请接管恢复车辆状态 - bag录制成功 - bag录制失败 - 正常 - 异常 - 寻迹算路 - 云Socket连接 - 时间: - - - - 自定义 - 已选%d个包,共 - %s月%s日 - 共计%d个包 (%sG) 已上传%d个包 (%sG) 剩余%d个包 (%sG) - 自定义A - 上报中… - 上报 - 人工 - 采集 - 自动 - 录包失败 - 已上报 + + + + + + + + + + + + + + + + + + + + + + + 建议车速 + ,可绿灯通过前方%d个路口 + 存在闯红灯风险 + 推荐车道: + 第%d车道 + 前方%f米%s车道拥堵 + + 前方%f米有%s,影响%s车道通行 + 前方%f米有%s + 路口内有他车闯红灯 + 路口前有他车闯红灯 + 车道 + 前方%f米%s存在障碍物,影响%s通行 + 当前能见度为%f米 + 前方有%s + 后方%f米有%s + 道路限速 + 前方%f米%d车道存在异常车辆 + 应急车辆 + 行人提醒 + 非机动车提醒 + 紧急制动预警 + 倒车预警 + 逆行预警 + 异常低速预警 + 异常停车预警 + 超速预警 + 交通拥堵预警 + 特殊车辆预警 + 紧急车辆预警 + 车辆状态异常预警 + 连续并道预警 + 匝道退回主路预警 + 交通管控预警 + 路面低摩阻预警 + 动态车道级限速预警 + 障碍物提醒 + 红绿灯故障预警 + 弱势交通参与者预警 + 闯红灯 + 机动车压实线变道 + 机动车不按导向标识行驶 + 预警 + 未知 + 行人 + 非机动车 + \ No newline at end of file