always try and translate the error message

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
Erik Jan de Wit 2024-10-21 10:34:44 +02:00 committed by Pedro Igor
parent 3d91df42d8
commit 77231bd68c
4 changed files with 13 additions and 5 deletions

View file

@ -75,7 +75,6 @@ linkedAccounts=Linked accounts
personalInfoDescription=Manage your basic information personalInfoDescription=Manage your basic information
removeAccess=Remove access removeAccess=Remove access
signingInDescription=Configure ways to sign in. signingInDescription=Configure ways to sign in.
somethingWentWrongDescription=Sorry, an unexpected error has occurred.
personalInfo=Personal info personalInfo=Personal info
removeCred=Remove {{name}} removeCred=Remove {{name}}
signOutAllDevices=Sign out all devices signOutAllDevices=Sign out all devices
@ -98,10 +97,11 @@ permissionRequest=Permission requests - {{name}}
add=Add add=Add
error-invalid-value='{{0}}' has invalid value. error-invalid-value='{{0}}' has invalid value.
somethingWentWrong=Something went wrong somethingWentWrong=Something went wrong
somethingWentWrongDescription=Sorry, an unexpected error has occurred.
tryAgain=Try again
rolesScope=If there is no role scope mapping defined, each user is permitted to use this client scope. If there are role scope mappings defined, the user must be a member of at least one of the roles. rolesScope=If there is no role scope mapping defined, each user is permitted to use this client scope. If there are role scope mappings defined, the user must be a member of at least one of the roles.
unShareError=Could not un-share the resource due to\: {{error}} unShareError=Could not un-share the resource due to\: {{error}}
ipAddress=IP address ipAddress=IP address
tryAgain=Try again
resourceName=Resource name resourceName=Resource name
unlinkedEmpty=No unlinked providers unlinkedEmpty=No unlinked providers
done=Done done=Done

View file

@ -15,6 +15,8 @@
body, #app { body, #app {
height: 100%; height: 100%;
overflow-x: hidden;
overflow-y: hidden;
} }
.container { .container {

View file

@ -3273,8 +3273,15 @@ groupDuplicated=Group duplicated
duplicateAGroup=Duplicate group duplicateAGroup=Duplicate group
couldNotFetchClientRoleMappings=Could not fetch client role mappings\: {{error}} couldNotFetchClientRoleMappings=Could not fetch client role mappings\: {{error}}
duplicateGroupWarning=Duplication of groups with a large number of subgroups is not supported. Please ensure that the group you are duplicating does not have a large number of subgroups. duplicateGroupWarning=Duplication of groups with a large number of subgroups is not supported. Please ensure that the group you are duplicating does not have a large number of subgroups.
<<<<<<< HEAD
showMemberships=Show memberships showMemberships=Show memberships
showMembershipsTitle={{username}} Group Memberships showMembershipsTitle={{username}} Group Memberships
noGroupMembershipsText=This user is not a member of any groups. noGroupMembershipsText=This user is not a member of any groups.
noGroupMemberships=No memberships noGroupMemberships=No memberships
termsAndConditionsDeclined=You need to accept the Terms and Conditions to continue termsAndConditionsDeclined=You need to accept the Terms and Conditions to continue
=======
termsAndConditionsDeclined=You need to accept the Terms and Conditions to continue
somethingWentWrong=Something went wrong
somethingWentWrongDescription=Sorry, an unexpected error has occurred.
tryAgain=Try again
>>>>>>> a163063cc4 (always try and translate the error message)

View file

@ -7,7 +7,6 @@ import {
TextContent, TextContent,
} from "@patternfly/react-core"; } from "@patternfly/react-core";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { label } from "../user-profile/utils";
import { getNetworkErrorDescription } from "../utils/errors"; import { getNetworkErrorDescription } from "../utils/errors";
type ErrorPageProps = { type ErrorPageProps = {
@ -42,7 +41,7 @@ export const ErrorPage = (props: ErrorPageProps) => {
> >
<TextContent> <TextContent>
{errorMessage ? ( {errorMessage ? (
<Text>{label(t, errorMessage)}</Text> <Text>{t(errorMessage)}</Text>
) : ( ) : (
<Text>{t("somethingWentWrongDescription")}</Text> <Text>{t("somethingWentWrongDescription")}</Text>
)} )}