diff --git a/src/clients/add/NewClientForm.tsx b/src/clients/add/NewClientForm.tsx index efc0de7a21..ac3c46f8d8 100644 --- a/src/clients/add/NewClientForm.tsx +++ b/src/clients/add/NewClientForm.tsx @@ -43,9 +43,9 @@ export const NewClientForm = () => { const save = async () => { try { await httpClient.doPost(`/admin/realms/${realm}/clients`, client); - addAlert("Client created", AlertVariant.success); + addAlert(t("createSuccess"), AlertVariant.success); } catch (error) { - addAlert(`Could not create client: '${error}'`, AlertVariant.danger); + addAlert(t("createError", { error }), AlertVariant.danger); } }; diff --git a/src/clients/messages.json b/src/clients/messages.json index 71f750000a..d568215f45 100644 --- a/src/clients/messages.json +++ b/src/clients/messages.json @@ -17,6 +17,8 @@ "generalSettings": "General Settings", "capabilityConfig": "Capability config", "clientsExplain": "Clients are applications and services that can request authentication of a user", + "createSuccess": "Client created successfully", + "createError": "Could not create client: '{{error}}'", "clientImportError": "Could not import client", "clientSaveSuccess": "Client successfully updated", "clientSaveError": "Client could not be updated:",