Update event post API

- Use more appropriate component class name
- Allow username to be moved in translation
This commit is contained in:
Toby Zerner
2015-07-20 18:12:08 +09:30
parent 82f1daeef4
commit 53c621d999
4 changed files with 41 additions and 11 deletions

View File

@ -13,15 +13,18 @@ export default class DiscussionRenamedPost extends EventPost {
return 'pencil';
}
description() {
descriptionKey() {
return 'core.discussion_renamed_post';
}
descriptionData() {
const post = this.props.post;
const oldTitle = post.content()[0];
const newTitle = post.content()[1];
return app.trans('core.discussion_renamed', {
user: this.props.post.user(),
return {
old: <strong className="DiscussionRenamedPost-old">{oldTitle}</strong>,
new: <strong className="DiscussionRenamedPost-new">{newTitle}</strong>
});
};
}
}