mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-12-08 05:02:30 -05:00
feat: translations support
This commit is contained in:
@@ -6,6 +6,8 @@ import { PageActions, MediaPageActions } from '../../utils/actions/';
|
||||
import { formatInnerLink, publishedOnDate } from '../../utils/helpers/';
|
||||
import { PopupMain } from '../_shared/';
|
||||
import CommentsList from '../comments/Comments';
|
||||
import { replaceString } from '../../utils/helpers/';
|
||||
import { translateString } from '../../utils/helpers/';
|
||||
|
||||
function metafield(arr) {
|
||||
let i;
|
||||
@@ -48,7 +50,7 @@ function MediaAuthorBanner(props) {
|
||||
</a>
|
||||
</span>
|
||||
{PageStore.get('config-media-item').displayPublishDate && props.published ? (
|
||||
<span className="author-banner-date">Published on {publishedOnDate(new Date(props.published))}</span>
|
||||
<span className="author-banner-date">{translateString("Published on")} {replaceString(publishedOnDate(new Date(props.published)))}</span>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
@@ -76,8 +78,8 @@ function EditMediaButton(props) {
|
||||
}
|
||||
|
||||
return (
|
||||
<a href={link} rel="nofollow" title="Edit media" className="edit-media">
|
||||
EDIT MEDIA
|
||||
<a href={link} rel="nofollow" title={translateString("Edit media")} className="edit-media">
|
||||
{translateString("EDIT MEDIA")}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
@@ -90,8 +92,8 @@ function EditSubtitleButton(props) {
|
||||
}
|
||||
|
||||
return (
|
||||
<a href={link} rel="nofollow" title="Edit subtitle" className="edit-subtitle">
|
||||
EDIT SUBTITLE
|
||||
<a href={link} rel="nofollow" title={translateString("Edit subtitle")} className="edit-subtitle">
|
||||
{translateString("EDIT SUBTITLE")}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
@@ -195,12 +197,12 @@ export default function ViewerInfoContent(props) {
|
||||
</button>
|
||||
) : null}
|
||||
{tagsContent.length ? (
|
||||
<MediaMetaField value={tagsContent} title={1 < tagsContent.length ? 'Tags' : 'Tag'} id="tags" />
|
||||
<MediaMetaField value={tagsContent} title={1 < tagsContent.length ? translateString('Tags') : translateString('Tag')} id="tags" />
|
||||
) : null}
|
||||
{categoriesContent.length ? (
|
||||
<MediaMetaField
|
||||
value={categoriesContent}
|
||||
title={1 < categoriesContent.length ? 'Categories' : 'Category'}
|
||||
title={1 < categoriesContent.length ? translateString('Categories') : translateString('Category')}
|
||||
id="categories"
|
||||
/>
|
||||
) : null}
|
||||
@@ -215,7 +217,7 @@ export default function ViewerInfoContent(props) {
|
||||
) : null}
|
||||
|
||||
<PopupTrigger contentRef={popupContentRef}>
|
||||
<button className="remove-media">DELETE MEDIA</button>
|
||||
<button className="remove-media">{translateString("DELETE MEDIA")}</button>
|
||||
</PopupTrigger>
|
||||
|
||||
<PopupContent contentRef={popupContentRef}>
|
||||
|
||||
Reference in New Issue
Block a user