messages refactoring

This commit is contained in:
Michael Gerber
2015-03-03 19:40:49 +01:00
parent 3b4b53ab93
commit 69146d4de1
5 changed files with 87 additions and 86 deletions

View File

@@ -9,43 +9,45 @@ passwordNew=New Password
successHeader=Success!
username=Username
missingFirstName=Please specify first name
invalidEmail=Invalid email address
missingLastName=Please specify last name
missingEmail=Please specify email
missingPassword=Please specify password.
notMatchPassword=Passwords don't match
missingFirstNameMessage=Please specify first name.
invalidEmailMessage=Invalid email address.
missingLastNameMessage=Please specify last name.
missingEmailMessage=Please specify email.
missingPasswordMessage=Please specify password.
notMatchPasswordMessage=Passwords don't match.
missingTotp=Please specify authenticator code
invalidPasswordExisting=Invalid existing password
invalidPasswordConfirm=Password confirmation doesn't match
invalidTotp=Invalid authenticator code
readOnlyUser=You can't update your account as it is read only
readOnlyPassword=You can't update your password as your account is read only
missingTotpMessage=Please specify authenticator code
invalidPasswordExistingMessage=Invalid existing password
invalidPasswordConfirmMessage=Password confirmation doesn't match
invalidTotpMessage=Invalid authenticator code
successTotp=Mobile authenticator configured.
successTotpRemoved=Mobile authenticator removed.
readOnlyUserMessage=You can't update your account as it is read only
readOnlyPasswordMessage=You can't update your password as your account is read only
accountUpdated=Your account has been updated
accountPasswordUpdated=Your password has been updated
successTotpMessage=Mobile authenticator configured.
successTotpRemovedMessage=Mobile authenticator removed.
missingIdentityProvider=Identity provider not specified
invalidFederatedIdentityAction=Invalid or missing action
identityProviderNotFound=Specified identity provider not found
federatedIdentityLinkNotActive=This identity is not active anymore
federatedIdentityRemovingLastProvider=You can't remove last federated identity as you don't have password
identityProviderRedirectError=Failed to redirect to identity provider
identityProviderRemoved=Identity provider removed successfully
accountUpdatedMessage=Your account has been updated
accountPasswordUpdatedMessage=Your password has been updated
accountDisabled=Account is disabled, contact admin
missingIdentityProviderMessage=Identity provider not specified
invalidFederatedIdentityActionMessage=Invalid or missing action
identityProviderNotFoundMessage=Specified identity provider not found
federatedIdentityLinkNotActiveMessage=This identity is not active anymore
federatedIdentityRemovingLastProviderMessage=You can't remove last federated identity as you don't have password
identityProviderRedirectErrorMessage=Failed to redirect to identity provider
identityProviderRemovedMessage=Identity provider removed successfully
logOutAllSessions=Log out all sessions
accountTemporarilyDisabled=Account is temporarily disabled, contact admin or try again later
invalidPasswordMinLength=Invalid password\: minimum length {0}
invalidPasswordMinLowerCaseChars=Invalid password\: must contain at least {0} lower case characters
invalidPasswordMinDigits=Invalid password\: must contain at least {0} numerical digits
invalidPasswordMinUpperCaseChars=Invalid password\: must contain at least {0} upper case characters
invalidPasswordMinSpecialChars=Invalid password\: must contain at least {0} special characters
accountDisabledMessage=Account is disabled, contact admin
doLogOutAllSessions=Log out all sessions
accountTemporarilyDisabledMessage=Account is temporarily disabled, contact admin or try again later
invalidPasswordMinLengthMessage=Invalid password: minimum length {0}
invalidPasswordMinLowerCaseCharsMessage=Invalid password: must contain at least {0} lower case characters
invalidPasswordMinDigitsMessage=Invalid password: must contain at least {0} numerical digits
invalidPasswordMinUpperCaseCharsMessage=Invalid password: must contain at least {0} upper case characters
invalidPasswordMinSpecialCharsMessage=Invalid password: must contain at least {0} special characters
locale_de=German
locale_en=English

View File

@@ -42,6 +42,6 @@
</table>
<a id="logout-all-sessions" href="${url.sessionsLogoutUrl}">${rb.logOutAllSessions}</a>
<a id="logout-all-sessions" href="${url.sessionsLogoutUrl}">${rb.doLogOutAllSessions}</a>
</@layout.mainLayout>

View File

