i18n keys for success and error message (#154)

fixes: #151
This commit is contained in:
Erik Jan de Wit 2020-10-07 18:01:16 +02:00 committed by GitHub
parent 8e2000283c
commit 556f474fa6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -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);
}
};

View file

@ -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:",