From 066b0173aa94ae4bc4d88b3797437308e0e6d08c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E5=AD=90=E6=9D=8E=C2=B7De?= Date: Sat, 17 Jul 2021 22:47:41 +0800 Subject: [PATCH] add i18n message --- .../anjiplus/template/gaea/business/code/ResponseCode.java | 7 +++++++ .../src/main/resources/i18n/messages_en_US.properties | 6 ++++++ .../src/main/resources/i18n/messages_zh_CN.properties | 6 ++++++ 3 files changed, 19 insertions(+) diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/code/ResponseCode.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/code/ResponseCode.java index 742ba67e..07a4feeb 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/code/ResponseCode.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/code/ResponseCode.java @@ -6,6 +6,13 @@ package com.anjiplus.template.gaea.business.code; * @since 2021-02-22 */ public interface ResponseCode { + + String Not_Null = "field.not.null"; + String Not_Empty = "field.not.empty"; + String MIN = "field.min"; + String MAX = "field.max"; + String DICT_ERROR = "field.dict.error"; + /** * 用户名或者密码不正确 */ diff --git a/report-core/src/main/resources/i18n/messages_en_US.properties b/report-core/src/main/resources/i18n/messages_en_US.properties index 702285db..122f7f33 100644 --- a/report-core/src/main/resources/i18n/messages_en_US.properties +++ b/report-core/src/main/resources/i18n/messages_en_US.properties @@ -6,6 +6,12 @@ 2003=File upload failed 2004=File does not exist +field.not.null={} can not be null +field.not.empty={} can not be empty +field.min={} must great then {} +field.max={} must less then {} +field.dict.error={} value error + login.error=username or password error User.token.expired=User token has expired diff --git a/report-core/src/main/resources/i18n/messages_zh_CN.properties b/report-core/src/main/resources/i18n/messages_zh_CN.properties index f05c8e55..56b93305 100644 --- a/report-core/src/main/resources/i18n/messages_zh_CN.properties +++ b/report-core/src/main/resources/i18n/messages_zh_CN.properties @@ -6,6 +6,12 @@ 2003=\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25 2004=\u6587\u4EF6\u4E0D\u5B58\u5728 +field.not.null={}\u4E0D\u80FD\u4E3Anull +field.not.empty={}\u4E0D\u80FD\u4E3A\u7A7A\u5B57\u7B26\u4E32 +field.min={}\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E{} +field.max={}\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E{} +field.dict.error={}\u5C5E\u6027 + login.error=\u7528\u6237\u540D\u6216\u8005\u5BC6\u7801\u4E0D\u6B63\u786E User.token.expired=\u7528\u6237\u672A\u767B\u5F55\u6216\u767B\u5F55\u4FE1\u606F\u8FC7\u671F