mirror of
https://github.com/flarum/core.git
synced 2025-07-18 07:11:17 +02:00
Make front-end localizable
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import Component from 'flarum/Component';
|
||||
import icon from 'flarum/helpers/icon';
|
||||
import humanTime from 'flarum/utils/humanTime';
|
||||
import extractText from 'flarum/utils/extractText';
|
||||
|
||||
/**
|
||||
* The `PostEdited` component displays information about when and by whom a post
|
||||
@@ -14,7 +15,7 @@ export default class PostEdited extends Component {
|
||||
view() {
|
||||
const post = this.props.post;
|
||||
const editUser = post.editUser();
|
||||
const title = 'Edited ' + (editUser ? 'by ' + editUser.username() + ' ' : '') + humanTime(post.editTime());
|
||||
const title = extractText(app.trans('core.post_edited', {user: editUser, ago: humanTime(post.editTime())}));
|
||||
|
||||
return (
|
||||
<span className="PostEdited" title={title}>{icon('pencil')}</span>
|
||||
|
Reference in New Issue
Block a user