diff --git a/src/common-messages.json b/src/common-messages.json index e10edbdb69..6525ba640e 100644 --- a/src/common-messages.json +++ b/src/common-messages.json @@ -49,6 +49,8 @@ "identityProviders": "Identity providers", "userFederation": "User federation", - "required": "Required field" + "required": "Required field", + + "createRealm": "Create Realm" } } diff --git a/src/components/realm-selector/RealmSelector.tsx b/src/components/realm-selector/RealmSelector.tsx index 48747f16ec..644e65969e 100644 --- a/src/components/realm-selector/RealmSelector.tsx +++ b/src/components/realm-selector/RealmSelector.tsx @@ -1,5 +1,6 @@ import React, { useState, useContext, useEffect } from "react"; import { useHistory } from "react-router-dom"; +import { useTranslation } from "react-i18next"; import { Dropdown, @@ -31,6 +32,7 @@ export const RealmSelector = ({ realmList }: RealmSelectorProps) => { const [search, setSearch] = useState(""); const [filteredItems, setFilteredItems] = useState(realmList); const history = useHistory(); + const { t } = useTranslation("common"); const toUpperCase = (realmName: string) => realmName.charAt(0).toUpperCase() + realmName.slice(1); @@ -49,7 +51,7 @@ export const RealmSelector = ({ realmList }: RealmSelectorProps) => { onClick={() => history.push("/add-realm")} className={className} > - Create Realm + {t("createRealm")} ); diff --git a/src/realm/add/NewRealmForm.tsx b/src/realm/add/NewRealmForm.tsx index f859cbb3b5..2f94645ba9 100644 --- a/src/realm/add/NewRealmForm.tsx +++ b/src/realm/add/NewRealmForm.tsx @@ -82,7 +82,7 @@ export const NewRealmForm = () => {