From bd1f001619d181cea1884a7f854c2db669978ff7 Mon Sep 17 00:00:00 2001 From: linbangquan <1437892690@qq.com> Date: Wed, 28 Feb 2024 15:37:31 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E9=85=8D=E7=BD=AE-=E9=87=8D=E5=BB=BA=E7=B4=A2=E5=BC=95-?= =?UTF-8?q?=E7=B4=A2=E5=BC=95=E7=B1=BB=E5=9E=8B=E5=90=8D=E7=A7=B0=E6=B2=A1?= =?UTF-8?q?=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1025132393365504]系统配置-重建索引-索引类型名称没翻译 http://192.168.0.96:8090/demo/rdm.html#/bug-detail/939050947543040/939050947543057/1025132393365504 --- .../core/FullTextIndexHandlerFactory.java | 8 ++++++++ .../framework/fulltextindex/enums/Status.java | 11 +++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/main/java/neatlogic/framework/fulltextindex/core/FullTextIndexHandlerFactory.java b/src/main/java/neatlogic/framework/fulltextindex/core/FullTextIndexHandlerFactory.java index 82efd2af4..b569128db 100644 --- a/src/main/java/neatlogic/framework/fulltextindex/core/FullTextIndexHandlerFactory.java +++ b/src/main/java/neatlogic/framework/fulltextindex/core/FullTextIndexHandlerFactory.java @@ -32,6 +32,7 @@ import java.util.stream.Collectors; public class FullTextIndexHandlerFactory extends ModuleInitializedListenerBase { private static final Map componentMap = new HashMap<>(); private static final List fullTextIndexTypeList = new ArrayList<>(); + private static final Map fullTextIndexTypeMap = new HashMap<>(); public static IFullTextIndexHandler getHandler(String type) { @@ -70,6 +71,12 @@ public class FullTextIndexHandlerFactory extends ModuleInitializedListenerBase { for (ModuleVo moduleVo : moduleList) { returnTypeList.addAll(fullTextIndexTypeList.stream().filter(type -> type.getModuleId().equals(moduleVo.getId())).collect(Collectors.toList())); } + for (FullTextIndexTypeVo typeVo : returnTypeList) { + IFullTextIndexType fullTextIndexType = fullTextIndexTypeMap.get(typeVo.getType()); + if (fullTextIndexType != null) { + typeVo.setTypeName(fullTextIndexType.getTypeName()); + } + } return returnTypeList; } @@ -104,6 +111,7 @@ public class FullTextIndexHandlerFactory extends ModuleInitializedListenerBase { if (component.getType() != null) { componentMap.put(component.getType().getType(), component); fullTextIndexTypeList.add(new FullTextIndexTypeVo(context.getModuleId(), component.getType().getType(), component.getType().getTypeName(), component.getType().isActiveGlobalSearch())); + fullTextIndexTypeMap.put(component.getType().getType(), component.getType()); } } } diff --git a/src/main/java/neatlogic/framework/fulltextindex/enums/Status.java b/src/main/java/neatlogic/framework/fulltextindex/enums/Status.java index 03bb7bda3..fc1688856 100644 --- a/src/main/java/neatlogic/framework/fulltextindex/enums/Status.java +++ b/src/main/java/neatlogic/framework/fulltextindex/enums/Status.java @@ -17,16 +17,15 @@ package neatlogic.framework.fulltextindex.enums; import neatlogic.framework.util.$; -import neatlogic.framework.util.I18n; public enum Status { - DOING("doing", new I18n("重建中")), - DONE("done", new I18n("重建完毕")); + DOING("doing", "nffe.status.doing"), + DONE("done", "nffe.status.done"); private final String value; - private final I18n text; + private final String text; - Status(String _value, I18n _text) { + Status(String _value, String _text) { this.value = _value; this.text = _text; } @@ -36,7 +35,7 @@ public enum Status { } public String getText() { - return $.t(text.toString()); + return $.t(text); } public static String getValue(String _status) { -- Gitee