[8.2.8][i18n] OCH/common/bridge 中文提取

This commit is contained in:
xinfengkun
2025-12-04 14:21:16 +08:00
parent 434d985bff
commit ed332584bb
6 changed files with 25 additions and 7 deletions

View File

@@ -14,6 +14,8 @@ import com.mogo.eagle.core.function.call.autopilot.CallerParallelDrivingActionsL
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
import com.mogo.eagle.core.utilcode.util.ParseVersionUtils;
import com.mogo.eagle.core.utilcode.util.StringUtils;
import com.mogo.och.bridge.R;
import com.mogo.och.bridge.autopilot.callback.OchAdasStartFailureCallback;
import com.mogo.och.bridge.autopilot.line.LineManager;
import com.zhjt.mogo.adas.data.bean.AutopilotStatistics;
@@ -81,7 +83,8 @@ public class OCHAdasAbilityManager implements IMoGoAutopilotActionsListener, IMo
public String getAutopilotUnAbilityReason() {
try {
if (unableAutopilotReasons == null || unableAutopilotReasons.isEmpty()) {
return "未知异常";
// return "未知异常";
return StringUtils.getString(R.string.module_och_unknown_error);
} else {
StringBuilder stringBuilder = new StringBuilder();
for (int i = 0; i < unableAutopilotReasons.size(); i++) {
@@ -94,7 +97,8 @@ public class OCHAdasAbilityManager implements IMoGoAutopilotActionsListener, IMo
}
} catch (Exception e) {
e.printStackTrace();
return "未知异常";
// return "未知异常";
return StringUtils.getString(R.string.module_och_unknown_error);
}
}

View File

@@ -73,7 +73,8 @@ object OchAutoPilotManager {
if (!FunctionBuildConfig.isDemoMode && !OCHAdasAbilityManager.getInstance().autopilotAbilityStatus) {
val reasons = OCHAdasAbilityManager.getInstance().unableAutopilotReasons
if ("AutopilotAbilityFSM" == OCHAdasAbilityManager.getInstance().abilityVersion && !reasons.isNullOrEmpty()) {
val msg = reasons[0].getUnableLaunchReason() + " 来源:" + reasons[0].source
// val msg = reasons[0].getUnableLaunchReason() + " 来源:" + reasons[0].source
val msg = reasons[0].getUnableLaunchReason() + " ${StringUtils.getString(R.string.module_och_source)}" + reasons[0].source
CallerMsgBoxManager.saveMsgBox(
MsgBoxBean(
MsgBoxType.AUTOPILOT,
@@ -84,7 +85,8 @@ object OchAutoPilotManager {
} else {
ToastUtils.showLong(
OCHAdasAbilityManager.getInstance().autopilotUnAbilityReason +
", 请稍候重试"
// ", 请稍候重试"
StringUtils.getString(R.string.module_och_please_try_again_later)
)
}
return false

View File

@@ -384,7 +384,8 @@ object LineManager : CallerBase<ILineCallback>() {
fun drawGlobalTrajectory(): Pair<Boolean, String> {
if (_lineInfos == null) {
return Pair(false, "请设置正确线路或订单")
// return Pair(false, "请设置正确线路或订单")
return Pair(false, StringUtils.getString(R.string.module_och_please_set_correct_route_or_order))
}
return CallerMapGlobalTrajectoryDrawManager.drawGlobalTrajectory().apply {
if (first) {

View File

@@ -4,7 +4,9 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerVlmManager
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OCHCOMMON
import com.mogo.eagle.core.utilcode.util.StringUtils
import com.mogo.och.bridge.BridgeServiceManager
import com.mogo.och.bridge.R
import com.mogo.och.common.module.biz.birdge.data.RoadMsg
import mogo.telematics.pad.MessagePad.TrackedObject
@@ -77,7 +79,8 @@ object OchNdeManager : IMoGoAutopilotIdentifyListener {
lastTime = System.currentTimeMillis()
val sortedList = roadMsgList.sortedWith(compareByDescending { it.laneNum })
BridgeServiceManager.invokeNdeData("路口车龙","前方路口有车龙",sortedList)
// BridgeServiceManager.invokeNdeData("路口车龙","前方路口有车龙",sortedList)
BridgeServiceManager.invokeNdeData(StringUtils.getString(R.string.module_och_crossing_tailback),StringUtils.getString(R.string.module_och_crossing_tailback_desc),sortedList)
}
}
}

View File

@@ -1,6 +1,8 @@
package com.mogo.och.bridge.device
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.utilcode.util.StringUtils
import com.mogo.och.bridge.R
import com.mogo.och.bridge.autopilot.location.OchLocationManager
import com.mogo.och.common.module.utils.RxUtils
import com.mogo.och.common.module.wigets.toast.ToastCharterUtils
@@ -39,7 +41,8 @@ object LightAirconditionDoorManager {
return if(location.gnssSpeed<0.3){
null
}else{
"车辆行驶中不可以开关门哦~"
// "车辆行驶中不可以开关门哦~"
StringUtils.getString(R.string.module_och_not_can_open_or_close_door)
}
}
}

View File

@@ -449,6 +449,11 @@
<string name="module_och_search_byid">输入ID快速检索</string>
<string name="module_och_history_verify_num_title">累计:</string>
<string name="module_och_start">开始</string>
<string name="module_och_unknown_error">未知异常</string>
<string name="module_och_source">来源:</string>
<string name="module_och_please_try_again_later">,请稍候重试</string>
<string name="module_och_please_set_correct_route_or_order">请设置正确线路或订单</string>
<string name="module_och_not_can_open_or_close_door">车辆行驶中不可以开关门哦~</string>