mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-12-02 03:48:05 +08:00
releases(发布): 准备beta 2.11.6.5
This commit is contained in:
parent
820be14b83
commit
c33646fbbb
@ -115,6 +115,15 @@ public class I18nMessageUtil {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 尝试获取语言
|
||||
*
|
||||
* @return 语言
|
||||
*/
|
||||
public static String tryGetNormalLanguage() {
|
||||
return normalLanguage(tryGetLanguage());
|
||||
}
|
||||
|
||||
/**
|
||||
* 尝试获取语言
|
||||
*
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user