V9: Implementing Error Describers for translated error messages (#10216)

* Adding missing keys needed for the translation of the error describers' msgs

* Override all methods from IdentityErrorDescriber in order to provide our own translated error messages using our own translation engine (ILocalizedTextService)

* Fix tests

* Refactoring based on introducing an UmbracoErrorDescriberBase

* Remove unnecessary usings
This commit is contained in:
Elitsa Marinovska
2021-05-03 14:05:17 +02:00
committed by GitHub
parent 12c55dd605
commit 4bdb011b16
5 changed files with 229 additions and 8 deletions

View File

@@ -358,9 +358,14 @@
<key alias="uploadNotAllowed">Upload is not allowed in this location.</key>
</area>
<area alias="member">
<key alias="createNewMember">Create a new member</key>
<key alias="allMembers">All Members</key>
<key alias="createNewMember">Create a new member</key>
<key alias="duplicateMemberLogin">A member with this login already exists</key>
<key alias="memberGroupNoProperties">Member groups have no additional properties for editing.</key>
<key alias="memberHasGroup">The member is already in group '%0%'</key>
<key alias="memberHasPassword">The member already has a password set</key>
<key alias="memberLockoutNotEnabled">Lockout is not enabled for this member</key>
<key alias="memberNotInGroup">The member is not in group '%0%'</key>
</area>
<area alias="contentType">
<key alias="copyFailed">Failed to copy content type</key>
@@ -656,6 +661,8 @@
<key alias="errorRegExpWithoutTab">%0% is not in a correct format</key>
</area>
<area alias="errors">
<key alias="defaultError">An unknown failure has occurred</key>
<key alias="concurrencyError">Optimistic concurrency failure, object has been modified</key>
<key alias="receivedErrorFromServer">Received an error from the server</key>
<key alias="dissallowedMediaType">The specified file type has been disallowed by the administrator</key>
<key alias="codemirroriewarning">NOTE! Even though CodeMirror is enabled by configuration, it is disabled in Internet Explorer because it's not stable enough.</key>
@@ -1444,7 +1451,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
<key alias="validationFailedMessage">Validation errors must be fixed before the item can be saved</key>
<key alias="operationFailedHeader">Failed</key>
<key alias="operationSavedHeader">Saved</key>
<key alias="operationSavedHeaderReloadUser">Saved. To view the changes please reload your browser</key>
<key alias="operationSavedHeaderReloadUser">Saved. To view the changes please reload your browser</key>
<key alias="invalidUserPermissionsText">Insufficient user permissions, could not complete the operation</key>
<key alias="operationCancelledHeader">Cancelled</key>
<key alias="operationCancelledText">Operation was cancelled by a 3rd party add-in</key>
@@ -1908,6 +1915,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
<key alias="descriptionField">Description field</key>
<key alias="disabled">Disable User</key>
<key alias="documentType">Document Type</key>
<key alias="duplicateLogin">A user with this login already exists</key>
<key alias="editors">Editor</key>
<key alias="excerptField">Excerpt field</key>
<key alias="failedPasswordAttempts">Failed login attempts</key>
@@ -1940,6 +1948,12 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
<key alias="passwordInvalid">Invalid current password</key>
<key alias="passwordIsDifferent">There was a difference between the new password and the confirmed password. Please try again!</key>
<key alias="passwordMismatch">The confirmed password doesn't match the new password!</key>
<key alias="passwordRequiresDigit">The password must have at least one digit ('0'-'9')</key>
<key alias="passwordRequiresLower">The password must have at least one lowercase ('a'-'z')</key>
<key alias="passwordRequiresNonAlphanumeric">The password must have at least one non alphanumeric character</key>
<key alias="passwordRequiresUniqueChars">The password must use at least %0% different characters</key>
<key alias="passwordRequiresUpper">The password must have at least one uppercase ('A'-'Z')</key>
<key alias="passwordTooShort">The password must be at least %0% characters long</key>
<key alias="permissionReplaceChildren">Replace child node permissions</key>
<key alias="permissionSelectedPages">You are currently modifying permissions for the pages:</key>
<key alias="permissionSelectPages">Select pages to modify their permissions</key>
@@ -1960,8 +1974,12 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
<key alias="updateDate">User last updated</key>
<key alias="userCreated">has been created</key>
<key alias="userCreatedSuccessHelp">The new user has successfully been created. To log in to Umbraco use the password below.</key>
<key alias="userHasPassword">The user already has a password set</key>
<key alias="userHasGroup">The user is already in group '%0%'</key>
<key alias="userLockoutNotEnabled">Lockout is not enabled for this user</key>
<key alias="userManagement">User management</key>
<key alias="username">Name</key>
<key alias="userNotInGroup">The user is not in group '%0%'</key>
<key alias="userPermissions">User permissions</key>
<key alias="usergroup">User group</key>
<key alias="userInvited">has been invited</key>
@@ -2111,6 +2129,14 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
<key alias="invalidNull">Value cannot be null</key>
<key alias="invalidEmpty">Value cannot be empty</key>
<key alias="invalidPattern">Value is invalid, it does not match the correct pattern</key>
<key alias="invalidMemberGroupName">Invalid member group name</key>
<key alias="invalidUserGroupName">Invalid user group name</key>
<key alias="invalidToken">Invalid token</key>
<key alias="invalidUsername">Invalid username</key>
<key alias="duplicateEmail">Email '%0%' is already taken</key>
<key alias="duplicateUserGroupName">User group name '%0%' is already taken</key>
<key alias="duplicateMemberGroupName">Member group name '%0%' is already taken</key>
<key alias="duplicateUsername">Username '%0%' is already taken</key>
<key alias="customValidation">Custom validation</key>
<key alias="entriesShort"><![CDATA[Minimum %0% entries, requires <strong>%1%</strong> more.]]></key>
<key alias="entriesExceed"><![CDATA[Maximum %0% entries, <strong>%1%</strong> too many.]]></key>