From 3c8dddf33e1c6b750e28bf94b593272f15211fdb Mon Sep 17 00:00:00 2001 From: Stan Silvert Date: Tue, 20 Nov 2018 08:02:37 -0500 Subject: [PATCH] KEYCLOAK-8758: Implement i18n/l10n --- .../theme/keycloak-preview/account/index.ftl | 2 +- .../account/resources/app/App.tsx | 7 +-- .../app/content/account-page/AccountPage.tsx | 17 +++---- .../account/resources/app/widgets/Logout.tsx | 4 +- .../account/resources/app/widgets/Msg.tsx | 46 +++++++++++++++++++ 5 files changed, 63 insertions(+), 13 deletions(-) create mode 100644 themes/src/main/resources/theme/keycloak-preview/account/resources/app/widgets/Msg.tsx diff --git a/themes/src/main/resources/theme/keycloak-preview/account/index.ftl b/themes/src/main/resources/theme/keycloak-preview/account/index.ftl index 5c6a1951d3..4d0f093c7a 100644 --- a/themes/src/main/resources/theme/keycloak-preview/account/index.ftl +++ b/themes/src/main/resources/theme/keycloak-preview/account/index.ftl @@ -122,7 +122,7 @@ if (loadListener) script.addEventListener("load", loadListener); document.head.appendChild(script); }; - keycloak.init({onLoad: 'login-required'}).success(function(authenticated) { + keycloak.init({onLoad: 'check-sso'}).success(function(authenticated) { loadjs("/node_modules/react/umd/react.development.js", function() { loadjs("/node_modules/react-dom/umd/react-dom.development.js", function() { loadjs("/node_modules/systemjs/dist/system.src.js", function() { diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/App.tsx b/themes/src/main/resources/theme/keycloak-preview/account/resources/app/App.tsx index dc08e92cfb..a461d5398e 100644 --- a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/App.tsx +++ b/themes/src/main/resources/theme/keycloak-preview/account/resources/app/App.tsx @@ -20,6 +20,7 @@ import {Route, Link} from 'react-router-dom'; import {KeycloakService} from './keycloak-service/keycloak.service'; import {Logout} from './widgets/Logout'; +import {Msg} from './widgets/Msg'; import {AccountPage} from './content/account-page/AccountPage'; import {ApplicationsPage} from './content/applications-page/ApplicationsPage'; import {PasswordPage} from './content/password-page/PasswordPage'; @@ -50,9 +51,9 @@ export class App extends React.Component { return (