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 allLink = See all
allPage = All articles allPage = All articles
allTaggedPage = All articles tagged ${tag} allTaggedPage = All articles tagged ${tag}
commentsSection = Comments
latestLink = See only latest latestLink = See only latest
latestPage = Latest articles latestPage = Latest articles
latestTaggedPage = Latest articles tagged ${tag} latestTaggedPage = Latest articles tagged ${tag}

View file

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

View file

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

View file

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