From 3ebb885fda5871a53c8c86fc72e3e88e6961c1af Mon Sep 17 00:00:00 2001 From: "Misty (Bot)" Date: Tue, 23 Jan 2018 09:25:15 +0000 Subject: [PATCH 1/3] Latest translations and fallbacks --- public/language/tr/flags.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/language/tr/flags.json b/public/language/tr/flags.json index 26bf025d62..f399f68636 100644 --- a/public/language/tr/flags.json +++ b/public/language/tr/flags.json @@ -54,11 +54,11 @@ "modal-body": "%1 %2 için bayraklama nedenini belirtin. Alternatif olarak hızlı rapor butonlarından birinini kullanabilirsin.", "modal-reason-spam": "Gereksiz", "modal-reason-offensive": "Saldırgan", - "modal-reason-other": "Other (specify below)", + "modal-reason-other": "Diğer (aşağıda belirtin)", "modal-reason-custom": "Bir içeriği bildirme nedeni...", "modal-submit": "Raporu Gönder", "modal-submit-success": "İçerik, denetlemek için bayraklandı.", - "modal-submit-confirm": "Confirm Submission", - "modal-submit-confirm-text": "You have a custom reason specified already. Are you sure you wish to submit via quick-report?", - "modal-submit-confirm-text-help": "Submitting a quick report will overwrite any custom reasons defined." + "modal-submit-confirm": "Gönderimi Onayla", + "modal-submit-confirm-text": "Zaten belirtilen özel bir sebebin var. Hızlı raporla göndermek istediğinizden emin misin?", + "modal-submit-confirm-text-help": "Hızlı bir rapor göndermek tanımlanan özel nedenlerin üzerine yazacaktır." } \ No newline at end of file From d70cdf1e2838c6cf88bff5a5334e2f8d278406c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 23 Jan 2018 12:02:43 -0500 Subject: [PATCH 2/3] show real emails sent number --- src/user/digest.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/user/digest.js b/src/user/digest.js index dba9c48f16..c08a0afe93 100644 --- a/src/user/digest.js +++ b/src/user/digest.js @@ -90,8 +90,9 @@ Digest.getSubscribers = function (interval, callback) { }; Digest.send = function (data, callback) { + var emailsSent = 0; if (!data || !data.subscribers || !data.subscribers.length) { - return callback(); + return callback(null, emailsSent); } var now = new Date(); @@ -131,7 +132,7 @@ Digest.send = function (data, callback) { return topicObj; }); - + emailsSent += 1; emailer.send('digest', userObj.uid, { subject: '[' + meta.config.title + '] [[email:digest.subject, ' + (now.getFullYear() + '/' + (now.getMonth() + 1) + '/' + now.getDate()) + ']]', username: userObj.username, @@ -151,6 +152,6 @@ Digest.send = function (data, callback) { }, next); }, ], function (err) { - callback(err, data.subscribers.length); + callback(err, emailsSent); }); }; From 813fdaf6f6b8cefa4fd7336d8888af9aefa01905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 23 Jan 2018 15:52:54 -0500 Subject: [PATCH 3/3] fix pageCount calculation --- public/src/client/topic/posts.js | 2 +- src/controllers/topics.js | 2 +- src/topics.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/src/client/topic/posts.js b/public/src/client/topic/posts.js index 626fcde6bd..b44d571919 100644 --- a/public/src/client/topic/posts.js +++ b/public/src/client/topic/posts.js @@ -68,7 +68,7 @@ define('forum/topic/posts', [ var posts = data.posts; - ajaxify.data.pagination.pageCount = Math.max(1, Math.ceil((posts[0].topic.postcount - 1) / config.postsPerPage)); + ajaxify.data.pagination.pageCount = Math.max(1, Math.ceil(posts[0].topic.postcount / config.postsPerPage)); var direction = config.topicPostSort === 'oldest_to_newest' || config.topicPostSort === 'most_votes' ? 1 : -1; var isPostVisible = (ajaxify.data.pagination.currentPage === ajaxify.data.pagination.pageCount && direction === 1) || diff --git a/src/controllers/topics.js b/src/controllers/topics.js index 13228f5779..1936c99481 100644 --- a/src/controllers/topics.js +++ b/src/controllers/topics.js @@ -387,7 +387,7 @@ topicsController.pagination = function (req, res, callback) { } var postCount = parseInt(results.topic.postcount, 10); - var pageCount = Math.max(1, Math.ceil((postCount - 1) / results.settings.postsPerPage)); + var pageCount = Math.max(1, Math.ceil(postCount / results.settings.postsPerPage)); var paginationData = pagination.create(currentPage, pageCount); paginationData.rel.forEach(function (rel) { diff --git a/src/topics.js b/src/topics.js index f20c069d98..2ac14e4264 100644 --- a/src/topics.js +++ b/src/topics.js @@ -52,7 +52,7 @@ Topics.getPageCount = function (tid, uid, callback) { user.getSettings(uid, next); }, function (settings, next) { - next(null, Math.ceil((parseInt(postCount, 10) - 1) / settings.postsPerPage)); + next(null, Math.ceil(parseInt(postCount, 10) / settings.postsPerPage)); }, ], callback); };