translate more pages

translate homepage stats sections
improve frontend __ replacement
fix globalLanguage incorrectly set in head include
indiachan-spamvector
Thomas Lynch 1 year ago
parent 09c571052f
commit 87f834b510
  1. 7
      gulp/res/js/i18n.js
  2. 24
      gulp/res/js/live.js
  3. 33
      locales/en.json
  4. 31
      locales/pt.json
  5. 2
      views/includes/head.pug
  6. 2
      views/pages/account.pug
  7. 32
      views/pages/globalmanageboardlist.pug
  8. 30
      views/pages/globalmanagelogs.pug
  9. 18
      views/pages/globalmanagenews.pug
  10. 12
      views/pages/globalmanagerecent.pug
  11. 6
      views/pages/globalmanagereports.pug
  12. 12
      views/pages/globalmanageroles.pug
  13. 10
      views/pages/globalmanagesettings.pug
  14. 18
      views/pages/home.pug

@ -7,11 +7,12 @@ const pluralMap = {
};
//simple translation
const __ = (key) => {
return LANG[key] || key;
const __ = (key, replacement=null) => {
const translation = LANG[key] || key;
return replacement !== null ? translation.replace('%s', replacement) : translation;
};
//plurals+replace %s with count
//pluralisation
const __n = (key, count) => {
const pluralKey = pluralMap[count] || 'other';
const translationObj = LANG[key];

@ -1,4 +1,4 @@
/* globals isRecent isGlobalRecent isThread post extraLocals isModView io setLocalStorage */
/* globals __ isRecent isGlobalRecent isThread post extraLocals isModView io setLocalStorage */
let liveEnabled = localStorage.getItem('live') == 'true';
let scrollEnabled = localStorage.getItem('scroll') == 'true';
let socket;
@ -159,7 +159,7 @@ window.addEventListener('settingsReady', function() { //after domcontentloaded
jsonPath = jsonParts.join('/');
const fetchNewPosts = async () => {
console.log('fetching posts from api');
updateLive('Fetching posts...', 'yellow');
updateLive(__('Fetching posts...'), 'yellow');
let json;
let newPosts = [];
try {
@ -178,7 +178,7 @@ window.addEventListener('settingsReady', function() { //after domcontentloaded
}
}
}
updateLive('Updated', 'green');
updateLive(__('Updated'), 'green');
return newPosts.length;
};
@ -225,7 +225,7 @@ window.addEventListener('settingsReady', function() { //after domcontentloaded
const pingStart = Date.now();
socket.volatile.emit('ping', () => {
const latency = Date.now() - pingStart;
updateLive(`Connected for live posts (${latency}ms)`, '#0de600');
updateLive(__('Connected for live posts (%sms)', latency), '#0de600');
});
};
const fallbackToPolling = () => {
@ -249,36 +249,36 @@ window.addEventListener('settingsReady', function() { //after domcontentloaded
socket.on('message', (message) => {
console.log(message, room);
if (message === 'joined') {
updateLive('Connected for live posts', '#0de600');
updateLive(__('Connected for live posts'), '#0de600');
socketPing();
}
});
socket.on('reconnect_attempt', () => {
updateLive('Attempting to reconnect...', 'yellow');
updateLive(__('Attempting to reconnect...'), 'yellow');
});
socket.on('disconnect', () => {
console.log('lost connection to room');
updateLive('Disconnected', 'red');
updateLive(__('Disconnected'), 'red');
});
socket.on('reconnect', () => {
console.log('reconnected to room');
fetchNewPosts();
});
socket.on('error', (e) => {
updateLive('Socket error', 'orange');
updateLive(__('Socket error'), 'orange');
console.error(e);
});
socket.on('connect_error', (e) => {
updateLive('Error connecting', 'orange');
updateLive(__('Error connecting'), 'orange');
console.error(e);
fallbackToPolling();
});
socket.on('reconnect_error', (e) => {
updateLive('Error reconnecting', 'orange');
updateLive(__('Error reconnecting'), 'orange');
console.error(e);
});
socket.on('reconnect_failed', (e) => {
updateLive('Failed reconnecting', 'orange');
updateLive(__('Failed reconnecting'), 'orange');
console.error(e);
fallbackToPolling();
});
@ -298,7 +298,7 @@ window.addEventListener('settingsReady', function() { //after domcontentloaded
if (socket && supportsWebSockets) {
socket.disconnect();
}
updateLive('Live posts off', 'darkgray');
updateLive(__('Live posts off'), 'darkgray');
};
const liveSetting = document.getElementById('live-setting');

@ -16,6 +16,7 @@
"one": "%s file",
"other": "%s files"
},
"%s files are being served, totaling %s.": "%s files are being served, totaling %s.",
"%s files selected": {
"one": "%s file selected",
"other": "%s files selected"
@ -89,6 +90,7 @@
"other": "Add Flags (Max %s)"
},
"Add layer": "Add layer",
"Add News": "Add News",
"Admin": "Admin",
"Airbrush": "Airbrush",
"alphanumeric only": "alphanumeric only",
@ -103,6 +105,7 @@
"one": "Asset %s",
"other": "Assets %s"
},
"Attempting to reconnect...": "Attempting to reconnect...",
"Ban duration e.g. 7d": "Ban duration e.g. 7d",
"Ban Poster": "Ban Poster",
"Ban reason": "Ban reason",
@ -136,6 +139,9 @@
"Color": "Color",
"comma separated": "comma separated",
"Confirm New Password": "Confirm New Password",
"Connected for live posts": "Connected for live posts",
"Connected for live posts (%sms)": "Connected for live posts (%sms)",
"Connecting...": "Connecting...",
"Could not load the image.": "Could not load the image.",
"Could not load the replay: ": "Could not load the replay: ",
"Create": "Create",
@ -160,6 +166,7 @@
"Deny Appeal": "Deny Appeal",
"Descending": "Descending",
"Description": "Description",
"Disconnected": "Disconnected",
"Dismiss Global Reports": "Dismiss Global Reports",
"Dismiss Reports": "Dismiss Reports",
"Double click to highlight (%s)": {
@ -188,12 +195,16 @@
"Email": "Email",
"Enabling 2FA will invalidate all your existing sessions and you will have to login again.": "Enabling 2FA will invalidate all your existing sessions and you will have to login again.",
"Eraser": "Eraser",
"Error connecting": "Error connecting",
"Error reconnecting": "Error reconnecting",
"Europe": "Tor Exit Node",
"Existing Password": "Existing Password",
"Expiry": "Expiry",
"Export": "Export",
"Failed reconnecting": "Failed reconnecting",
"faq": "faq",
"Faster": "Faster",
"Fetching posts...": "Fetching posts...",
"Files": {
"one": "File",
"other": "Files"
@ -219,6 +230,7 @@
"Global Board Owner": "Global Board Owner",
"Global Board Staff": "Global Board Staff",
"Global Management": "Global Management",
"Global post history for %s": "Global post history for %s",
"Global Report": "Global Report",
"Global Settings": "Global Settings",
"Global Staff": "Global Staff",
@ -227,6 +239,7 @@
"Hide Username": "Hide Username",
"Hide Username In Modlog": "Hide Username In Modlog",
"Home": "Home",
"Hot Thread (%s)": "Hot Thread (%s)",
"Hover to view": "Hover to view",
"I'm sure": "I'm sure",
"ID": "ID",
@ -235,6 +248,7 @@
"Index": "Index",
"Internal server error": "Internal server error",
"Invalid dimensions.": "Invalid dimensions.",
"IP": "IP",
"IP/ID": "IP/ID",
"IPV4": "IPV4",
"IPV6": "IPV6",
@ -243,18 +257,22 @@
"Last Active": "Last Active",
"Last edited": "Last edited",
"Latest Activity": "Latest Activity",
"Latest News": "Latest News",
"Layer": "Layer",
"Layer limit reached.": "Layer limit reached.",
"Layers": "Layers",
"Live posts off": "Live posts off",
"loading": "loading",
"Loading replay…": "Loading replay…",
"Local First": "Local First",
"Locked": "Locked",
"Log Message": "Log Message",
"Log out": "Log out",
"Login": "Login",
"Logs": "Logs",
"Lokinet SNApp": "Lokinet SNApp",
"Manage": "Manage",
"Manage News": "Manage News",
"Max %s": {
"one": "Max %s",
"other": "Max %s"
@ -289,6 +307,7 @@
"No bans.": "No bans.",
"No camera? Use this secret in your authenticator app instead": "No camera? Use this secret in your authenticator app instead",
"No Filters": "No Filters",
"No Logs.": "No Logs.",
"No posts.": "No posts.",
"No results.": "No results.",
"No video/audio files in this thread.": "No video/audio files in this thread.",
@ -333,7 +352,8 @@
"Pruned IP": "Pruned IP",
"Range": "Range",
"Reason": "Reason",
"Recent": "Recent",
"Recent": "w",
"Recent Posts": "Recept Posts",
"Recording replay": "Recording replay",
"Redo": "Redo",
"Register": "Register",
@ -349,6 +369,7 @@
"Report": "Report",
"Report reason": "Report reason",
"Reports": "Reports",
"Reports against or by ip %s": "Reports against or by ip %s",
"Resign": "Resign",
"Resign from a staff position": "Resign from a staff position",
"Reverse": "Reverse",
@ -378,6 +399,7 @@
"Single": "Single",
"Size": "Size",
"Slower": "Slower",
"Socket error": "Socket error",
"Sort": "Sort",
"Sort By": "Sort By",
"Spoiler": "Spoiler",
@ -395,6 +417,8 @@
"Tags": "Tags",
"Tegaki": "Tegaki",
"The active layer is not visible.": "The active layer is not visible.",
"There are currently %s public boards, %s in total. Sitewide, %s posts have been made in the last day, %s in the last hour, %s in total.": "There are currently %s public boards, %s in total. Sitewide, %s posts have been made in the last day, %s in the last hour, %s in total.",
"There are currently %s sites and %s boards in the known webring. Across all webring boards, %s posts have been made in the last hour, %s in total.": "There are currently %s sites and %s boards in the known webring. Across all webring boards, %s posts have been made in the last hour, %s in total.",
"Thread from": "Thread from",
"Thread No.": "Thread No.",
"Thread Watcher": "Thread Watcher",
@ -412,8 +436,12 @@
"Undo": "Undo",
"Unknown": "Unknown",
"Unlink Files": "Unlink Files",
"Unregistered User": "Unregistered User",
"Update": "Update",
"Updated": "Updated",
"Upgrade Ban": "Upgrade Ban",
"URI e.g. /uri/": "URI e.g. /uri/",
"URI or tags": "URI or tags",
"USER WAS BANNED FOR THIS POST": "USER WAS BANNED FOR THIS POST",
"Username": "Username",
"Users": "Users",
@ -421,6 +449,7 @@
"Watch": "Watch",
"Webring": "Webring",
"Welcome": "Welcome",
"Welcome, %s": "Welcome, %s",
"Wide": "Wide",
"Wide Range": "Wide Range",
"You": "You",
@ -428,4 +457,4 @@
"You own": "You own",
"Your upload was too large": "Your upload was too large",
"Zoom": "Zoom"
}
}

@ -16,6 +16,7 @@
"one": "%s ficheiro",
"other": "%s ficheiros"
},
"%s files are being served, totaling %s.": "%s Ficheiros %s.",
"%s files selected": {
"one": "%s ficheiro selecionado",
"other": "%s ficheiros selecionados"
@ -104,6 +105,7 @@
"other": "Add Flags (Max %s)"
},
"Add layer": "Adicionar camada",
"Add News": "Add News",
"Admin": "Admin",
"Airbrush": "Aerógrafo",
"alphanumeric only": "Alfanumérico apenas",
@ -118,6 +120,7 @@
"one": "Asset %s",
"other": "Assets %s"
},
"Attempting to reconnect...": "A ligar...",
"Ban duration e.g. 7d": "Duração do ban e.g. 7d",
"Ban Poster": "Banir Utilizador",
"Ban reason": "Motivodo do Ban",
@ -167,6 +170,9 @@
"Color": "Cor",
"comma separated": "separado por vírgula",
"Confirm New Password": "Confirm New Password",
"Connected for live posts": "Ligado",
"Connected for live posts (%sms)": "Ligado (%sms)",
"Connecting...": "A ligar...",
"Could not load the image.": "Não foi possível carregar a imagem.",
"Could not load the replay: ": "Não foi possível carregar a repetição: ",
"Create": "Criar",
@ -195,6 +201,7 @@
"Description": "Descrição",
"Detected": "Detected",
"Dice Roll": "Dice Roll",
"Disconnected": "Desligado",
"Dismiss Global Reports": "Dismiss Global Reports",
"Dismiss Reports": "Dismiss Denúncias",
"Double click to highlight (%s)": {
@ -223,12 +230,16 @@
"Email": "Opção",
"Enabling 2FA will invalidate all your existing sessions and you will have to login again.": "Ativar 2FA vai invalidar todas as sessões ativas e terás que fazer login novamente.",
"Eraser": "Borracha",
"Error connecting": "Erro a ligar",
"Error reconnecting": "Erro a ligar",
"Europe": "Tor Exit Node",
"Existing Password": "Existing Password",
"Expiry": "Expira",
"Export": "Exportar",
"Failed reconnecting": "Erro a ligar",
"faq": "faq",
"Faster": "Mais rápido",
"Fetching posts...": "A adquirir...",
"Files": {
"one": "Ficheiro",
"other": "Ficheiros"
@ -261,6 +272,7 @@
"Global Board Staff": "Global Board Staff",
"Global Logs": "Global Logs",
"Global Management": "Global Management",
"Global post history for %s": "Global post history for %s",
"Global Report": "Denúncia Global",
"Global Settings": "Opções Globais",
"Global Staff": "Global Staff",
@ -270,6 +282,7 @@
"Hide Username": "Esconder Username",
"Hide Username In Modlog": "Esconder Username",
"Home": "Início",
"Hot Thread (%s)": "Hot Thread (%s)",
"Hover to view": "Hover to view",
"I'm sure": "Tenho a certeza",
"ID": "ID",
@ -279,6 +292,7 @@
"Inline Monospace": "Inline Monospace",
"Internal server error": "Erro interno do servidor",
"Invalid dimensions.": "Dimensões invalidas.",
"IP": "IP",
"IP/ID": "IP/ID",
"IPV4": "IPV4",
"IPV6": "IPV6",
@ -288,20 +302,24 @@
"Last Active": "Last Active",
"Last edited": "Last edited",
"Latest Activity": "Última Atividade",
"Latest News": "Latest News",
"Layer": "Camada",
"Layer limit reached.": "Limite de camadas excedido.",
"Layers": "Camadas",
"Links": "Links",
"Live posts off": "Direto desligado",
"loading": "loading",
"Loading replay…": "A carregar repetição...",
"Local First": "Locais Primeiro",
"Locked": "Locked",
"Log Message": "Mensagem Log",
"Log out": "Log out",
"Login": "Entrar",
"Logs": "Logs",
"Lokinet SNApp": "Lokinet SNApp",
"Make links clickable": "Make links clickable",
"Manage": "Gerir",
"Manage News": "Manage News",
"Max %s": {
"one": "Max %s",
"other": "Max %s"
@ -336,6 +354,7 @@
"No bans.": "Sem bans.",
"No camera? Use this secret in your authenticator app instead": "Sem câmara? Usa este segredo na tua aplicação de autenticação",
"No Filters": "No Filters",
"No Logs.": "No Logs.",
"No posts.": "Sem publicações.",
"No results.": "No results.",
"No video/audio files in this thread.": "No video/audio files in this thread.",
@ -385,6 +404,7 @@
"Raw IPs": "Raw IPs",
"Reason": "Reason",
"Recent": "Recentes",
"Recent Posts": "Recept Posts",
"Recording replay": "A gravar repetição",
"Redo": "Refazer",
"Register": "Registar",
@ -400,6 +420,7 @@
"Report": "Denunciar",
"Report reason": "Motivo denúncia",
"Reports": "Denúncias",
"Reports against or by ip %s": "Reports against or by ip %s",
"Resign": "Abandonar",
"Resign from a staff position": "Abandonar posição",
"Reverse": "ImgOps",
@ -430,6 +451,7 @@
"Single": "Único",
"Size": "Tamanho",
"Slower": "Mais devagar",
"Socket error": "Erro socket",
"Sort": "Ordenar",
"Sort By": "Ordem",
"Spoiler": "Spoiler",
@ -448,6 +470,8 @@
"Tags": "Tags",
"Tegaki": "Tegaki",
"The active layer is not visible.": "A camada activa não está visível.",
"There are currently %s public boards, %s in total. Sitewide, %s posts have been made in the last day, %s in the last hour, %s in total.": "Existem %s tábuas públicas, %s no total. Foram feitas %s publicações no último dia, %s na última hora, %s no total.",
"There are currently %s sites and %s boards in the known webring. Across all webring boards, %s posts have been made in the last hour, %s in total.": "There are currently %s sites and %s boards in the known webring. Across all webring boards, %s posts have been made in the last hour, %s in total.",
"Thread from": "Thread from",
"Thread No.": "Fio n.º",
"Thread Watcher": "Favoritos",
@ -467,8 +491,12 @@
"Undo": "Desfazer",
"Unknown": "Unknown",
"Unlink Files": "Unlink Ficheiros",
"Unregistered User": "Unregistered User",
"Update": "Update",
"Updated": "Atualizado",
"Upgrade Ban": "Alterar Range",
"URI e.g. /uri/": "URI e.g. /uri/",
"URI or tags": "URI or tags",
"Use bold": "Use bold",
"Use code blocks": "Use code blocks",
"Use detected": "Use detected",
@ -489,7 +517,8 @@
"View Raw IPs": "View Raw IPs",
"Watch": "+Favorito",
"Webring": "Webring",
"Welcome": "Bem-vindo",
"Welcome": "Welcome",
"Welcome, %s": "Bem-vindo, %s",
"Wide": "Longo",
"Wide Range": "Range Longo",
"You": "You",

@ -33,7 +33,7 @@ if isBoard && board.settings.customCss
include ../../gulp/res/icons/html_code.html
//- language pack
- const languageScript = isBoard ? board.settings.language : language;
- const languageScript = isBoard ? board.settings.language : globalLanguage;
script(src=`/js/lang/${languageScript}.js?v=${commit}`)
//- main script

@ -5,7 +5,7 @@ block head
block content
.board-header
h1.board-title #{__('Welcome')}, #{user.username}
h1.board-title #{__(`Welcome %s`, user.username)}
br
hr(size=1)
h4.no-m-p #{__('General')}:

@ -4,10 +4,10 @@ include ../mixins/globalmanagenav.pug
include ../mixins/boardtable.pug
block head
title Boards
title #{__('Boards')}
block content
h1.board-title Global Management
h1.board-title #{__('Global Management')}
br
+globalmanagenav('boards')
hr(size=1)
@ -18,29 +18,29 @@ block content
.row.wrap.sb
.col.mr-5
.row
.label Search
input(type='text' name='search' value=search placeholder='Uri or tags')
.label #{__('Search')}
input(type='text' name='search' value=search placeholder=__('URI or tags'))
.row
.label Sort
.label #{__('Sort')}
select(name='sort')
option(value='popularity') Popularity
option(value='activity' selected=query.sort === 'activity') Latest Activity
option(value='popularity') #{__('Popularity')}
option(value='activity' selected=query.sort === 'activity') #{__('Latest Activity')}
.row
.label Order
.label #{__('Order')}
select(name='direction')
option(value='desc') Descending
option(value='asc' selected=query.direction === 'asc') Ascending
option(value='desc') #{__('Descending')}
option(value='asc' selected=query.direction === 'asc') #{__('Ascending')}
.col
.row
.label Unlisted
.label #{__('Unlisted')}
label.postform-style.ph-5
input(type='checkbox', name='filter_unlisted', value='1' checked=(query.filter_unlisted != null))
.row
.label SFW
.label #{__('SFW')}
label.postform-style.ph-5
input(type='checkbox', name='filter_sfw', value='1' checked=(query.filter_sfw != null))
.row
.label Abandoned
.label #{__('Abandoned')}
label.postform-style.ph-5
input(type='checkbox', name='filter_abandoned', value='1' checked=(query.filter_abandoned != null))
input(type='submit', value='Filter')
@ -52,13 +52,13 @@ block content
td
span.left
if board.settings.sfw === true
span.help(title='SFW') 💼
span.help(title=__('SFW')) 💼
|
if board.settings.unlistedLocal === true
span.help(title='Unlisted') 👁️
span.help(title=__('Unlisted')) 👁️
|
if !board.owner
span.help(title='Abandoned') 🏚️
span.help(title=__('Abandoned')) 🏚️
|
a(href=`/${board._id}/index.html`) /#{board._id}/ - #{board.settings.name}
if permissions.get(Permissions.GLOBAL_MANAGE_ACCOUNTS)

@ -4,10 +4,10 @@ include ../mixins/globalmanagenav.pug
include ../mixins/postlink.pug
block head
title Logs
title #{__('Logs')}
block content
h1.board-title Global Management
h1.board-title #{__('Global Management')}
br
+globalmanagenav('logs')
hr(size=1)
@ -16,27 +16,27 @@ block content
form.form-post.mv-5(action=`/globalmanage/globallogs.html` method='GET')
input(type='hidden' value=page)
.row
.label Board URI
.label #{__('Board URI')}
input(type='text' name='uri' value=uri)
.row
.label Username
.label #{__('Username')}
input(type='text' name='username' value=username)
.row
.label IP
.label #{__('IP')}
input(type='text' name='ip' value=ip)
input(type='submit', value='Filter')
input(type='submit', value=__('Filter'))
h4.no-m-p Global Logs:
if logs && logs.length > 0
.table-container.flex-center.mv-10.text-center
table.fw
tr
th Date
th Board
th User
th IP
th Actions
th Posts
th Log Message
th #{__('Date')}
th #{__('Board')}
th #{__('User')}
th #{__('IP')}
th #{__('Actions')}
th #{__('Posts')}
th #{__('Log Message')}
for log in logs
tr
- const logDate = new Date(log.date);
@ -46,7 +46,7 @@ block content
|
a(href=`?uri=${log.board}`) [+]
td
if log.user !== 'Unregistered User'
if log.user !== __('Unregistered User')
a(href=`accounts.html?username=${log.user}`) #{log.user}
else
| #{log.user}
@ -69,4 +69,4 @@ block content
.pages.mv-5
include ../includes/pages.pug
else
p No logs.
p #{__('No Logs.')}

@ -3,27 +3,27 @@ include ../mixins/newspost.pug
include ../mixins/globalmanagenav.pug
block head
title News
title #{__('News')}
block content
h1.board-title Global Management
h1.board-title #{__('Global Management')}
br
+globalmanagenav('news')
hr(size=1)
h4.no-m-p Add News:
h4.no-m-p #{__('Add News')}:
.form-wrapper.flexleft
form.form-post(action=`/forms/global/addnews`, enctype='application/x-www-form-urlencoded', method='POST')
input(type='hidden' name='_csrf' value=csrf)
.row
.label Title
.label #{__('Title')}
input(type='text' name='title' required)
.row
.label Message
textarea(name='message' rows='10' placeholder='Supports post styling' required)
input(type='submit', value='Submit')
.label #{__('Message')}
textarea(name='message' rows='10' placeholder=__('Supports post styling') required)
input(type='submit', value=__('Submit'))
if news.length > 0
hr(size=1)
h4.no-m-p Manage News:
h4.no-m-p #{__('Manage News')}:
.form-wrapper.flexleft
form.form-post(action=`/forms/global/deletenews`, enctype='application/x-www-form-urlencoded', method='POST')
input(type='hidden' name='_csrf' value=csrf)
@ -31,4 +31,4 @@ block content
+newspost(post, true)
if news.length === 1
.anchor
input(type='submit', value='Delete')
input(type='submit', value=__('Delete'))

@ -3,27 +3,27 @@ include ../mixins/globalmanagenav.pug
include ../mixins/post.pug
block head
title Recent Posts
title #{__('Recent Posts')}
block content
h1.board-title Global Management
h1.board-title #{__('Global Management')}
br
.wrapbar
+globalmanagenav('recent')
if page === 1 && !ip
.jsonly#livetext(data-view-raw-ip=(viewRawIp?'true':'false') data-room=`globalmanage-recent-${viewRawIp === true ? 'raw' : 'hashed'}`)
.dot#livecolor
| Connecting...
input.postform-style.ml-5.di#updatepostsbutton(type='button' value='Update')
| #{__('Connecting...')}
input.postform-style.ml-5.di#updatepostsbutton(type='button' value=__('Update'))
form(action=`/forms/global/actions` method='POST' enctype='application/x-www-form-urlencoded')
input(type='hidden' name='_csrf' value=csrf)
if posts.length === 0
hr(size=1)
p No posts.
p #{__('No posts.')}
else
hr(size=1)
if ip
h4.no-m-p Global post history for #{ip}
h4.no-m-p #{__(`Global post history for %s`, ip)}
hr(size=1)
for p in posts
.thread

@ -3,10 +3,10 @@ include ../mixins/post.pug
include ../mixins/globalmanagenav.pug
block head
title Reports
title #{__('Reports')}
block content
h1.board-title Global Management
h1.board-title #{__('Global Management')}
br
+globalmanagenav('reports')
form(action=`/forms/global/actions` method='POST' enctype='application/x-www-form-urlencoded')
@ -17,7 +17,7 @@ block content
input(type='hidden' name='_csrf' value=csrf)
hr(size=1)
if ip
h4.no-m-p Reports against or by #{ip}
h4.no-m-p #{__('Reports against or by ip %s', ip)}
hr(size=1)
for report in reports
.thread

@ -2,21 +2,21 @@ extends ../layout.pug
include ../mixins/globalmanagenav.pug
block head
title Roles
title #{__('Roles')}
block content
h1.board-title Global Management
h1.board-title #{__('Global Management')}
br
+globalmanagenav('roles')
hr(size=1)
h4.mv-5 Roles:
h4.mv-5 #{__('Roles')}:
.table-container.flex-left.text-center
table
tr
th Role
th Permissions
th #{__('Role')}
th #{__('Permissions')}
for role in allRoles
tr
td #{roleNameMap[role.permissions.toString('base64')]}
td: a(href=`/globalmanage/editrole/${role._id}.html`) [Edit]
td: a(href=`/globalmanage/editrole/${role._id}.html`) [#{__('Edit')}]

@ -2,10 +2,10 @@ extends ../layout.pug
include ../mixins/globalmanagenav.pug
block head
title Settings
title #{__('Settings')}
block content
h1.board-title Global Management
h1.board-title #{__('Global Management')}
br
+globalmanagenav('settings')
hr(size=1)
@ -14,13 +14,13 @@ block content
form.form-post(action=`/forms/global/deleteboard`, enctype='application/x-www-form-urlencoded', method='POST')
input(type='hidden' name='_csrf' value=csrf)
.row
.label Board URI
.label #{__('Board URI')}
input(type='text' name='uri' required)
.row
.label I'm sure
.label #{__("I'm sure")}
label.postform-style.ph-5
input(type='checkbox', name='confirm', value='true' required)
input(type='submit', value='Submit')
input(type='submit', value=__('Submit'))
hr(size=1)
h4.no-m-p Settings:
.form-wrapper.flexleft

@ -9,7 +9,7 @@ block content
.table-container.flex-center.mv-10.text-center
table
tr
th.alt Welcome
th.alt #{__('Welcome')}
tr
td
pre.no-m-p
@ -18,7 +18,7 @@ block content
.table-container.flex-center.mv-10
table.newstable
tr
th(colspan=3) Latest News
th(colspan=3) #{__('Latest News')}
each post in recentNews
tr
td
@ -35,7 +35,7 @@ block content
each post, i in hotThreads
tr
td.text-center
span.help(title=`Hot Thread (${post.score.toFixed(1)})`) 🔥
span.help(title=__('Hot Thread (%s)', post.score.toFixed(1))) 🔥
| #{post.replyposts}
td
- const threadLink = `/${post.board}/thread/${post.postId}.html#${post.postId}`;
@ -58,7 +58,7 @@ block content
td
if board.settings.sfw === true
span.left
span.help(title='SFW') 💼
span.help(title=__('SFW')) 💼
|
a(href=`/${board._id}/index.html`) /#{board._id}/ - #{board.settings.name}
td #{board.settings.description}
@ -73,18 +73,18 @@ block content
.table-container.flex-center.mv-10.text-center
table(style='max-width:450px')
tr
th Local Stats
th #{__('Local Stats')}
tr
td
pre.no-m-p
| There are currently #[span.bold #{localStats.total-localStats.unlisted}] public boards, #[span.bold #{localStats.total}] in total. Sitewide, #[span.bold #{localStats.ppd}] post#{localStats.ppd === 1 ? ' has' : 's have'} been made in the last day, #[span.bold #{localStats.pph}] in the last hour, #[span.bold #{localStats.posts}] in total.
| #[span.bold #{fileStats.count}] file#{fileStats.count === 1 ? ' is' : 's are'} being served, totaling #[span.bold #{fileStats.totalSizeString}].
| #{__('There are currently %s public boards, %s in total. Sitewide, %s posts have been made in the last day, %s in the last hour, %s in total.', localStats.total-localStats.unlisted, localStats.total, localStats.ppd, localStats.pph)}
| #{__('%s files are being served, totaling %s.', fileStats.count, fileStats.totalSizeString)}
if enableWebring === true && webringStats != null
.table-container.flex-center.mv-10.text-center
table(style='max-width:450px')
tr
th Webring Stats
th #{__('Webring Stats')}
tr
td
pre.no-m-p
| There are currently #[span.bold #{webringStats.sites}] sites and #[span.bold #{webringStats.total}] boards in the known webring. Across all webring boards, #[span.bold #{webringStats.pph}] post#{webringStats.pph === 1 ? ' has' : 's have'} been made in the last hour, #[span.bold #{webringStats.posts}] in total.
| #{__('There are currently %s sites and %s boards in the known webring. Across all webring boards, %s posts have been made in the last hour, %s in total.', webringStats.sites, webringStats.total, webringStats.pph, webringStats.posts)}

Loading…
Cancel
Save