2
0

feat: system support i18n return message

This commit is contained in:
zhangsz
2025-01-21 19:50:49 +08:00
parent a70c5d3cd9
commit 40bc0b612b
12 changed files with 130 additions and 47 deletions

View File

@@ -3,6 +3,7 @@ package org.wfc.common.core.web.domain;
import java.util.HashMap;
import java.util.Objects;
import org.wfc.common.core.constant.HttpStatus;
import org.wfc.common.core.utils.MessageUtils;
import org.wfc.common.core.utils.StringUtils;
/**
@@ -66,7 +67,7 @@ public class AjaxResult extends HashMap<String, Object>
*/
public static AjaxResult success()
{
return AjaxResult.success("操作成功");
return AjaxResult.success(MessageUtils.message("common.operate.success"));
}
/**
@@ -76,7 +77,7 @@ public class AjaxResult extends HashMap<String, Object>
*/
public static AjaxResult success(Object data)
{
return AjaxResult.success("操作成功", data);
return AjaxResult.success(MessageUtils.message("common.operate.success"), data);
}
/**
@@ -132,7 +133,7 @@ public class AjaxResult extends HashMap<String, Object>
*/
public static AjaxResult error()
{
return AjaxResult.error("操作失败");
return AjaxResult.error(MessageUtils.message("common.operate.failed"));
}
/**

View File

@@ -66,10 +66,7 @@ tenant.expired=Sorry, your tenant has expired. Please contact the administrator.
## wfc-modules-user
user.kyc.birthdate.not.blank=Date of birth cannot be blank
user.kyc.birthdate.not.valid=Date of birth format error
user.client.not.redirect.params=not wanfi redirect params
user.modify.user=Modify user information
user.modify.user.phone.exist=failed, phone number already existss
user.modify.user.email.exist=failed, email already exists
user.client.not.redirect.params=not WANFi redirect params
user.modify.user.phone.exist=Modify user ''{0}'' failed, phone number already exists
user.modify.user.email.exist=Modify user ''{0}'' failed, email already exists
user.modify.user.failed.contact.administrator=Modify personal information exception, please contact the administrator
@@ -80,4 +77,42 @@ user.avatar.file.format.error=Avatar fFile format is incorrect, please upload a
user.file.service.error.contact.administrator=File service exception, please contact the administrator
user.avatar.upload.error.contact.administrator=Upload image exception, please contact the administrator
user.not.register=The current system has not enabled the registration function
user.name.or.password.error=Username or password error
user.name.or.password.error=Username or password error
## wfc-modules-system
system.add.dict.failed.dict.exist=Add dictionary ''{0}'' failed, dictionary type already exists
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.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
system.delete.menu.failed.menu.child=There are submenus, deletion is not allowed
system.delete.menu.failed.menu.assign=Menu has been assigned, deletion is not allowed
system.modify.password.failed.error.old.password=Failed to modify password, old password error
system.modify.password.failed.new.password.same.old.password=The new password cannot be the same as the old password
system.modify.password.failed.contact.administrator=Modify password exception, please contact the administrator
system.upload.file.format.error=File format is incorrect, please upload a ''{0}'' format file
system.file.service.error.contact.administrator=File service exception, please contact the administrator
system.upload.file.error.contact.administrator=Upload file exception, please contact the administrator
system.role.add.failed.role.exist=Add role ''{0}'' failed, role name already exists
system.role.add.failed.role.permission.exist=Add role ''{0}'' failed, role permission already exists
system.role.modify.failed.role.exist=Modify role ''{0}'' failed, role name already exists
system.role.modify.failed.role.permission.exist=Modify role ''{0}'' failed, role permission already exists
system.no.register=The current system has not enabled the registration function
system.role.delete.failed.role.assigned=The role ''{0}'' has been assigned and cannot be deleted
system.role.no.permission=No permission to access role data
system.user.no.exist=User does not exist
system.user.add.user.failed.user.exist=Add user ''{0}'' failed, login account already exists
system.user.add.user.failed.phone.exist=Add user ''{0}'' failed, phone number already exists
system.user.add.user.failed.email.exist=Add user ''{0}'' failed, email already exists
system.user.modify.user.failed.user.exist=Modify user ''{0}'' failed, login account already exists
system.user.modify.user.failed.phone.exist=Modify user ''{0}'' failed, phone number already exists
system.user.modify.user.failed.email.exist=Modify user ''{0}'' failed, email already exists
system.user.modify.failed.contact.administrator=Modify personal information exception, please contact the administrator
system.user.cannot.delete=The current user cannot be deleted
system.config.cannot.delete.builtin=The built-in parameter {0} cannot be deleted
## wfc-common
common.operate.success=Operation successful
common.operate.failed=Operation failed

View File

@@ -67,7 +67,6 @@ tenant.expired=对不起,您的租户已过期,请联系管理员
user.kyc.birthdate.not.blank=出生日期不能为空
user.kyc.birthdate.not.valid=出生日期格式错误
user.client.not.redirect.params=WANFi缺失重定向参数
user.modify.user=修改用户信息
user.modify.user.phone.exist=修改用户''{0}''失败,手机号已存在
user.modify.user.email.exist=修改用户''{0}''失败,邮箱已存在
user.modify.user.failed.contact.administrator=修改个人信息异常,请联系管理员
@@ -79,3 +78,42 @@ user.file.service.error.contact.administrator=文件服务异常,请联系管
user.avatar.upload.error.contact.administrator=上传图片异常,请联系管理员
user.not.register=当前系统没有开启注册功能
user.name.or.password.error=用户名或密码错误
## wfc-modules-system
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.modify.menu.failed.menu.exist=修改菜单''{0}''失败,菜单名称已存在
system.modify.menu.failed.menu.url=修改菜单''{0}''失败地址必须以http(s)://开头
system.modify.menu.failed.menu.parent=修改菜单''{0}''失败,上级菜单不能选择自己
system.delete.menu.failed.menu.child=存在子菜单,不允许删除
system.delete.menu.failed.menu.assign=菜单已分配,不允许删除
system.modify.password.failed.error.old.password=修改密码失败,旧密码错误
system.modify.password.failed.new.password.same.old.password=新密码不能与旧密码相同
system.modify.password.failed.contact.administrator=修改密码异常,请联系管理员
system.upload.file.format.error=文件格式不正确,请上传''{0}''格式
system.file.service.error.contact.administrator=文件服务异常,请联系管理员
system.upload.file.error.contact.administrator=上传文件异常,请联系管理员
system.role.add.failed.role.exist=新增角色''{0}''失败,角色名称已存在
system.role.add.failed.role.permission.exist=新增角色''{0}''失败,角色权限已存在
system.role.modify.failed.role.exist=修改角色''{0}''失败,角色名称已存在
system.role.modify.failed.role.permission.exist=修改角色''{0}''失败,角色权限已存在
system.no.register=当前系统没有开启注册功能
system.role.delete.failed.role.assigned=''{0}''角色已分配,不允许删除
system.role.delete.failed.super.admin=不允许操作超级管理员角色
system.role.no.permission=没有权限访问角色数据
system.user.no.exist=用户不存在
system.user.add.user.failed.user.exist=新增用户''{0}''失败,登录账号已存在
system.user.add.user.failed.phone.exist=新增用户''{0}''失败,手机号码已存在
system.user.add.user.failed.email.exist=新增用户''{0}''失败,邮箱账号已存在
system.user.modify.user.failed.user.exist=修改用户''{0}''失败,登录账号已存在
system.user.modify.user.failed.phone.exist=修改用户''{0}''失败,手机号码已存在
system.user.modify.user.failed.email.exist=修改用户''{0}''失败,邮箱账号已存在
system.user.modify.failed.contact.administrator=修改个人信息异常,请联系管理员
system.user.cannot.delete=当前用户不能删除
system.config.cannot.delete.builtin=内置参数{0}不能删除
system.dict.delete.failed.dict.assigned=字典数据{0}已分配,不能删除
## wfc-common
common.operate.success=操作成功
common.operate.failed=操作失败