Translate editpost, move customflag from post to iinclude, and update editpost to properly show board custom flags in the flag slot

indiachan-spamvector
Thomas Lynch 1 year ago
parent ba4ee005af
commit 8f689f8df0
  1. 5
      locales/en.json
  2. 5
      locales/pt.json
  3. 7
      views/includes/postflag.pug
  4. 8
      views/mixins/post.pug
  5. 25
      views/pages/editpost.pug

@ -183,6 +183,7 @@
"Hidden User": "Hidden User",
"Hide": "Hide",
"Hide Username In Modlog": "Hide Username In Modlog",
"Hide Username": "Hide Username",
"Home": "Home",
"Hover to view": "Hover to view",
"I'm sure": "I'm sure",
@ -238,7 +239,8 @@
"None": "None",
"Not Shown": "Not Shown",
"Note": "Note",
"Nothing": "None",
"Nothing": "Nothing",
"No.": "No.",
"Now": "Now",
"Opacity": "Opacity",
"Open": "Open",
@ -343,6 +345,7 @@
"Upgrade Ban": "Upgrade Ban",
"URI e.g. /uri/": "URI e.g. /uri/",
"Username": "Username",
"USER WAS BANNED FOR THIS POST": "USER WAS BANNED FOR THIS POST",
"Users": "Users",
"Watch": "Watch",
"Webring": "Webring",

@ -226,6 +226,7 @@
"Hidden User": "Esconder",
"Hide": "Esconder",
"Hide Username In Modlog": "Esconder Username",
"Hide Username": "Esconder Username",
"Home": "Início",
"Hover to view": "Hover to view",
"I'm sure": "Tenho a certeza",
@ -287,6 +288,7 @@
"Note": "Nota",
"Note: Setting board management permissions on an account/role level will grant them globally i.e for all boards.\nTo make somebody a normal board owner/staff, transfer them the board or give them the appropriate permissions in the board staff permission editing interface.": "Note: Setting board management permissions on an account/role level will grant them globally i.e for all boards.\nTo make somebody a normal board owner/staff, transfer them the board or give them the appropriate permissions in the board staff permission editing interface.",
"Nothing": "Nenhuma",
"No.": "/#/",
"Now": "Agora",
"Opacity": "Opacidade",
"Open": "Abrir",
@ -410,7 +412,8 @@
"Use strikethrough": "Use strikethrough",
"Use titles": "Use titles",
"Use underline": "Use underline",
"Username": "Username",
"Username": "Username",
"USER WAS BANNED FOR THIS POST": "UTILIZADOR FOI BANIDO",
"Users": "Utilizadores",
"View Raw IPs": "View Raw IPs",
"Watch": "+Favorito",

@ -0,0 +1,7 @@
if post.country.custom === true
span(title=post.country.name)
img.customflag(src=`/flag/${post.board}/${post.country.src}` alt=' ' loading='lazy')
|
else
span(class=`flag flag-${post.country.code.toLowerCase()}` title=post.country.name alt=post.country.name)
|

@ -39,13 +39,7 @@ mixin post(post, truncate, manage=false, globalmanage=false, ban=false, overboar
span.post-name #{post.name}
|
if post.country && post.country.code
if post.country.custom === true
span(title=post.country.name)
img.customflag(src=`/flag/${post.board}/${post.country.src}` alt=' ' loading='lazy')
|
else
span(class=`flag flag-${post.country.code.toLowerCase()}` title=post.country.name alt=post.country.name)
|
include ../includes/postflag.pug
if post.tripcode
span.post-tripcode #{post.tripcode}
|

@ -1,10 +1,10 @@
extends ../layout.pug
block head
title Edit Post
title #{__('Edit Post')}
block content
h1.board-title Edit Post
h1.board-title #{__('Edit Post')}
.form-wrapper.flex-center.mv-10
form.form-post(action='/forms/editpost' method='POST')
input(type='hidden' name='_csrf' value=csrf)
@ -19,12 +19,11 @@ block content
label
if !post.thread
include ../includes/posticons.pug
input.edit.post-subject(value=post.subject placeholder='Subject' type='text' name='subject' maxlength=globalLimits.fieldLength.subject)
input.edit.post-name(value=post.email type='text' name='email' placeholder='Email' maxlength=globalLimits.fieldLength.email)
input.edit.post-name(type='text' name='name' placeholder='Name' maxlength=globalLimits.fieldLength.name value=post.name+(post.capcode || ''))
input.edit.post-subject(value=post.subject placeholder=__('Subject') type='text' name='subject' maxlength=globalLimits.fieldLength.subject)
input.edit.post-name(value=post.email type='text' name='email' placeholder=__('Email') maxlength=globalLimits.fieldLength.email)
input.edit.post-name(type='text' name='name' placeholder=__('Name') maxlength=globalLimits.fieldLength.name value=post.name+(post.capcode || ''))
if post.country && post.country.code
span(class=`flag flag-${post.country.code.toLowerCase()}` title=post.country.name alt=post.country.name)
|
include ../includes/postflag.pug
if post.tripcode
span.post-tripcode #{post.tripcode}
|
@ -38,20 +37,20 @@ block content
span.user-id(style=`background-color: #${post.userId}`) #{post.userId}
|
span.post-links
a.noselect.no-decoration(href=`${postURL}#${post.postId}`) No.
a.noselect.no-decoration(href=`${postURL}#${post.postId}`) #{__('No.')}
span.post-quoters
a.no-decoration(href=`${postURL}#postform`) #{post.postId}
.post-data
pre.post-message
textarea.edit.fw(name='message' rows='15' placeholder='Message') #{post.nomarkup}
textarea.edit.fw(name='message' rows='15' placeholder=__('Message')) #{post.nomarkup}
if post.banmessage
p.ban
span.message USER WAS BANNED FOR THIS POST
span.message #{__('USER WAS BANNED FOR THIS POST')}
|
span.reason(data-reason=post.banmessage) #{post.banmessage}
label.mt-5
input.post-check(type='checkbox', name='hide_name' value='1')
| Hide Username
| #{__('Hide Username')}
label.mv-5
input(type='text', name='log_message', placeholder='Modlog message' autocomplete='off')
input(type='submit', value='Save')
input(type='text', name='log_message', placeholder=__('Modlog message') autocomplete='off')
input(type='submit', value=__('Save'))

Loading…
Cancel
Save