1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

fix translation marked org and org access list strings

This commit is contained in:
John Mitchell 2019-04-12 15:23:45 -04:00
parent 63894bf822
commit 526b640329
No known key found for this signature in database
GPG Key ID: FE6A9B5BD4EB5C94
2 changed files with 71 additions and 71 deletions

View File

@ -355,8 +355,8 @@ class OrganizationAccessList extends React.Component {
isOpen={showWarning} isOpen={showWarning}
onClose={this.hideWarning} onClose={this.hideWarning}
actions={[ actions={[
<Button key="delete" variant="danger" aria-label="Confirm delete" onClick={this.confirmDelete}>Delete</Button>, <Button key="delete" variant="danger" aria-label="Confirm delete" onClick={this.confirmDelete}>{i18n._(t`Delete`)}</Button>,
<Button key="cancel" variant="secondary" onClick={this.hideWarning}>Cancel</Button> <Button key="cancel" variant="secondary" onClick={this.hideWarning}>{i18n._(t`Cancel`)}</Button>
]} ]}
> >
{warningMsg} {warningMsg}

View File

@ -153,7 +153,7 @@ class OrganizationsList extends Component {
handleOpenOrgDeleteModal () { handleOpenOrgDeleteModal () {
const { results, selected } = this.state; const { results, selected } = this.state;
const warningTitle = i18nMark(`Delete Organization${selected.length > 1 ? 's' : ''}`); const warningTitle = selected.length > 1 ? i18nMark('Delete Organization') : i18nMark('Delete Organizations');
const warningMsg = i18nMark('Are you sure you want to delete:'); const warningMsg = i18nMark('Are you sure you want to delete:');
const orgsToDelete = []; const orgsToDelete = [];
@ -271,60 +271,60 @@ class OrganizationsList extends Component {
} = this.state; } = this.state;
const { match } = this.props; const { match } = this.props;
return ( return (
<PageSection variant={medium}> <I18n>
<Card> {({ i18n }) => (
{ isModalOpen && ( <PageSection variant={medium}>
<AlertModal <Card>
variant="danger" { isModalOpen && (
title={warningTitle} <AlertModal
isOpen={isModalOpen} variant="danger"
onClose={this.handleClearOrgsToDelete} title={warningTitle}
actions={[ isOpen={isModalOpen}
<Button variant="danger" key="delete" aria-label="confirm-delete" onClick={this.handleOrgDelete}>Delete</Button>, onClose={this.handleClearOrgsToDelete}
<Button variant="secondary" key="cancel" aria-label="cancel-delete" onClick={this.handleClearOrgsToDelete}>Cancel</Button> actions={[
]} <Button variant="danger" key="delete" aria-label="confirm-delete" onClick={this.handleOrgDelete}>{i18n._(t`Delete`)}</Button>,
> <Button variant="secondary" key="cancel" aria-label="cancel-delete" onClick={this.handleClearOrgsToDelete}>{i18n._(t`Cancel`)}</Button>
{warningMsg} ]}
<br /> >
{orgsToDelete.map((org) => ( {warningMsg}
<span key={org.id}>
<strong>
{org.name}
</strong>
<br /> <br />
</span> {orgsToDelete.map((org) => (
))} <span key={org.id}>
<br /> <strong>
</AlertModal> {org.name}
)} </strong>
{noInitialResults && ( <br />
<EmptyState> </span>
<EmptyStateIcon icon={CubesIcon} /> ))}
<Title size="lg"> <br />
<Trans>No Organizations Found</Trans> </AlertModal>
</Title> )}
<EmptyStateBody> {noInitialResults && (
<Trans>Please add an organization to populate this list</Trans> <EmptyState>
</EmptyStateBody> <EmptyStateIcon icon={CubesIcon} />
</EmptyState> <Title size="lg">
) || ( <Trans>No Organizations Found</Trans>
<Fragment> </Title>
<DataListToolbar <EmptyStateBody>
addUrl={`${match.url}/add`} <Trans>Please add an organization to populate this list</Trans>
isAllSelected={selected.length === results.length} </EmptyStateBody>
sortedColumnKey={sortedColumnKey} </EmptyState>
sortOrder={sortOrder} ) || (
columns={this.columns} <Fragment>
onSearch={this.onSearch} <DataListToolbar
onSort={this.onSort} addUrl={`${match.url}/add`}
onSelectAll={this.onSelectAll} isAllSelected={selected.length === results.length}
onOpenDeleteModal={this.handleOpenOrgDeleteModal} sortedColumnKey={sortedColumnKey}
disableTrashCanIcon={selected.length === 0} sortOrder={sortOrder}
showDelete columns={this.columns}
showSelectAll onSearch={this.onSearch}
/> onSort={this.onSort}
<I18n> onSelectAll={this.onSelectAll}
{({ i18n }) => ( onOpenDeleteModal={this.handleOpenOrgDeleteModal}
disableTrashCanIcon={selected.length === 0}
showDelete
showSelectAll
/>
<ul className="pf-c-data-list" aria-label={i18n._(t`Organizations List`)}> <ul className="pf-c-data-list" aria-label={i18n._(t`Organizations List`)}>
{ results.map(o => ( { results.map(o => (
<OrganizationListItem <OrganizationListItem
@ -340,21 +340,21 @@ class OrganizationsList extends Component {
/> />
))} ))}
</ul> </ul>
)} <Pagination
</I18n> count={count}
<Pagination page={page}
count={count} pageCount={pageCount}
page={page} page_size={page_size}
pageCount={pageCount} onSetPage={this.onSetPage}
page_size={page_size} />
onSetPage={this.onSetPage} { loading ? <div>loading...</div> : '' }
/> { error ? <div>error</div> : '' }
{ loading ? <div>loading...</div> : '' } </Fragment>
{ error ? <div>error</div> : '' } )}
</Fragment> </Card>
)} </PageSection>
</Card> )}
</PageSection> </I18n>
); );
} }
} }