From 7a9bcc1e1e85a94e529f254fb4ee83633446e410 Mon Sep 17 00:00:00 2001
From: Alex Corey
{speechBubble}
@@ -63,4 +62,4 @@ About.defaultProps = {
version: null,
};
-export default withI18n()(About);
+export default About;
diff --git a/awx/ui_next/src/components/AdHocCommands/AdHocCommands.jsx b/awx/ui_next/src/components/AdHocCommands/AdHocCommands.jsx
index fb8ed89f84..f85120f8f7 100644
--- a/awx/ui_next/src/components/AdHocCommands/AdHocCommands.jsx
+++ b/awx/ui_next/src/components/AdHocCommands/AdHocCommands.jsx
@@ -1,6 +1,6 @@
import React, { useCallback, useEffect, useState, useContext } from 'react';
import { useHistory, useParams } from 'react-router-dom';
-import { withI18n } from '@lingui/react';
+
import { t } from '@lingui/macro';
import PropTypes from 'prop-types';
import { Button, DropdownItem } from '@patternfly/react-core';
@@ -14,7 +14,7 @@ import AdHocCommandsWizard from './AdHocCommandsWizard';
import { KebabifiedContext } from '../../contexts/Kebabified';
import ContentError from '../ContentError';
-function AdHocCommands({ adHocItems, i18n, hasListItems, onLaunchLoading }) {
+function AdHocCommands({ adHocItems, hasListItems, onLaunchLoading }) {
const history = useHistory();
const { id } = useParams();
@@ -22,11 +22,11 @@ function AdHocCommands({ adHocItems, i18n, hasListItems, onLaunchLoading }) {
const { isKebabified, onKebabModalChange } = useContext(KebabifiedContext);
const verbosityOptions = [
- { value: '0', key: '0', label: i18n._(t`0 (Normal)`) },
- { value: '1', key: '1', label: i18n._(t`1 (Verbose)`) },
- { value: '2', key: '2', label: i18n._(t`2 (More Verbose)`) },
- { value: '3', key: '3', label: i18n._(t`3 (Debug)`) },
- { value: '4', key: '4', label: i18n._(t`4 (Connection Debug)`) },
+ { value: '0', key: '0', label: t`0 (Normal)` },
+ { value: '1', key: '1', label: t`1 (Verbose)` },
+ { value: '2', key: '2', label: t`2 (More Verbose)` },
+ { value: '3', key: '3', label: t`3 (Debug)` },
+ { value: '4', key: '4', label: t`4 (Connection Debug)` },
];
useEffect(() => {
if (isKebabified) {
@@ -102,7 +102,7 @@ function AdHocCommands({ adHocItems, i18n, hasListItems, onLaunchLoading }) {
- {i18n._(
- t`Pass extra command line changes. There are two ansible command line parameters: `
- )}
+ {t`Pass extra command line changes. There are two ansible command line parameters: `}
-e, --extra-vars
- {i18n._(t`Provide key/value pairs using either
- YAML or JSON.`)}
+ {t`Provide key/value pairs using either
+ YAML or JSON.`}
{i18n._(t`Click to view job details`)}
+{t`Click to view job details`}
)} > ); @@ -175,4 +175,4 @@ WorkflowNodeHelp.propTypes = { node: shape().isRequired, }; -export default withI18n()(WorkflowNodeHelp); +export default WorkflowNodeHelp; diff --git a/awx/ui_next/src/components/Workflow/WorkflowStartNode.jsx b/awx/ui_next/src/components/Workflow/WorkflowStartNode.jsx index 23dbc06481..8f4c17d79c 100644 --- a/awx/ui_next/src/components/Workflow/WorkflowStartNode.jsx +++ b/awx/ui_next/src/components/Workflow/WorkflowStartNode.jsx @@ -1,6 +1,5 @@ import React, { useContext, useRef, useState } from 'react'; import styled from 'styled-components'; -import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { bool, func } from 'prop-types'; import { PlusIcon } from '@patternfly/react-icons'; @@ -31,7 +30,7 @@ const StartDiv = styled.div` padding: 0px 10px; `; -function WorkflowStartNode({ i18n, onUpdateHelpText, showActionTooltip }) { +function WorkflowStartNode({ onUpdateHelpText, showActionTooltip }) { const ref = useRef(null); const startNodeRef = useRef(null); const [hovering, setHovering] = useState(false); @@ -58,7 +57,7 @@ function WorkflowStartNode({ i18n, onUpdateHelpText, showActionTooltip }) { y="10" style={{ overflow: 'visible' }} > -{i18n._(t`Notification sent successfully`)}
+{t`Notification sent successfully`}
)} {notification.status === 'failed' && notification?.error === 'timed out' && ( -{i18n._(t`Notification timed out`)}
+{t`Notification timed out`}
)} {notification.status === 'failed' && notification?.error !== 'timed out' && ( @@ -265,4 +263,4 @@ function NotificationTemplatesList({ i18n }) { ); } -export default withI18n()(NotificationTemplatesList); +export default NotificationTemplatesList; diff --git a/awx/ui_next/src/screens/NotificationTemplate/NotificationTemplateList/NotificationTemplateListItem.jsx b/awx/ui_next/src/screens/NotificationTemplate/NotificationTemplateList/NotificationTemplateListItem.jsx index 025e4b7465..c2f783b583 100644 --- a/awx/ui_next/src/screens/NotificationTemplate/NotificationTemplateList/NotificationTemplateListItem.jsx +++ b/awx/ui_next/src/screens/NotificationTemplate/NotificationTemplateList/NotificationTemplateListItem.jsx @@ -1,6 +1,6 @@ import 'styled-components/macro'; import React, { useState, useEffect, useCallback } from 'react'; -import { withI18n } from '@lingui/react'; + import { t } from '@lingui/macro'; import { Link } from 'react-router-dom'; import { Button } from '@patternfly/react-core'; @@ -27,7 +27,6 @@ function NotificationTemplateListItem({ isSelected, onSelect, rowIndex, - i18n, }) { const recentNotifications = template.summary_fields?.recent_notifications; const latestStatus = recentNotifications @@ -102,25 +101,25 @@ function NotificationTemplateListItem({ isSelected, onSelect, }} - dataLabel={i18n._(t`Selected`)} + dataLabel={t`Selected`} /> -
{'{{'} job_friendly_name {'}}'}
@@ -87,8 +87,8 @@ function CustomMessagesSubForm({ defaultMessages, type, i18n }) {
{'{{'} job.status {'}}'}
.{' '}
- {i18n._(t`You may apply a number of possible variables in the
- message. For more information, refer to the`)}{' '}
+ {t`You may apply a number of possible variables in the
+ message. For more information, refer to the`}{' '}
- {i18n._(t`Documentation.`)}
+ {t`Ansible Tower Documentation.`}
@@ -105,7 +105,7 @@ function CustomMessagesSubForm({ defaultMessages, type, i18n }) {
- {i18n._(t`If you do not have a subscription, you can visit - Red Hat to obtain a trial subscription.`)} + {t`If you do not have a subscription, you can visit + Red Hat to obtain a trial subscription.`}
- {i18n._( - t`Select your Ansible Automation Platform subscription to use.` - )} -
+{t`Select your Ansible Automation Platform subscription to use.`}
- {i18n._(t`Provide your Red Hat or Red Hat Satellite credentials + {t`Provide your Red Hat or Red Hat Satellite credentials below and you can choose from a list of your available subscriptions. The credentials you use will be stored for future use in - retrieving renewal or expanded subscriptions.`)} + retrieving renewal or expanded subscriptions.`}
- {i18n._( - t`Are you sure you want to remove all the nodes in this workflow?` - )} + {t`Are you sure you want to remove all the nodes in this workflow?`}
{i18n._(t`Are you sure you want to remove this link?`)}
+{t`Are you sure you want to remove this link?`}
{!linkToDelete.isConvergenceLink && (- {i18n._( - t`Removing this link will orphan the rest of the branch and cause it to be executed immediately on launch.` - )} + {t`Removing this link will orphan the rest of the branch and cause it to be executed immediately on launch.`}
{i18n._(t`Are you sure you want to remove the node below:`)}
+{t`Are you sure you want to remove the node below:`}
{i18n._(t`Are you sure you want to remove this node?`)}
+{t`Are you sure you want to remove this node?`}
)}