Merge branch 'feat/ui-0.5.0' into 'test'

fix: timeline add i18n

See merge request opensource/answer!272
This commit is contained in:
Li Shuailing 2022-11-24 02:15:20 +00:00
commit f913408d13
2 changed files with 12 additions and 6 deletions

View File

@ -1225,3 +1225,9 @@ ui:
title: "History for" title: "History for"
show_votes: "Show votes" show_votes: "Show votes"
n_or_a: N/A n_or_a: N/A
title_for: "Timeline for"
title_for_tag: "Title for tag"
datetime: Datetime
type: Type
by: By
comment: Comment

View File

@ -48,8 +48,8 @@ const Index: FC = () => {
<PageTitle <PageTitle
title={ title={
timelineData?.object_info.object_type === 'tag' timelineData?.object_info.object_type === 'tag'
? `Timeline for tag ${timelineData?.object_info.title}` ? `${t('title_for_tag')} ${timelineData?.object_info.title}`
: `Timeline for ${timelineData?.object_info.title}` : `${t('title_for')} ${timelineData?.object_info.title}`
} }
/> />
<Row className="py-3 justify-content-center"> <Row className="py-3 justify-content-center">
@ -71,10 +71,10 @@ const Index: FC = () => {
<Table hover> <Table hover>
<thead> <thead>
<tr> <tr>
<th style={{ width: '20%' }}>Datetime</th> <th style={{ width: '20%' }}>{t('datetime')}</th>
<th style={{ width: '15%' }}>Type</th> <th style={{ width: '15%' }}>{t('type')}</th>
<th style={{ width: '19%' }}>By</th> <th style={{ width: '19%' }}>{t('by')}</th>
<th>Comment</th> <th>{t('comment')}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>