Commit ffea274a authored by alex yao's avatar alex yao

fix

parent 1e875b92
......@@ -56,6 +56,8 @@ import java.io.IOException;
import java.io.PrintWriter;
import java.util.*;
import static cn.com.poc.common.constant.XLangConstant.*;
@Component
public class AgentApplicationInfoServiceImpl implements AgentApplicationInfoService {
......@@ -791,16 +793,15 @@ public class AgentApplicationInfoServiceImpl implements AgentApplicationInfoServ
ToolFunction toolFunction = new ToolFunction();
BizAgentApplicationPluginEntity bizAgentApplicationPluginEntity = bizAgentApplicationPluginService.getInfoById(functionResult.getFunctionName());
if (bizAgentApplicationPluginEntity != null && !bizAgentApplicationPluginEntity.getClassification().equals("system")) {
Locale currentLocale = Context.get().getMessageSource().getCurrentLocale();
String languageTag = currentLocale.toLanguageTag();
switch (languageTag) {
case "zh-CN":
String lang = BlContext.getCurrentLocaleLanguageToLowerCase();
switch (lang) {
case ZH_CN:
toolFunction.setName(bizAgentApplicationPluginEntity.getZhCnTitle());
break;
case "en":
case ZH_TW:
toolFunction.setName(bizAgentApplicationPluginEntity.getZhTwTitle());
break;
case "zh-TW":
case EN:
toolFunction.setName(bizAgentApplicationPluginEntity.getEnTitle());
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