Allow customizing the name of the comments section

This commit is contained in:
Tissevert 2019-02-19 21:57:50 +01:00
parent 04fe7b8f31
commit d7dcdb2880
4 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,7 @@
allLink = See all
allPage = All articles
allTaggedPage = All articles tagged ${tag}
commentsSection = Comments
latestLink = See only latest
latestPage = Latest articles
latestTaggedPage = Latest articles tagged ${tag}

View File

@ -43,7 +43,7 @@ function Comments(modules) {
function emptySection(ul, threadId) {
return [modules.dom.make('div', {class: 'comments'}, [
modules.dom.make('h2', {innerText: 'Comments'}),
modules.dom.make('h2', {innerText: blog.wording.commentsSection}),
ul,
modules.dom.make('a', {
href: blog.path.commentsAt + '/notice/' + threadId,

View File

@ -25,6 +25,7 @@ data Wording = Wording {
allLink :: Text
, allPage :: Text
, allTaggedPage :: Template
, commentsSection :: Text
, latestLink :: Text
, latestPage :: Text
, latestTaggedPage :: Template
@ -36,6 +37,7 @@ keys = try . string <$> [
"allLink"
, "allPage"
, "allTaggedPage"
, "commentsSection"
, "latestLink"
, "latestPage"
, "latestTaggedPage"
@ -82,6 +84,7 @@ build arguments = do
allLink = wording ! "allLink"
, allPage = wording ! "allPage"
, allTaggedPage
, commentsSection = wording ! "commentsSection"
, latestLink = wording ! "latestLink"
, latestPage = wording ! "latestPage"
, latestTaggedPage

View File

@ -49,6 +49,7 @@ data WordingExport = WordingExport {
allLink :: Text
, allPage :: Text
, allTaggedPage :: Text
, commentsSection :: Text
, latestLink :: Text
, latestPage :: Text
, latestTaggedPage :: Text
@ -96,6 +97,7 @@ exportBlog = do
allLink = Blog.allLink $ Blog.wording blog
, allPage = Blog.allPage $ Blog.wording blog
, allTaggedPage = showTemplate . Blog.allTaggedPage $ Blog.wording blog
, commentsSection = Blog.commentsSection $ Blog.wording blog
, latestLink = Blog.latestLink $ Blog.wording blog
, latestPage = Blog.latestPage $ Blog.wording blog
, latestTaggedPage = showTemplate . Blog.latestTaggedPage $ Blog.wording blog