Barış Soner Uşaklı 2 years ago
parent 97f081353f
commit 661a6e0473

@ -43,10 +43,10 @@
"ban-ip": "Ban IP",
"view-history": "Edit History",
"wrote-ago": "wrote <span class=\"timeago\" title=\"%1\"></span>",
"wrote-on": "wrote on <span class=\"timeago\" title=\"%1\"></span>",
"replied-to-user-ago": "replied to <a component=\"post/parent\" data-topid=\"%1\" href=\"%2\">%3</a> <span class=\"timeago\" title=\"%4\"></span>",
"replied-to-user-on": "replied to <a component=\"post/parent\" data-topid=\"%1\" href=\"%2\">%3</a> on <span class=\"timeago\" title=\"%4\"></span>",
"wrote-ago": "wrote <a href=\"%1\" class=\"timeago text-muted\" title=\"%2\"></a>",
"wrote-on": "wrote on <a href=\"%1\" class=\"timeago text-muted\" title=\"%2\"></a>",
"replied-to-user-ago": "replied to <a component=\"post/parent\" data-topid=\"%1\" href=\"%2\">%3</a> <a href=\"%4\" class=\"timeago text-muted\" title=\"%5\"></a>",
"replied-to-user-on": "replied to <a component=\"post/parent\" data-topid=\"%1\" href=\"%2\">%3</a> on <a hrf=\"%4\" class=\"timeago text-muted\" title=\"%5\"></a>",
"user-locked-topic-ago": "%1 locked this topic %2",
"user-locked-topic-on": "%1 locked this topic on %2",

@ -328,13 +328,13 @@ module.exports = function (utils, Benchpress, relative_path) {
post.parent.username : '[[global:guest]]';
const isBeforeCutoff = post.timestamp < (Date.now() - (timeagoCutoff * oneDayInMs));
const langSuffix = isBeforeCutoff ? 'on' : 'ago';
return `[[topic:replied-to-user-${langSuffix}, ${post.toPid}, ${relative_path}/post/${post.toPid}, ${username}, ${post.timestampISO}]]`;
return `[[topic:replied-to-user-${langSuffix}, ${post.toPid}, ${relative_path}/post/${post.toPid}, ${username}, ${relative_path}/post/${post.pid}, ${post.timestampISO}]]`;
}
function generateWrote(post, timeagoCutoff) {
const isBeforeCutoff = post.timestamp < (Date.now() - (timeagoCutoff * oneDayInMs));
const langSuffix = isBeforeCutoff ? 'on' : 'ago';
return `[[topic:wrote-${langSuffix}, ${post.timestampISO}]]`;
return `[[topic:wrote-${langSuffix}, ${relative_path}/post/${post.pid}, ${post.timestampISO}]]`;
}
function register() {

Loading…
Cancel
Save