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