set default locale to english

This commit is contained in:
Michael Gerber
2015-02-25 18:35:46 +01:00
parent efd912959b
commit 386447b790
6 changed files with 10 additions and 189 deletions

View File

@@ -83,7 +83,7 @@ public class LocaleHelper {
return Locale.forLanguageTag(realm.getDefaultLocale());
}
return null;
return Locale.ENGLISH;
}
public static void updateLocaleCookie(Response.ResponseBuilder builder, Locale locale, RealmModel realm, UriInfo uriInfo, String path) {

View File

@@ -106,16 +106,12 @@ public class ClassLoaderTheme implements Theme {
@Override
public Properties getMessages(Locale locale) throws IOException {
if(locale == null){
return null;
}
Properties m = new Properties();
String message = null;
if(locale != null){
message = this.messageRoot + "messages_" + locale.toString() + ".properties";
}else{
message = this.messageRoot + "messages.properties";
}
URL url = classLoader.getResource(message);
URL url = classLoader.getResource(this.messageRoot + "messages_" + locale.toString() + ".properties");
if (url != null) {
m.load(url.openStream());
}

View File

@@ -83,16 +83,13 @@ public class FolderTheme implements Theme {
@Override
public Properties getMessages(Locale locale) throws IOException {
Properties m = new Properties();
String message = null;
if(locale != null){
message = "messages_" + locale.toString() + ".properties";
}else{
message = "messages.properties";
if(locale == null){
return null;
}
File file = new File(themeDir, "messages" + File.separator + message);
Properties m = new Properties();
File file = new File(themeDir, "messages" + File.separator + "messages_" + locale.toString() + ".properties");
if (file.isFile()) {
m.load(new FileInputStream(file));
}

View File

@@ -1,43 +0,0 @@
authenticatorCode=One-time code
email=Email
errorHeader=Error!
firstName=First name
lastName=Last name
password=Password
passwordConfirm=Confirmation
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
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
successTotp=Mobile authenticator configured.
successTotpRemoved=Mobile authenticator removed.
accountUpdated=Your account has been updated
accountPasswordUpdated=Your password has been updated
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
accountDisabled=Account is disabled, contact admin\
accountTemporarilyDisabled=Account is temporarily disabled, contact admin or try again later
logOutAllSessions=Log out all sessions

View File

@@ -1,12 +0,0 @@
emailVerificationSubject=Verify email
emailVerificationBody=Someone has created a Keycloak account with this email address. If this was you, click the link below to verify your email address\n\n{0}\n\nThis link will expire within {1} minutes.\n\nIf you didn't create this account, just ignore this message.
passwordResetSubject=Reset password
passwordResetBody=Someone just requested to change your Keycloak account's password. If this was you, click on the link below to set a new password\n\n{0}\n\nThis link will expire within {1} minutes.\n\nIf you don't want to reset your password, just ignore this message and nothing will be changed.
eventLoginErrorSubject=Login error
eventLoginErrorBody=A failed login attempt was dettected to your account on {0} from {1}. If this was not you, please contact an admin.
eventRemoveTotpSubject=Remove TOTP
eventRemoveTotpBody=TOTP was removed from your account on {0} from {1}. If this was not you, please contact an admin.
eventUpdatePasswordSubject=Update password
eventUpdatePasswordBody=Your password was changed on {0} from {1}. If this was not you, please contact an admin.
eventUpdateTotpSubject=Update TOTP
eventUpdateTotpBody=TOTP was updated for your account on {0} from {1}. If this was not you, please contact an admin.

View File

@@ -1,117 +0,0 @@
logIn=Log in
logInTo=Log in to
logInWith=Log in with
noAccount=New user?
register=Register
registerWith=Register with
allRequired=All fields are required
alreadyHaveAccount=Already have an account?
poweredByKeycloak=Powered by Keycloak
username=Username
usernameOrEmail=Username or email
fullName=Full name
firstName=First name
lastName=Last name
email=Email
password=Password
rememberMe=Remember me
passwordConfirm=Confirm password
passwordNew=New Password
passwordNewConfirm=New Password confirmation
cancel=Cancel
accept=Accept
submit=Submit
yes=Yes
no=No
authenticatorCode=One-time code
clientCertificate=Client Certificate
invalidUser=Invalid username or password.
invalidPassword=Invalid username or password.
invalidEmail=Invalid email address
accountDisabled=Account is disabled, contact admin
accountTemporarilyDisabled=Account is temporarily disabled, contact admin or try again later
expiredCode=Login timeout. Please login again
missingFirstName=Please specify first name
missingLastName=Please specify last name
missingEmail=Please specify email
missingUsername=Please specify username
missingPassword=Please specify password.
notMatchPassword=Passwords don't match
missingTotp=Please specify authenticator code
invalidPasswordExisting=Invalid existing password
invalidPasswordConfirm=Password confirmation doesn't match
invalidTotp=Invalid authenticator code
successTotp=Mobile authenticator configured.
successTotpRemoved=Mobile authenticator removed.
usernameExists=Username already exists
emailExists=Email already exists
federatedIdentityEmailExists=User with email already exists. Please login to account management to link the account.
federatedIdentityUsernameExists=User with username already exists. Please login to account management to link the account.
loginTitle=Log in to
loginOauthTitle=Temporary access.
loginOauthTitleHtml=Temporary access requested. Login to grant access.
loginForgot=Forgot
loginTotpTitle=Mobile Authenticator Setup
loginTotpStep1=Install <a href="https://fedorahosted.org/freeotp/" target="_blank">FreeOTP</a> or <a href="http://code.google.com/p/google-authenticator/" target="_blank">Google Authenticator</a> on your mobile
loginTotpStep2=Open the application and scan the barcode or enter the key
loginTotpStep3=Enter the one-time code provided by the application and click Submit to finish the setup
loginTotpOneTime=One-time code
loginProfileTitle=Update Account Information
loginProfileWarning=Your account is not enabled because you need to update your account information.
loginProfileWarningFollow=Please follow the steps below.
loginProfileError=Some required fields are empty or incorrect.
loginProfileErrorSteps=Please correct the fields in red.
oauthGrantTitle=OAuth Grant
oauthGrantTitleHtml=Temporary access requested
oauthGrantTerms=Keycloak Central Login and Google will use this information in accordance with their respective terms of service and privacy policies.
oauthGrantRequest=Do you grant these access privileges?
oauthGrantLoginRequest=Do you grant access?
emailVerifyTitle=Email verification
emailVerifyInstr=An email with instructions to verify your email address has been sent to you.
emailVerifyInstrQ=Haven't received a verification code in your email?
emailVerifyClick=Click here
emailVerifyResend=to re-send the email.
error=A system error has occured, contact admin
errorTitle=We're sorry...
errorTitleHtml=We're <strong>sorry</strong> ...
errorGenericMsg=Something happened and we could not process your request.
actionWarningHeader=Your account is not enabled.
actionTotpWarning=You need to set up Mobile Authenticator to activate your account.
actionProfileWarning=You need to update your user profile to activate your account.
actionPasswordWarning=You need to change your password to activate your account.
actionEmailWarning=You need to verify your email address to activate your account.
actionFollow=Please fill in the fields below.
errorKerberosLogin=Kerberos ticket not available. Authenticate with password.
successHeader=Success!
errorHeader=Error!
# Forgot password part
emailForgotHeader=Forgot Your Password?
backToLogin=&laquo; Back to Login
emailUpdateHeader=Update password
emailSent=You should receive an email shortly with further instructions.
emailSendError=Failed to send email, please try again later
emailError=Invalid email.
emailErrorInfo=Please, fill in the fields again.
emailInstruction=Enter your username or email address and we will send you instructions on how to create a new password.
accountUpdated=Your account has been updated
accountPasswordUpdated=Your password has been updated