Skip to content

Commit 7ad7539

Browse files
committed
added blog support
1 parent ba8cca8 commit 7ad7539

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

js/dist/forum.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/dist/forum.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/src/forum/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ app.initializers.add('dem13n-topic-starter-label', () => {
1717

1818
const routeName = app.current.get('routeName');
1919

20-
if (routeName === 'discussion' || routeName === 'discussion.near') {
20+
if (routeName === 'discussion' || routeName === 'discussion.near' || routeName === 'blogArticle') {
2121

22+
const labelText = (routeName === 'blogArticle') ? app.translator.trans('dem13n.forum.blog_article_author') : app.translator.trans('dem13n.forum.topic_starter');
2223
const post = this.attrs.post;
2324
const postAuthor = post.user().id();
2425
const discussionAuthor = post.discussion().user().id();
@@ -29,7 +30,7 @@ app.initializers.add('dem13n-topic-starter-label', () => {
2930

3031
if (postAuthor === discussionAuthor && checkFP(post)) {
3132
vnode.children.push(
32-
<span className="topicStarter">{app.translator.trans('dem13n.forum.topic_starter')}</span>
33+
<span className="topicStarter">{labelText}</span>
3334
);
3435
}
3536
}

locale/en.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
dem13n:
22
forum:
33
topic_starter: Topic starter
4+
blog_article_author: Author

locale/ru.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
dem13n:
22
forum:
33
topic_starter: Автор темы
4+
blog_article_author: Автор

0 commit comments

Comments
 (0)