方法补充static
parent
4615e23317
commit
3c49ade7b4
|
@ -3878,8 +3878,8 @@ public class Util extends weaver.general.Util {
|
||||||
* @param newName 新名字
|
* @param newName 新名字
|
||||||
* @param lanuage 要替换的语言 以 7 8 9 举例
|
* @param lanuage 要替换的语言 以 7 8 9 举例
|
||||||
*/
|
*/
|
||||||
public String moreLanugageHandler(String oldName, String newName, String lanuage) {
|
public static String moreLanugageHandler(String oldName, String newName, String lanuage) {
|
||||||
List languageIds = weaver.general.Util.getActiveLanguageIds();//获取系统支持的多语言
|
List languageIds = getActiveLanguageIds();//获取系统支持的多语言
|
||||||
String newMoreLanuage = "";
|
String newMoreLanuage = "";
|
||||||
//要按照当前系统支持的多语言id进行拼接处理
|
//要按照当前系统支持的多语言id进行拼接处理
|
||||||
if (oldName.startsWith("~`~`") && oldName.endsWith("`~`~")) {
|
if (oldName.startsWith("~`~`") && oldName.endsWith("`~`~")) {
|
||||||
|
@ -3888,13 +3888,13 @@ public class Util extends weaver.general.Util {
|
||||||
//多语言的中间处理
|
//多语言的中间处理
|
||||||
String tempLanuage = joinLanuage(newName, languageIds);
|
String tempLanuage = joinLanuage(newName, languageIds);
|
||||||
//中间处理转成map
|
//中间处理转成map
|
||||||
Map splitMultilangData = weaver.general.Util.splitMultilangData(tempLanuage);
|
Map splitMultilangData = splitMultilangData(tempLanuage);
|
||||||
Map<String, String> lanuageMap = new HashMap<>();
|
Map<String, String> lanuageMap = new HashMap<>();
|
||||||
for (Object id : languageIds) {
|
for (Object id : languageIds) {
|
||||||
String labelLanuage = "`~`" + id;
|
String labelLanuage = "`~`" + id;
|
||||||
if (oldName.contains(labelLanuage)) {
|
if (oldName.contains(labelLanuage)) {
|
||||||
//获取过滤的语言name
|
//获取过滤的语言name
|
||||||
String formatLanuageName = weaver.general.Util.formatMultiLang(oldName, String.valueOf(id));
|
String formatLanuageName = formatMultiLang(oldName, String.valueOf(id));
|
||||||
if (!weaver.general.StringUtil.isEmpty(formatLanuageName)) {
|
if (!weaver.general.StringUtil.isEmpty(formatLanuageName)) {
|
||||||
lanuageMap.put(String.valueOf(id), formatLanuageName);
|
lanuageMap.put(String.valueOf(id), formatLanuageName);
|
||||||
}
|
}
|
||||||
|
@ -3911,7 +3911,7 @@ public class Util extends weaver.general.Util {
|
||||||
splitMultilangData.put(entry.getKey(), entry.getValue());
|
splitMultilangData.put(entry.getKey(), entry.getValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
newMoreLanuage = weaver.general.Util.stitchMultilangData(splitMultilangData);
|
newMoreLanuage = stitchMultilangData(splitMultilangData);
|
||||||
} else {
|
} else {
|
||||||
//要根据系统支持的语言进行拼接
|
//要根据系统支持的语言进行拼接
|
||||||
newMoreLanuage = joinLanuage(newName, languageIds);
|
newMoreLanuage = joinLanuage(newName, languageIds);
|
||||||
|
@ -3926,7 +3926,7 @@ public class Util extends weaver.general.Util {
|
||||||
* @param languageIds 系统支持的语言集合
|
* @param languageIds 系统支持的语言集合
|
||||||
* @return 拼接后的字符串
|
* @return 拼接后的字符串
|
||||||
*/
|
*/
|
||||||
public String joinLanuage(String newName, List languageIds) {
|
public static String joinLanuage(String newName, List languageIds) {
|
||||||
StringBuilder supportLanuage = new StringBuilder();
|
StringBuilder supportLanuage = new StringBuilder();
|
||||||
supportLanuage.append("~`~`");
|
supportLanuage.append("~`~`");
|
||||||
languageIds.forEach(id -> {
|
languageIds.forEach(id -> {
|
||||||
|
|
Loading…
Reference in New Issue