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
removeAccess=Remove access
signingInDescription=Configure ways to sign in.
somethingWentWrongDescription=Sorry, an unexpected error has occurred.
personalInfo=Personal info
removeCred=Remove {{name}}
signOutAllDevices=Sign out all devices
@ -98,10 +97,11 @@ permissionRequest=Permission requests - {{name}}
add=Add
error-invalid-value='{{0}}' has invalid value.
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.
unShareError=Could not un-share the resource due to\: {{error}}
ipAddress=IP address
tryAgain=Try again
resourceName=Resource name
unlinkedEmpty=No unlinked providers
done=Done

View file

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

View file

@ -3273,8 +3273,15 @@ groupDuplicated=Group duplicated
duplicateAGroup=Duplicate group
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.
<<<<<<< HEAD
showMemberships=Show memberships
showMembershipsTitle={{username}} Group Memberships
noGroupMembershipsText=This user is not a member of any groups.
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
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,
} from "@patternfly/react-core";
import { useTranslation } from "react-i18next";
import { label } from "../user-profile/utils";
import { getNetworkErrorDescription } from "../utils/errors";
type ErrorPageProps = {
@ -42,7 +41,7 @@ export const ErrorPage = (props: ErrorPageProps) => {
>
<TextContent>
{errorMessage ? (
<Text>{label(t, errorMessage)}</Text>
<Text>{t(errorMessage)}</Text>
) : (
<Text>{t("somethingWentWrongDescription")}</Text>
)}