From 0409109faaa18714782b510a10836835556c1922 Mon Sep 17 00:00:00 2001 From: "Misty (Bot)" Date: Thu, 9 Feb 2017 09:21:45 +0000 Subject: [PATCH 1/5] Latest translations and fallbacks --- public/language/de/admin/admin.json | 2 +- .../language/de/admin/advanced/database.json | 4 +-- public/language/sr/notifications.json | 6 ++--- public/language/sr/user.json | 6 ++--- .../language/tr/admin/general/dashboard.json | 26 +++++++++---------- public/language/tr/user.json | 6 ++--- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/public/language/de/admin/admin.json b/public/language/de/admin/admin.json index 70c096f86b..69c5847a82 100644 --- a/public/language/de/admin/admin.json +++ b/public/language/de/admin/admin.json @@ -2,6 +2,6 @@ "alert.confirm-reload": "Bist du sicher, dass du NodeBB neu laden möchtest?", "alert.confirm-restart": "Bist du sicher, dass du NodeBB neu starten möchtest?", - "acp-title": "%1 | NodeBB Admin Control Panel", + "acp-title": "%1 | NodeBB Admin Systemsteuerung", "settings-header-contents": "Inhalte" } \ No newline at end of file diff --git a/public/language/de/admin/advanced/database.json b/public/language/de/admin/advanced/database.json index 71c4feb1a1..5b0d883771 100644 --- a/public/language/de/admin/advanced/database.json +++ b/public/language/de/admin/advanced/database.json @@ -14,9 +14,9 @@ "mongo.storage-size": "Speichergröße", "mongo.index-size": "Indexgröße", "mongo.file-size": "Dateigröße", - "mongo.resident-memory": "Resident Memory", + "mongo.resident-memory": "Permanenter Speicher", "mongo.virtual-memory": "virtueller Speicher", - "mongo.mapped-memory": "Mapped Memory", + "mongo.mapped-memory": "Zugeordneter Speicher", "mongo.raw-info": "MongoDB Rohinfo", "redis": "Redis", diff --git a/public/language/sr/notifications.json b/public/language/sr/notifications.json index b1e9761adb..9af1e5a1ba 100644 --- a/public/language/sr/notifications.json +++ b/public/language/sr/notifications.json @@ -19,9 +19,9 @@ "user_flagged_post_in": "%1 је означио поруку у %2", "user_flagged_post_in_dual": "%1 и %2 су означили поруку у %3", "user_flagged_post_in_multiple": "%1 и осталих %2 су означили поруку у %3", - "user_flagged_user": "%1 flagged a user profile (%2)", - "user_flagged_user_dual": "%1 and %2 flagged a user profile (%3)", - "user_flagged_user_multiple": "%1 and %2 others flagged a user profile (%3)", + "user_flagged_user": "%1 је означио кориснички профил (%2)", + "user_flagged_user_dual": "%1 и %2 су означили кориснички профил (%3)", + "user_flagged_user_multiple": "%1 и %2 осталих су означили кориснички профил (%3)", "user_posted_to": "%1 је послао нови одговор на: %2", "user_posted_to_dual": "%1 и %2 су одговорили на: %3", "user_posted_to_multiple": "%1 и %2 других су одговорили на: %3", diff --git a/public/language/sr/user.json b/public/language/sr/user.json index 4eb21c474e..08c61c887c 100644 --- a/public/language/sr/user.json +++ b/public/language/sr/user.json @@ -33,7 +33,7 @@ "chat": "Ђаскање", "chat_with": "Настави ћаскање са %1", "new_chat_with": "Започни ново ћаскање са %1", - "flag-profile": "Flag Profile", + "flag-profile": "Означи профил", "follow": "Прати", "unfollow": "Не прати", "more": "Више", @@ -65,8 +65,8 @@ "remove_uploaded_picture": "Уклоните отпремљену слику", "upload_cover_picture": "Отпреми насловну слику", "remove_cover_picture_confirm": "Да ли сте сигурни да желите да уклоните насловну слику?", - "crop_picture": "Crop picture", - "upload_cropped_picture": "Crop and upload", + "crop_picture": "Изрежи слику", + "upload_cropped_picture": "Изрежи и опреми", "settings": "Подешавања", "show_email": "Прикажи моју лозинку", "show_fullname": "Прикажи моје пуно име", diff --git a/public/language/tr/admin/general/dashboard.json b/public/language/tr/admin/general/dashboard.json index 2f2493e435..e4c022f1d0 100644 --- a/public/language/tr/admin/general/dashboard.json +++ b/public/language/tr/admin/general/dashboard.json @@ -1,20 +1,20 @@ { "forum-traffic": "Forum Trafiği", "page-views": "Sayfa Gösterimi", - "unique-visitors": "Unique Visitors", - "users": "Users", - "posts": "Posts", - "topics": "Topics", - "page-views-last-month": "Page views Last Month", - "page-views-this-month": "Page views This Month", - "page-views-last-day": "Page views in last 24 hours", - - "stats.day": "Day", + "unique-visitors": "Tekil ziyaretçi", + "users": "Kullanıcılar", + "posts": "İletiler", + "topics": "Başlıklar", + "page-views-last-month": "Geçen ay sayfa görüntüleme", + "page-views-this-month": "Bu ay sayfa görüntüleme", + "page-views-last-day": "Son 24 saatteki sayfa görüntüleme", + + "stats.day": "Gün", "stats.week": "Hafta", - "stats.month": "Month", - "stats.all": "All Time", + "stats.month": "Ay", + "stats.all": "Tüm Zamanlar", - "updates": "Updates", + "updates": "Güncellemeler", "running-version": "You are running NodeBB v%1.", "keep-updated": "Always make sure that your NodeBB is up to date for the latest security patches and bug fixes.", "up-to-date": "

You are up-to-date

", @@ -33,7 +33,7 @@ "reload": "Reload", "restart": "Restart", "restart-warning": "Reloading or Restarting your NodeBB will drop all existing connections for a few seconds.", - "maintenance-mode": "Maintenance Mode", + "maintenance-mode": "Bakım Modu", "maintenance-mode-title": "Click here to set up maintenance mode for NodeBB", "realtime-chart-updates": "Realtime Chart Updates", diff --git a/public/language/tr/user.json b/public/language/tr/user.json index 00d4ddad09..89d9d2b0cf 100644 --- a/public/language/tr/user.json +++ b/public/language/tr/user.json @@ -33,7 +33,7 @@ "chat": "Sohbet", "chat_with": "%1 ile sohbete devam et", "new_chat_with": "%1 ile yeni sohbete başla", - "flag-profile": "Flag Profile", + "flag-profile": "Bayrak Profili", "follow": "Takip Et", "unfollow": "Takip etme", "more": "Daha Fazla", @@ -65,8 +65,8 @@ "remove_uploaded_picture": "Yüklenmiş fotoğrafı kaldır", "upload_cover_picture": "Kapak fotoğrafı yükle", "remove_cover_picture_confirm": "Kapak görselini silmek istediğinden emin misin?", - "crop_picture": "Crop picture", - "upload_cropped_picture": "Crop and upload", + "crop_picture": "Görsel Kırp", + "upload_cropped_picture": "Kırp ve yükle", "settings": "Ayarlar", "show_email": "E-postamı göster", "show_fullname": "Tam ismimi göster", From ab7867d4b55f96dc9cfea638b120c2e0c023415b Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 9 Feb 2017 13:15:37 +0300 Subject: [PATCH 2/5] topic follow tests, fix filterIgnoring --- src/categories.js | 6 ++--- src/topics/follow.js | 4 +-- test/topics.js | 59 +++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 63 insertions(+), 6 deletions(-) diff --git a/src/categories.js b/src/categories.js index 4458e09481..5bb5222d38 100644 --- a/src/categories.js +++ b/src/categories.js @@ -350,11 +350,11 @@ var privileges = require('./privileges'); Categories.filterIgnoringUids = function (cid, uids, callback) { async.waterfall([ function (next) { - db.sortedSetScores('cid:' + cid + ':ignorers', uids, next); + db.isSortedSetMembers('cid:' + cid + ':ignorers', uids, next); }, - function (scores, next) { + function (isIgnoring, next) { var readingUids = uids.filter(function (uid, index) { - return uid && !!scores[index]; + return uid && !isIgnoring[index]; }); next(null, readingUids); } diff --git a/src/topics/follow.js b/src/topics/follow.js index 0667218588..4775cdb9bc 100644 --- a/src/topics/follow.js +++ b/src/topics/follow.js @@ -153,9 +153,9 @@ module.exports = function (Topics) { function (next) { db.isSetMembers('tid:' + tid + ':ignorers', uids, next); }, - function (isMembers, next) { + function (isIgnoring, next) { var readingUids = uids.filter(function (uid, index) { - return uid && isMembers[index]; + return uid && !isIgnoring[index]; }); next(null, readingUids); } diff --git a/test/topics.js b/test/topics.js index 3a192b9e94..24b4c973de 100644 --- a/test/topics.js +++ b/test/topics.js @@ -445,7 +445,7 @@ describe('Topic\'s', function () { assert.equal(pinnedTids[1], tid2); done(); }); - }); + }); }); }); @@ -1197,8 +1197,65 @@ describe('Topic\'s', function () { }); }); }); + }); + describe('follow/unfollow', function () { + var socketTopics = require('../src/socket.io/topics'); + var tid; + var followerUid; + before(function (done) { + User.create({username: 'follower'}, function (err, uid) { + if (err) { + return done(err); + } + followerUid = uid; + topics.post({uid: adminUid, title: 'topic title', content: 'some content', cid: topic.categoryId}, function (err, result) { + if (err) { + return done(err); + } + tid = result.topicData.tid; + done(); + }); + }); + }); + it('should filter ignoring uids', function (done) { + socketTopics.changeWatching({uid: followerUid}, {tid: tid, type: 'ignore'}, function (err) { + assert.ifError(err); + topics.filterIgnoringUids(tid, [adminUid, followerUid], function (err, uids) { + assert.ifError(err); + assert.equal(uids.length, 1); + assert.equal(uids[0], adminUid); + done(); + }); + }); + }); + + it('should error with invalid data', function (done) { + socketTopics.changeWatching({uid: followerUid}, {}, function (err) { + assert.equal(err.message, '[[error:invalid-data]]'); + done(); + }); + }) + + it('should error with invalid type', function (done) { + socketTopics.changeWatching({uid: followerUid}, {tid: tid, type: 'derp'}, function (err) { + assert.equal(err.message, '[[error:invalid-command]]'); + done(); + }); + }) + + it('should follow topic', function (done) { + topics.toggleFollow(tid, followerUid, function(err, isFollowing) { + assert.ifError(err); + assert(isFollowing); + topics.isFollowing([tid], followerUid, function (err, isFollowing) { + assert.ifError(err); + assert(isFollowing); + done(); + }); + }); + }); }); From 667582744e3c16d010436c808a0811bf636547fb Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 9 Feb 2017 13:22:03 +0300 Subject: [PATCH 3/5] fix eslint --- test/topics.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/topics.js b/test/topics.js index 24b4c973de..01af1f5f2e 100644 --- a/test/topics.js +++ b/test/topics.js @@ -1236,17 +1236,17 @@ describe('Topic\'s', function () { assert.equal(err.message, '[[error:invalid-data]]'); done(); }); - }) + }); it('should error with invalid type', function (done) { socketTopics.changeWatching({uid: followerUid}, {tid: tid, type: 'derp'}, function (err) { assert.equal(err.message, '[[error:invalid-command]]'); done(); }); - }) + }); it('should follow topic', function (done) { - topics.toggleFollow(tid, followerUid, function(err, isFollowing) { + topics.toggleFollow(tid, followerUid, function (err, isFollowing) { assert.ifError(err); assert(isFollowing); topics.isFollowing([tid], followerUid, function (err, isFollowing) { From cc160d77e779638c2db7c68b60c0971b0442adf0 Mon Sep 17 00:00:00 2001 From: pichalite Date: Thu, 9 Feb 2017 17:33:31 +0000 Subject: [PATCH 4/5] Fix scrolling issues on mobile --- public/less/admin/mobile.less | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/public/less/admin/mobile.less b/public/less/admin/mobile.less index e0e8ddb1dc..c192351885 100644 --- a/public/less/admin/mobile.less +++ b/public/less/admin/mobile.less @@ -2,14 +2,19 @@ display: none; } -@media (max-width: 1200px) { - -} - @media (max-width: 991px) { body { height: 100%; } + + #panel { + background-color: inherit; + min-height: 100%; + } + + body, #panel, .slideout-menu { + -webkit-overflow-scrolling: touch; + } .header { height: 58px; From d61665c20a44549ad515d10c2c64697b6e1c1c13 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 9 Feb 2017 12:52:18 -0500 Subject: [PATCH 5/5] updated copy for no-routes-not-found --- public/language/en-GB/admin/advanced/errors.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/language/en-GB/admin/advanced/errors.json b/public/language/en-GB/admin/advanced/errors.json index 963e68b116..546f0f1508 100644 --- a/public/language/en-GB/admin/advanced/errors.json +++ b/public/language/en-GB/admin/advanced/errors.json @@ -8,7 +8,7 @@ "clear-error-log": "Clear Error Log", "route": "Route", "count": "Count", - "no-routes-not-found": "Hooray! There are no routes that were not found.", + "no-routes-not-found": "Hooray! No 404 errors!", "clear404-confirm": "Are you sure you wish to clear the 404 error logs?", "clear404-success": "\"404 Not Found\" errors cleared" } \ No newline at end of file