@@ -108,30 +108,26 @@ unsupportedNameIdFormatMessage=Unsupported NameIDFormat
invlidRequesterMessage=Invalid requester
registrationNotAllowedMessage=Registration not allowed
permissionNotApprovedMessage=Permission not approved.
noRelayStateInResponseMessage=No relay state in response from identity provider [{0}].
identityProviderAlreadyLinkedMessage=The identity returned by the identity provider [{0}] is already linked to another user.
insufficientPermissionMessage=Insufficient permissions to link identities.
couldNotProceedWithAuthenticationRequestMessage=Could not proceed with authentication request to identity provider.
couldNotObtainTokenMessage=Could not obtain token from identity provider [{0}].
unexpectedErrorRetrievingTokenMessage=Unexpected error when retrieving token from identity provider [{0}].
unexpectedErrorHandlingResponseMessage=Unexpected error when handling response from identity provider [{0}].
identityProviderAuthenticationFailedMessage=Authentication failed. Could not authenticate with identity provider [{0}].
couldNotSendAuthenticationRequestMessage=Could not send authentication request to identity provider [{0}].
unexpectedErrorHandlingRequestMessage=Unexpected error when handling authentication request to identity provider [{0}].
invalidAccessCodeMessage=Invalid access code.
sessionNotActiveMessage=Session not active.
unknownCodeMessage=Unknown code, please login again through your application.
invalidCodeMessage=Invalid code, please login again through your application.
identityProviderUnexpectedErrorMessage=Unexpected error when authenticating with identity provider
identityProviderNotFoundMessage=Could not find an identity provider with the identifier [{0}].
realmSupportsNoCredentialsMessage=Realm [{0}] does not support any credential type.
identityProviderNotUniqueMessage=Realm [{0}] supports multiple identity providers. Could not determine which identity provider should be used to authenticate with.
permissionNotApproved=Permission not approved.
noRelayStateInResponse=No relay state in response from identity provider [{0}].
identityProviderAlreadyLinked=The identity returned by the identity provider [{0}] is already linked to another user.
insufficientPermission=Insufficient permissions to link identities.
couldNotProceedWithAuthenticationRequest=Could not proceed with authentication request to identity provider.
couldNotObtainToken=Could not obtain token from identity provider [{0}].
unexpectedErrorRetrievingToken=Unexpected error when retrieving token from identity provider [{0}].
unexpectedErrorHandlingResponse=Unexpected error when handling response from identity provider [{0}].
identityProviderAuthenticationFailed=Authentication failed. Could not authenticate with identity provider [{0}].
couldNotSendAuthenticationRequest=Could not send authentication request to identity provider [{0}].
unexpectedErrorHandlingRequest=Unexpected error when handling authentication request to identity provider [{0}].
invalidAccessCode=Invalid access code.
sessionNotActive=Session not active.
unknownCode=Unknown code, please login again through your application.
invalidCode=Invalid code, please login again through your application.
identityProviderUnexpectedError=Unexpected error when authenticating with identity provider
identityProviderNotFound=Could not find an identity provider with the identifier [{0}].
identityProviderNoToken=Could not obtain token from identity provider [{0}].
realmSupportsNoCredentials=Realm [{0}] does not support any credential type.
identityProviderNotUnique=Realm [{0}] supports multiple identity providers. Could not determine which identity provider should be used to authenticate with.
locale_de=German
locale_en=English

View File

