feat: translate error messages (#254)

* feat: translate error messages in error interceptor

* fix: add statik import

* feat: user error msgs

* feat: add translations

* feat: add translations

* feat: add translations

* feat: add translations

* feat: add translations

* feat: add translations

* some fixes and improved error messages

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
Fabi
2020-06-22 13:51:44 +02:00
committed by GitHub
parent f68a5e63b5
commit 6556d053b2
52 changed files with 570 additions and 389 deletions

View File

@@ -0,0 +1,110 @@
Errors:
Internal: Es ist ein interner Fehler aufgetreten
NoChangesFound: Keine Änderungen gefunden
User:
NotFound: Benutzer konnte nicht gefunden werden
UserIDMissing: User ID fehlt
OrgIamPolicyNil: Organisations Policy ist leer
EmailAsUsernameNotAllowed: Benutzername darf keine E-Mail Adresse sein
Invalid: Benutzerdaten sind ungültig
DomainNotAllowedAsUsername: Domäne ist bereits reserviert und kann nicht verwendet werden
AlreadyInactive: Benutzer ist bereits deaktiviert
NotInactive: Benutzer ist nicht inaktiv
ShouldBeActiveOrInitial: Benutzer ist nicht aktiv oder initialisiert
NotLocked: Benutzer ist nicht gesperrt
NoChanges: Keine Änderungen gefunden
InitCodeNotFound: Kein Initialisierungs Code gefunden
ProfileNotFound: Profil nicht gefunden
ProfileInvalid: Profildaten sind ungültig
EmailNotFound: Email nicht gefunden
EmailInvalid: Email ist ungültig
EmailAlreadyVerified: Email ist bereits verifiziert
PhoneNotFound: Telfonnummer nicht gefunden
PhoneInvalid: Telefonnummer ist ungültig
PhoneAlreadyVerified: Telefonnummer bereits verifiziert
AddressNotFound: Addresse nicht gefunden
Code:
Empty: Code ist leer
NotFound: Code konnte nicht gefunden werden
Expired: Code ist abgelaufen
GeneratorAlgNotSupported: Generator Algorithums wird nicht unterstützt
Password:
NotFound: Password nicht gefunden
Empty: Passwort ist leer
Invalid: Passwort ungültig
PasswordComplexityPolicy:
NotFound: Passwort Policy konnte nicht gefunden werden
MinLength: Passwort ist zu kurz
HasLower: Passwort beinhaltet keinen Kleinbuchstaben
HasUpper: Passwort beinhaltet keinen Grossbuchstaben
HasNumber: Passwort beinhaltet keine Nummer
HasSymbol: Passwort beinhaltet kein Symbol
Mfa:
Otp:
AlreadyReady: Multifaktor OTP (OneTimePassword) ist bereits eingerichtet
NotExisting: Multifaktor OTP (OneTimePassword) existiert nicht
NotReady: Multifaktor OTP (OneTimePassword) ist nicht bereit
InvalidCode: Code ist ungültig
Org:
Invalid: Organisation ist ungültig
AlreadyDeactivated: Organisation ist bereits deaktiviert
AlreadyActive: Organisation ist bereits aktiv
Empty: Organisation ist leer
NotFound: Organisation konnte nicht gefunden werden
InvalidDomain: Domäne ist ungültig
DomainMissing: Domäne fehlt
DomainNotOnOrg: Domäne fehlt auf Organisation
MemberIDMissing: Member ID fehlt
MemberNotFound: Organisations Member konnte nicht gefunden werden
InvalidMember: Organisations Member ist ungültig
UserIDMissing: User ID fehlt
PolicyAlreadyExists: Policy existiert bereits
PolicyNotExisting: Policy existiert nicht
Project:
ProjectIDMissing: Project Id fehlt
AlreadyExists: Project existiert bereits auf der Organisation
OrgNotExisting: Organisation existiert nicht
UserNotExisting: User existiert nicht
CouldNotGenerateClientSecret: Client Secret konnte nicht generiert werden
Invalid: Projekt ist ungültig
NotActive: Projekt ist nicht aktiv
NotInactive: Projekt ist nicht deaktiviert
UserIDMissing: User ID fehlt
MemberNotFound: Member konnte nicht gefunden werden
MemberInvalid: Member ist ungültig
MemberAlreadyExists: Member existiert bereits
MemberNotExisting: Member existiert nicht
MinimumOneRoleNeeded: Es muss mindestend eine Rolle hinzugefügt werden
RoleAlreadyExists: Rolle existiert bereits
RoleInvalid: Rolle ist ungültig
RoleNotExisting: Rolle existiert nicht
IDMissing: ID fehlt
AppNotFound: Applikation nicht gefunden
AppInvalid: Applikation ist ungültig
AppNotExisting: Applikation exisitert nicht
OIDCConfigInvalid: OIDC Konfiguration ist ungültig
AppIsNotOIDC: Applikation ist nicht vom Typ OIDC
RequiredFieldsMissing: Benötigte Felder fehlen
GrantNotFound: Grant konnte nicht gefunden werden
GrantInvalid: Projekt Grant ist ungültig
GrantAlreadyExists: Projekt Grant existiert bereits
GrantNotExists: Projekt Grant existiert nicht
GrantHasNotExistingRole: Eine der Rollen existiert nicht auf dem Projekt
UserIDMisisng: User ID fehlt
Iam:
MemberInvalid: Member ist ungültig
MemberAlreadyExisting: Member existiert bereits
MemberNotExisting: Member existiert nicht
IDMissing: Id fehlt
GlobalOrgMissing: Globale Organisation fehlt
IamProjectIDMisisng: Iam Project ID fehlt
Policy:
AlreadyExists: Policy existiert bereits
UserGrant:
NotFound: Benutzer Berechtigung konnte nicht gefunden werden
Invalid: Benutzer Berechtigung ist ungültig
IDMissing: Id fehlt
NotActive: Benutzer Berechtigung ist nicht aktiv
NotInactive: Benutzer Berechtigung ist nicht deaktiviert
Changes:
NotFound: Es konnte kein Änderungsverlauf gefunden werden

View File

@@ -0,0 +1,110 @@
Errors:
Internal: An internal error occured
NoChangesFound: No changes found
User:
NotFound: User could not be found
UserIDMissing: User ID missing
OrgIamPolicyNil: Organisation Policy is empty
EmailAsUsernameNotAllowed: Email is not allowed as username
Invalid: Userdata is invalid
DomainNotAllowedAsUsername: Domain is already reserved
AlreadyInactive: User already inactive
NotInactive: User is not inactive
ShouldBeActiveOrInitial: User is not active or inital
NotLocked: User is not locked
NoChanges: No changes found
InitCodeNotFound: Initialization Code not found
ProfileNotFound: Profile not found
ProfileInvalid: Profildata invalid
EmailNotFound: Email not found
EmailInvalid: Email is invalid
EmailAlreadyVerified: Email is alredy verified
PhoneNotFound: Phone not found
PhoneInvalid: Phone is invalid
PhoneAlreadyVerified: Phone already verified
AddressNotFound: Address not found
Code:
Empty: Code is empty
NotFound: Code not found
Expired: Code is expired
GeneratorAlgNotSupported: Unsupported generator algorithm
Password:
NotFound: Passoword not found
Empty: Password is empty
Invalid: Passwort is invalid
PasswordComplexityPolicy:
NotFound: Password policy not found
MinLength: Password is to short
HasLower: Password must contain lower case
HasUpper: Password must contain upper case
HasNumber: Password must contain number
HasSymbol: Password must contain symbol
Mfa:
Otp:
AlreadyReady: Multifactor OTP (OneTimePassword) is already set up
NotExisting: Multifactor OTP (OneTimePassword) doesn't exist
NotReady: Multifactor OTP (OneTimePassword) isn't ready
InvalidCode: Invalid code
Org:
Invalid: Organisation is invalid
AlreadyDeactivated: Organisation is already deactivated
AlreadyActive: Organisation is already ative
Empty: Organisation is empty
NotFound: Organisation not found
InvalidDomain: Invalid domain
DomainMissing: Domain missing
DomainNotOnOrg: Domain doesn't exist on organisation
MemberIDMissing: Member ID missing
MemberNotFound: Organisations member not found
InvalidMember: Organisation member is invalid
UserIDMissing: User ID missing
PolicyAlreadyExists: Policy alredy exists
PolicyNotExisting: Policy doesn't exist
Project:
ProjectIDMissing: Project Id missing
AlreadyExists: Project already exists on organisation
OrgNotExisting: Organisation doesn't exist
UserNotExisting: User doesn't exist
CouldNotGenerateClientSecret: Could not generate client secret
Invalid: Project is invalid
NotActive: Project is not active
NotInactive: Projekt is not deactivated
UserIDMissing: User ID missing
MemberNotFound: Project member not found
MemberInvalid: Project member is invalid
MemberAlreadyExists: Project member already exists
MemberNotExisting: Projekt member doesn't exist
MinimumOneRoleNeeded: At least one role should be added
RoleAlreadyExists: Role already exists
RoleInvalid: Role is invalid
RoleNotExisting: Role doesn't exist
IDMissing: ID missing
AppNotFound: Application not found
AppInvalid: Application invalid
AppNotExisting: Application doesn't exist
OIDCConfigInvalid: OIDC configuration is invalid
AppIsNotOIDC: Application is not type oidc
RequiredFieldsMissing: Some required fields are missing
GrantNotFound: Grant not found
GrantInvalid: Project grant is invalid
GrantAlreadyExists: Project grant already exists
GrantNotExists: Project grant doesn't exist
GrantHasNotExistingRole: One role doesn't exist on project
UserIDMisisng: User ID missing
Iam:
MemberInvalid: Member is invalid
MemberAlreadyExisting: Member already exists
MemberNotExisting: Member does not exist
IDMissing: Id missing
GlobalOrgMissing: Global organisation missing
IamProjectIDMisisng: Iam project id missing
Policy:
AlreadyExists: Policy already exists
UserGrant:
NotFound: User grant not found
Invalid: User grant is invalid
IDMissing: Id missing
NotActive: User grant is not active
NotInactive: User grant is not deactivated
Changes:
NotFound: No history found