Translate param tips.

pull/151/head
ruibaby 2019-05-09 22:01:54 +08:00
parent cfaa73aec2
commit 72897a0a7b
14 changed files with 61 additions and 61 deletions

View File

@ -16,8 +16,8 @@ import javax.validation.constraints.Size;
@Data
public class AttachmentParam implements InputConverter<Attachment> {
@NotBlank(message = "Attachment name must not be blank")
@Size(max = 255, message = "Length of attachment name must not be more than {max}")
@NotBlank(message = "附件名称不能为空")
@Size(max = 255, message = "附件名称的字符长度不能超过 {max}")
private String name;
}

View File

@ -19,20 +19,20 @@ import java.lang.reflect.ParameterizedType;
@Data
public abstract class BaseCommentParam<COMMENT> implements InputConverter<COMMENT> {
@NotBlank(message = "评论者称不能为空")
@Size(max = 50, message = "Length of comment author name must not be more than {max}")
@NotBlank(message = "评论者称不能为空")
@Size(max = 50, message = "评论者昵称的字符长度不能超过 {max}")
private String author;
@NotBlank(message = "邮箱不能为空")
@Email(message = "邮箱格式不正确")
@Size(max = 255, message = "邮箱的长度不能超过 {max}")
@Size(max = 255, message = "邮箱的字符长度不能超过 {max}")
private String email;
@Size(max = 127, message = "评论者博客链接不能超过 {max}")
@Size(max = 127, message = "评论者博客链接的字符长度不能超过 {max}")
private String authorUrl;
@NotBlank(message = "评论内容不能为空")
@Size(max = 1023, message = "评论内容的长额不能超过 {max}")
@Size(max = 1023, message = "评论内容的字符长度不能超过 {max}")
private String content;
@Min(value = 1, message = "Post id must not be less than {value}")

View File

@ -22,20 +22,20 @@ public class CategoryParam implements InputConverter<Category> {
/**
* Category name.
*/
@NotBlank(message = "Category name must not be blank")
@Size(max = 50, message = "Length of category name must not be more than {max}")
@NotBlank(message = "分类名称不能为空")
@Size(max = 50, message = "分类名称的字符长度不能超过 {max}")
private String name;
/**
* Category slug name.
*/
@Size(max = 50, message = "Length of category slug name must not be more than {max}")
@Size(max = 50, message = "分类别名的字符长度不能超过 {max}")
private String slugName;
/**
* Category description.
*/
@Size(max = 100, message = "Length of category description must not be more than {max}")
@Size(max = 100, message = "分类描述的字符长度不能超过 {max}")
private String description;
/**

View File

@ -24,7 +24,7 @@ public class InstallParam extends UserParam {
/**
* Blog title.
*/
@NotBlank(message = "Blog title must not be blank", groups = CreateCheck.class)
@NotBlank(message = "博客名称不能为空", groups = CreateCheck.class)
private String title;
/**

View File

@ -16,7 +16,7 @@ import javax.validation.constraints.Size;
@Data
public class JournalParam implements InputConverter<Journal> {
@NotBlank(message = "Content must not be blank")
@Size(max = 511, message = "Length of comment content must not be more than {max}")
@NotBlank(message = "内容不能为空")
@Size(max = 511, message = "内容的字符长度不能超过 {max}")
private String content;
}

View File

@ -17,22 +17,22 @@ import javax.validation.constraints.Size;
@Data
public class LinkParam implements InputConverter<Link> {
@NotBlank(message = "Link name must not be blank")
@Size(max = 255, message = "Length of link name must not be more than {max}")
@NotBlank(message = "友情链接名称不能为空")
@Size(max = 255, message = "友情链接名称的字符长度不能超过 {max}")
private String name;
@NotBlank(message = "Link url must not be blank")
@Size(max = 1023, message = "Length of link url must not be more than {max}")
@URL(message = "Link url format is incorrect")
@NotBlank(message = "友情链接地址不能为空")
@Size(max = 1023, message = "友情链接地址的字符长度不能超过 {max}")
@URL(message = "友情链接地址格式不正确")
private String url;
@Size(max = 1023, message = "Length of link logo must not be more than {max}")
@Size(max = 1023, message = "友情链接 Logo 的字符长度不能超过 {max}")
private String logo;
@Size(max = 255, message = "Length of link description must not be more than {max}")
@Size(max = 255, message = "友情链接描述的字符长度不能超过 {max}")
private String description;
@Size(max = 255, message = "Length of link team must not be more than {max}")
@Size(max = 255, message = "友情链接分组的字符长度 {max}")
private String team;
}

View File

@ -16,12 +16,12 @@ import javax.validation.constraints.Size;
@ToString
public class LoginParam {
@NotBlank(message = "Username or email must not be blank")
@Size(max = 255, message = "Length of username or email must not be more than {max}")
@NotBlank(message = "用户名或邮箱不能为空")
@Size(max = 255, message = "用户名或邮箱的字符长度不能超过 {max}")
private String username;
@NotBlank(message = "Password must not be blank")
@Size(max = 100, message = "Length of password must not be more than {max}")
@NotBlank(message = "登陆密码不能为空")
@Size(max = 100, message = "用户密码字符长度不能超过 {max}")
private String password;
}

View File

@ -19,21 +19,21 @@ import javax.validation.constraints.Size;
@ToString
public class MenuParam implements InputConverter<Menu> {
@NotBlank(message = "Menu name must not be blank")
@Size(max = 50, message = "Length of menu name must not be more than {max}")
@NotBlank(message = "菜单名称不能为空")
@Size(max = 50, message = "菜单名称的字符长度不能超过 {max}")
private String name;
@NotBlank(message = "Menu url must not be blank")
@Size(max = 1023, message = "Length of menu url must not be more than {max}")
@NotBlank(message = "菜单地址不能为空")
@Size(max = 1023, message = "菜单地址的字符长度不能超过 {max}")
private String url;
@Min(value = 0, message = "Menu priority must not be less than {value}")
@Min(value = 0, message = "排序编号不能低于 {value}")
private Integer priority;
@Size(max = 50, message = "Length of menu target must not be more than {max}")
private String target;
@Size(max = 50, message = "Length of menu icon must not be more than {max}")
@Size(max = 50, message = "菜单图标的字符长度不能超过 {max}")
private String icon;
private Integer parentId;

View File

@ -14,12 +14,12 @@ import javax.validation.constraints.Size;
@Data
public class PasswordParam {
@NotBlank(message = "Old password must not be blank")
@Size(max = 100, message = "Length of password must not be more than {max}")
@NotBlank(message = "旧密码不能为空")
@Size(max = 100, message = "密码的字符长度不能超过 {max}")
private String oldPassword;
@NotBlank(message = "New password must not be blank")
@Size(max = 100, message = "Length of password must not be more than {max}")
@NotBlank(message = "新密码不能为空")
@Size(max = 100, message = "密码的字符长度不能超过 {max}")
private String newPassword;
}

View File

@ -16,7 +16,7 @@ import java.util.Date;
@Data
public class PhotoParam implements InputConverter<Photo> {
@NotBlank(message = "Photo name must not be blank")
@NotBlank(message = "照片名称不能为空")
private String name;
private String description;
@ -25,10 +25,10 @@ public class PhotoParam implements InputConverter<Photo> {
private String location;
@NotBlank(message = "Photo thumbnail must not be blank")
@NotBlank(message = "照片缩略图链接地址不能为空")
private String thumbnail;
@NotBlank(message = "Photo url must not be blank")
@NotBlank(message = "照片链接地址不能为空")
private String url;
private String team;

View File

@ -23,25 +23,25 @@ import java.util.Set;
@Data
public class PostParam implements InputConverter<Post> {
@NotBlank(message = "Title must not be blank")
@Size(max = 100, message = "Length of title must not be more than {max}")
@NotBlank(message = "文章标题不能为空")
@Size(max = 100, message = "文章标题的字符长度不能超过 {max}")
private String title;
private PostStatus status = PostStatus.DRAFT;
private String url;
@NotBlank(message = "Original content must not be blank")
@NotBlank(message = "文章内容不能为空")
private String originalContent;
private String summary;
@Size(max = 255, message = "Length of thumbnail must not be more than {max}")
@Size(max = 255, message = "文章缩略图链接的字符长度不能超过 {max}")
private String thumbnail;
private Boolean disallowComment = false;
@Size(max = 255, message = "Length of password must not be more than {max}")
@Size(max = 255, message = "文章密码的字符长度不能超过 {max}")
private String password;
@Size(max = 255, message = "Length of template must not be more than {max}")

View File

@ -19,18 +19,18 @@ import javax.validation.constraints.Size;
@Data
public class SheetParam implements InputConverter<Sheet> {
@NotBlank(message = "Title must not be blank")
@Size(max = 100, message = "Length of title must not be more than {max}")
@NotBlank(message = "页面标题不能为空")
@Size(max = 100, message = "页面标题的字符长度不能超过 {max}")
private String title;
private PostStatus status = PostStatus.DRAFT;
private String url;
@NotBlank(message = "Original content must not be blank")
@NotBlank(message = "页面内容不能为空")
private String originalContent;
@Size(max = 255, message = "Length of thumbnail must not be more than {max}")
@Size(max = 255, message = "页面缩略图链接的字符长度不能超过 {max}")
private String thumbnail;
private Boolean disallowComment = false;

View File

@ -21,11 +21,11 @@ import javax.validation.constraints.Size;
@Data
public class TagParam implements InputConverter<Tag> {
@NotBlank(message = "Tag name must not be blank")
@Size(max = 255, message = "Length of tag name must not be more than {max}")
@NotBlank(message = "标签名称不能为空")
@Size(max = 255, message = "标签名称的字符长度不能超过 {max}")
private String name;
@Size(max = 255, message = "Length of tag slug name must not be more than {max}")
@Size(max = 255, message = "标签别名的字符长度不能超过 {max}")
private String slugName;
@Override

View File

@ -21,27 +21,27 @@ import javax.validation.constraints.Size;
@Data
public class UserParam implements InputConverter<User> {
@NotBlank(message = "Username must not be blank", groups = {AllCheck.class})
@Size(max = 50, message = "Length of username must not be more than {max}", groups = {AllCheck.class})
@NotBlank(message = "用户名不能为空", groups = {AllCheck.class})
@Size(max = 50, message = "用户名的字符长度不能超过 {max}", groups = {AllCheck.class})
private String username;
@NotBlank(message = "Nickname must not be blank", groups = {AllCheck.class})
@Size(max = 255, message = "Length of nickname must not be more than {max}", groups = {AllCheck.class})
@NotBlank(message = "用户昵称不能为空", groups = {AllCheck.class})
@Size(max = 255, message = "用户昵称的字符长度不能超过 {max}", groups = {AllCheck.class})
private String nickname;
@Email(message = "The email format is incorrect", groups = {AllCheck.class})
@NotBlank(message = "Email must not be blank", groups = {AllCheck.class})
@Size(max = 127, message = "Length of email must not be more than {max}", groups = {AllCheck.class})
@Email(message = "电子邮件地址的格式不正确", groups = {AllCheck.class})
@NotBlank(message = "电子邮件地址不能为空", groups = {AllCheck.class})
@Size(max = 127, message = "电子邮件的字符长度不能超过 {max}", groups = {AllCheck.class})
private String email;
@Null(groups = UpdateCheck.class)
@Size(min = 8, max = 100, message = "Length of password must be between {min} and {max}", groups = {CreateCheck.class})
@Size(min = 8, max = 100, message = "密码的字符长度必须在 {min} - {max} 之间", groups = {CreateCheck.class})
private String password;
@Size(max = 1023, message = "Length of avatar link must not be more than {max}", groups = {AllCheck.class})
@Size(max = 1023, message = "头像链接地址的字符长度不能超过 {max}", groups = {AllCheck.class})
private String avatar;
@Size(max = 1023, message = "Length of description must not be more than {max}", groups = {AllCheck.class})
@Size(max = 1023, message = "用户描述的字符长度不能超过 {max}", groups = {AllCheck.class})
private String description;
}