threadstats translation

indiachan-spamvector
Thomas Lynch 1 year ago
parent 976b59ccad
commit db06a2a8a7
  1. 8
      gulp/res/js/threadstat.js
  2. 12
      locales/en.json
  3. 12
      locales/pt.json
  4. 6
      views/pages/thread.pug

@ -1,4 +1,4 @@
/* globals isThread */
/* globals __n isThread */
window.addEventListener('DOMContentLoaded', () => {
const statsElem = document.getElementById('threadstats');
@ -49,8 +49,8 @@ window.addEventListener('DOMContentLoaded', () => {
const numFiles = +statsElem.children[1].innerText.match(/^(\d+)/g);
const filesTotal = numFiles + newFiles;
const postTotal = numPosts + 1;
statsElem.children[0].innerText = `${postTotal} repl${postTotal === 1 ? 'y' : 'ies'}`;
statsElem.children[1].innerText = `${filesTotal} file${filesTotal === 1 ? '' : 's'}`;
statsElem.children[0].innerText = __n('%s replies', postTotal);
statsElem.children[1].innerText = __n('%s files', filesTotal);
if (e.detail.json.userId) {
const userId = e.detail.post.querySelector('.user-id');
idElems.push(userId);
@ -67,7 +67,7 @@ window.addEventListener('DOMContentLoaded', () => {
statsElem.appendChild(spacer);
statsElem.appendChild(uidSpan);
}
statsElem.children[2].innerText = `${idMap.size} UID${idMap.size === 1 ? '' : 's'}`;
statsElem.children[2].innerText = __n('%s UIDs', idMap.size);
}
});
}

@ -29,6 +29,18 @@
"one": "Reply",
"other": "Replies"
},
"%s replies": {
"one": "%s reply",
"other": "%s replies"
},
"%s files": {
"one": "%s file",
"other": "%s files"
},
"%s UIDs": {
"one": "%s UID",
"other": "%s UIDs"
},
"Captcha text": "Captcha text",
"Please enable JavaScript to solve the captcha.": "Please enable JavaScript to solve the captcha.",
"%s characters": {

@ -29,6 +29,18 @@
"one": "Reposta",
"other": "Repostas"
},
"%s replies": {
"one": "%s reposta",
"other": "%s respostas"
},
"%s files": {
"one": "%s ficheiro",
"other": "%s ficheiros"
},
"%s UIDs": {
"one": "%s UID",
"other": "%s UIDs"
},
"Captcha text": "Código captcha",
"Please enable JavaScript to solve the captcha.": "Necessita JavaScript.",
"%s characters": {

@ -65,12 +65,12 @@ block content
.pages
+boardnav(null, true, true)
#threadstats
span #{thread.replyposts} repl#{thread.replyposts === 1 ? 'y' : 'ies'}
span #{__n('%s replies', thread.replyposts)}
| |
span #{thread.replyfiles + thread.files.length} file#{thread.replyfiles + thread.files.length === 1 ? '' : 's'}
span #{__n('%s files', thread.replyfiles + thread.files.length)}
if board.settings.ids
| |
span #{uids.size} UID#{uids.size === 1 ? '' : 's'}
span #{__n('%s UIDs', uids.size)}
.jsonly#livetext
.dot#livecolor
| Connecting...

Loading…
Cancel
Save