Commit ffea274a authored by alex yao's avatar alex yao

fix

parent 1e875b92
...@@ -56,6 +56,8 @@ import java.io.IOException; ...@@ -56,6 +56,8 @@ import java.io.IOException;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.util.*; import java.util.*;
import static cn.com.poc.common.constant.XLangConstant.*;
@Component @Component
public class AgentApplicationInfoServiceImpl implements AgentApplicationInfoService { public class AgentApplicationInfoServiceImpl implements AgentApplicationInfoService {
...@@ -791,16 +793,15 @@ public class AgentApplicationInfoServiceImpl implements AgentApplicationInfoServ ...@@ -791,16 +793,15 @@ public class AgentApplicationInfoServiceImpl implements AgentApplicationInfoServ
ToolFunction toolFunction = new ToolFunction(); ToolFunction toolFunction = new ToolFunction();
BizAgentApplicationPluginEntity bizAgentApplicationPluginEntity = bizAgentApplicationPluginService.getInfoById(functionResult.getFunctionName()); BizAgentApplicationPluginEntity bizAgentApplicationPluginEntity = bizAgentApplicationPluginService.getInfoById(functionResult.getFunctionName());
if (bizAgentApplicationPluginEntity != null && !bizAgentApplicationPluginEntity.getClassification().equals("system")) { if (bizAgentApplicationPluginEntity != null && !bizAgentApplicationPluginEntity.getClassification().equals("system")) {
Locale currentLocale = Context.get().getMessageSource().getCurrentLocale(); String lang = BlContext.getCurrentLocaleLanguageToLowerCase();
String languageTag = currentLocale.toLanguageTag(); switch (lang) {
switch (languageTag) { case ZH_CN:
case "zh-CN":
toolFunction.setName(bizAgentApplicationPluginEntity.getZhCnTitle()); toolFunction.setName(bizAgentApplicationPluginEntity.getZhCnTitle());
break; break;
case "en": case ZH_TW:
toolFunction.setName(bizAgentApplicationPluginEntity.getZhTwTitle()); toolFunction.setName(bizAgentApplicationPluginEntity.getZhTwTitle());
break; break;
case "zh-TW": case EN:
toolFunction.setName(bizAgentApplicationPluginEntity.getEnTitle()); toolFunction.setName(bizAgentApplicationPluginEntity.getEnTitle());
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment