diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/network/DispatchServiceModel.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/network/DispatchServiceModel.kt index 09534eeaaa..9d5cc789b2 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/network/DispatchServiceModel.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/network/DispatchServiceModel.kt @@ -7,10 +7,12 @@ import com.mogo.eagle.core.data.BaseData import com.mogo.eagle.core.data.autopilot.AutopilotRouteInfo.RouteModels import com.mogo.eagle.core.data.biz.dispatch.ReportDispatchResult import com.mogo.eagle.core.data.biz.dispatch.ReportedRoute +import com.mogo.eagle.core.function.biz.R import com.mogo.eagle.core.network.MoGoRetrofitFactory import com.mogo.eagle.core.network.RequestOptions import com.mogo.eagle.core.network.SubscribeImpl import com.mogo.eagle.core.network.utils.GsonUtil +import com.mogo.eagle.core.utilcode.util.StringUtils import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.schedulers.Schedulers import java.util.* @@ -106,7 +108,8 @@ class DispatchServiceModel private constructor() { if (!e.message.isNullOrBlank()) { onError?.invoke(e.message!!) } else { - onError?.invoke("上报失败") +// onError?.invoke("上报失败") + onError?.invoke(StringUtils.getString(R.string.module_core_reporting_failed)) } } diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/monitoring/CronTaskManager.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/monitoring/CronTaskManager.kt index 36ceb1af06..d0acd18efe 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/monitoring/CronTaskManager.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/monitoring/CronTaskManager.kt @@ -7,11 +7,13 @@ import com.mogo.commons.constants.HostConst import com.mogo.commons.utils.RetryWithDelay import com.mogo.eagle.core.data.biz.camera.CameraEntity import com.mogo.eagle.core.data.biz.camera.ReqLiveCarBean +import com.mogo.eagle.core.function.biz.R import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager import com.mogo.eagle.core.function.call.hmi.CallerHmiManager import com.mogo.eagle.core.network.MoGoRetrofitFactory import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BIZ +import com.mogo.eagle.core.utilcode.util.StringUtils import com.mogo.eagle.function.biz.monitoring.net.ICameraListServices import io.reactivex.Observable import io.reactivex.android.schedulers.AndroidSchedulers @@ -178,7 +180,8 @@ class CronTaskManager { if (!flvString.isNullOrEmpty()) { success(flvString) } else { - error(Throwable("flvUrl为空")) +// error(Throwable("flvUrl为空")) + error(Throwable(StringUtils.getString(R.string.module_core_fvl_url_null))) } } else { error(Throwable(it.msg)) diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/redlightwarning/RedLightWarningManager.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/redlightwarning/RedLightWarningManager.kt index 5283eb0ce0..c4047aa8ed 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/redlightwarning/RedLightWarningManager.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/redlightwarning/RedLightWarningManager.kt @@ -14,6 +14,7 @@ import com.mogo.eagle.core.data.biz.trafficlight.TrafficLightStatusHelper.getCur import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTrafficLightListener import com.mogo.eagle.core.function.api.v2x.IMoGoVipSetListener +import com.mogo.eagle.core.function.biz.R import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager import com.mogo.eagle.core.function.call.hmi.CallerHmiManager import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager @@ -23,6 +24,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X import com.mogo.eagle.core.utilcode.util.CoordinateUtils import com.mogo.eagle.core.utilcode.util.LocationUtils +import com.mogo.eagle.core.utilcode.util.StringUtils import com.mogo.eagle.core.utilcode.util.ThreadUtils import com.mogo.eagle.function.biz.v2x.trafficlight.core.MogoTrafficLightManager import com.zhjt.service_biz.BizConfig @@ -132,8 +134,10 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener, val originRemainSpeed = floor(distance / (remainTime + trafficLightResult.flashYellow + 1.5) * 3.6).toInt() when { - originRemainSpeed > 50 -> greenLightWarning("10到50") - originRemainSpeed in 10..50 -> greenLightWarning("10到$originRemainSpeed") +// originRemainSpeed > 50 -> greenLightWarning("10到50") + originRemainSpeed > 50 -> greenLightWarning(StringUtils.getString(R.string.module_core_10_to_50)) +// originRemainSpeed in 10..50 -> greenLightWarning("10到$originRemainSpeed") + originRemainSpeed in 10..50 -> greenLightWarning("${StringUtils.getString(R.string.module_core_10_to_any)}$originRemainSpeed") } } } @@ -146,8 +150,10 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener, // 单位Km/h,当前为黄灯,推荐速度越慢越容易绿灯通过,且要满足[10,50] val originRemainSpeed = floor(distance / (remainTime + 1.5) * 3.6).toInt() when { - originRemainSpeed > 50 -> greenLightWarning("10到50") - originRemainSpeed in 10..50 -> greenLightWarning("10到$originRemainSpeed") +// originRemainSpeed > 50 -> greenLightWarning("10到50") + originRemainSpeed > 50 -> greenLightWarning(StringUtils.getString(R.string.module_core_10_to_50)) +// originRemainSpeed in 10..50 -> greenLightWarning("10到$originRemainSpeed") + originRemainSpeed in 10..50 -> greenLightWarning("${StringUtils.getString(R.string.module_core_10_to_any)}$originRemainSpeed") } } } @@ -160,8 +166,10 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener, // 单位Km/h,当前为绿灯,推荐速度越快越容易绿灯通过,且要满足[10,50] val originRemainSpeed = ceil(distance / (remainTime - 1.5) * 3.6).toInt() when { - originRemainSpeed < 10 -> greenLightWarning("10到50") - originRemainSpeed in 10..50 -> greenLightWarning("${originRemainSpeed}到50") +// originRemainSpeed < 10 -> greenLightWarning("10到50") + originRemainSpeed < 10 -> greenLightWarning(StringUtils.getString(R.string.module_core_10_to_50)) +// originRemainSpeed in 10..50 -> greenLightWarning("${originRemainSpeed}到50") + originRemainSpeed in 10..50 -> greenLightWarning("${originRemainSpeed}${StringUtils.getString(R.string.module_core_any_to_50)}") } } } diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/trafficlight/network/TrafficLightNetWorkModel.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/trafficlight/network/TrafficLightNetWorkModel.kt index e5360016e6..6b0d613fc2 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/trafficlight/network/TrafficLightNetWorkModel.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/trafficlight/network/TrafficLightNetWorkModel.kt @@ -4,11 +4,13 @@ import com.mogo.commons.constants.HostConst import com.mogo.commons.storage.SharedPrefsMgr import com.mogo.eagle.core.data.BaseResponse import com.mogo.eagle.core.data.biz.trafficlight.* +import com.mogo.eagle.core.function.biz.R import com.mogo.eagle.core.network.MoGoRetrofitFactory import com.mogo.eagle.core.network.apiCall import com.mogo.eagle.core.network.cancel import com.mogo.eagle.core.network.request import com.mogo.eagle.core.utilcode.util.GsonUtils +import com.mogo.eagle.core.utilcode.util.StringUtils import com.mogo.map.MogoData.Companion.mogoMapData class TrafficLightNetWorkModel { @@ -86,7 +88,8 @@ class TrafficLightNetWorkModel { if (it.result != null) { onSuccess.invoke(it.result) } else { - onError.invoke(it.msg ?: "返回result数据为null") +// onError.invoke(it.msg ?: "返回result数据为null") + onError.invoke(it.msg ?: StringUtils.getString(R.string.module_core_result_data_null)) } } onError { diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XEventManager.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XEventManager.kt index 97c3bae91d..8e71439dd0 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XEventManager.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XEventManager.kt @@ -32,6 +32,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener import com.mogo.eagle.core.function.api.autopilot.IMoGoV2XListener import com.mogo.eagle.core.function.api.cloud.IMoGoCloudListener +import com.mogo.eagle.core.function.biz.R import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager @@ -47,6 +48,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X import com.mogo.eagle.core.utilcode.util.CoordinateUtils import com.mogo.eagle.core.utilcode.util.GsonUtils +import com.mogo.eagle.core.utilcode.util.StringUtils import com.mogo.eagle.core.utilcode.util.Utils import com.mogo.eagle.function.biz.v2x.V2XBizTrace import com.mogo.eagle.function.biz.v2x.v2n.V2XPoiLoader.Companion.v2xPoiLoader @@ -233,11 +235,13 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IV2XCallback, // 1004 -> { //V2N_RSM,静止事件,包括异常停车、异常静止障碍物 // } 1005 -> { //V2N_RSI,施工事件,包括锥桶或者挡板围城的施工场景,是个多边形包围区域 - tts = "自动驾驶正在提前规划绕开前方道路施工" +// tts = "自动驾驶正在提前规划绕开前方道路施工" + tts = StringUtils.getString(R.string.module_core_auto_drive_preplan_avoid_road_construction) EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGONG.poiType } 1007 -> { //三角牌 - tts = "自动驾驶正在提前规划绕开前方交通事故" +// tts = "自动驾驶正在提前规划绕开前方交通事故" + tts = StringUtils.getString(R.string.module_core_auto_drive_preplan_avoid_front_accident) EventTypeEnumNew.FOURS_ACCIDENT_04.poiType } else -> { @@ -334,7 +338,11 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IV2XCallback, private fun sendToMsgBox(count: Int) { val msgBoxBean = - MsgBoxBean(MsgBoxType.V2X, V2XMsg("", "查询到当前全程共${count}个事件", "",CommunicationType.V2N.name)) +// MsgBoxBean(MsgBoxType.V2X, V2XMsg("", "查询到当前全程共${count}个事件", "",CommunicationType.V2N.name)) + MsgBoxBean( + MsgBoxType.V2X, + V2XMsg("", StringUtils.getString(R.string.module_core_query_whole_route_total_events, count), "", CommunicationType.V2N.name) + ) msgBoxBean.sourceType = DataSourceType.SUMMARY V2XBizTrace.onAck("$M_V2X$TAG", mapOf("v2xEventsSummary" to msgBoxBean)) CallerMsgBoxManager.saveMsgBox(msgBoxBean) diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XPoiLoader.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XPoiLoader.kt index 3c8f1ff45a..c2e958db39 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XPoiLoader.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XPoiLoader.kt @@ -10,9 +10,11 @@ import com.mogo.eagle.core.data.msgbox.MsgBoxType import com.mogo.eagle.core.data.msgbox.V2XMsg import com.mogo.eagle.core.data.v2x.V2XEvent import com.mogo.eagle.core.data.v2x.V2XMarkerResponse +import com.mogo.eagle.core.function.biz.R import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant +import com.mogo.eagle.core.utilcode.util.StringUtils import com.mogo.eagle.core.utilcode.util.UiThreadHandler import com.mogo.eagle.function.biz.v2x.V2XBizTrace import com.mogo.eagle.function.biz.v2x.v2n.network.V2XRefreshModel @@ -160,7 +162,11 @@ class V2XPoiLoader private constructor() { val size = it?.size ?: 0 if (size > 0) { val msgBoxBean = - MsgBoxBean(MsgBoxType.V2X, V2XMsg("", "查询到当前全程共${size}个事件", "",CommunicationType.V2N.name)) +// MsgBoxBean(MsgBoxType.V2X, V2XMsg("", "查询到当前全程共${size}个事件", "",CommunicationType.V2N.name)) + MsgBoxBean( + MsgBoxType.V2X, + V2XMsg("", StringUtils.getString(R.string.module_core_query_whole_route_total_events, size), "", CommunicationType.V2N.name) + ) msgBoxBean.sourceType = DataSourceType.SUMMARY V2XBizTrace.onAck("${SceneConstant.M_V2X}$TAG", mapOf("v2xEventsSummary" to msgBoxBean)) CallerMsgBoxManager.saveMsgBox(msgBoxBean) diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt index c3a548e264..e52b921051 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt @@ -39,6 +39,7 @@ import com.mogo.eagle.core.utilcode.util.CoordinateTransform import com.mogo.eagle.core.utilcode.util.CoordinateUtils import com.mogo.eagle.core.utilcode.util.DrivingDirectionUtils import com.mogo.eagle.core.utilcode.util.GsonUtils +import com.mogo.eagle.core.utilcode.util.StringUtils import com.mogo.eagle.core.utilcode.util.ThreadUtils import com.mogo.eagle.core.utilcode.util.Utils import com.mogo.eagle.function.biz.v2x.V2XBizTrace @@ -190,9 +191,13 @@ internal object V2NIdentifyDrawer : IEventDismissListener { } } val contentType = - if (poiType == EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGONG.poiType) "道路施工" else "道路事故" - val content = "前方${distance.toInt()}米有$contentType" - val tts = "前方${distance.toInt()}米有$contentType" +// if (poiType == EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGONG.poiType) "道路施工" else "道路事故" + StringUtils.getString(if (poiType == EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGONG.poiType) R.string.module_core_road_construction else R.string.module_core_road_accident) + +// val content = "前方${distance.toInt()}米有$contentType" + val content = StringUtils.getString(R.string.module_core_front_have, distance.toInt(), contentType) +// val tts = "前方${distance.toInt()}米有$contentType" + val tts = content V2XBizTrace.onAck(TAG, "绘制poi事件:$poiType") saveMsgBox( MsgBoxBean( @@ -806,7 +811,8 @@ internal object V2NIdentifyDrawer : IEventDismissListener { saveMsgBox(MsgBoxBean( MsgBoxType.NDE, NDEMsg( - "", "路口车龙", "前方路口有车龙" +// "", "路口车龙", "前方路口有车龙" + "", StringUtils.getString(R.string.module_och_crossing_tailback), StringUtils.getString(R.string.module_och_crossing_tailback_desc) ).also { it.setRoadList(sortedList) } @@ -815,7 +821,8 @@ internal object V2NIdentifyDrawer : IEventDismissListener { if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) { ThreadUtils.runOnUiThread { AIAssist.getInstance(Utils.getApp()) - .speakTTSVoiceWithLevel("前方路口有车龙", AIAssist.NEW_LEVEL_2) +// .speakTTSVoiceWithLevel("前方路口有车龙", AIAssist.NEW_LEVEL_2) + .speakTTSVoiceWithLevel(StringUtils.getString(R.string.module_och_crossing_tailback_desc), AIAssist.NEW_LEVEL_2) } } } diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/warning/V2XFrontWarningScenario.java b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/warning/V2XFrontWarningScenario.java index 44c9598e1e..425ff7b33e 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/warning/V2XFrontWarningScenario.java +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/warning/V2XFrontWarningScenario.java @@ -21,8 +21,10 @@ import com.mogo.eagle.core.data.msgbox.MsgBoxType; import com.mogo.eagle.core.data.msgbox.V2XMsg; import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener; import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener; +import com.mogo.eagle.core.function.biz.R; import com.mogo.eagle.core.function.call.hmi.CallerHmiManager; import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager; +import com.mogo.eagle.core.utilcode.util.StringUtils; import com.mogo.eagle.function.biz.v2x.v2n.scenario.impl.AbsV2XScenario; import com.mogo.eagle.function.biz.v2x.v2n.scenario.view.IV2XMarker; import com.mogo.eagle.core.data.v2x.V2XWarningTarget; @@ -100,12 +102,15 @@ public class V2XFrontWarningScenario extends AbsV2XScenario implements IMoGoChas switch (entity.getType()) { case 1: case 11: - entity.setTts("注意行人"); +// entity.setTts("注意行人"); + entity.setTts(StringUtils.getString(R.string.module_core_watch_pedestrians)); return EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_PERSON.getPoiType(); case 2: - entity.setTts("注意自行车"); +// entity.setTts("注意自行车"); + entity.setTts(StringUtils.getString(R.string.module_core_watch_bicycle)); case 4: - entity.setTts("注意摩托车"); +// entity.setTts("注意摩托车"); + entity.setTts(StringUtils.getString(R.string.module_core_watch_motorbike)); return EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.getPoiType(); } return "0"; @@ -116,7 +121,8 @@ public class V2XFrontWarningScenario extends AbsV2XScenario implements IMoGoChas //距离四舍五入保留整数 BigDecimal bg = BigDecimal.valueOf(dis); double disBig = bg.setScale(0, RoundingMode.HALF_UP).doubleValue(); - String distance = String.format(Locale.getDefault(), "%.0f", disBig) + "米"; +// String distance = String.format(Locale.getDefault(), "%.0f", disBig) + "米"; + String distance = String.format(Locale.getDefault(), "%.0f", disBig) + StringUtils.getString(R.string.module_och_m); String content = entity.getWarningContent(); SpannableStringBuilder ssb = new SpannableStringBuilder(content + distance); ssb.setSpan(new ForegroundColorSpan(Color.parseColor("#FF3036")), content.length(), ssb.length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE); diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/utils/V2NUtils.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/utils/V2NUtils.kt index 78e7d903bf..a023d6248b 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/utils/V2NUtils.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/utils/V2NUtils.kt @@ -2,6 +2,8 @@ package com.mogo.eagle.function.biz.v2x.v2n.utils import android.util.Log import androidx.annotation.WorkerThread +import com.mogo.eagle.core.function.biz.R +import com.mogo.eagle.core.utilcode.util.StringUtils import com.mogo.map.MapDataWrapper import com.mogo.map.entities.Lane import com.zhidaoauto.map.data.road.CenterLine @@ -70,7 +72,8 @@ object V2NUtils { fun computeBestLane(laneId: Int, occupy: List, total: List): Pair { if (occupy.size == total.size) { - return Pair(Int.MIN_VALUE, "更换路线") +// return Pair(Int.MIN_VALUE, "更换路线") + return Pair(Int.MIN_VALUE, StringUtils.getString(R.string.module_core_change_line)) } val map = HashMap() if (total.size % 2 == 0) { @@ -78,17 +81,22 @@ object V2NUtils { for (i in 0 until half) { val left = total[i] val right = total[half + i] - map[left.id] = "驶入左${i + 1}车道" - map[right.id] = "驶入右${i + 1}车道" +// map[left.id] = "驶入左${i + 1}车道" + map[left.id] = StringUtils.getString(R.string.module_core_drive_into_left_lane, (i + 1)) +// map[right.id] = "驶入右${i + 1}车道" + map[right.id] = StringUtils.getString(R.string.module_core_drive_into_right_lane, (i + 1)) } } else { val middle = total.size / 2 - map[total[middle].id] = "驶入中间车道" +// map[total[middle].id] = "驶入中间车道" + map[total[middle].id] = StringUtils.getString(R.string.module_core_drive_into_center_lane) for (i in 0 until middle) { val left = total[i] val right = total[middle + i + 1] - map[left.id] = "驶入左${i + 1}车道" - map[right.id] = "驶入右${i + 1}车道" +// map[left.id] = "驶入左${i + 1}车道" + map[left.id] = StringUtils.getString(R.string.module_core_drive_into_left_lane, (i + 1)) +// map[right.id] = "驶入右${i + 1}车道" + map[right.id] = StringUtils.getString(R.string.module_core_drive_into_right_lane, (i + 1)) } } val ids = occupy.map { it.id } @@ -103,8 +111,10 @@ object V2NUtils { delta = abs } } - return Pair(best, map[best] ?: "更换路线") +// return Pair(best, map[best] ?: "更换路线") + return Pair(best, map[best] ?: StringUtils.getString(R.string.module_core_change_line)) } - return Pair(Int.MIN_VALUE, "更换路线") +// return Pair(Int.MIN_VALUE, "更换路线") + return Pair(Int.MIN_VALUE, StringUtils.getString(R.string.module_core_change_line)) } } \ No newline at end of file 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 7fd6cba2ca..635c63dff3 100644 --- a/core/mogo-core-res/src/main/res/values/string.xml +++ b/core/mogo-core-res/src/main/res/values/string.xml @@ -366,5 +366,23 @@ 当前MAP版本不支持360环视,请升级MAP版本 尚未建立连接 已连接,不要重复连接 + flvUrl为空 + 10到50 + 10到 + 到50 + 返回result数据为null + 自动驾驶正在提前规划绕开前方道路施工 + 自动驾驶正在提前规划绕开前方交通事故 + 查询到当前全程共%d个事件 + 道路施工 + 道路事故 + 前方%d米有%s + 注意行人 + 注意自行车 + 注意摩托车 + 更换路线 + 驶入左%d车道 + 驶入右%d车道 + 驶入中间车道 \ No newline at end of file