diff --git a/src/contexts/Network.jsx b/src/contexts/Network.jsx index c00d5b2895..b5b46286c2 100644 --- a/src/contexts/Network.jsx +++ b/src/contexts/Network.jsx @@ -4,6 +4,8 @@ import React, { Component } from 'react'; import { withRouter } from 'react-router-dom'; +import { i18nMark } from '@lingui/react'; + import { withRootDialog } from './RootDialog'; import APIClient from '../api'; @@ -37,7 +39,7 @@ class prov extends Component { } history.replace('/login'); setRootDialogMessage({ - bodyText: 'You have been logged out.', + bodyText: i18nMark('You have been logged out.') }); } @@ -49,8 +51,8 @@ class prov extends Component { } history.replace('/home'); setRootDialogMessage({ - title: '404', - bodyText: 'Cannot find resource.', + title: i18nMark('404'), + bodyText: i18nMark('Cannot find resource.'), variant: 'warning' }); } diff --git a/src/pages/Organizations/Organizations.jsx b/src/pages/Organizations/Organizations.jsx index 28ac5864ab..4baa46d978 100644 --- a/src/pages/Organizations/Organizations.jsx +++ b/src/pages/Organizations/Organizations.jsx @@ -1,6 +1,7 @@ import React, { Component, Fragment } from 'react'; import { Route, withRouter, Switch } from 'react-router-dom'; import { i18nMark } from '@lingui/react'; +import { Trans } from '@lingui/macro'; import { NetworkProvider } from '../../contexts/Network'; import { withRootDialog } from '../../contexts/RootDialog'; @@ -62,7 +63,13 @@ class Organizations extends Component { history.replace('/organizations'); setRootDialogMessage({ title: '404', - bodyText: `Cannot find organization with ID ${newRouteMatch.params.id}.`, + bodyText: ( + + Cannot find organization with ID + {` ${newRouteMatch.params.id}`} + . + + ), variant: 'warning' }); }} diff --git a/src/pages/Organizations/components/OrganizationAccessList.jsx b/src/pages/Organizations/components/OrganizationAccessList.jsx index 983bba1e01..bd070e7289 100644 --- a/src/pages/Organizations/components/OrganizationAccessList.jsx +++ b/src/pages/Organizations/components/OrganizationAccessList.jsx @@ -7,7 +7,7 @@ import { } from '@patternfly/react-core'; import { I18n, i18nMark } from '@lingui/react'; -import { t } from '@lingui/macro'; +import { t, Trans } from '@lingui/macro'; import { Link @@ -257,16 +257,33 @@ class OrganizationAccessList extends React.Component { let warningMsg; if (type === 'users') { - warningTitle = i18nMark('User Access Removal'); - warningMsg = i18nMark(`Please confirm that you would like to remove ${roleName} - access from ${resourceName}.`); + warningTitle = i18nMark('Remove User Access'); + warningMsg = ( + + Are you sure you want to remove + {` ${roleName} `} + access from + {` ${resourceName}`} + ? + + ); } if (type === 'teams') { - warningTitle = i18nMark('Team Access Removal'); - warningMsg = i18nMark(`Please confirm that you would like to remove ${roleName} - access from the team ${resourceName}. This will affect all - members of the team. If you would like to only remove access - for this particular user, please remove them from the team.`); + warningTitle = i18nMark('Remove Team Access'); + warningMsg = ( + + Are you sure you want to remove + {` ${roleName} `} + access from + {` ${resourceName}`} + ? Doing so affects all members of the team. +
+
+ If you + only + want to remove access for this particular user, please remove them from the team. +
+ ); } this.setState({ diff --git a/src/pages/Organizations/screens/OrganizationsList.jsx b/src/pages/Organizations/screens/OrganizationsList.jsx index e1bfe618b4..1698ee1474 100644 --- a/src/pages/Organizations/screens/OrganizationsList.jsx +++ b/src/pages/Organizations/screens/OrganizationsList.jsx @@ -153,7 +153,7 @@ class OrganizationsList extends Component { handleOpenOrgDeleteModal () { const { results, selected } = this.state; - const warningTitle = i18nMark('Delete Organization'); + const warningTitle = i18nMark(`Delete Organization${selected.length > 1 ? 's' : ''}`); const warningMsg = i18nMark('Are you sure you want to delete:'); const orgsToDelete = [];