From 96eefab36f2874ec72cdd0d6529f0572b8eae14f Mon Sep 17 00:00:00 2001 From: zhengkunwang <31820853+zhengkunwang223@users.noreply.github.com> Date: Tue, 18 Feb 2025 17:06:10 +0800 Subject: [PATCH] feat: Added underscore support for website default documents (#7898) --- frontend/src/global/form-rules.ts | 2 +- frontend/src/lang/modules/en.ts | 2 +- frontend/src/lang/modules/ja.ts | 2 +- frontend/src/lang/modules/ko.ts | 2 +- frontend/src/lang/modules/ms.ts | 2 +- frontend/src/lang/modules/pt-br.ts | 2 +- frontend/src/lang/modules/ru.ts | 2 +- frontend/src/lang/modules/tw.ts | 2 +- frontend/src/lang/modules/zh.ts | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/frontend/src/global/form-rules.ts b/frontend/src/global/form-rules.ts index d3ba996d2..0eca11d9e 100644 --- a/frontend/src/global/form-rules.ts +++ b/frontend/src/global/form-rules.ts @@ -422,7 +422,7 @@ const checkDoc = (rule: any, value: any, callback: any) => { if (value === '' || typeof value === 'undefined' || value == null) { callback(new Error(i18n.global.t('commons.rule.nginxDoc'))); } else { - const reg = /^[A-Za-z0-9\n./]+$/; + const reg = /^[A-Za-z0-9_\n./]+$/; if (!reg.test(value) && value !== '') { callback(new Error(i18n.global.t('commons.rule.nginxDoc'))); } else { diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 678a0d832..233ced5a9 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -225,7 +225,7 @@ const message = { 'This field must consist of English, numbers, ".", "-", and "_" characters with a length of 2-30.', paramComplexity: `This field mustn't start and end with special characters and must consist of English, numbers, "{0}" characters with a length of 6-128.`, paramUrlAndPort: 'This field must be in the format of "http(s)://(domain name/ip):(port)".', - nginxDoc: 'This field must consist of English, numbers and "." characters.', + nginxDoc: 'This field must consist of English, numbers, _ and "." characters.', appName: 'Supports lowercase letters, numbers, -, and _, length 2-30, and cannot start or end with - or _', containerName: 'Supports letters, numbers, -, _ and .; cannot start with - _ or .; length: 2-128', mirror: 'The mirror acceleration address should start with http(s)://, support English letters (both uppercase and lowercase), numbers, . / and -, and should not contain blank lines.', diff --git a/frontend/src/lang/modules/ja.ts b/frontend/src/lang/modules/ja.ts index 1be34c693..6a4e50ef0 100644 --- a/frontend/src/lang/modules/ja.ts +++ b/frontend/src/lang/modules/ja.ts @@ -224,7 +224,7 @@ const message = { paramComplexity: `このフィールドは、特殊文字で開始および終了する必要はなく、英語、数字「{0}」文字で構成されている必要があります。`, paramUrlAndPort: 'このフィールドは、「http(s)://(domain name/ip):(ポート)」の形式でなければなりません。', - nginxDoc: 'このフィールドは、英語、数字、「」で構成されている必要があります。文字。', + nginxDoc: 'このフィールドは、英語、数字、_、「」で構成されている必要があります。文字。', appName: '小文字の英字、数字、-および_をサポートし、長さは2〜30で、-または_で始まったり終わったりすることはできません', containerName: '文字、数字、 - 、_および。;- _または。で始めることはできません。長さ:2-128', diff --git a/frontend/src/lang/modules/ko.ts b/frontend/src/lang/modules/ko.ts index dff60f088..c421471bb 100644 --- a/frontend/src/lang/modules/ko.ts +++ b/frontend/src/lang/modules/ko.ts @@ -224,7 +224,7 @@ const message = { paramComplexity: '이 필드는 특수 문자로 시작하거나 끝날 수 없으며, 영어, 숫자, "{0}" 문자로 구성되어야 하며 길이는 6-128 자여야 합니다.', paramUrlAndPort: '이 필드는 "http(s)://(도메인 이름/IP):(포트)" 형식이어야 합니다.', - nginxDoc: '이 필드는 영어, 숫자 및 "." 문자로 구성되어야 합니다.', + nginxDoc: '이 필드는 영어, 숫자 및 _ "." 문자로 구성되어야 합니다.', appName: '소문자, 숫자, "-", "_"를 지원하며 길이는 2-30 자이고, "-" 또는 "_"로 시작하거나 끝날 수 없습니다.', containerName: diff --git a/frontend/src/lang/modules/ms.ts b/frontend/src/lang/modules/ms.ts index 7d618dd96..f87c5f185 100644 --- a/frontend/src/lang/modules/ms.ts +++ b/frontend/src/lang/modules/ms.ts @@ -230,7 +230,7 @@ const message = { paramComplexity: 'Ruangan ini tidak boleh bermula atau berakhir dengan aksara khas dan mesti terdiri daripada aksara rumi, nombor, "{0}" dengan panjang 6-128 aksara.', paramUrlAndPort: 'Ruangan ini mesti dalam format "http(s)://(nama domain/IP):(port)".', - nginxDoc: 'Ruangan ini mesti terdiri daripada aksara rumi, nombor, dan ".".', + nginxDoc: 'Ruangan ini mesti terdiri daripada aksara rumi, nombor, _, dan ".".', appName: 'Menyokong huruf kecil, nombor, -, dan _, panjang 2-30, dan tidak boleh bermula atau berakhir dengan - atau _', containerName: diff --git a/frontend/src/lang/modules/pt-br.ts b/frontend/src/lang/modules/pt-br.ts index 3a69518fa..39f8ce456 100644 --- a/frontend/src/lang/modules/pt-br.ts +++ b/frontend/src/lang/modules/pt-br.ts @@ -228,7 +228,7 @@ const message = { paramComplexity: 'Este campo não deve começar ou terminar com caracteres especiais e deve conter letras, números e "{0}" com comprimento de 6-128.', paramUrlAndPort: 'Este campo deve estar no formato "http(s)://(nome do domínio/IP):(porta)".', - nginxDoc: 'Este campo deve conter letras, números e ".".', + nginxDoc: 'Este campo deve conter letras, _, números e ".".', appName: 'Suporta letras minúsculas, números, - e _, comprimento de 2 a 30, e não pode começar ou terminar com - ou _', containerName: diff --git a/frontend/src/lang/modules/ru.ts b/frontend/src/lang/modules/ru.ts index 32a92786b..987d172f1 100644 --- a/frontend/src/lang/modules/ru.ts +++ b/frontend/src/lang/modules/ru.ts @@ -226,7 +226,7 @@ const message = { paramComplexity: 'Это поле не должно начинаться и заканчиваться специальными символами и должно состоять из английских букв, цифр, "{0}" длиной 6-128.', paramUrlAndPort: 'Это поле должно быть в формате "http(s)://(доменное имя/ip):(порт)".', - nginxDoc: 'Это поле должно состоять из английских букв, цифр и ".".', + nginxDoc: 'Это поле должно состоять из английских букв, цифр и _,".".', appName: 'Поддерживает строчные буквы, цифры, - и _, длина 2-30, и не может начинаться или заканчиваться на - или _', containerName: 'Поддерживаются буквы, цифры, -, _ и .; не может начинаться с - _ или .; длина: 2-128', diff --git a/frontend/src/lang/modules/tw.ts b/frontend/src/lang/modules/tw.ts index b0b1ec650..07ee9c055 100644 --- a/frontend/src/lang/modules/tw.ts +++ b/frontend/src/lang/modules/tw.ts @@ -219,7 +219,7 @@ const message = { paramName: '支援英文、數字、.-和_,長度2-64', paramComplexity: '支援英文、數字、{0},長度6-128,特殊字元不能在首尾', paramUrlAndPort: '格式為 http(s)://(域名/ip):(埠)', - nginxDoc: '僅支援英文大小寫,數字,和.', + nginxDoc: '僅支援英文大小寫,數字,_,和.', appName: '支援小寫英文、數字、-和_,長度2-30,並且不能以-_開頭和結尾', containerName: '支援字母、數字、_-和.,不能以-_或.開頭,長度2-128', mirror: '支援以 http(s):// 開頭,英文大小寫,數字,. / 和 - 的鏡像加速地址,且不能有空行', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index fe3d15a44..c9a8532a3 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -218,7 +218,7 @@ const message = { paramName: '支持英文、数字、.-和_,长度2-64', paramComplexity: '支持英文、数字、{0},长度6-128,特殊字符不能在首尾', paramUrlAndPort: '格式为 http(s)://(域名/ip):(端口)', - nginxDoc: '仅支持英文大小写,数字,和.', + nginxDoc: '仅支持英文大小写,数字,_和.', appName: '支持小写英文、数字、-和_,长度2-30,并且不能以-_开头和结尾', containerName: '支持字母、数字、_-和.,不能以-_或.开头,长度2-128', mirror: '支持以 http(s):// 开头,英文大小写,数字,. / 和 - 的镜像加速地址,且不能有空行',