mirror of
https://github.com/ansible/awx.git
synced 2026-02-14 01:34:45 -03:30
update tests based on i18n changes
This commit is contained in:
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
|
||||
import { withI18n } from '@lingui/react';
|
||||
import { t } from '@lingui/macro';
|
||||
import { Wizard } from '@patternfly/react-core';
|
||||
import { withNetwork } from '../../contexts/Network';
|
||||
import SelectResourceStep from './SelectResourceStep';
|
||||
import SelectRoleStep from './SelectRoleStep';
|
||||
import SelectableCard from './SelectableCard';
|
||||
@@ -249,4 +250,5 @@ AddResourceRole.defaultProps = {
|
||||
roles: {}
|
||||
};
|
||||
|
||||
export default withI18n()(AddResourceRole);
|
||||
export { AddResourceRole as _AddResourceRole };
|
||||
export default withI18n()(withNetwork(AddResourceRole));
|
||||
|
||||
@@ -58,4 +58,5 @@ AnsibleSelect.propTypes = {
|
||||
value: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
export { AnsibleSelect as _AnsibleSelect };
|
||||
export default withI18n()(AnsibleSelect);
|
||||
|
||||
@@ -113,7 +113,7 @@ class PaginatedDataList extends React.Component {
|
||||
const { error } = this.state;
|
||||
const [orderBy, sortOrder] = this.getSortOrder();
|
||||
const queryParams = parseNamespacedQueryString(qsConfig, location.search);
|
||||
const columns = toolbarColumns || [{ name: i18n._(t`Name`), key: 'name', isSortable: true }];
|
||||
const columns = toolbarColumns.length ? toolbarColumns : [{ name: i18n._(t`Name`), key: 'name', isSortable: true }];
|
||||
return (
|
||||
<Fragment>
|
||||
{error && (
|
||||
@@ -141,7 +141,7 @@ class PaginatedDataList extends React.Component {
|
||||
<DataListToolbar
|
||||
sortedColumnKey={orderBy}
|
||||
sortOrder={sortOrder}
|
||||
columns={toolbarColumns}
|
||||
columns={columns}
|
||||
onSearch={() => { }}
|
||||
onSort={this.handleSort}
|
||||
showSelectAll={showSelectAll}
|
||||
|
||||
@@ -187,13 +187,15 @@ class Pagination extends Component {
|
||||
className="awx-pagination__page-input-form"
|
||||
onSubmit={this.onSubmit}
|
||||
>
|
||||
{i18n._(t`Page ${(<TextInput
|
||||
{i18n._(t`Page `)}
|
||||
<TextInput
|
||||
className="awx-pagination__page-input"
|
||||
aria-label={i18n._(t`Page Number`)}
|
||||
value={value}
|
||||
type="text"
|
||||
onChange={this.onPageChange}
|
||||
/>)} of ${pageCount}`)}
|
||||
/>
|
||||
{i18n._(t` of ${pageCount}`)}
|
||||
</form>
|
||||
<div className="pf-c-input-group">
|
||||
<Button
|
||||
|
||||
@@ -94,7 +94,7 @@ class OrganizationListItem extends React.Component {
|
||||
</Badge>
|
||||
</ListGroup>
|
||||
</DataListCell>,
|
||||
<DataListCell>
|
||||
<DataListCell key="teams">
|
||||
<ListGroup>
|
||||
{i18n._(t`Teams`)}
|
||||
<Badge isRead>
|
||||
|
||||
@@ -188,7 +188,6 @@ class OrganizationAccess extends React.Component {
|
||||
<AddResourceRole
|
||||
onClose={this.toggleAddModal}
|
||||
onSave={this.handleSuccessfulRoleAdd}
|
||||
api={api}
|
||||
roles={organization.summary_fields.object_roles}
|
||||
/>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user