Skip to content

Commit

Permalink
DateComponent: wrap in Trans when used in sentence (#895)
Browse files Browse the repository at this point in the history
* NamespaceDetail, DeleteGroupModal: remove dead variables

(rebase issue between #790 and #810)

* DateComponent: wrap any "updated <DC/>" in Trans, whole
  • Loading branch information
himdel committed Sep 7, 2021
1 parent d0c13e4 commit d9e9499
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
4 changes: 3 additions & 1 deletion src/components/collection-list/collection-list-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ export class CollectionListItem extends React.Component<IProps, {}> {
<DataListCell isFilled={false} alignRight key='stats'>
{controls ? <div className='entry'>{controls}</div> : null}
<div className='right-col entry'>
{t`Updated`} <DateComponent date={latest_version.created_at} />
<Trans>
Updated <DateComponent date={latest_version.created_at} />
</Trans>
</div>
<div className='entry'>v{latest_version.version}</div>
</DataListCell>,
Expand Down
7 changes: 4 additions & 3 deletions src/components/headers/collection-header.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { t } from '@lingui/macro';
import { t, Trans } from '@lingui/macro';
import * as React from 'react';
import cx from 'classnames';
import './header.scss';
Expand Down Expand Up @@ -106,8 +106,9 @@ export class CollectionHeader extends React.Component<IProps> {
</div>
{latestVersion ? (
<span className='last-updated'>
{t`Last updated`}{' '}
<DateComponent date={latestVersion}></DateComponent>
<Trans>
Last updated <DateComponent date={latestVersion} />
</Trans>
</span>
) : null}
</div>
Expand Down
1 change: 0 additions & 1 deletion src/containers/group-management/delete-group-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ interface IProps {
export class DeleteGroupModal extends React.Component<IProps> {
render() {
const { cancelAction, count, deleteAction, name, users } = this.props;
const nameBold = <b>{name}</b>;

return (
<DeleteModal
Expand Down
9 changes: 0 additions & 9 deletions src/containers/namespace-detail/namespace-detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,6 @@ export class NamespaceDetail extends React.Component<IProps, IState> {
'view_type',
];

const docsAnsibleLink = (
<a
href='https://docs.ansible.com/ansible/latest/galaxy/user_guide.html#configuring-the-ansible-galaxy-client'
target='_blank'
>
here
</a>
);

return (
<React.Fragment>
<ImportModal
Expand Down

0 comments on commit d9e9499

Please sign in to comment.