@@ -114,62 +114,65 @@ public class Messages {
public static final String PERMISSION_NOT_APPROVED = "permissionNotApproved";
public static final String PERMISSION_NOT_APPROVED = "permissionNotApprovedMessage";
public static final String NO_RELAY_STATE_IN_RESPONSE = "noRelayStateInResponse";
public static final String NO_RELAY_STATE_IN_RESPONSE = "noRelayStateInResponseMessage";
public static final String IDENTITY_PROVIDER_ALREADY_LINKED = "identityProviderAlreadyLinked";
public static final String IDENTITY_PROVIDER_ALREADY_LINKED = "identityProviderAlreadyLinkedMessage";
public static final String INSUFFICIENT_PERMISSION = "insufficientPermission";
public static final String INSUFFICIENT_PERMISSION = "insufficientPermissionMessage";
public static final String COULD_NOT_PROCEED_WITH_AUTHENTICATION_REQUEST = "couldNotProceedWithAuthenticationRequest";
public static final String COULD_NOT_PROCEED_WITH_AUTHENTICATION_REQUEST = "couldNotProceedWithAuthenticationRequestMessage";
public static final String COULD_NOT_OBTAIN_TOKEN = "couldNotObtainToken";
public static final String COULD_NOT_OBTAIN_TOKEN = "couldNotObtainTokenMessage";
public static final String UNEXPECTED_ERROR_RETRIEVING_TOKEN = "unexpectedErrorRetrievingToken";
public static final String UNEXPECTED_ERROR_RETRIEVING_TOKEN = "unexpectedErrorRetrievingTokenMessage";
public static final String IDENTITY_PROVIDER_AUTHENTICATION_FAILED = "identityProviderAuthenticationFailed";
public static final String IDENTITY_PROVIDER_AUTHENTICATION_FAILED = "identityProviderAuthenticationFailedMessage";
public static final String UNEXPECTED_ERROR_HANDLING_RESPONSE = "unexpectedErrorHandlingResponse";
public static final String UNEXPECTED_ERROR_HANDLING_RESPONSE = "unexpectedErrorHandlingResponseMessage";
public static final String COULD_NOT_SEND_AUTHENTICATION_REQUEST = "couldNotSendAuthenticationRequest";
public static final String COULD_NOT_SEND_AUTHENTICATION_REQUEST = "couldNotSendAuthenticationRequestMessage";
public static final String UNEXPECTED_ERROR_HANDLING_REQUEST = "unexpectedErrorHandlingRequest";
public static final String UNEXPECTED_ERROR_HANDLING_REQUEST = "unexpectedErrorHandlingRequestMessage";
public static final String INVALID_ACCESS_CODE = "invalidAccessCode";
public static final String INVALID_ACCESS_CODE = "invalidAccessCodeMessage";
public static final String SESSION_NOT_ACTIVE = "sessionNotActive";
public static final String SESSION_NOT_ACTIVE = "sessionNotActiveMessage";
public static final String UNKNOWN_CODE = "unknownCode";
public static final String UNKNOWN_CODE = "unknownCodeMessage";
public static final String INVALID_CODE = "invalidCode";
public static final String INVALID_CODE = "invalidCodeMessage";
public static final String IDENTITY_PROVIDER_UNEXPECTED_ERROR = "identityProviderUnexpectedError";
public static final String IDENTITY_PROVIDER_UNEXPECTED_ERROR = "identityProviderUnexpectedErrorMessage";
public static final String IDENTITY_PROVIDER_NOT_FOUND = "identityProviderNotFound";
public static final String IDENTITY_PROVIDER_NOT_FOUND = "identityProviderNotFoundMessage";
public static final String IDENTITY_PROVIDER_NOT_UNIQUE = "identityProviderNotUniqueMessage";
public static final String READ_ONLY_USER = "readOnlyUser";
public static final String REALM_SUPPORTS_NO_CREDENTIALS = "realmSupportsNoCredentialsMessage";
public static final String READ_ONLY_PASSWORD = "readOnlyPassword";
public static final String READ_ONLY_USER = "readOnlyUserMessage";
public static final String MISSING_IDENTITY_PROVIDER = "missingIdentityProvider";
public static final String READ_ONLY_PASSWORD = "readOnlyPasswordMessage";
public static final String INVALID_FEDERATED_IDENTITY_ACTION = "invalidFederatedIdentityAction";
public static final String SUCCESS_TOTP_REMOVED = "successTotpRemovedMessage";
public static final String FEDERATED_IDENTITY_NOT_ACTIVE = "federatedIdentityLinkNotActive";
public static final String SUCCESS_TOTP = "successTotpMessage";
public static final String FEDERATED_IDENTITY_REMOVING_LAST_PROVIDER = "federatedIdentityRemovingLastProvider";
public static final String MISSING_IDENTITY_PROVIDER = "missingIdentityProviderMessage";
public static final String IDENTITY_PROVIDER_REDIRECT_ERROR = "identityProviderRedirectError";
public static final String INVALID_FEDERATED_IDENTITY_ACTION = "invalidFederatedIdentityActionMessage";
public static final String IDENTITY_PROVIDER_REMOVED = "identityProviderRemoved";
public static final String FEDERATED_IDENTITY_NOT_ACTIVE = "federatedIdentityLinkNotActiveMessage";
public static final String FEDERATED_IDENTITY_REMOVING_LAST_PROVIDER = "federatedIdentityRemovingLastProviderMessage";
public static final String IDENTITY_PROVIDER_REDIRECT_ERROR = "identityProviderRedirectErrorMessage";
public static final String IDENTITY_PROVIDER_REMOVED = "identityProviderRemovedMessage";
public static final String IDENTITY_PROVIDER_NO_TOKEN = "identityProviderNoToken";
public static final String ERROR = "error";
public static final String REALM_SUPPORTS_NO_CREDENTIALS = "realmSupportsNoCredentials";
public static final String IDENTITY_PROVIDER_NOT_UNIQUE = "identityProviderNotUnique";
}

View File

@@ -450,7 +450,7 @@ public class AccountService {
event.event(EventType.REMOVE_TOTP).client(auth.getClient()).user(auth.getUser()).success();
setReferrerOnPage();
return account.setSuccess("successTotpRemoved").createResponse(AccountPages.TOTP);
return account.setSuccess(Messages.SUCCESS_TOTP_REMOVED).createResponse(AccountPages.TOTP);
}
@@ -529,7 +529,7 @@ public class AccountService {
event.event(EventType.UPDATE_TOTP).client(auth.getClient()).user(auth.getUser()).success();
setReferrerOnPage();
return account.setSuccess("successTotp").createResponse(AccountPages.TOTP);
return account.setSuccess(Messages.SUCCESS_TOTP).createResponse(AccountPages.TOTP);
}
/**