Files
framework/js/forum/src/components/DiscussionRenamedPost.js
dcsjapan 49d59089e4 Add third tier to key namespacing
- Changes all `app.trans` calls to `app.translator.trans` calls.
- Changes existing keys to [three-tier namespace structure](https://github.com/flarum/english/pull/12).
- Extracts additional strings for `lib:` namespace.
- Extracts two previously missed strings for EditGroupModal.js.
2015-10-20 13:04:43 +09:00

31 lines
752 B
JavaScript

import EventPost from 'flarum/components/EventPost';
/**
* The `DiscussionRenamedPost` component displays a discussion event post
* indicating that the discussion has been renamed.
*
* ### Props
*
* - All of the props for EventPost
*/
export default class DiscussionRenamedPost extends EventPost {
icon() {
return 'pencil';
}
descriptionKey() {
return 'core.forum.post_stream.discussion_renamed_text';
}
descriptionData() {
const post = this.props.post;
const oldTitle = post.content()[0];
const newTitle = post.content()[1];
return {
'old': <strong className="DiscussionRenamedPost-old">{oldTitle}</strong>,
'new': <strong className="DiscussionRenamedPost-new">{newTitle}</strong>
};
}
}