releases(发布): 准备beta 2.11.6.5

This commit is contained in:
小吾立 2024-06-17 10:56:37 +08:00
parent 820be14b83
commit c33646fbbb
4 changed files with 13 additions and 4 deletions

View File

@ -115,6 +115,15 @@ public class I18nMessageUtil {
}
}
/**
* 尝试获取语言
*
* @return 语言
*/
public static String tryGetNormalLanguage() {
return normalLanguage(tryGetLanguage());
}
/**
* 尝试获取语言
*

View File

@ -286,7 +286,7 @@ public class IndexControl extends BaseServerController {
UserModel userModel = getUserModel();
String workspaceId = nodeService.getCheckUserWorkspace(request);
JSONObject config = systemParametersServer.getConfigDefNewInstance(StrUtil.format("menus_config_{}", workspaceId), JSONObject.class);
String language = I18nMessageUtil.tryGetLanguage();
String language = I18nMessageUtil.tryGetNormalLanguage();
// 菜单
InputStream inputStream = ResourceUtil.getStream("classpath:/menus/" + language + "/index.json");
JSONArray showArray = config.getJSONArray("serverMenuKeys");
@ -328,7 +328,7 @@ public class IndexControl extends BaseServerController {
@SystemPermission
public IJsonMessage<List<Object>> systemMenusData(HttpServletRequest request) {
UserModel userModel = getUserModel();
String language = I18nMessageUtil.tryGetLanguage();
String language = I18nMessageUtil.tryGetNormalLanguage();
// 菜单
InputStream inputStream = ResourceUtil.getStream("classpath:/menus/" + language + "/system.json");
String json = IoUtil.read(inputStream, CharsetUtil.CHARSET_UTF_8);

View File

@ -180,7 +180,7 @@ public class NodeUpdateController extends BaseServerController {
@GetMapping(value = "fast_install.json", produces = MediaType.APPLICATION_JSON_VALUE)
public IJsonMessage<JSONObject> fastInstall(HttpServletRequest request) {
boolean beta = RemoteVersion.betaRelease();
String language = I18nMessageUtil.tryGetLanguage();
String language = I18nMessageUtil.tryGetNormalLanguage();
InputStream inputStream = ResourceUtil.getStream("classpath:/fast-install/" + language + (beta ? "/beta.json" : "/release.json"));
String json = IoUtil.read(inputStream, CharsetUtil.CHARSET_UTF_8);
JSONObject jsonObject = new JSONObject();

View File

@ -279,7 +279,7 @@ public class WorkspaceController extends BaseServerController {
JSONObject config = systemParametersServer.getConfigDefNewInstance(StrUtil.format("menus_config_{}", workspaceId), JSONObject.class);
//"classpath:/menus/index.json"
//"classpath:/menus/node-index.json"
String language = I18nMessageUtil.tryGetLanguage();
String language = I18nMessageUtil.tryGetNormalLanguage();
config.put("serverMenus", this.readMenusJson("classpath:/menus/" + language + "/index.json"));
return JsonMessage.success("", config);
}