Add some basics with translate functionality
This commit is contained in:
36
server/views/translate-chapter.pug
Normal file
36
server/views/translate-chapter.pug
Normal file
@@ -0,0 +1,36 @@
|
||||
extend templates/layout.pug
|
||||
|
||||
block content
|
||||
.container
|
||||
.center
|
||||
h1= chapter.entry.translationEntries[0].name
|
||||
h2= chapter.entry.name
|
||||
|
||||
//- TODO: List chunks in the chapter
|
||||
.row
|
||||
.col.s12
|
||||
table
|
||||
thead
|
||||
tr
|
||||
th #{chapter.entry.dialect.name}
|
||||
th #{chapter.entry.translationEntries[0].name}
|
||||
th
|
||||
|
||||
tbody
|
||||
each chunk in chapter.chunks
|
||||
tr
|
||||
td= chunk.text
|
||||
td
|
||||
if chunk.ossified
|
||||
span= chunk.text
|
||||
else if chunk.translation
|
||||
span= chunk.translation.text
|
||||
else
|
||||
span= chunk.text.replaceAll(/./g, " ")
|
||||
td
|
||||
if chunk.ossified
|
||||
span nothing
|
||||
else if chunk.translation
|
||||
a.btn.blue review
|
||||
else
|
||||
a.btn.black translate
|
||||
@@ -4,4 +4,6 @@ block content
|
||||
.container
|
||||
.center
|
||||
h1= translationEntry.name
|
||||
h2= translationEntry.entry.name
|
||||
h2= translationEntry.entry.name
|
||||
|
||||
a.btn.black(href=`/translate/${translationEntry.id}`) Translate
|
||||
Reference in New Issue
Block a user