Fix error message

This commit is contained in:
Laurent Destailleur 2022-11-30 17:37:29 +01:00
parent 2ce5856a2c
commit 5905c0e89e
2 changed files with 3 additions and 3 deletions

View File

@ -280,7 +280,7 @@ ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it
ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify.
ErrorIsNotADraft=%s is not a draft
ErrorExecIdFailed=Can't execute command "id"
ErrorBadCharIntoLoginName=Unauthorized character in the login name
ErrorBadCharIntoLoginName=Unauthorized character in the field %s
ErrorRequestTooLarge=Error, request too large or session expired
ErrorNotApproverForHoliday=You are not the approver for leave %s
ErrorAttributeIsUsedIntoProduct=This attribute is used in one or more product variants

View File

@ -1522,7 +1522,7 @@ class User extends CommonObject
return -1;
} elseif (preg_match('/['.preg_quote($badCharUnauthorizedIntoLoginName, '/').']/', $this->login)) {
$langs->load("errors");
$this->error = $langs->trans("ErrorBadCharIntoLoginName");
$this->error = $langs->trans("ErrorBadCharIntoLoginName", $langs->transnoentitiesnoconv("Login"));
return -1;
}
@ -1918,7 +1918,7 @@ class User extends CommonObject
return -1;
} elseif (preg_match('/['.preg_quote($badCharUnauthorizedIntoLoginName, '/').']/', $this->login)) {
$langs->load("errors");
$this->error = $langs->trans("ErrorBadCharIntoLoginName");
$this->error = $langs->trans("ErrorBadCharIntoLoginName", $langs->transnoentitiesnoconv("Login"));
return -1;
}