feat: common support i18n
This commit is contained in:
@@ -40,7 +40,7 @@ public class AjaxResult extends HashMap<String, Object>
|
||||
public AjaxResult(int code, String msg)
|
||||
{
|
||||
super.put(CODE_TAG, code);
|
||||
super.put(MSG_TAG, msg);
|
||||
super.put(MSG_TAG, MessageUtils.message(msg));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -53,7 +53,7 @@ public class AjaxResult extends HashMap<String, Object>
|
||||
public AjaxResult(int code, String msg, Object data)
|
||||
{
|
||||
super.put(CODE_TAG, code);
|
||||
super.put(MSG_TAG, msg);
|
||||
super.put(MSG_TAG, MessageUtils.message(msg));
|
||||
if (StringUtils.isNotNull(data))
|
||||
{
|
||||
super.put(DATA_TAG, data);
|
||||
@@ -88,7 +88,7 @@ public class AjaxResult extends HashMap<String, Object>
|
||||
*/
|
||||
public static AjaxResult success(String msg)
|
||||
{
|
||||
return AjaxResult.success(msg, null);
|
||||
return AjaxResult.success(MessageUtils.message(msg), null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -100,7 +100,7 @@ public class AjaxResult extends HashMap<String, Object>
|
||||
*/
|
||||
public static AjaxResult success(String msg, Object data)
|
||||
{
|
||||
return new AjaxResult(HttpStatus.SUCCESS, msg, data);
|
||||
return new AjaxResult(HttpStatus.SUCCESS, MessageUtils.message(msg), data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -111,7 +111,7 @@ public class AjaxResult extends HashMap<String, Object>
|
||||
*/
|
||||
public static AjaxResult warn(String msg)
|
||||
{
|
||||
return AjaxResult.warn(msg, null);
|
||||
return AjaxResult.warn(MessageUtils.message(msg), null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -123,7 +123,7 @@ public class AjaxResult extends HashMap<String, Object>
|
||||
*/
|
||||
public static AjaxResult warn(String msg, Object data)
|
||||
{
|
||||
return new AjaxResult(HttpStatus.WARN, msg, data);
|
||||
return new AjaxResult(HttpStatus.WARN, MessageUtils.message(msg), data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -144,7 +144,7 @@ public class AjaxResult extends HashMap<String, Object>
|
||||
*/
|
||||
public static AjaxResult error(String msg)
|
||||
{
|
||||
return AjaxResult.error(msg, null);
|
||||
return AjaxResult.error(MessageUtils.message(msg), null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -156,7 +156,7 @@ public class AjaxResult extends HashMap<String, Object>
|
||||
*/
|
||||
public static AjaxResult error(String msg, Object data)
|
||||
{
|
||||
return new AjaxResult(HttpStatus.ERROR, msg, data);
|
||||
return new AjaxResult(HttpStatus.ERROR, MessageUtils.message(msg), data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -168,7 +168,7 @@ public class AjaxResult extends HashMap<String, Object>
|
||||
*/
|
||||
public static AjaxResult error(int code, String msg)
|
||||
{
|
||||
return new AjaxResult(code, msg, null);
|
||||
return new AjaxResult(code, MessageUtils.message(msg), null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -83,6 +83,13 @@ system.add.dict.failed.dict.exist=Add dictionary ''{0}'' failed, dictionary type
|
||||
system.modify.dict.failed.dict.exist=Modify dictionary ''{0}'' failed, dictionary type already exists
|
||||
system.add.menu.failed.menu.exist=Add menu ''{0}'' failed, menu name already exists
|
||||
system.add.menu.failed.menu.url=Add menu ''{0}'' failed, address must start with http(s)://
|
||||
system.menu.name.not.blank=Menu name cannot be blank
|
||||
system.menu.name.length.valid=Menu name length cannot exceed 50 characters
|
||||
system.menu.order.not.blank=Display order cannot be blank
|
||||
system.menu.url.length.valid=Menu address cannot exceed 200 characters
|
||||
system.menu.component.length.valid=Component path cannot exceed 255 characters
|
||||
system.menu.type.not.blank=Menu type cannot be blank
|
||||
system.menu.permission.length.valid=Permission string cannot exceed 100 characters
|
||||
system.modify.menu.failed.menu.exist=Modify menu ''{0}'' failed, menu name already exists
|
||||
system.modify.menu.failed.menu.url=Modify menu ''{0}'' failed, address must start with http(s)://
|
||||
system.modify.menu.failed.menu.parent=Modify menu ''{0}'' failed, superior menu cannot be selected by itself
|
||||
@@ -157,6 +164,14 @@ auth.password.retry.limit.exceed=Password input error {0} times
|
||||
## wfc-common
|
||||
common.operate.success=Operation successful
|
||||
common.operate.failed=Operation failed
|
||||
common.no.internal.access.permission=No internal access permission, not allowed to access
|
||||
common.no.user.info=No user information set, not allowed to access
|
||||
common.no.token=No token
|
||||
common.invalid.token=Invalid token
|
||||
common.no.permission=No permission, please contact the administrator to add permissions
|
||||
common.request.path.variable.not.blank=Request path variable''{0}'' cannot be blank
|
||||
common.request.parameter.type.not.match=Request parameter''{0}'' requires type: ''{1}'', but the input value is: ''{2}''
|
||||
common.demo.mode=Demo mode, no operation is allowed
|
||||
|
||||
## system portal menu
|
||||
menu.system.management=System Management
|
||||
|
||||
@@ -83,6 +83,13 @@ system.add.dict.failed.dict.exist=Add dictionary ''{0}'' failed, dictionary type
|
||||
system.modify.dict.failed.dict.exist=Modify dictionary ''{0}'' failed, dictionary type already exists
|
||||
system.add.menu.failed.menu.exist=Add menu ''{0}'' failed, menu name already exists
|
||||
system.add.menu.failed.menu.url=Add menu ''{0}'' failed, address must start with http(s)://
|
||||
system.menu.name.not.blank=Menu name cannot be blank
|
||||
system.menu.name.length.valid=Menu name length cannot exceed 50 characters
|
||||
system.menu.order.not.blank=Display order cannot be blank
|
||||
system.menu.url.length.valid=Menu address cannot exceed 200 characters
|
||||
system.menu.component.length.valid=Component path cannot exceed 255 characters
|
||||
system.menu.type.not.blank=Menu type cannot be blank
|
||||
system.menu.permission.length.valid=Permission string cannot exceed 100 characters
|
||||
system.modify.menu.failed.menu.exist=Modify menu ''{0}'' failed, menu name already exists
|
||||
system.modify.menu.failed.menu.url=Modify menu ''{0}'' failed, address must start with http(s)://
|
||||
system.modify.menu.failed.menu.parent=Modify menu ''{0}'' failed, superior menu cannot be selected by itself
|
||||
@@ -157,6 +164,14 @@ auth.password.retry.limit.exceed=Password input error {0} times
|
||||
## wfc-common
|
||||
common.operate.success=Operation successful
|
||||
common.operate.failed=Operation failed
|
||||
common.no.internal.access.permission=No internal access permission, not allowed to access
|
||||
common.no.user.info=No user information set, not allowed to access
|
||||
common.no.token=No token
|
||||
common.invalid.token=Invalid token
|
||||
common.no.permission=No permission, please contact the administrator to add permissions
|
||||
common.request.path.variable.not.blank=Request path variable''{0}'' cannot be blank
|
||||
common.request.parameter.type.not.match=Request parameter''{0}'' requires type: ''{1}'', but the input value is: ''{2}''
|
||||
common.demo.mode=Demo mode, no operation is allowed
|
||||
|
||||
## system portal menu
|
||||
menu.system.management=System Management
|
||||
|
||||
@@ -83,6 +83,13 @@ system.add.dict.failed.dict.exist=新增字典''{0}''失败,字典类型已存
|
||||
system.modify.dict.failed.dict.exist=修改字典''{0}''失败,字典类型已存在
|
||||
system.add.menu.failed.menu.exist=新增菜单''{0}''失败,菜单名称已存在
|
||||
system.add.menu.failed.menu.url=新增菜单''{0}''失败,地址必须以http(s)://开头
|
||||
system.menu.name.not.blank=菜单名称不能为空
|
||||
system.menu.name.length.valid=菜单名称长度不能超过50个字符
|
||||
system.menu.order.not.blank=显示顺序不能为空
|
||||
system.menu.url.length.valid=路由地址不能超过200个字符
|
||||
system.menu.component.length.valid=组件路径不能超过255个字符
|
||||
system.menu.type.not.blank=菜单类型不能为空
|
||||
system.menu.permission.length.valid=权限标识长度不能超过100个字符
|
||||
system.modify.menu.failed.menu.exist=修改菜单''{0}''失败,菜单名称已存在
|
||||
system.modify.menu.failed.menu.url=修改菜单''{0}''失败,地址必须以http(s)://开头
|
||||
system.modify.menu.failed.menu.parent=修改菜单''{0}''失败,上级菜单不能选择自己
|
||||
@@ -159,6 +166,14 @@ auth.password.retry.limit.exceed=密码输入错误{0}次
|
||||
## wfc-common
|
||||
common.operate.success=操作成功
|
||||
common.operate.failed=操作失败
|
||||
common.no.internal.access.permission=没有内部访问权限,不允许访问
|
||||
common.no.user.info=没有设置用户信息,不允许访问
|
||||
common.no.token=未提供token
|
||||
common.invalid.token=无效的token
|
||||
common.no.permission=没有访问权限,请联系管理员授权
|
||||
common.request.path.variable.not.blank=请求路径中缺少必需的路径变量''{0}''
|
||||
common.request.parameter.type.not.match=请求参数类型不匹配,参数''{0}''要求类型为:''{1}'',但输入值为:''{2}''
|
||||
common.demo.mode=演示模式,不允许操作
|
||||
|
||||
## system portal menu
|
||||
menu.system.management=系统管理
|
||||
|
||||
Reference in New Issue
Block a user