mirror of
https://github.com/flarum/core.git
synced 2025-07-29 12:40:40 +02:00
Improved consistency for existing core translation key names. See flarum/core#265 - Completely overhauled core en.yml - Replaced existing key names in all core JS files to match - Extracted a hardcoded string in IndexPage.js - Combined two app.trans calls in DiscussionControls.js - Removed hardcoded spaces from LogInModal.js and SignUpModal.js - Added two new keys from DiscussionControls.js (soft delete) - Created two new “reused keys” to YML to accommodate same
31 lines
746 B
JavaScript
31 lines
746 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.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>
|
|
};
|
|
}
|
|
}
|