mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-06-04 11:14:10 +08:00
chore: improve the check time of variable name (#7569)
This commit is contained in:
parent
0a7ab9a47d
commit
399d7cd596
@ -42,18 +42,19 @@ const ConfigModal: FC<IConfigModalProps> = ({
|
|||||||
const { type, label, variable, options, max_length } = tempPayload
|
const { type, label, variable, options, max_length } = tempPayload
|
||||||
|
|
||||||
const isStringInput = type === InputVarType.textInput || type === InputVarType.paragraph
|
const isStringInput = type === InputVarType.textInput || type === InputVarType.paragraph
|
||||||
const handlePayloadChange = useCallback((key: string) => {
|
const checkVariableName = useCallback((value: string) => {
|
||||||
return (value: any) => {
|
const { isValid, errorMessageKey } = checkKeys([value], false)
|
||||||
if (key === 'variable') {
|
|
||||||
const { isValid, errorKey, errorMessageKey } = checkKeys([value], true)
|
|
||||||
if (!isValid) {
|
if (!isValid) {
|
||||||
Toast.notify({
|
Toast.notify({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
message: t(`appDebug.varKeyError.${errorMessageKey}`, { key: errorKey }),
|
message: t(`appDebug.varKeyError.${errorMessageKey}`, { key: t('appDebug.variableConig.varName') }),
|
||||||
})
|
})
|
||||||
return
|
return false
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
return true
|
||||||
|
}, [t])
|
||||||
|
const handlePayloadChange = useCallback((key: string) => {
|
||||||
|
return (value: any) => {
|
||||||
setTempPayload((prev) => {
|
setTempPayload((prev) => {
|
||||||
const newPayload = {
|
const newPayload = {
|
||||||
...prev,
|
...prev,
|
||||||
@ -63,19 +64,20 @@ const ConfigModal: FC<IConfigModalProps> = ({
|
|||||||
return newPayload
|
return newPayload
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}, [t])
|
}, [])
|
||||||
|
|
||||||
const handleVarKeyBlur = useCallback((e: any) => {
|
const handleVarKeyBlur = useCallback((e: any) => {
|
||||||
if (tempPayload.label)
|
const varName = e.target.value
|
||||||
|
if (!checkVariableName(varName) || tempPayload.label)
|
||||||
return
|
return
|
||||||
|
|
||||||
setTempPayload((prev) => {
|
setTempPayload((prev) => {
|
||||||
return {
|
return {
|
||||||
...prev,
|
...prev,
|
||||||
label: e.target.value,
|
label: varName,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, [tempPayload])
|
}, [checkVariableName, tempPayload.label])
|
||||||
|
|
||||||
const handleConfirm = () => {
|
const handleConfirm = () => {
|
||||||
const moreInfo = tempPayload.variable === payload?.variable
|
const moreInfo = tempPayload.variable === payload?.variable
|
||||||
@ -84,10 +86,11 @@ const ConfigModal: FC<IConfigModalProps> = ({
|
|||||||
type: ChangeType.changeVarName,
|
type: ChangeType.changeVarName,
|
||||||
payload: { beforeKey: payload?.variable || '', afterKey: tempPayload.variable },
|
payload: { beforeKey: payload?.variable || '', afterKey: tempPayload.variable },
|
||||||
}
|
}
|
||||||
if (!tempPayload.variable) {
|
|
||||||
Toast.notify({ type: 'error', message: t('appDebug.variableConig.errorMsg.varNameRequired') })
|
const isVariableNameValid = checkVariableName(tempPayload.variable)
|
||||||
|
if (!isVariableNameValid)
|
||||||
return
|
return
|
||||||
}
|
|
||||||
// TODO: check if key already exists. should the consider the edit case
|
// TODO: check if key already exists. should the consider the edit case
|
||||||
// if (varKeys.map(key => key?.trim()).includes(tempPayload.variable.trim())) {
|
// if (varKeys.map(key => key?.trim()).includes(tempPayload.variable.trim())) {
|
||||||
// Toast.notify({
|
// Toast.notify({
|
||||||
|
@ -237,11 +237,11 @@ const translation = {
|
|||||||
typeSelect: 'Auswählen',
|
typeSelect: 'Auswählen',
|
||||||
},
|
},
|
||||||
varKeyError: {
|
varKeyError: {
|
||||||
canNoBeEmpty: 'Variablenschlüssel darf nicht leer sein',
|
canNoBeEmpty: '{{key}} ist erforderlich',
|
||||||
tooLong: 'Variablenschlüssel: {{key}} zu lang. Darf nicht länger als 30 Zeichen sein',
|
tooLong: '{{key}} zu lang. Darf nicht länger als 30 Zeichen sein',
|
||||||
notValid: 'Variablenschlüssel: {{key}} ist ungültig. Darf nur Buchstaben, Zahlen und Unterstriche enthalten',
|
notValid: '{{key}} ist ungültig. Darf nur Buchstaben, Zahlen und Unterstriche enthalten',
|
||||||
notStartWithNumber: 'Variablenschlüssel: {{key}} darf nicht mit einer Zahl beginnen',
|
notStartWithNumber: '{{key}} darf nicht mit einer Zahl beginnen',
|
||||||
keyAlreadyExists: 'Variablenschlüssel: :{{key}} existiert bereits',
|
keyAlreadyExists: '{{key}} existiert bereits',
|
||||||
},
|
},
|
||||||
otherError: {
|
otherError: {
|
||||||
promptNoBeEmpty: 'Prompt darf nicht leer sein',
|
promptNoBeEmpty: 'Prompt darf nicht leer sein',
|
||||||
|
@ -290,11 +290,11 @@ const translation = {
|
|||||||
typeSelect: 'Select',
|
typeSelect: 'Select',
|
||||||
},
|
},
|
||||||
varKeyError: {
|
varKeyError: {
|
||||||
canNoBeEmpty: 'Variable key can not be empty',
|
canNoBeEmpty: '{{key}} is required',
|
||||||
tooLong: 'Variable key: {{key}} too length. Can not be longer then 30 characters',
|
tooLong: '{{key}} is too length. Can not be longer then 30 characters',
|
||||||
notValid: 'Variable key: {{key}} is invalid. Can only contain letters, numbers, and underscores',
|
notValid: '{{key}} is invalid. Can only contain letters, numbers, and underscores',
|
||||||
notStartWithNumber: 'Variable key: {{key}} can not start with a number',
|
notStartWithNumber: '{{key}} can not start with a number',
|
||||||
keyAlreadyExists: 'Variable key: :{{key}} already exists',
|
keyAlreadyExists: '{{key}} already exists',
|
||||||
},
|
},
|
||||||
otherError: {
|
otherError: {
|
||||||
promptNoBeEmpty: 'Prompt can not be empty',
|
promptNoBeEmpty: 'Prompt can not be empty',
|
||||||
@ -323,7 +323,6 @@ const translation = {
|
|||||||
'content': 'Content',
|
'content': 'Content',
|
||||||
'required': 'Required',
|
'required': 'Required',
|
||||||
'errorMsg': {
|
'errorMsg': {
|
||||||
varNameRequired: 'Variable name is required',
|
|
||||||
labelNameRequired: 'Label name is required',
|
labelNameRequired: 'Label name is required',
|
||||||
varNameCanBeRepeat: 'Variable name can not be repeated',
|
varNameCanBeRepeat: 'Variable name can not be repeated',
|
||||||
atLeastOneOption: 'At least one option is required',
|
atLeastOneOption: 'At least one option is required',
|
||||||
|
@ -248,11 +248,11 @@ const translation = {
|
|||||||
typeSelect: 'Seleccionar',
|
typeSelect: 'Seleccionar',
|
||||||
},
|
},
|
||||||
varKeyError: {
|
varKeyError: {
|
||||||
canNoBeEmpty: 'La clave de la variable no puede estar vacía',
|
canNoBeEmpty: 'Se requiere {{key}}',
|
||||||
tooLong: 'Clave de la variable: {{key}} demasiado larga. No puede tener más de 30 caracteres',
|
tooLong: '{{key}} demasiado larga. No puede tener más de 30 caracteres',
|
||||||
notValid: 'Clave de la variable: {{key}} no es válida. Solo puede contener letras, números y guiones bajos',
|
notValid: '{{key}} no es válida. Solo puede contener letras, números y guiones bajos',
|
||||||
notStartWithNumber: 'Clave de la variable: {{key}} no puede comenzar con un número',
|
notStartWithNumber: '{{key}} no puede comenzar con un número',
|
||||||
keyAlreadyExists: 'Clave de la variable: {{key}} ya existe',
|
keyAlreadyExists: '{{key}} ya existe',
|
||||||
},
|
},
|
||||||
otherError: {
|
otherError: {
|
||||||
promptNoBeEmpty: 'La indicación no puede estar vacía',
|
promptNoBeEmpty: 'La indicación no puede estar vacía',
|
||||||
|
@ -283,11 +283,11 @@ const translation = {
|
|||||||
typeSelect: 'انتخاب',
|
typeSelect: 'انتخاب',
|
||||||
},
|
},
|
||||||
varKeyError: {
|
varKeyError: {
|
||||||
canNoBeEmpty: 'کلید متغیر نمیتواند خالی باشد',
|
canNoBeEmpty: '{{key}} مطلوب',
|
||||||
tooLong: 'کلید متغیر: {{key}} طولانی است. نمیتواند بیش از 30 کاراکتر باشد',
|
tooLong: '{{key}} طولانی است. نمیتواند بیش از 30 کاراکتر باشد',
|
||||||
notValid: 'کلید متغیر: {{key}} نامعتبر است. فقط میتواند شامل حروف، اعداد و زیرخط باشد',
|
notValid: '{{key}} نامعتبر است. فقط میتواند شامل حروف، اعداد و زیرخط باشد',
|
||||||
notStartWithNumber: 'کلید متغیر: {{key}} نمیتواند با عدد شروع شود',
|
notStartWithNumber: '{{key}} نمیتواند با عدد شروع شود',
|
||||||
keyAlreadyExists: 'کلید متغیر: :{{key}} از قبل وجود دارد',
|
keyAlreadyExists: '{{key}} از قبل وجود دارد',
|
||||||
},
|
},
|
||||||
otherError: {
|
otherError: {
|
||||||
promptNoBeEmpty: 'پرس و جو نمیتواند خالی باشد',
|
promptNoBeEmpty: 'پرس و جو نمیتواند خالی باشد',
|
||||||
|
@ -237,11 +237,11 @@ const translation = {
|
|||||||
typeSelect: 'Sélectionner',
|
typeSelect: 'Sélectionner',
|
||||||
},
|
},
|
||||||
varKeyError: {
|
varKeyError: {
|
||||||
canNoBeEmpty: 'La clé variable ne peut pas être vide',
|
canNoBeEmpty: '{{key}} est obligatoire',
|
||||||
tooLong: 'Variable key: {{key}} too length. Can not be longer then 30 characters',
|
tooLong: '{{key}} too length. Can not be longer then 30 characters',
|
||||||
notValid: 'Variable key: {{key}} is invalid. Can only contain letters, numbers, and underscores',
|
notValid: '{{key}} is invalid. Can only contain letters, numbers, and underscores',
|
||||||
notStartWithNumber: 'Variable key: {{key}} can not start with a number',
|
notStartWithNumber: '{{key}} can not start with a number',
|
||||||
keyAlreadyExists: 'Variable key: :{{key}} already exists',
|
keyAlreadyExists: '{{key}} already exists',
|
||||||
},
|
},
|
||||||
otherError: {
|
otherError: {
|
||||||
promptNoBeEmpty: 'Le prompt ne peut pas être vide',
|
promptNoBeEmpty: 'Le prompt ne peut pas être vide',
|
||||||
|
@ -276,14 +276,14 @@ const translation = {
|
|||||||
typeSelect: 'चुनें',
|
typeSelect: 'चुनें',
|
||||||
},
|
},
|
||||||
varKeyError: {
|
varKeyError: {
|
||||||
canNoBeEmpty: 'वेरिएबल कुंजी खाली नहीं हो सकती',
|
canNoBeEmpty: '{{key}} आवश्यक है',
|
||||||
tooLong:
|
tooLong:
|
||||||
'वेरिएबल कुंजी: {{key}} बहुत लंबी है। 30 वर्णों से अधिक नहीं हो सकती',
|
'{{key}} बहुत लंबी है। 30 वर्णों से अधिक नहीं हो सकती',
|
||||||
notValid:
|
notValid:
|
||||||
'वेरिएबल कुंजी: {{key}} अवैध है। केवल अक्षर, संख्याएं, और अंडरस्कोर शामिल हो सकते हैं',
|
'{{key}} अवैध है। केवल अक्षर, संख्याएं, और अंडरस्कोर शामिल हो सकते हैं',
|
||||||
notStartWithNumber:
|
notStartWithNumber:
|
||||||
'वेरिएबल कुंजी: {{key}} एक संख्या से प्रारंभ नहीं हो सकती',
|
'{{key}} एक संख्या से प्रारंभ नहीं हो सकती',
|
||||||
keyAlreadyExists: 'वेरिएबल कुंजी: {{key}} पहले से मौजूद है',
|
keyAlreadyExists: '{{key}} पहले से मौजूद है',
|
||||||
},
|
},
|
||||||
otherError: {
|
otherError: {
|
||||||
promptNoBeEmpty: 'प्रॉम्प्ट खाली नहीं हो सकता',
|
promptNoBeEmpty: 'प्रॉम्प्ट खाली नहीं हो सकता',
|
||||||
|
@ -278,14 +278,14 @@ const translation = {
|
|||||||
typeSelect: 'Seleziona',
|
typeSelect: 'Seleziona',
|
||||||
},
|
},
|
||||||
varKeyError: {
|
varKeyError: {
|
||||||
canNoBeEmpty: 'La chiave della variabile non può essere vuota',
|
canNoBeEmpty: '{{key}} è obbligatorio',
|
||||||
tooLong:
|
tooLong:
|
||||||
'La chiave della variabile: {{key}} è troppo lunga. Non può essere più lunga di 30 caratteri',
|
'{{key}} è troppo lunga. Non può essere più lunga di 30 caratteri',
|
||||||
notValid:
|
notValid:
|
||||||
'La chiave della variabile: {{key}} non è valida. Può contenere solo lettere, numeri e underscore',
|
'{{key}} non è valida. Può contenere solo lettere, numeri e underscore',
|
||||||
notStartWithNumber:
|
notStartWithNumber:
|
||||||
'La chiave della variabile: {{key}} non può iniziare con un numero',
|
'{{key}} non può iniziare con un numero',
|
||||||
keyAlreadyExists: 'La chiave della variabile: {{key}} esiste già',
|
keyAlreadyExists: '{{key}} esiste già',
|
||||||
},
|
},
|
||||||
otherError: {
|
otherError: {
|
||||||
promptNoBeEmpty: 'Il prompt non può essere vuoto',
|
promptNoBeEmpty: 'Il prompt non può essere vuoto',
|
||||||
|
@ -284,11 +284,11 @@ const translation = {
|
|||||||
typeSelect: '選択',
|
typeSelect: '選択',
|
||||||
},
|
},
|
||||||
varKeyError: {
|
varKeyError: {
|
||||||
canNoBeEmpty: '変数キーを空にすることはできません',
|
canNoBeEmpty: '{{key}} は必須です',
|
||||||
tooLong: '変数キー: {{key}} が長すぎます。30文字を超えることはできません',
|
tooLong: '{{key}} が長すぎます。30文字を超えることはできません',
|
||||||
notValid: '変数キー: {{key}} が無効です。文字、数字、アンダースコアのみを含めることができます',
|
notValid: '{{key}} が無効です。文字、数字、アンダースコアのみを含めることができます',
|
||||||
notStartWithNumber: '変数キー: {{key}} は数字で始めることはできません',
|
notStartWithNumber: '{{key}} は数字で始めることはできません',
|
||||||
keyAlreadyExists: '変数キー: {{key}} はすでに存在します',
|
keyAlreadyExists: '{{key}} はすでに存在します',
|
||||||
},
|
},
|
||||||
otherError: {
|
otherError: {
|
||||||
promptNoBeEmpty: 'プロンプトを空にすることはできません',
|
promptNoBeEmpty: 'プロンプトを空にすることはできません',
|
||||||
|
@ -248,11 +248,11 @@ const translation = {
|
|||||||
typeSelect: '선택',
|
typeSelect: '선택',
|
||||||
},
|
},
|
||||||
varKeyError: {
|
varKeyError: {
|
||||||
canNoBeEmpty: '변수 키를 비울 수 없습니다',
|
canNoBeEmpty: '{{key}}가 필요합니다',
|
||||||
tooLong: '변수 키: {{key}}가 너무 깁니다. 30자를 넘을 수 없습니다',
|
tooLong: '{{key}}가 너무 깁니다. 30자를 넘을 수 없습니다',
|
||||||
notValid: '변수 키: {{key}}가 유효하지 않습니다. 문자, 숫자, 밑줄만 포함할 수 있습니다',
|
notValid: '{{key}}가 유효하지 않습니다. 문자, 숫자, 밑줄만 포함할 수 있습니다',
|
||||||
notStartWithNumber: '변수 키: {{key}}는 숫자로 시작할 수 없습니다',
|
notStartWithNumber: '{{key}}는 숫자로 시작할 수 없습니다',
|
||||||
keyAlreadyExists: '변수 키: {{key}}는 이미 존재합니다',
|
keyAlreadyExists: '{{key}}는 이미 존재합니다',
|
||||||
},
|
},
|
||||||
otherError: {
|
otherError: {
|
||||||
promptNoBeEmpty: '프롬프트를 비울 수 없습니다',
|
promptNoBeEmpty: '프롬프트를 비울 수 없습니다',
|
||||||
|
@ -275,14 +275,14 @@ const translation = {
|
|||||||
typeSelect: 'Wybierz',
|
typeSelect: 'Wybierz',
|
||||||
},
|
},
|
||||||
varKeyError: {
|
varKeyError: {
|
||||||
canNoBeEmpty: 'Klucz zmiennej nie może być pusty',
|
canNoBeEmpty: '{{klucz}} jest wymagany',
|
||||||
tooLong:
|
tooLong:
|
||||||
'Klucz zmiennej: {{key}} za długi. Nie może być dłuższy niż 30 znaków',
|
'{{key}} za długi. Nie może być dłuższy niż 30 znaków',
|
||||||
notValid:
|
notValid:
|
||||||
'Klucz zmiennej: {{key}} jest nieprawidłowy. Może zawierać tylko litery, cyfry i podkreślenia',
|
'{{key}} jest nieprawidłowy. Może zawierać tylko litery, cyfry i podkreślenia',
|
||||||
notStartWithNumber:
|
notStartWithNumber:
|
||||||
'Klucz zmiennej: {{key}} nie może zaczynać się od cyfry',
|
'{{key}} nie może zaczynać się od cyfry',
|
||||||
keyAlreadyExists: 'Klucz zmiennej: :{{key}} już istnieje',
|
keyAlreadyExists: '{{key}} już istnieje',
|
||||||
},
|
},
|
||||||
otherError: {
|
otherError: {
|
||||||
promptNoBeEmpty: 'Monit nie może być pusty',
|
promptNoBeEmpty: 'Monit nie może być pusty',
|
||||||
|
@ -254,11 +254,11 @@ const translation = {
|
|||||||
typeSelect: 'Selecionar',
|
typeSelect: 'Selecionar',
|
||||||
},
|
},
|
||||||
varKeyError: {
|
varKeyError: {
|
||||||
canNoBeEmpty: 'A chave da variável não pode estar vazia',
|
canNoBeEmpty: '{{key}} é obrigatório',
|
||||||
tooLong: 'A chave da variável: {{key}} é muito longa. Não pode ter mais de 30 caracteres',
|
tooLong: '{{key}} é muito longa. Não pode ter mais de 30 caracteres',
|
||||||
notValid: 'A chave da variável: {{key}} é inválida. Pode conter apenas letras, números e sublinhados',
|
notValid: '{{key}} é inválida. Pode conter apenas letras, números e sublinhados',
|
||||||
notStartWithNumber: 'A chave da variável: {{key}} não pode começar com um número',
|
notStartWithNumber: '{{key}} não pode começar com um número',
|
||||||
keyAlreadyExists: 'A chave da variável: :{{key}} já existe',
|
keyAlreadyExists: '{{key}} já existe',
|
||||||
},
|
},
|
||||||
otherError: {
|
otherError: {
|
||||||
promptNoBeEmpty: 'A solicitação não pode estar vazia',
|
promptNoBeEmpty: 'A solicitação não pode estar vazia',
|
||||||
|
@ -254,11 +254,11 @@ const translation = {
|
|||||||
typeSelect: 'Selectează',
|
typeSelect: 'Selectează',
|
||||||
},
|
},
|
||||||
varKeyError: {
|
varKeyError: {
|
||||||
canNoBeEmpty: 'Cheia variabilei nu poate fi goală',
|
canNoBeEmpty: '{{key}} este necesară',
|
||||||
tooLong: 'Cheia variabilei: {{key}} este prea lungă. Nu poate fi mai lungă de 30 de caractere',
|
tooLong: '{{key}} este prea lungă. Nu poate fi mai lungă de 30 de caractere',
|
||||||
notValid: 'Cheia variabilei: {{key}} este nevalidă. Poate conține doar litere, cifre și sublinieri',
|
notValid: '{{key}} este nevalidă. Poate conține doar litere, cifre și sublinieri',
|
||||||
notStartWithNumber: 'Cheia variabilei: {{key}} nu poate începe cu un număr',
|
notStartWithNumber: '{{key}} nu poate începe cu un număr',
|
||||||
keyAlreadyExists: 'Cheia variabilei: :{{key}} deja există',
|
keyAlreadyExists: ':{{key}} deja există',
|
||||||
},
|
},
|
||||||
otherError: {
|
otherError: {
|
||||||
promptNoBeEmpty: 'Promptul nu poate fi gol',
|
promptNoBeEmpty: 'Promptul nu poate fi gol',
|
||||||
|
@ -290,11 +290,11 @@ const translation = {
|
|||||||
typeSelect: 'Seçim',
|
typeSelect: 'Seçim',
|
||||||
},
|
},
|
||||||
varKeyError: {
|
varKeyError: {
|
||||||
canNoBeEmpty: 'Değişken anahtarı boş olamaz',
|
canNoBeEmpty: '{{key}} gereklidir',
|
||||||
tooLong: 'Değişken anahtarı: {{key}} çok uzun. 30 karakterden uzun olamaz',
|
tooLong: '{{key}} çok uzun. 30 karakterden uzun olamaz',
|
||||||
notValid: 'Değişken anahtarı: {{key}} geçersizdir. Sadece harfler, rakamlar ve altçizgiler içerebilir',
|
notValid: '{{key}} geçersizdir. Sadece harfler, rakamlar ve altçizgiler içerebilir',
|
||||||
notStartWithNumber: 'Değişken anahtarı: {{key}} bir rakamla başlamamalıdır',
|
notStartWithNumber: '{{key}} bir rakamla başlamamalıdır',
|
||||||
keyAlreadyExists: 'Değişken anahtarı: {{key}} zaten mevcut',
|
keyAlreadyExists: '{{key}} zaten mevcut',
|
||||||
},
|
},
|
||||||
otherError: {
|
otherError: {
|
||||||
promptNoBeEmpty: 'Prompt boş olamaz',
|
promptNoBeEmpty: 'Prompt boş olamaz',
|
||||||
|
@ -248,11 +248,11 @@ const translation = {
|
|||||||
typeSelect: 'Вибрати', // Select
|
typeSelect: 'Вибрати', // Select
|
||||||
},
|
},
|
||||||
varKeyError: {
|
varKeyError: {
|
||||||
canNoBeEmpty: 'Ключ змінної не може бути порожнім', // Variable key can not be empty
|
canNoBeEmpty: 'Потрібен {{key}}', // Variable key can not be empty
|
||||||
tooLong: 'Ключ змінної: {{key}} занадто довгий. Не може бути більше 30 символів', // Variable key: {{key}} too length. Can not be longer then 30 characters
|
tooLong: '{{key}} занадто довгий. Не може бути більше 30 символів', // Variable key: {{key}} too length. Can not be longer then 30 characters
|
||||||
notValid: 'Ключ змінної: {{key}} недійсний. Може містити лише літери, цифри та підкреслення', // Variable key: {{key}} is invalid. Can only contain letters, numbers, and underscores
|
notValid: '{{key}} недійсний. Може містити лише літери, цифри та підкреслення', // Variable key: {{key}} is invalid. Can only contain letters, numbers, and underscores
|
||||||
notStartWithNumber: 'Ключ змінної: {{key}} не може починатися з цифри', // Variable key: {{key}} can not start with a number
|
notStartWithNumber: '{{key}} не може починатися з цифри', // Variable key: {{key}} can not start with a number
|
||||||
keyAlreadyExists: 'Ключ змінної: :{{key}} вже існує', // Variable key: :{{key}} already exists
|
keyAlreadyExists: ':{{key}} вже існує', // Variable key: :{{key}} already exists
|
||||||
},
|
},
|
||||||
otherError: {
|
otherError: {
|
||||||
promptNoBeEmpty: 'Команда не може бути порожньою', // Prompt can not be empty
|
promptNoBeEmpty: 'Команда не може бути порожньою', // Prompt can not be empty
|
||||||
|
@ -248,11 +248,11 @@ const translation = {
|
|||||||
typeSelect: 'Lựa chọn',
|
typeSelect: 'Lựa chọn',
|
||||||
},
|
},
|
||||||
varKeyError: {
|
varKeyError: {
|
||||||
canNoBeEmpty: 'Khóa biến không thể trống',
|
canNoBeEmpty: '{{key}} là bắt buộc',
|
||||||
tooLong: 'Khóa biến: {{key}} quá dài. Không thể dài hơn 30 ký tự',
|
tooLong: '{{key}} quá dài. Không thể dài hơn 30 ký tự',
|
||||||
notValid: 'Khóa biến: {{key}} không hợp lệ. Chỉ có thể chứa chữ cái, số, và dấu gạch dưới',
|
notValid: '{{key}} không hợp lệ. Chỉ có thể chứa chữ cái, số, và dấu gạch dưới',
|
||||||
notStartWithNumber: 'Khóa biến: {{key}} không thể bắt đầu bằng số',
|
notStartWithNumber: '{{key}} không thể bắt đầu bằng số',
|
||||||
keyAlreadyExists: 'Khóa biến: {{key}} đã tồn tại',
|
keyAlreadyExists: '{{key}} đã tồn tại',
|
||||||
},
|
},
|
||||||
otherError: {
|
otherError: {
|
||||||
promptNoBeEmpty: 'Lời nhắc không thể trống',
|
promptNoBeEmpty: 'Lời nhắc không thể trống',
|
||||||
|
@ -287,11 +287,11 @@ const translation = {
|
|||||||
typeSelect: '下拉选项',
|
typeSelect: '下拉选项',
|
||||||
},
|
},
|
||||||
varKeyError: {
|
varKeyError: {
|
||||||
canNoBeEmpty: '变量不能为空',
|
canNoBeEmpty: '{{key}}必填',
|
||||||
tooLong: '变量: {{key}} 长度太长。不能超过 30 个字符',
|
tooLong: '{{key}} 长度太长。不能超过 30 个字符',
|
||||||
notValid: '变量: {{key}} 非法。只能包含英文字符,数字和下划线',
|
notValid: '{{key}} 非法。只能包含英文字符,数字和下划线',
|
||||||
notStartWithNumber: '变量: {{key}} 不能以数字开头',
|
notStartWithNumber: '{{key}} 不能以数字开头',
|
||||||
keyAlreadyExists: '变量:{{key}} 已存在',
|
keyAlreadyExists: '{{key}} 已存在',
|
||||||
},
|
},
|
||||||
otherError: {
|
otherError: {
|
||||||
promptNoBeEmpty: '提示词不能为空',
|
promptNoBeEmpty: '提示词不能为空',
|
||||||
@ -320,7 +320,6 @@ const translation = {
|
|||||||
'required': '必填',
|
'required': '必填',
|
||||||
'content': '内容',
|
'content': '内容',
|
||||||
'errorMsg': {
|
'errorMsg': {
|
||||||
varNameRequired: '变量名称必填',
|
|
||||||
labelNameRequired: '显示名称必填',
|
labelNameRequired: '显示名称必填',
|
||||||
varNameCanBeRepeat: '变量名称不能重复',
|
varNameCanBeRepeat: '变量名称不能重复',
|
||||||
atLeastOneOption: '至少需要一个选项',
|
atLeastOneOption: '至少需要一个选项',
|
||||||
|
@ -233,11 +233,11 @@ const translation = {
|
|||||||
typeSelect: '下拉選項',
|
typeSelect: '下拉選項',
|
||||||
},
|
},
|
||||||
varKeyError: {
|
varKeyError: {
|
||||||
canNoBeEmpty: '變數不能為空',
|
canNoBeEmpty: '{{key}} 是必要的',
|
||||||
tooLong: '變數: {{key}} 長度太長。不能超過 30 個字元',
|
tooLong: '{{key}} 長度太長。不能超過 30 個字元',
|
||||||
notValid: '變數: {{key}} 非法。只能包含英文字元,數字和下劃線',
|
notValid: '{{key}} 非法。只能包含英文字元,數字和下劃線',
|
||||||
notStartWithNumber: '變數: {{key}} 不能以數字開頭',
|
notStartWithNumber: '{{key}} 不能以數字開頭',
|
||||||
keyAlreadyExists: '變數:{{key}} 已存在',
|
keyAlreadyExists: '{{key}} 已存在',
|
||||||
},
|
},
|
||||||
otherError: {
|
otherError: {
|
||||||
promptNoBeEmpty: '提示詞不能為空',
|
promptNoBeEmpty: '提示詞不能為空',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user