Fix some scheduled live string localization
This commit is contained in:
parent
78e7eaa689
commit
18a054747a
2 changed files with 8 additions and 3 deletions
|
@ -3,6 +3,7 @@ import React from 'react';
|
||||||
import DateTime from 'component/dateTime';
|
import DateTime from 'component/dateTime';
|
||||||
import { LIVESTREAM_STARTED_RECENTLY_BUFFER } from 'constants/livestream';
|
import { LIVESTREAM_STARTED_RECENTLY_BUFFER } from 'constants/livestream';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
import I18nMessage from 'component/i18nMessage';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
uri: string,
|
uri: string,
|
||||||
|
@ -16,7 +17,9 @@ const LivestreamDateTime = (props: Props) => {
|
||||||
if (activeLivestream) {
|
if (activeLivestream) {
|
||||||
return (
|
return (
|
||||||
<span>
|
<span>
|
||||||
{__('Started')} <DateTime timeAgo date={activeLivestream.startedStreaming.toDate()} />
|
<I18nMessage tokens={{ time_date: <DateTime timeAgo date={activeLivestream.startedStreaming.toDate()} /> }}>
|
||||||
|
{__('Started %time_date%')}
|
||||||
|
</I18nMessage>
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -29,7 +32,9 @@ const LivestreamDateTime = (props: Props) => {
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<span>
|
<span>
|
||||||
{__('Live')} <DateTime timeAgo uri={uri} showFutureDate />
|
<I18nMessage tokens={{ time_date: <DateTime timeAgo uri={uri} showFutureDate /> }}>
|
||||||
|
{__('Live %time_date%')}
|
||||||
|
</I18nMessage>
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -36,7 +36,7 @@ export default function LivestreamScheduledInfo(props: Props) {
|
||||||
<p className={'livestream-scheduled__time'}>
|
<p className={'livestream-scheduled__time'}>
|
||||||
{!inPast && (
|
{!inPast && (
|
||||||
<span>
|
<span>
|
||||||
<span>Live {startDateFromNow}</span>
|
<span>{__('Live %time_date%', { time_date: startDateFromNow })}</span>
|
||||||
<br />
|
<br />
|
||||||
<span className={'livestream-scheduled__date'}>{startDate}</span>
|
<span className={'livestream-scheduled__date'}>{startDate}</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
Loading…
Add table
Reference in a new issue