From 31c339c78ee568c85450c30c8af029b3b58252b1 Mon Sep 17 00:00:00 2001 From: WangXu10 Date: Mon, 24 Jul 2023 11:43:48 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AF=BC=E5=85=A5=E7=94=A8=E6=88=B7=E5=A7=93?= =?UTF-8?q?=E5=90=8D=E9=95=BF=E5=BA=A6=E6=8F=90=E7=A4=BA=E4=B8=8E=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E7=94=A8=E6=88=B7=E5=A7=93=E5=90=8D=E9=95=BF=E5=BA=A6?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E4=B8=8D=E4=B8=80=E8=87=B4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1028086 --user=王旭 【系统设置】github#25748,系统设置-用户:excel导入用户提示名称不能超出64字符,改成名称刚好64 页面上再修改这个用户 提示字段在2-50 https://www.tapd.cn/55049933/s/1396363 --- .../java/io/metersphere/excel/listener/UserDataListener.java | 4 ++-- .../backend/src/main/resources/i18n/messages_en_US.properties | 2 +- .../backend/src/main/resources/i18n/messages_zh_CN.properties | 2 +- .../backend/src/main/resources/i18n/messages_zh_TW.properties | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/system-setting/backend/src/main/java/io/metersphere/excel/listener/UserDataListener.java b/system-setting/backend/src/main/java/io/metersphere/excel/listener/UserDataListener.java index 0b83889462..328cf0c89d 100644 --- a/system-setting/backend/src/main/java/io/metersphere/excel/listener/UserDataListener.java +++ b/system-setting/backend/src/main/java/io/metersphere/excel/listener/UserDataListener.java @@ -88,8 +88,8 @@ public class UserDataListener extends EasyExcelListener { stringBuilder.append(Translator.get("user_import_id_too_long") + ";"); } - if (data.getName().length() > 64) { - stringBuilder.append(Translator.get("user_import_name_too_long") + ";"); + if (data.getName().length() > 50 || data.getName().length() < 2) { + stringBuilder.append(Translator.get("user_import_name_length_limit") + ";"); } if (containsChineseCharacter(data.getId())) { diff --git a/system-setting/backend/src/main/resources/i18n/messages_en_US.properties b/system-setting/backend/src/main/resources/i18n/messages_en_US.properties index feb2ddd4bd..edad9b1bf5 100644 --- a/system-setting/backend/src/main/resources/i18n/messages_en_US.properties +++ b/system-setting/backend/src/main/resources/i18n/messages_en_US.properties @@ -7,4 +7,4 @@ plugin_parse_error=Plugin parse error plugin_type_error=Plugin type selection error! user_import_id_not_chinese=User id cannot be Chinese user_import_id_too_long=User ID length cannot exceed 50 characters -user_import_name_too_long=Username length cannot exceed 64 characters \ No newline at end of file +user_import_name_length_limit=The name must be between 2-50 characters in length \ No newline at end of file diff --git a/system-setting/backend/src/main/resources/i18n/messages_zh_CN.properties b/system-setting/backend/src/main/resources/i18n/messages_zh_CN.properties index a9a5407515..1156ac56be 100644 --- a/system-setting/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/system-setting/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -7,4 +7,4 @@ plugin_parse_error=插件解析失败 plugin_type_error=插件类型选择错误! user_import_id_not_chinese=用户ID不能为中文 user_import_id_too_long=用户ID长度不能超过50个字符 -user_import_name_too_long=用户名称长度不能超过64个字符 +user_import_name_length_limit=姓名长度必须在2-50个字符之间 diff --git a/system-setting/backend/src/main/resources/i18n/messages_zh_TW.properties b/system-setting/backend/src/main/resources/i18n/messages_zh_TW.properties index 0c586fcc06..37baaaa962 100644 --- a/system-setting/backend/src/main/resources/i18n/messages_zh_TW.properties +++ b/system-setting/backend/src/main/resources/i18n/messages_zh_TW.properties @@ -7,4 +7,4 @@ plugin_parse_error=插件解析失敗! plugin_type_error=插件類型選擇錯誤! user_import_id_not_chinese=用戶id不能為中文 user_import_id_too_long=用戶ID長度不能超過50個字符 -user_import_name_too_long=用戶名稱長度不能超過64個字符 \ No newline at end of file +user_import_name_length_limit=姓名長度必須在2-50個字符之間 \ No newline at end of file