From 65329b9bd75d2566a328170b6edaa1eb86109e1f Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 10 Jul 2017 12:21:17 -0400 Subject: [PATCH 01/67] closes nodebb-plugin-markdown#85 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index eb3e7872d7..63651e2ba7 100644 --- a/package.json +++ b/package.json @@ -55,11 +55,11 @@ "morgan": "^1.3.2", "mousetrap": "^1.5.3", "nconf": "~0.8.2", - "nodebb-plugin-composer-default": "4.4.18", + "nodebb-plugin-composer-default": "4.4.19", "nodebb-plugin-dbsearch": "2.0.4", "nodebb-plugin-emoji-extended": "1.1.1", "nodebb-plugin-emoji-one": "1.2.1", - "nodebb-plugin-markdown": "7.1.1", + "nodebb-plugin-markdown": "7.1.2", "nodebb-plugin-mentions": "2.1.5", "nodebb-plugin-soundpack-default": "1.0.0", "nodebb-plugin-spam-be-gone": "0.5.0", From 923bd86662dab4063c11a2fa5a1d3414775510c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 10 Jul 2017 12:54:45 -0400 Subject: [PATCH 02/67] Widgets refactor (#5817) * widgets refactor render widgets server side widgets can use all the data the template can use * fix tests --- public/src/ajaxify.js | 2 +- public/src/widgets.js | 97 +++++++++++++----------------- src/controllers/api.js | 50 +++++---------- src/database/mongo/helpers.js | 2 +- src/middleware/render.js | 12 ++++ src/routes/api.js | 1 - src/views/admin/extend/widgets.tpl | 22 +++---- src/widgets/admin.js | 2 +- src/widgets/index.js | 64 ++++++++++++++------ test/controllers.js | 13 ++-- 10 files changed, 135 insertions(+), 130 deletions(-) diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js index 9ca9052dc9..e2303c501c 100644 --- a/public/src/ajaxify.js +++ b/public/src/ajaxify.js @@ -204,7 +204,7 @@ $(document).ready(function () { } ajaxify.loadScript(tpl_url, done); - ajaxify.widgets.render(tpl_url, url, done); + ajaxify.widgets.render(tpl_url, done); $(window).trigger('action:ajaxify.contentLoaded', { url: url, tpl: tpl_url }); diff --git a/public/src/widgets.js b/public/src/widgets.js index f5f667d2a7..90b2d355c7 100644 --- a/public/src/widgets.js +++ b/public/src/widgets.js @@ -1,6 +1,5 @@ 'use strict'; - (function (ajaxify) { ajaxify.widgets = {}; @@ -14,77 +13,63 @@ }); }; - ajaxify.widgets.render = function (template, url, callback) { + ajaxify.widgets.render = function (template, callback) { callback = callback || function () {}; + if (template.match(/^admin/)) { return callback(); } - var widgetLocations = ['sidebar', 'footer', 'header']; + var locations = Object.keys(ajaxify.data.widgets); - $('#content [widget-area]').each(function () { - var location = $(this).attr('widget-area'); - if ($.inArray(location, widgetLocations) === -1) { - widgetLocations.push(location); + locations.forEach(function (location) { + var area = $('#content [widget-area="' + location + '"]'); + if (area.length) { + return; } - }); - $.get(config.relative_path + '/api/widgets/render?' + config['cache-buster'], { - locations: widgetLocations, - template: template + '.tpl', - url: url, - cid: ajaxify.data.cid, - isMobile: utils.isMobile(), - }, function (renderedAreas) { - for (var x = 0; x < renderedAreas.length; x += 1) { - var renderedWidgets = renderedAreas[x].widgets; - var location = renderedAreas[x].location; - var html = ''; + var widgetsAtLocation = ajaxify.data.widgets[location] || []; + var html = ''; - for (var i = 0; i < renderedWidgets.length; i += 1) { - html += templates.parse(renderedWidgets[i].html, {}); - } + widgetsAtLocation.forEach(function (widget) { + html += widget.html; - var area = $('#content [widget-area="' + location + '"]'); - - if (!area.length && window.location.pathname.indexOf('/admin') === -1 && renderedWidgets.length) { - if (location === 'footer' && !$('#content [widget-area="footer"]').length) { - $('#content').append($('
')); - } else if (location === 'sidebar' && !$('#content [widget-area="sidebar"]').length) { - if ($('[component="account/cover"]').length) { - $('[component="account/cover"]').nextAll().wrapAll($('
')); - } else if ($('[component="groups/cover"]').length) { - $('[component="groups/cover"]').nextAll().wrapAll($('
')); - } else { - $('#content > *').wrapAll($('
')); - } - } else if (location === 'header' && !$('#content [widget-area="header"]').length) { - $('#content').prepend($('
')); + if (location === 'footer' && !$('#content [widget-area="footer"]').length) { + $('#content').append($('
')); + } else if (location === 'sidebar' && !$('#content [widget-area="sidebar"]').length) { + if ($('[component="account/cover"]').length) { + $('[component="account/cover"]').nextAll().wrapAll($('
')); + } else if ($('[component="groups/cover"]').length) { + $('[component="groups/cover"]').nextAll().wrapAll($('
')); + } else { + $('#content > *').wrapAll($('
')); } - - area = $('#content [widget-area="' + location + '"]'); + } else if (location === 'header' && !$('#content [widget-area="header"]').length) { + $('#content').prepend($('
')); } + }); + area = $('#content [widget-area="' + location + '"]'); + if (html && area.length) { area.html(html); - - if (renderedWidgets.length) { - area.removeClass('hidden'); - ajaxify.widgets.reposition(location); - } } - var widgetAreas = $('#content [widget-area]'); - widgetAreas.find('img:not(.not-responsive)').addClass('img-responsive'); - widgetAreas.find('.timeago').timeago(); - widgetAreas.find('img[title].teaser-pic,img[title].user-img').each(function () { - $(this).tooltip({ - placement: 'top', - title: $(this).attr('title'), - }); - }); - $(window).trigger('action:widgets.loaded', {}); - - callback(renderedAreas); + if (widgetsAtLocation.length) { + area.removeClass('hidden'); + ajaxify.widgets.reposition(location); + } }); + + var widgetAreas = $('#content [widget-area]'); + widgetAreas.find('img:not(.not-responsive)').addClass('img-responsive'); + widgetAreas.find('.timeago').timeago(); + widgetAreas.find('img[title].teaser-pic,img[title].user-img').each(function () { + $(this).tooltip({ + placement: 'top', + title: $(this).attr('title'), + }); + }); + $(window).trigger('action:widgets.loaded', {}); + callback(); }; }(ajaxify || {})); diff --git a/src/controllers/api.js b/src/controllers/api.js index 5ec2f55697..b464748f49 100644 --- a/src/controllers/api.js +++ b/src/controllers/api.js @@ -11,12 +11,11 @@ var topics = require('../topics'); var categories = require('../categories'); var privileges = require('../privileges'); var plugins = require('../plugins'); -var widgets = require('../widgets'); var translator = require('../translator'); var apiController = module.exports; -apiController.getConfig = function (req, res, next) { +apiController.loadConfig = function (req, callback) { var config = {}; config.environment = process.env.NODE_ENV; config.relative_path = nconf.get('relative_path'); @@ -59,7 +58,7 @@ apiController.getConfig = function (req, res, next) { config.requireEmailConfirmation = parseInt(meta.config.requireEmailConfirmation, 10) === 1; config.topicPostSort = meta.config.topicPostSort || 'oldest_to_newest'; config.categoryTopicSort = meta.config.categoryTopicSort || 'newest_to_oldest'; - config.csrf_token = req.csrfToken(); + config.csrf_token = req.csrfToken && req.csrfToken(); config.searchEnabled = plugins.hasListeners('filter:search.query'); config.bootswatchSkin = meta.config.bootswatchSkin || 'noskin'; config.defaultBootswatchSkin = meta.config.bootswatchSkin || 'noskin'; @@ -80,7 +79,7 @@ apiController.getConfig = function (req, res, next) { async.waterfall([ function (next) { - if (!req.user) { + if (!req.uid) { return next(null, config); } user.getSettings(req.uid, next); @@ -98,41 +97,22 @@ apiController.getConfig = function (req, res, next) { config.bootswatchSkin = (settings.bootswatchSkin && settings.bootswatchSkin !== 'default') ? settings.bootswatchSkin : config.bootswatchSkin; plugins.fireHook('filter:config.get', config, next); }, - ], function (err, config) { - if (err) { - return next(err); - } - - if (res.locals.isAPI) { - res.json(config); - } else { - next(null, config); - } - }); + ], callback); }; - -apiController.renderWidgets = function (req, res, next) { - if (!req.query.template || !req.query.locations) { - return res.status(200).json({}); - } - - widgets.render(req.uid, - { - template: req.query.template, - url: req.query.url, - locations: req.query.locations, - isMobile: req.query.isMobile === 'true', - cid: req.query.cid, +apiController.getConfig = function (req, res, next) { + async.waterfall([ + function (next) { + apiController.loadConfig(req, next); }, - req, - res, - function (err, widgets) { - if (err) { - return next(err); + function (config, next) { + if (res.locals.isAPI) { + res.json(config); + } else { + next(null, config); } - res.status(200).json(widgets); - }); + }, + ], next); }; apiController.getPostData = function (pid, uid, callback) { diff --git a/src/database/mongo/helpers.js b/src/database/mongo/helpers.js index 47f8434c77..7a791c9fca 100644 --- a/src/database/mongo/helpers.js +++ b/src/database/mongo/helpers.js @@ -6,7 +6,7 @@ helpers.toMap = function (data) { var map = {}; for (var i = 0; i < data.length; i += 1) { map[data[i]._key] = data[i]; - data[i]._key = undefined; + delete data[i]._key; } return map; }; diff --git a/src/middleware/render.js b/src/middleware/render.js index e37b994445..bf3cb03638 100644 --- a/src/middleware/render.js +++ b/src/middleware/render.js @@ -7,6 +7,7 @@ var winston = require('winston'); var plugins = require('../plugins'); var translator = require('../translator'); +var widgets = require('../widgets'); module.exports = function (middleware) { middleware.processRender = function (req, res, next) { @@ -49,6 +50,17 @@ module.exports = function (middleware) { function (data, next) { options = data.templateData; + widgets.render(req.uid, { + template: template + '.tpl', + url: options.url, + templateData: options, + req: req, + res: res, + }, next); + }, + function (data, next) { + options.widgets = data; + res.locals.template = template; options._locals = undefined; diff --git a/src/routes/api.js b/src/routes/api.js index 9b5a7f77c7..34f14f5a8c 100644 --- a/src/routes/api.js +++ b/src/routes/api.js @@ -9,7 +9,6 @@ module.exports = function (app, middleware, controllers) { app.use('/api', router); router.get('/config', middleware.applyCSRF, controllers.api.getConfig); - router.get('/widgets/render', controllers.api.renderWidgets); router.get('/me', middleware.checkGlobalPrivacySettings, controllers.user.getCurrentUser); router.get('/user/uid/:uid', middleware.checkGlobalPrivacySettings, controllers.user.getUserByUID); diff --git a/src/views/admin/extend/widgets.tpl b/src/views/admin/extend/widgets.tpl index 07b8b5c193..0e2d2a848c 100644 --- a/src/views/admin/extend/widgets.tpl +++ b/src/views/admin/extend/widgets.tpl @@ -32,32 +32,32 @@

[[admin/extend/widgets:explanation]]

- +
[[none-installed, {config.relative_path}/admin/extend/plugins]]
- +

- +
-
+
- {widgets.name} -
{widgets.description}
+ {availableWidgets.name} +
{availableWidgets.description}
- +
diff --git a/src/widgets/admin.js b/src/widgets/admin.js index dde3aca43d..4ca05571f5 100644 --- a/src/widgets/admin.js +++ b/src/widgets/admin.js @@ -72,7 +72,7 @@ admin.get = function (callback) { callback(false, { templates: templates, areas: widgetData.areas, - widgets: widgetData.widgets, + availableWidgets: widgetData.widgets, }); }); }); diff --git a/src/widgets/index.js b/src/widgets/index.js index 2e228dab63..982b40c696 100644 --- a/src/widgets/index.js +++ b/src/widgets/index.js @@ -3,27 +3,35 @@ var async = require('async'); var winston = require('winston'); var templates = require('templates.js'); +var _ = require('lodash'); var plugins = require('../plugins'); var translator = require('../translator'); var db = require('../database'); +var apiController = require('../controllers/api'); var widgets = module.exports; -widgets.render = function (uid, area, req, res, callback) { - if (!area.locations || !area.template) { +widgets.render = function (uid, options, callback) { + if (!options.template) { return callback(new Error('[[error:invalid-data]]')); } async.waterfall([ function (next) { - widgets.getAreas(['global', area.template], area.locations, next); + widgets.getWidgetDataForTemplates(['global', options.template], next); }, function (data, next) { var widgetsByLocation = {}; - async.map(area.locations, function (location, done) { - widgetsByLocation[location] = data.global[location].concat(data[area.template][location]); + delete data.global.drafts; + + var locations = _.uniq(Object.keys(data.global).concat(Object.keys(data[options.template]))); + + var returnData = {}; + + async.each(locations, function (location, done) { + widgetsByLocation[location] = (data.global[location] || []).concat(data[options.template][location] || []); if (!widgetsByLocation[location].length) { return done(null, { location: location, widgets: [] }); @@ -33,28 +41,43 @@ widgets.render = function (uid, area, req, res, callback) { if (!widget || !widget.data || (!!widget.data['hide-registered'] && uid !== 0) || (!!widget.data['hide-guests'] && uid === 0) || - (!!widget.data['hide-mobile'] && area.isMobile)) { + (!!widget.data['hide-mobile'] && options.req.useragent.isMobile)) { return next(); } - renderWidget(widget, uid, area, req, res, next); - }, function (err, result) { - done(err, { location: location, widgets: result.filter(Boolean) }); + renderWidget(widget, uid, options, next); + }, function (err, renderedWidgets) { + if (err) { + return done(err); + } + returnData[location] = renderedWidgets.filter(Boolean); + done(); }); - }, next); + }, function (err) { + next(err, returnData); + }); }, ], callback); }; -function renderWidget(widget, uid, area, req, res, callback) { +function renderWidget(widget, uid, options, callback) { async.waterfall([ function (next) { + if (options.res.locals.isAPI) { + apiController.loadConfig(options.req, next); + } else { + next(null, options.res.locals.config); + } + }, + function (config, next) { + var templateData = _.assign(options.templateData, { config: config }); plugins.fireHook('filter:widget.render:' + widget.widget, { uid: uid, - area: area, + area: options, + templateData: templateData, data: widget.data, - req: req, - res: res, + req: options.req, + res: options.res, }, next); }, function (data, next) { @@ -84,23 +107,28 @@ function renderWidget(widget, uid, area, req, res, callback) { ], callback); } -widgets.getAreas = function (templates, locations, callback) { +widgets.getWidgetDataForTemplates = function (templates, callback) { var keys = templates.map(function (tpl) { return 'widgets:' + tpl; }); + async.waterfall([ function (next) { - db.getObjectsFields(keys, locations, next); + db.getObjects(keys, next); }, function (data, next) { var returnData = {}; templates.forEach(function (template, index) { returnData[template] = returnData[template] || {}; + + var templateWidgetData = data[index] || {}; + var locations = Object.keys(templateWidgetData); + locations.forEach(function (location) { - if (data && data[index] && data[index][location]) { + if (templateWidgetData && templateWidgetData[location]) { try { - returnData[template][location] = JSON.parse(data[index][location]); + returnData[template][location] = JSON.parse(templateWidgetData[location]); } catch (err) { winston.error('can not parse widget data. template: ' + template + ' location: ' + location); returnData[template][location] = []; diff --git a/test/controllers.js b/test/controllers.js index 34c515fc7a..6a3882ea5e 100644 --- a/test/controllers.js +++ b/test/controllers.js @@ -687,22 +687,23 @@ describe('Controllers', function () { ], done); }); - it('should return {} if there is no template or locations', function (done) { - request(nconf.get('url') + '/api/widgets/render', { json: true }, function (err, res, body) { + it('should return {} if there are no widgets', function (done) { + request(nconf.get('url') + '/api/category/' + cid, { json: true }, function (err, res, body) { assert.ifError(err); assert.equal(res.statusCode, 200); - assert(body); - assert.equal(Object.keys(body), 0); + assert(body.widgets); + assert.equal(Object.keys(body.widgets), 0); done(); }); }); it('should render templates', function (done) { - var url = nconf.get('url') + '/api/widgets/render?template=categories.tpl&url=&isMobile=false&locations%5B%5D=sidebar&locations%5B%5D=footer&locations%5B%5D=header'; + var url = nconf.get('url') + '/api/categories'; request(url, { json: true }, function (err, res, body) { assert.ifError(err); assert.equal(res.statusCode, 200); - assert(body); + assert(body.widgets); + assert(body.widgets.sidebar); done(); }); }); From bece6808a2994568e707898d30b17d683f12ac9b Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Mon, 10 Jul 2017 13:04:01 -0400 Subject: [PATCH 03/67] up themes for widgets refactor --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 63651e2ba7..c007894688 100644 --- a/package.json +++ b/package.json @@ -64,10 +64,10 @@ "nodebb-plugin-soundpack-default": "1.0.0", "nodebb-plugin-spam-be-gone": "0.5.0", "nodebb-rewards-essentials": "0.0.9", - "nodebb-theme-lavender": "4.0.4", - "nodebb-theme-persona": "5.0.11", + "nodebb-theme-lavender": "4.0.5", + "nodebb-theme-persona": "5.0.12", "nodebb-theme-slick": "1.1.0", - "nodebb-theme-vanilla": "6.0.8", + "nodebb-theme-vanilla": "6.0.9", "nodebb-widget-essentials": "3.0.0", "nodemailer": "2.6.4", "nodemailer-sendmail-transport": "1.0.0", From 4e7447c9d6e1e11b94e0cbeaf5842c2d9f39c90a Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Mon, 10 Jul 2017 14:05:48 -0400 Subject: [PATCH 04/67] remove ajaxify.widgets.reposition --- public/src/widgets.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/public/src/widgets.js b/public/src/widgets.js index 90b2d355c7..082b291624 100644 --- a/public/src/widgets.js +++ b/public/src/widgets.js @@ -3,16 +3,6 @@ (function (ajaxify) { ajaxify.widgets = {}; - ajaxify.widgets.reposition = function (location) { - $('body [has-widget-class]').each(function () { - var $this = $(this); - if ($this.attr('has-widget-target') === location) { - $this.removeClass(); - $this.addClass($this.attr('has-widget-class')); - } - }); - }; - ajaxify.widgets.render = function (template, callback) { callback = callback || function () {}; @@ -56,7 +46,6 @@ if (widgetsAtLocation.length) { area.removeClass('hidden'); - ajaxify.widgets.reposition(location); } }); From e036e26238a0bbecbca6375d777e998a7bdc6a72 Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Mon, 10 Jul 2017 14:55:57 -0400 Subject: [PATCH 05/67] closes #5813 --- src/controllers/index.js | 4 +-- src/upgrades/1.6.0/robots-config-change.js | 35 ++++++++++++++++++++++ src/views/admin/settings/web-crawler.tpl | 2 +- 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 src/upgrades/1.6.0/robots-config-change.js diff --git a/src/controllers/index.js b/src/controllers/index.js index 0f15d2f4ab..84c20ade81 100644 --- a/src/controllers/index.js +++ b/src/controllers/index.js @@ -291,8 +291,8 @@ Controllers.confirmEmail = function (req, res) { Controllers.robots = function (req, res) { res.set('Content-Type', 'text/plain'); - if (meta.config['robots.txt']) { - res.send(meta.config['robots.txt']); + if (meta.config['robots:txt']) { + res.send(meta.config['robots:txt']); } else { res.send('User-agent: *\n' + 'Disallow: ' + nconf.get('relative_path') + '/admin/\n' + diff --git a/src/upgrades/1.6.0/robots-config-change.js b/src/upgrades/1.6.0/robots-config-change.js new file mode 100644 index 0000000000..3a18872bbc --- /dev/null +++ b/src/upgrades/1.6.0/robots-config-change.js @@ -0,0 +1,35 @@ +'use strict'; + +var async = require('async'); +var db = require('../../database'); + +module.exports = { + name: 'Fix incorrect robots.txt schema', + timestamp: Date.UTC(2017, 6, 10), + method: function (callback) { + async.waterfall([ + function (next) { + db.getObject('config', next); + }, + function (config, next) { + if (!config) { + return callback(); + } + // fix mongo nested data + if (config.robots && config.robots.txt) { + db.setObjectField('config', 'robots:txt', config.robots.txt, next); + } else if (typeof config['robots.txt'] === 'string' && config['robots.txt']) { + db.setObjectField('config', 'robots:txt', config['robots.txt'], next); + } else { + next(); + } + }, + function (next) { + db.deleteObjectField('config', 'robots', next); + }, + function (next) { + db.deleteObjectField('config', 'robots.txt', next); + }, + ], callback); + }, +}; diff --git a/src/views/admin/settings/web-crawler.tpl b/src/views/admin/settings/web-crawler.tpl index 276a4fb0aa..45f7156ed9 100644 --- a/src/views/admin/settings/web-crawler.tpl +++ b/src/views/admin/settings/web-crawler.tpl @@ -5,7 +5,7 @@
[[admin/settings/web-crawler:robots-txt]]
- +
From 59aeee6516136629d442216b03797577fc607301 Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Mon, 10 Jul 2017 15:26:58 -0400 Subject: [PATCH 06/67] remove addExpiresHeaders --- src/middleware/headers.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/middleware/headers.js b/src/middleware/headers.js index 190de28b0e..eb11ff8718 100644 --- a/src/middleware/headers.js +++ b/src/middleware/headers.js @@ -23,17 +23,5 @@ module.exports = function (middleware) { next(); }; - - middleware.addExpiresHeaders = function (req, res, next) { - if (req.app.enabled('cache')) { - res.setHeader('Cache-Control', 'public, max-age=5184000'); - res.setHeader('Expires', new Date(Date.now() + 5184000000).toUTCString()); - } else { - res.setHeader('Cache-Control', 'public, max-age=0'); - res.setHeader('Expires', new Date().toUTCString()); - } - - next(); - }; }; From 45d940ad2bccc9ccd10718424d62485679836959 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 10 Jul 2017 16:34:18 -0400 Subject: [PATCH 07/67] added one more client-side hook for search @barisusakli --- public/src/client/search.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/src/client/search.js b/public/src/client/search.js index b9e0aff09e..38a34fc818 100644 --- a/public/src/client/search.js +++ b/public/src/client/search.js @@ -119,6 +119,10 @@ define('forum/search', ['search', 'autocomplete', 'storage'], function (searchMo $('#show-as-topics').prop('checked', isTopic).parent().toggleClass('active', isTopic); $('#show-as-posts').prop('checked', isPost).parent().toggleClass('active', isPost); } + + $(window).trigger('action:search.fillOutForm', { + form: formData, + }); } } From dc110e2e3ff4fe8cc095f9d5b09bfaccb2c628db Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Tue, 11 Jul 2017 13:44:51 -0400 Subject: [PATCH 08/67] closes #5818 --- src/meta/tags.js | 6 +++--- src/middleware/header.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/meta/tags.js b/src/meta/tags.js index 34ed3c43a9..0938980f22 100644 --- a/src/meta/tags.js +++ b/src/meta/tags.js @@ -10,7 +10,7 @@ var Meta = require('../meta'); var Tags = module.exports; -Tags.parse = function (req, meta, link, callback) { +Tags.parse = function (req, data, meta, link, callback) { async.parallel({ tags: function (next) { var defaultTags = [{ @@ -50,7 +50,7 @@ Tags.parse = function (req, meta, link, callback) { }); } - plugins.fireHook('filter:meta.getMetaTags', defaultTags, next); + plugins.fireHook('filter:meta.getMetaTags', { req: req, data: data, defaultTags: defaultTags }, next); }, links: function (next) { var defaultLinks = [{ @@ -101,7 +101,7 @@ Tags.parse = function (req, meta, link, callback) { href: nconf.get('relative_path') + '/assets/uploads/system/touchicon-192.png', }); } - plugins.fireHook('filter:meta.getLinkTags', defaultLinks, next); + plugins.fireHook('filter:meta.getLinkTags', { req: req, data: data, defaultLinks: defaultLinks }, next); }, }, function (err, results) { if (err) { diff --git a/src/middleware/header.js b/src/middleware/header.js index fe95b11a27..a30034df69 100644 --- a/src/middleware/header.js +++ b/src/middleware/header.js @@ -105,7 +105,7 @@ module.exports = function (middleware) { }); }, navigation: async.apply(navigation.get), - tags: async.apply(meta.tags.parse, req, res.locals.metaTags, res.locals.linkTags), + tags: async.apply(meta.tags.parse, req, data, res.locals.metaTags, res.locals.linkTags), banned: async.apply(user.isBanned, req.uid), banReason: async.apply(user.getBannedReason, req.uid), }, next); From 2d875a99cb6e27b9b16d6fc9dfd45931dfdedb51 Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Tue, 11 Jul 2017 13:59:29 -0400 Subject: [PATCH 09/67] fix data --- src/meta/tags.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/meta/tags.js b/src/meta/tags.js index 0938980f22..4224f85dee 100644 --- a/src/meta/tags.js +++ b/src/meta/tags.js @@ -108,7 +108,7 @@ Tags.parse = function (req, data, meta, link, callback) { return callback(err); } - meta = results.tags.concat(meta || []).map(function (tag) { + meta = results.tags.defaultTags.concat(meta || []).map(function (tag) { if (!tag || typeof tag.content !== 'string') { winston.warn('Invalid meta tag. ', tag); return tag; @@ -139,7 +139,7 @@ Tags.parse = function (req, data, meta, link, callback) { addIfNotExists(meta, 'property', 'og:image:height', 200); } - link = results.links.concat(link || []); + link = results.links.defaultLinks.concat(link || []); callback(null, { meta: meta, From 12d53c95ca4cfe972f5687235abedd91bc9716a0 Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Tue, 11 Jul 2017 14:14:55 -0400 Subject: [PATCH 10/67] up composer --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c007894688..e56ff845c8 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "morgan": "^1.3.2", "mousetrap": "^1.5.3", "nconf": "~0.8.2", - "nodebb-plugin-composer-default": "4.4.19", + "nodebb-plugin-composer-default": "5.0.0", "nodebb-plugin-dbsearch": "2.0.4", "nodebb-plugin-emoji-extended": "1.1.1", "nodebb-plugin-emoji-one": "1.2.1", From 593ea572c9b172ae5c3cbc024de863cb51f23491 Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Tue, 11 Jul 2017 14:32:57 -0400 Subject: [PATCH 11/67] up markdown --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e56ff845c8..6592fe6b18 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "nodebb-plugin-dbsearch": "2.0.4", "nodebb-plugin-emoji-extended": "1.1.1", "nodebb-plugin-emoji-one": "1.2.1", - "nodebb-plugin-markdown": "7.1.2", + "nodebb-plugin-markdown": "8.0.0", "nodebb-plugin-mentions": "2.1.5", "nodebb-plugin-soundpack-default": "1.0.0", "nodebb-plugin-spam-be-gone": "0.5.0", From 701ba7388372547e5711d8c5c513d5b186f80729 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 11 Jul 2017 15:40:41 -0400 Subject: [PATCH 12/67] updated homepage route logic so that it is all contained in the local function (and plugin hook receives all entries, including custom) @barisusakli --- src/controllers/accounts/settings.js | 59 +++++++++++++++++----------- 1 file changed, 35 insertions(+), 24 deletions(-) diff --git a/src/controllers/accounts/settings.js b/src/controllers/accounts/settings.js index 2f360f883c..0bcdc75c9c 100644 --- a/src/controllers/accounts/settings.js +++ b/src/controllers/accounts/settings.js @@ -34,9 +34,6 @@ settingsController.get = function (req, res, callback) { languages: function (next) { languages.list(next); }, - homePageRoutes: function (next) { - getHomePageRoutes(next); - }, soundsMapping: function (next) { meta.sounds.getUserSoundMap(userData.uid, next); }, @@ -45,7 +42,6 @@ settingsController.get = function (req, res, callback) { function (results, next) { userData.settings = results.settings; userData.languages = results.languages; - userData.homePageRoutes = results.homePageRoutes; var types = [ 'notification', @@ -89,6 +85,12 @@ settingsController.get = function (req, res, callback) { plugins.fireHook('filter:user.customSettings', { settings: results.settings, customSettings: [], uid: req.uid }, next); }, + function (data, next) { + getHomePageRoutes(userData, function (err, routes) { + userData.homePageRoutes = routes; + next(err, data); + }); + }, function (data, next) { userData.customSettings = data.customSettings; userData.disableEmailSubscriptions = parseInt(meta.config.disableEmailSubscriptions, 10) === 1; @@ -128,24 +130,6 @@ settingsController.get = function (req, res, callback) { { name: 'Yeti', value: 'yeti' }, ]; - var isCustom = true; - userData.homePageRoutes.forEach(function (route) { - route.selected = route.route === userData.settings.homePageRoute; - if (route.selected) { - isCustom = false; - } - }); - - if (isCustom && userData.settings.homePageRoute === 'none') { - isCustom = false; - } - - userData.homePageRoutes.push({ - route: 'custom', - name: 'Custom', - selected: isCustom, - }); - userData.bootswatchSkinOptions.forEach(function (skin) { skin.selected = skin.value === userData.settings.bootswatchSkin; }); @@ -168,7 +152,7 @@ settingsController.get = function (req, res, callback) { }; -function getHomePageRoutes(callback) { +function getHomePageRoutes(userData, callback) { async.waterfall([ function (next) { db.getSortedSetRange('cid:0:children', 0, -1, next); @@ -206,9 +190,36 @@ function getHomePageRoutes(callback) { route: 'popular', name: 'Popular', }, - ].concat(categoryData) }, next); + ].concat(categoryData, [ + { + route: 'custom', + name: 'Custom', + }, + ]) }, next); }, function (data, next) { + // Set selected for each route + var customIdx; + var hasSelected = false; + data.routes = data.routes.map(function (route, idx) { + if (route.route === userData.settings.homePageRoute) { + route.selected = true; + hasSelected = true; + } else { + route.selected = false; + } + + if (route.route === 'custom') { + customIdx = idx; + } + + return route; + }); + + if (!hasSelected && customIdx && userData.settings.homePageRoute !== 'none') { + data.routes[customIdx].selected = true; + } + next(null, data.routes); }, ], callback); From 0b101fa3eb55ddc3e1a28836846fcde09f566852 Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Tue, 11 Jul 2017 16:18:20 -0400 Subject: [PATCH 13/67] composer-default --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6592fe6b18..fbe4ad5246 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "morgan": "^1.3.2", "mousetrap": "^1.5.3", "nconf": "~0.8.2", - "nodebb-plugin-composer-default": "5.0.0", + "nodebb-plugin-composer-default": "5.0.1", "nodebb-plugin-dbsearch": "2.0.4", "nodebb-plugin-emoji-extended": "1.1.1", "nodebb-plugin-emoji-one": "1.2.1", From 0e0d961f7c1159294477b158844775c1b38051d1 Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Tue, 11 Jul 2017 16:40:04 -0400 Subject: [PATCH 14/67] dont change templateData --- src/widgets/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/index.js b/src/widgets/index.js index 982b40c696..d14016cf42 100644 --- a/src/widgets/index.js +++ b/src/widgets/index.js @@ -70,7 +70,7 @@ function renderWidget(widget, uid, options, callback) { } }, function (config, next) { - var templateData = _.assign(options.templateData, { config: config }); + var templateData = _.assign({ }, options.templateData, { config: config }); plugins.fireHook('filter:widget.render:' + widget.widget, { uid: uid, area: options, From 71e3fea55b5cc388e3f1e1ae25e4a8f40897aa5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 11 Jul 2017 19:18:47 -0400 Subject: [PATCH 15/67] closes #5802 --- .../dismiss_flags_from_deleted_topics.js | 66 ++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/src/upgrades/1.1.0/dismiss_flags_from_deleted_topics.js b/src/upgrades/1.1.0/dismiss_flags_from_deleted_topics.js index 6cbf6b7254..37e2fce239 100644 --- a/src/upgrades/1.1.0/dismiss_flags_from_deleted_topics.js +++ b/src/upgrades/1.1.0/dismiss_flags_from_deleted_topics.js @@ -34,8 +34,72 @@ module.exports = { }).filter(Boolean); winston.verbose('[2016/04/29] ' + toDismiss.length + ' dismissable flags found'); - async.each(toDismiss, posts.dismissFlag, next); + async.each(toDismiss, dismissFlag, next); }, ], callback); }, }; + +// copied from core since this function was removed +// https://github.com/NodeBB/NodeBB/blob/v1.x.x/src/posts/flags.js +function dismissFlag(pid, callback) { + async.waterfall([ + function (next) { + db.getObjectFields('post:' + pid, ['pid', 'uid', 'flags'], next); + }, + function (postData, next) { + if (!postData.pid) { + return callback(); + } + async.parallel([ + function (next) { + if (parseInt(postData.uid, 10)) { + if (parseInt(postData.flags, 10) > 0) { + async.parallel([ + async.apply(db.sortedSetIncrBy, 'users:flags', -postData.flags, postData.uid), + async.apply(db.incrObjectFieldBy, 'user:' + postData.uid, 'flags', -postData.flags), + ], next); + } else { + next(); + } + } else { + next(); + } + }, + function (next) { + db.sortedSetsRemove([ + 'posts:flagged', + 'posts:flags:count', + 'uid:' + postData.uid + ':flag:pids', + ], pid, next); + }, + function (next) { + async.series([ + function (next) { + db.getSortedSetRange('pid:' + pid + ':flag:uids', 0, -1, function (err, uids) { + if (err) { + return next(err); + } + + async.each(uids, function (uid, next) { + var nid = 'post_flag:' + pid + ':uid:' + uid; + async.parallel([ + async.apply(db.delete, 'notifications:' + nid), + async.apply(db.sortedSetRemove, 'notifications', 'post_flag:' + pid + ':uid:' + uid), + ], next); + }, next); + }); + }, + async.apply(db.delete, 'pid:' + pid + ':flag:uids'), + ], next); + }, + async.apply(db.deleteObjectField, 'post:' + pid, 'flags'), + async.apply(db.delete, 'pid:' + pid + ':flag:uid:reason'), + async.apply(db.deleteObjectFields, 'post:' + pid, ['flag:state', 'flag:assignee', 'flag:notes', 'flag:history']), + ], next); + }, + function (results, next) { + db.sortedSetsRemoveRangeByScore(['users:flags'], '-inf', 0, next); + }, + ], callback); +} From d478deb4fee4c5c0b79c50ce65cb99f75f6b986b Mon Sep 17 00:00:00 2001 From: "Misty (Bot)" Date: Wed, 12 Jul 2017 09:23:22 +0000 Subject: [PATCH 16/67] Latest translations and fallbacks --- .../pt-BR/admin/appearance/customise.json | 4 ++-- .../pt-BR/admin/development/info.json | 4 ++-- .../pt-BR/admin/general/dashboard.json | 18 ++++++++--------- .../pt-BR/admin/general/languages.json | 2 +- .../pt-BR/admin/manage/categories.json | 2 +- .../language/pt-BR/admin/manage/groups.json | 2 +- .../pt-BR/admin/settings/advanced.json | 2 +- .../pt-BR/admin/settings/general.json | 2 +- .../language/pt-BR/admin/settings/post.json | 4 ++-- .../pt-BR/admin/settings/reputation.json | 2 +- .../language/pt-BR/admin/settings/user.json | 6 +++--- public/language/pt-BR/email.json | 8 ++++---- public/language/pt-BR/error.json | 8 ++++---- public/language/pt-BR/global.json | 4 ++-- public/language/pt-BR/groups.json | 2 +- public/language/pt-BR/modules.json | 2 +- public/language/pt-BR/notifications.json | 20 +++++++++---------- public/language/pt-BR/topic.json | 4 ++-- public/language/pt-BR/user.json | 4 ++-- public/language/zh-CN/global.json | 4 ++-- public/language/zh-CN/topic.json | 2 +- 21 files changed, 53 insertions(+), 53 deletions(-) diff --git a/public/language/pt-BR/admin/appearance/customise.json b/public/language/pt-BR/admin/appearance/customise.json index b09feb1da0..b03e02e9f3 100644 --- a/public/language/pt-BR/admin/appearance/customise.json +++ b/public/language/pt-BR/admin/appearance/customise.json @@ -7,6 +7,6 @@ "custom-header.description": "Adicione HTML pessoal aqui (ex. JavaScript, Meta Tags, Tags, etc), os quais serão acrescentados ao final da seção <head> do markup do seu fórum.", "custom-header.enable": "Ligar o Cabeçalho Personalizado", - "custom-css.livereload": "Enable Live Reload", - "custom-css.livereload.description": "Enable this to force all sessions on every device under your account to refresh whenever you click save" + "custom-css.livereload": "Habilitar Recarregamento Automático", + "custom-css.livereload.description": "Ligue isso para forçar com que todas as sessões em todos os dispositivos em tua conta atualizem quando quer que você clique em salvar" } \ No newline at end of file diff --git a/public/language/pt-BR/admin/development/info.json b/public/language/pt-BR/admin/development/info.json index 4d754e5d85..f877120a7f 100644 --- a/public/language/pt-BR/admin/development/info.json +++ b/public/language/pt-BR/admin/development/info.json @@ -1,12 +1,12 @@ { "you-are-on": "Informação - Você está em %1:%2", - "nodes-responded": "%1 nodes responded within %2ms!", + "nodes-responded": "%1 nodes respondidos dentro de %2ms!", "host": "host", "pid": "pid", "nodejs": "nodejs", "online": "online", "git": "git", - "memory": "memory", + "memory": "memória", "load": "carregar", "uptime": "tempo rodando", diff --git a/public/language/pt-BR/admin/general/dashboard.json b/public/language/pt-BR/admin/general/dashboard.json index c6621b2593..8f28d3d0fb 100644 --- a/public/language/pt-BR/admin/general/dashboard.json +++ b/public/language/pt-BR/admin/general/dashboard.json @@ -5,14 +5,14 @@ "users": "Usuários", "posts": "Posts", "topics": "Tópicos", - "page-views-seven": "Last 7 Days", - "page-views-thirty": "Last 30 Days", - "page-views-last-day": "Last 24 hours", - "page-views-custom": "Custom Date Range", - "page-views-custom-start": "Range Start", - "page-views-custom-end": "Range End", - "page-views-custom-help": "Enter a date range of page views you would like to view. If no date picker is available, the accepted format is YYYY-MM-DD", - "page-views-custom-error": "Please enter a valid date range in the format YYYY-MM-DD", + "page-views-seven": "Últimos 7 Dias", + "page-views-thirty": "Últimos 30 Dias", + "page-views-last-day": "Últimas 24 horas", + "page-views-custom": "Alcançe de Data Personalizado", + "page-views-custom-start": "Ínicio do Alcance", + "page-views-custom-end": "Fim do Alcance", + "page-views-custom-help": "Entre uma data de alcance de visualizações de página que você quer ver. Se nenhum selecionador de data estiver disponível, o formato aceito é AAAA-MM-DD", + "page-views-custom-error": "Por favor entre com um alcance de data válido no formato AAAA-MM-DD", "stats.day": "Dia", "stats.week": "Semana", @@ -26,7 +26,7 @@ "upgrade-available": "

Uma nova versão (v%1) foi lançada. Leve em consideração atualizar o seu NodeBB.

", "prerelease-upgrade-available": "

Esta versão um pre-release antigo do NodeBB. Uma nova versão (v%1) foi lançada. Leve em consideração atualizar o seu NodeBB.

", "prerelease-warning": "

Esta é uma versão pre-release do NodeBB. Bugs inesperados podem ocorrer.

", - "running-in-development": "Forum is running in development mode. The forum may be open to potential vulnerabilities; please contact your system administrator.", + "running-in-development": "O fórum está sendo executado em modo de desenvolvedor. O fórum pode estar abrto à potenciais vulnerabilidades; por favor, entre em contato com o seu administrador de sistemas.", "notices": "Avisos", "restart-not-required": "Reiniciar não é necessário", diff --git a/public/language/pt-BR/admin/general/languages.json b/public/language/pt-BR/admin/general/languages.json index fe5213d0dc..53fa515534 100644 --- a/public/language/pt-BR/admin/general/languages.json +++ b/public/language/pt-BR/admin/general/languages.json @@ -2,5 +2,5 @@ "language-settings": "Configurações de Idioma", "description": "O idioma padrão determina as configurações de idioma para todos os usuários que estiverem visitando o seu fórum.
Usuários individuais podem sobrepor o idioma padrão em sua página de configurações de conta.", "default-language": "Idioma Padrão", - "auto-detect": "Auto Detect Language Setting for Guests" + "auto-detect": "Auto Detectar Configurações de Idioma para Convidados" } \ No newline at end of file diff --git a/public/language/pt-BR/admin/manage/categories.json b/public/language/pt-BR/admin/manage/categories.json index f2f06cf835..f63e2d327d 100644 --- a/public/language/pt-BR/admin/manage/categories.json +++ b/public/language/pt-BR/admin/manage/categories.json @@ -10,7 +10,7 @@ "custom-class": "Classe Personalizada", "num-recent-replies": "# de Respostas Recentes", "ext-link": "Link Externo", - "is-section": "Treat this category as a section", + "is-section": "Trate estacategoria como uma seção", "upload-image": "Fazer upload de Imagem", "delete-image": "Remover", "category-image": "Imagem da Categoria", diff --git a/public/language/pt-BR/admin/manage/groups.json b/public/language/pt-BR/admin/manage/groups.json index 6ec69b4ac5..2fb3557563 100644 --- a/public/language/pt-BR/admin/manage/groups.json +++ b/public/language/pt-BR/admin/manage/groups.json @@ -1,7 +1,7 @@ { "name": "Nome do Grupo", "description": "Descrição do Grupo", - "member-count": "Member Count", + "member-count": "Número de Membros", "system": "Grupo do Sistema", "edit": "Editar", "search-placeholder": "Procurar", diff --git a/public/language/pt-BR/admin/settings/advanced.json b/public/language/pt-BR/admin/settings/advanced.json index 87f5545286..8d4cbdf5de 100644 --- a/public/language/pt-BR/admin/settings/advanced.json +++ b/public/language/pt-BR/admin/settings/advanced.json @@ -6,7 +6,7 @@ "headers.allow-from": "Defina ALLOW-FROM para Colocar o NodeBB em um iFrame", "headers.powered-by": "Personalizar o cabeçalho de \"Powered By\" enviado pelo NodeBB", "headers.acao": "Access-Control-Allow-Origin", - "headers.acao-help": "To deny access to all sites, leave empty", + "headers.acao-help": "Para impedir o acesso à todos os sites, deixe vazio", "headers.acam": "Access-Control-Allow-Methods", "headers.acah": "Access-Control-Allow-Headers", "traffic-management": "Administração de Tráfego", diff --git a/public/language/pt-BR/admin/settings/general.json b/public/language/pt-BR/admin/settings/general.json index cccd319950..7d5ec37639 100644 --- a/public/language/pt-BR/admin/settings/general.json +++ b/public/language/pt-BR/admin/settings/general.json @@ -28,5 +28,5 @@ "outgoing-links": "Links Externos", "outgoing-links.warning-page": "Utilizar Página de Aviso de Links Externos", "search-default-sort-by": "Padrão de ordenação de pesquisa por", - "outgoing-links.whitelist": "Domains to whitelist for bypassing the warning page" + "outgoing-links.whitelist": "Domínios para colocar na lista branca de passar pela página de aviso" } \ No newline at end of file diff --git a/public/language/pt-BR/admin/settings/post.json b/public/language/pt-BR/admin/settings/post.json index 902000e386..35739bee69 100644 --- a/public/language/pt-BR/admin/settings/post.json +++ b/public/language/pt-BR/admin/settings/post.json @@ -29,8 +29,8 @@ "unread": "Configurações de Não-Lidos", "unread.cutoff": "Data de corte de não-lidos", "unread.min-track-last": "Mínimo de posts no tópico antes de rastrear o último lido", - "recent": "Recent Settings", - "recent.categoryFilter.disable": "Disable filtering of topics in ignored categories on the /recent page", + "recent": "Configurações Recentes", + "recent.categoryFilter.disable": "Desailitar filtragem de tópicos em categorias ignoradas na página /recente", "signature": "Configurações de Assinatura", "signature.disable": "Desabilitar assinaturas", "signature.no-links": "Desabilitar links em assinaturas", diff --git a/public/language/pt-BR/admin/settings/reputation.json b/public/language/pt-BR/admin/settings/reputation.json index 86d774ff99..3dbd88f69b 100644 --- a/public/language/pt-BR/admin/settings/reputation.json +++ b/public/language/pt-BR/admin/settings/reputation.json @@ -2,7 +2,7 @@ "reputation": "Configurações de Reputação", "disable": "Desabilitar o Sistema de Reputação", "disable-down-voting": "Desabilitar Baixo Votar", - "votes-are-public": "All Votes Are Public", + "votes-are-public": "Todos os Votos São Públicos", "thresholds": "Limiares de Atividade", "min-rep-downvote": "Reputação mínima para votar negativamente em posts", "min-rep-flag": "Reputação mínima para sinalizar posts" diff --git a/public/language/pt-BR/admin/settings/user.json b/public/language/pt-BR/admin/settings/user.json index a849488cc9..ac07df60f3 100644 --- a/public/language/pt-BR/admin/settings/user.json +++ b/public/language/pt-BR/admin/settings/user.json @@ -34,12 +34,12 @@ "registration.max-invites": "Máximo de Convites por Usuário", "max-invites": "Máximo de Convites por Usuário", "max-invites-help": "0 para nenhuma restrição. Administradores tem convites infinitos
Apenas aplicável para \"Apenas Convite\"", - "invite-expiration": "Invite expiration", - "invite-expiration-help": "# of days invitations expire in.", + "invite-expiration": "Vencimento do convite", + "invite-expiration-help": "núm. de dias em que o convite vence.", "min-username-length": "Tamanho Mínimo do Nome de Usuário", "max-username-length": "Tamanho Máximo do Nome de Usuário", "min-password-length": "Tamanho Mínimo da Senha", - "min-password-strength": "Minimum Password Strength", + "min-password-strength": "Força Mínima da Senha", "max-about-me-length": "Tamanho Máximo do Sobre Mim", "terms-of-use": "Termos de Uso do Fórum (Deixar em branco para desabilitar)", "user-search": "Pesquisa de Usuário", diff --git a/public/language/pt-BR/email.json b/public/language/pt-BR/email.json index 766152ee05..b70c27d5c2 100644 --- a/public/language/pt-BR/email.json +++ b/public/language/pt-BR/email.json @@ -32,9 +32,9 @@ "notif.post.unsub.info": "Esta notificação de postagem foi enviada para você devido as suas configurações de assinatura.", "test.text1": "Este é um e-mail de teste, para verificar que o enviador de emails está corretamente configurado no seu NodeBB.", "unsub.cta": "Clique aqui para alterar estas configurações", - "banned.subject": "You have been banned from %1", - "banned.text1": "The user %1 has been banned from %2.", - "banned.text2": "This ban will last until %1.", - "banned.text3": "This is the reason why you have been banned:", + "banned.subject": "Você foi banido de %1", + "banned.text1": "O usuário %1 foi banido de %2.", + "banned.text2": "Este banimento dururá até %1.", + "banned.text3": "Este é o motivo pelo qual você foi banido:", "closing": "Obrigado!" } \ No newline at end of file diff --git a/public/language/pt-BR/error.json b/public/language/pt-BR/error.json index 0463e2ad5e..2b203a4ad3 100644 --- a/public/language/pt-BR/error.json +++ b/public/language/pt-BR/error.json @@ -1,6 +1,6 @@ { "invalid-data": "Dados Inválidos", - "invalid-json": "Invalid JSON", + "invalid-json": "JSON Inválido", "not-logged-in": "Você não parece estar logado.", "account-locked": "Sua conta foi temporariamente bloqueada ", "search-requires-login": "É necessário ter uma conta para pesquisar - por favor efetue o login ou cadastre-se.", @@ -13,7 +13,7 @@ "invalid-title": "Título inválido!", "invalid-user-data": "Dados de Usuário Inválidos", "invalid-password": "Senha Inválida", - "invalid-login-credentials": "Invalid login credentials", + "invalid-login-credentials": "Credenciais de login inválidas", "invalid-username-or-password": "Por favor especifique ambos nome de usuário e senha", "invalid-search-term": "Termo de pesquisa inválido", "csrf-invalid": "Nós não fomos capazes de logá-lo, provavelmente devido à uma sessão expirada. Por favor tente novamente.", @@ -32,7 +32,7 @@ "password-too-long": "A senha é muito grande", "user-banned": "Usuário banido", "user-banned-reason": "Desculpa, esta conta foi banida (Motivo: %1)", - "user-banned-reason-until": "Sorry, this account has been banned until %1 (Reason: %2)", + "user-banned-reason-until": "Desculpe, esta conta foi banida até %1 (Motivo: %2)", "user-too-new": "Desculpe, é necessário que você aguarde %1 segundo(s) antes de fazer o seu primeiro post.", "blacklisted-ip": "Desculpe, o seu endereço IP foi banido desta comunidade. Se você acha que isso é um engano, por favor contate um administrador.", "ban-expiry-missing": "Por favor forneça uma data para o fim deste banimento", @@ -107,7 +107,7 @@ "chat-disabled": "O sistema de chat foi desabilitado", "too-many-messages": "Você enviou muitas mensagens, por favor aguarde um momento.", "invalid-chat-message": "Mensagem de chat inválida", - "chat-message-too-long": "Chat messages can not be longer than %1 characters.", + "chat-message-too-long": "Mensagens de chat não podem ter mais do que %1 caracteres.", "cant-edit-chat-message": "Você não tem permissão para editar esta mensagem", "cant-remove-last-user": "Você não pode excluir o último usuário", "cant-delete-chat-message": "Você não possui permissão para deletar esta mensagem", diff --git a/public/language/pt-BR/global.json b/public/language/pt-BR/global.json index f173968642..57cfa84c16 100644 --- a/public/language/pt-BR/global.json +++ b/public/language/pt-BR/global.json @@ -104,6 +104,6 @@ "cookies.accept": "Entendi!", "cookies.learn_more": "Saber Mais", "edited": "Editado", - "disabled": "Disabled", - "select": "Select" + "disabled": "Desligado", + "select": "Escolha" } \ No newline at end of file diff --git a/public/language/pt-BR/groups.json b/public/language/pt-BR/groups.json index 9edc536dfa..5c411ec37c 100644 --- a/public/language/pt-BR/groups.json +++ b/public/language/pt-BR/groups.json @@ -27,7 +27,7 @@ "details.disableJoinRequests": "Desabilitar pedidos de participação", "details.grant": "Conceder/Retomar a Posse", "details.kick": "Chutar", - "details.kick_confirm": "Are you sure you want to remove this member from the group?", + "details.kick_confirm": "Você tem certeza que deseja remover este membro do grupo?", "details.owner_options": "Administração do Grupo", "details.group_name": "Nome do Grupo", "details.member_count": "Número de Membros", diff --git a/public/language/pt-BR/modules.json b/public/language/pt-BR/modules.json index 0a2425ce03..9a61633ba3 100644 --- a/public/language/pt-BR/modules.json +++ b/public/language/pt-BR/modules.json @@ -20,7 +20,7 @@ "chat.three_months": "3 Meses", "chat.delete_message_confirm": "Tem certeza que deseja excluir esta mensagem?", "chat.add-users-to-room": "Adicionar usuários à sala", - "chat.confirm-chat-with-dnd-user": "This user has set their status to DnD(Do not disturb). Do you still want to chat with them?", + "chat.confirm-chat-with-dnd-user": "Este usuário definiu seu estado como DnD(Do not disturb─Não perturbe). Você ainda assim quer conversar com ele?", "composer.compose": "Compor", "composer.show_preview": "Exibir Pré-visualização", "composer.hide_preview": "Esconder Pré-visualização", diff --git a/public/language/pt-BR/notifications.json b/public/language/pt-BR/notifications.json index 2f2aaed17a..f7a14a5aa1 100644 --- a/public/language/pt-BR/notifications.json +++ b/public/language/pt-BR/notifications.json @@ -10,15 +10,15 @@ "return_to": "Voltar para %1", "new_notification": "Nova Notificação", "you_have_unread_notifications": "Você possui notificações não lidas.", - "all": "All", - "topics": "Topics", - "replies": "Replies", - "chat": "Chats", - "follows": "Follows", - "upvote": "Upvotes", - "new-flags": "New Flags", - "my-flags": "Flags assigned to me", - "bans": "Bans", + "all": "Tudo", + "topics": "Tópicos", + "replies": "Respostas", + "chat": "Conversas", + "follows": "Seguindo", + "upvote": "Cimavotos", + "new-flags": "Novas Sinalizações", + "my-flags": "Sinalizações designadas à mim", + "bans": "Banimentos", "new_message_from": "Nova mensagem de %1", "upvoted_your_post_in": "%1 deu voto positivo para seu post em %2.", "upvoted_your_post_in_dual": "%1 e %2 deram voto positivo ao seu post em %3.", @@ -40,7 +40,7 @@ "user_started_following_you_multiple": "%1 e %2 outros começaram a lhe acompanhar.", "new_register": "%1 lhe enviou um pedido de cadastro.", "new_register_multiple": "Há %1 pedidos de registro aguardando revisão.", - "flag_assigned_to_you": "Flag %1 has been assigned to you", + "flag_assigned_to_you": "A Sinalização %1 foi desiganada para você", "email-confirmed": "Email Confirmado", "email-confirmed-message": "Obrigado por validar o seu email. Agora sua conta está plenamente ativada.", "email-confirm-error-message": "Houve um problema ao validar o seu endereço de email. Talvez o código era invalido ou tenha expirado.", diff --git a/public/language/pt-BR/topic.json b/public/language/pt-BR/topic.json index 8e6ed0aa7e..6ae93feb95 100644 --- a/public/language/pt-BR/topic.json +++ b/public/language/pt-BR/topic.json @@ -14,7 +14,7 @@ "quote": "Citar", "reply": "Responder", "replies_to_this_post": "%1 Respostas", - "one_reply_to_this_post": "1 Reply", + "one_reply_to_this_post": "1 Resposta", "last_reply_time": "Última resposta", "reply-as-topic": "Responder como tópico", "guest-login-reply": "Entre para responder", @@ -59,7 +59,7 @@ "thread_tools.unlock": "Destrancar Tópico", "thread_tools.move": "Mover Tópico", "thread_tools.move_all": "Mover Tudo", - "thread_tools.select_category": "Select Category", + "thread_tools.select_category": "Escolha a Categoria", "thread_tools.fork": "Ramificar Tópico", "thread_tools.delete": "Deletar Tópico", "thread_tools.delete-posts": "Deletar Posts", diff --git a/public/language/pt-BR/user.json b/public/language/pt-BR/user.json index e242fc41b4..9b3ff880e8 100644 --- a/public/language/pt-BR/user.json +++ b/public/language/pt-BR/user.json @@ -60,7 +60,7 @@ "username_taken_workaround": "O nome de usuário que você escolheu já existia, então nós o alteramos um pouquinho. Agora você é conhecido como %1", "password_same_as_username": "A sua senha é igual ao seu nome de usuário, por favor escolha outra senha.", "password_same_as_email": "Tua senha é a mesma que o teu email, por favor escolha outra senha.", - "weak_password": "Weak password.", + "weak_password": "Senha fraca.", "upload_picture": "Carregar Foto", "upload_a_picture": "Carregue uma Foto", "remove_uploaded_picture": "Remover Foto Enviada", @@ -132,5 +132,5 @@ "info.email-history": "Histórico do Email", "info.moderation-note": "Nota da Moderação", "info.moderation-note.success": "Nota da moderação salva", - "info.moderation-note.add": "Add note" + "info.moderation-note.add": "Adicionar nota" } \ No newline at end of file diff --git a/public/language/zh-CN/global.json b/public/language/zh-CN/global.json index 8cc6f51c61..3fca087799 100644 --- a/public/language/zh-CN/global.json +++ b/public/language/zh-CN/global.json @@ -104,6 +104,6 @@ "cookies.accept": "知道了!", "cookies.learn_more": "了解更多", "edited": "已编辑", - "disabled": "Disabled", - "select": "Select" + "disabled": "禁用", + "select": "选择" } \ No newline at end of file diff --git a/public/language/zh-CN/topic.json b/public/language/zh-CN/topic.json index 84cfc9924f..63d808ecd6 100644 --- a/public/language/zh-CN/topic.json +++ b/public/language/zh-CN/topic.json @@ -59,7 +59,7 @@ "thread_tools.unlock": "解锁主题", "thread_tools.move": "移动主题", "thread_tools.move_all": "移动全部", - "thread_tools.select_category": "Select Category", + "thread_tools.select_category": "选择版块", "thread_tools.fork": "分割主题", "thread_tools.delete": "删除主题", "thread_tools.delete-posts": "删除这些帖子", From e613064b06120e8aff24f5f37382accfc2f77737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 12 Jul 2017 17:21:15 -0400 Subject: [PATCH 17/67] closes #5819 --- public/language/en-GB/admin/extend/plugins.json | 4 ++-- public/language/en-GB/admin/general/dashboard.json | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/public/language/en-GB/admin/extend/plugins.json b/public/language/en-GB/admin/extend/plugins.json index 1661a987b7..cf80583db4 100644 --- a/public/language/en-GB/admin/extend/plugins.json +++ b/public/language/en-GB/admin/extend/plugins.json @@ -12,11 +12,11 @@ "reorder-plugins": "Re-order Plugins", "order-active": "Order Active Plugins", "dev-interested": "Interested in writing plugins for NodeBB?", - "docs-info": "Full documentation regarding plugin authoring can be found in the NodeBB Docs Portal.", + "docs-info": "Full documentation regarding plugin authoring can be found in the NodeBB Docs Portal.", "order.description": "Certain plugins work ideally when they are initialised before/after other plugins.", "order.explanation": "Plugins load in the order specified here, from top to bottom", - + "plugin-item.themes": "Themes", "plugin-item.deactivate": "Deactivate", "plugin-item.activate": "Activate", diff --git a/public/language/en-GB/admin/general/dashboard.json b/public/language/en-GB/admin/general/dashboard.json index 61f4421fb5..9f1c6d8a4e 100644 --- a/public/language/en-GB/admin/general/dashboard.json +++ b/public/language/en-GB/admin/general/dashboard.json @@ -18,13 +18,13 @@ "stats.week": "Week", "stats.month": "Month", "stats.all": "All Time", - + "updates": "Updates", "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

", - "upgrade-available": "

A new version (v%1) has been released. Consider upgrading your NodeBB.

", - "prerelease-upgrade-available": "

This is an outdated pre-release version of NodeBB. A new version (v%1) has been released. Consider upgrading your NodeBB.

", + "upgrade-available": "

A new version (v%1) has been released. Consider upgrading your NodeBB.

", + "prerelease-upgrade-available": "

This is an outdated pre-release version of NodeBB. A new version (v%1) has been released. Consider upgrading your NodeBB.

", "prerelease-warning": "

This is a pre-release version of NodeBB. Unintended bugs may occur.

", "running-in-development": "Forum is running in development mode. The forum may be open to potential vulnerabilities; please contact your system administrator.", From bca79da8c648955154ec21b364d2194848f75500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 12 Jul 2017 19:29:41 -0400 Subject: [PATCH 18/67] closes #4197 add in-topic search support to dbsearch prevent multiple click handlers on in-topic search widget(each click was causing multiple scrolls) fix index --- package.json | 2 +- public/src/client/topic.js | 2 +- public/src/modules/navigator.js | 2 +- public/src/modules/search.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index fbe4ad5246..935f3d130e 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "mousetrap": "^1.5.3", "nconf": "~0.8.2", "nodebb-plugin-composer-default": "5.0.1", - "nodebb-plugin-dbsearch": "2.0.4", + "nodebb-plugin-dbsearch": "2.0.5", "nodebb-plugin-emoji-extended": "1.1.1", "nodebb-plugin-emoji-one": "1.2.1", "nodebb-plugin-markdown": "8.0.0", diff --git a/public/src/client/topic.js b/public/src/client/topic.js index 08a707f029..0a0d857663 100644 --- a/public/src/client/topic.js +++ b/public/src/client/topic.js @@ -99,7 +99,7 @@ define('forum/topic', [ function handleTopicSearch() { require(['search', 'mousetrap'], function (search, mousetrap) { - $('.topic-search') + $('.topic-search').off('click') .on('click', '.prev', function () { search.topicDOM.prev(); }) diff --git a/public/src/modules/navigator.js b/public/src/modules/navigator.js index a7fd657cac..d8b8cb4fe2 100644 --- a/public/src/modules/navigator.js +++ b/public/src/modules/navigator.js @@ -245,7 +245,7 @@ define('navigator', ['forum/pagination', 'components'], function (pagination, co } } - var page = Math.max(1, Math.ceil(index / config.postsPerPage)); + var page = Math.max(1, Math.ceil((index + 1) / config.postsPerPage)); if (parseInt(page, 10) !== ajaxify.data.pagination.currentPage) { pagination.loadPage(page, function () { diff --git a/public/src/modules/search.js b/public/src/modules/search.js index ce24bd4c40..daf9fae820 100644 --- a/public/src/modules/search.js +++ b/public/src/modules/search.js @@ -156,7 +156,7 @@ define('search', ['navigator', 'translator', 'storage'], function (nav, translat return app.alertError(err.message); } - nav.scrollToPost(postIndex, true); + nav.scrollToIndex(postIndex, true); }); } else { translator.translate('[[search:no-matches]]', function (text) { From e6d0dde7b41a1b1877210c1f1c1f3241902c8900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 12 Jul 2017 19:35:20 -0400 Subject: [PATCH 19/67] up dbsearch --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 935f3d130e..821dbc2aec 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "mousetrap": "^1.5.3", "nconf": "~0.8.2", "nodebb-plugin-composer-default": "5.0.1", - "nodebb-plugin-dbsearch": "2.0.5", + "nodebb-plugin-dbsearch": "2.0.6", "nodebb-plugin-emoji-extended": "1.1.1", "nodebb-plugin-emoji-one": "1.2.1", "nodebb-plugin-markdown": "8.0.0", From 0f5be5ae255b47e6de4aeb02df061559ae17cf0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 12 Jul 2017 19:44:35 -0400 Subject: [PATCH 20/67] remove plugin.hook check --- src/topics.js | 12 ++++-------- test/topics.js | 7 ------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/src/topics.js b/src/topics.js index 3952f7b402..81bfccefc2 100644 --- a/src/topics.js +++ b/src/topics.js @@ -326,12 +326,8 @@ Topics.isLocked = function (tid, callback) { }; Topics.search = function (tid, term, callback) { - if (plugins.hasListeners('filter:topic.search')) { - plugins.fireHook('filter:topic.search', { - tid: tid, - term: term, - }, callback); - } else { - callback(new Error('[[error:no-plugins-available]]'), []); - } + plugins.fireHook('filter:topic.search', { + tid: tid, + term: term, + }, callback); }; diff --git a/test/topics.js b/test/topics.js index a1d0bda512..0592b9d030 100644 --- a/test/topics.js +++ b/test/topics.js @@ -1505,13 +1505,6 @@ describe('Topic\'s', function () { }); }); - it('should error if no search plugin', function (done) { - socketTopics.search({ uid: adminUid }, { tid: topic.tid, term: 'test' }, function (err) { - assert.equal(err.message, '[[error:no-plugins-available]]'); - done(); - }); - }); - it('should return results', function (done) { var plugins = require('../src/plugins'); plugins.registerHook('myTestPlugin', { From 4056283fd50ac89cdaaca482ea78a0146028787b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 12 Jul 2017 19:47:08 -0400 Subject: [PATCH 21/67] always return array --- src/topics.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/topics.js b/src/topics.js index 81bfccefc2..8dd5df0c13 100644 --- a/src/topics.js +++ b/src/topics.js @@ -329,5 +329,7 @@ Topics.search = function (tid, term, callback) { plugins.fireHook('filter:topic.search', { tid: tid, term: term, - }, callback); + }, function (err, pids) { + callback(err, Array.isArray(pids) ? pids : []); + }); }; From 5888a5ffc455d61b89f0b4384fc0c0ba063584f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 12 Jul 2017 20:10:19 -0400 Subject: [PATCH 22/67] closes #5010 init plugin hooks before resetting widgets, the areas are returned by `filter:widgets.getAreas` --- src/reset.js | 13 ++++++++----- src/widgets/index.js | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/reset.js b/src/reset.js index 4b45821ddf..3d2fab2e0f 100644 --- a/src/reset.js +++ b/src/reset.js @@ -10,7 +10,6 @@ var events = require('./events'); var Reset = {}; - Reset.reset = function (callback) { db.init(function (err) { if (err) { @@ -163,10 +162,14 @@ function resetPlugins(callback) { } function resetWidgets(callback) { - require('./widgets').reset(function (err) { - winston.info('[reset] All Widgets moved to Draft Zone'); - callback(err); - }); + async.waterfall([ + require('./plugins').reload, + require('./widgets').reset, + function (next) { + winston.info('[reset] All Widgets moved to Draft Zone'); + next(); + }, + ], callback); } module.exports = Reset; diff --git a/src/widgets/index.js b/src/widgets/index.js index d14016cf42..9071989722 100644 --- a/src/widgets/index.js +++ b/src/widgets/index.js @@ -193,7 +193,7 @@ widgets.reset = function (callback) { function (results, next) { drafts = results.drafts || []; - async.each(results.areas, function (area, next) { + async.eachSeries(results.areas, function (area, next) { async.waterfall([ function (next) { widgets.getArea(area.template, area.location, next); From 0e4fba7c6cb3d06fcdf52382c5f3e1fee16b4009 Mon Sep 17 00:00:00 2001 From: "Misty (Bot)" Date: Thu, 13 Jul 2017 09:23:25 +0000 Subject: [PATCH 23/67] Latest translations and fallbacks --- public/language/he/error.json | 6 +- public/language/sr/admin/settings/email.json | 42 +++++----- public/language/sr/admin/settings/post.json | 86 ++++++++++---------- 3 files changed, 67 insertions(+), 67 deletions(-) diff --git a/public/language/he/error.json b/public/language/he/error.json index f5e33a6e10..4a7e36b65e 100644 --- a/public/language/he/error.json +++ b/public/language/he/error.json @@ -49,7 +49,7 @@ "post-edit-duration-expired-minutes": "הנך רשאי לערוך תגובה עד %1 דקות מרגע פרסום התגובה.", "post-edit-duration-expired-minutes-seconds": "הנך רשאי לערוך תגובה עד %1 דקות %2 ושניות מרגע פרסום התגובה.", "post-edit-duration-expired-hours": "אתה מורשה לערוך פוסטים רק %1 שעות אחרי הפרסום.", - "post-edit-duration-expired-hours-minutes": "You are only allowed to edit posts for %1 hour(s) %2 minute(s) after posting", + "post-edit-duration-expired-hours-minutes": "הנך רשאי לערוך פוסט למשך %1 שעות %2 דקות מרגע פרסומו.", "post-edit-duration-expired-days": "You are only allowed to edit posts for %1 day(s) after posting", "post-edit-duration-expired-days-hours": "You are only allowed to edit posts for %1 day(s) %2 hour(s) after posting", "post-delete-duration-expired": "You are only allowed to delete posts for %1 second(s) after posting", @@ -75,8 +75,8 @@ "still-uploading": "אנא המתן לסיום ההעלאות", "file-too-big": "הגודל המקסימלי של הקובץ הוא %1 קילובייט - אנא העלה קובץ קטן יותר", "guest-upload-disabled": "העלאת אורחים אינה מאופשרת", - "already-bookmarked": "You have already bookmarked this post", - "already-unbookmarked": "You have already unbookmarked this post", + "already-bookmarked": "כבר הוספת פוסט זה לרשימת המסומנים", + "already-unbookmarked": "כבר הסרת פוסט זה מרשימת המסומנים", "cant-ban-other-admins": "אינך יכול לחסום מנהלים אחרים!", "cant-remove-last-admin": "אתה המנהל היחיד. הוסף משתמש אחר לניהול לפני שאתה מוריד את עצמך מניהול", "cant-delete-admin": "משתמש זה מוגדר כמנהל. על מנת למחוק את המשתמש, עליך להסיר קודם את גישותיו.", diff --git a/public/language/sr/admin/settings/email.json b/public/language/sr/admin/settings/email.json index 1e92c88490..861b1f67f3 100644 --- a/public/language/sr/admin/settings/email.json +++ b/public/language/sr/admin/settings/email.json @@ -1,25 +1,25 @@ { - "email-settings": "Email Settings", - "address": "Email Address", - "address-help": "The following email address refers to the email that the recipient will see in the \"From\" and \"Reply To\" fields.", - "from": "From Name", + "email-settings": "Podešavanje Email-a", + "address": "Email adresa", + "address-help": "Označena email adresa se odnosi na email koga će primalac videti \"Od\" i \"Odgovori\" poljima.", + "from": "Od koga", "from-help": "The from name to display in the email.", - "gmail-routing": "Gmail Routing", - "gmail-routing-help1": "There have been reports of Gmail Routing not working on accounts with heightened security. In those scenarios, you will have to configure your GMail account to allow less secure apps.", - "gmail-routing-help2": "For more information about this workaround, please consult this NodeMailer article on the issue. An alternative would be to utilise a third-party emailer plugin such as SendGrid, Mailgun, etc. Browse available plugins here.", - "gmail-transport": "Route emails through a Gmail/Google Apps account", - "gmail-transport.username": "Username", - "gmail-transport.username-help": "Enter the full email address here, especially if you are using a Google Apps managed domain.", - "gmail-transport.password": "Password", - "template": "Edit Email Template", - "template.select": "Select Email Template", - "template.revert": "Revert to Original", - "testing": "Email Testing", - "testing.select": "Select Email Template", - "testing.send": "Send Test Email", - "testing.send-help": "The test email will be sent to the currently logged in user's email address.", - "subscriptions": "Email Subscriptions", - "subscriptions.disable": "Disable subscriber notification emails", + "gmail-routing": "Gmail rutiranje", + "gmail-routing-help1": "Imamo izveštaje da Gmail rutiranje nije radilo na nalogu za povećanom bezbednošću. U takvom slučaju, moraćete da podesite Vaš GMail nalog da prihvati aplikacije sa manjom bezbednoću.", + "gmail-routing-help2": "Za više informacija o ovome, molimo konsultujte ovaj NodeMailer članak o ovom problemu. Alternativa bi bila da iskoristite \"third-party\" email plugin-ove kao što su SendGrid, Mailgun, itd. Pogledajte plugin-ove ovde.", + "gmail-transport": "Rutiraj email-ove kroz nalog Gmail/Google aplikacije.", + "gmail-transport.username": "Korisničko ime", + "gmail-transport.username-help": "Unesite punu email adresu ovde, pogotovo ako koristite Google aplikacije na upravljanom domenu.", + "gmail-transport.password": "Lozinka", + "template": "Promeni šablon Email-a", + "template.select": "Izaberi šablon Email-a", + "template.revert": "Vrati na Originalno podešavanje.", + "testing": "Testiranje Email-a", + "testing.select": "Izaberi šablon Email-a", + "testing.send": "Pošalji probni Email", + "testing.send-help": "Probni email će biti poslat na adresu trenutno ulogovanog korisnika", + "subscriptions": "Email subskripcije", + "subscriptions.disable": "Onemogući notifikacije o email subskripcijama", "subscriptions.hour": "Digest Hour", - "subscriptions.hour-help": "Please enter a number representing the hour to send scheduled email digests (e.g. 0 for midnight, 17 for 5:00pm). Keep in mind that this is the hour according to the server itself, and may not exactly match your system clock.
The approximate server time is:
The next daily digest is scheduled to be sent " + "subscriptions.hour-help": "Molim unesite broj koji označava satnicu kada da pošalje zakazani sažeti email (nrp. 0 za ponoć, 17 za 5:00 pm). Uzmite u obzir da će se slanje događati po satnici samog servara, i da vrlo verovatno se ne poklapa sa satnicom vašeg sistema.
Trenutno vreme servera je:
Sledeći dnevni sažeti email zakazan je za slanje u " } \ No newline at end of file diff --git a/public/language/sr/admin/settings/post.json b/public/language/sr/admin/settings/post.json index aca8b39d64..a7e7dd7a98 100644 --- a/public/language/sr/admin/settings/post.json +++ b/public/language/sr/admin/settings/post.json @@ -1,46 +1,46 @@ { - "sorting": "Post Sorting", - "sorting.post-default": "Default Post Sorting", - "sorting.oldest-to-newest": "Oldest to Newest", - "sorting.newest-to-oldest": "Newest to Oldest", - "sorting.most-votes": "Most Votes", - "sorting.topic-default": "Default Topic Sorting", - "restrictions": "Posting Restrictions", - "restrictions.seconds-between": "Seconds between Posts", - "restrictions.seconds-between-new": "Seconds between Posts for New Users", - "restrictions.rep-threshold": "Reputation threshold before this restriction is lifted", - "restrictions.seconds-defore-new": "Seconds before new user can post", - "restrictions.seconds-edit-after": "Number of seconds users are allowed to edit posts after posting. (0 disabled)", - "restrictions.seconds-delete-after": "Number of seconds users are allowed to delete posts after posting. (0 disabled)", - "restrictions.replies-no-delete": "Number of replies after users are disallowed to delete their own topics. (0 disabled)", - "restrictions.min-title-length": "Minimum Title Length", - "restrictions.max-title-length": "Maximum Title Length", - "restrictions.min-post-length": "Minimum Post Length", - "restrictions.max-post-length": "Maximum Post Length", - "restrictions.days-until-stale": "Days until Topic is considered stale", - "restrictions.stale-help": "If a topic is considered \"stale\", then a warning will be shown to users who attempt to reply to that topic.", - "timestamp": "Timestamp", + "sorting": "Sortiranje postova", + "sorting.post-default": "Uobičajeno sortiranje postova", + "sorting.oldest-to-newest": "Od starijih ka novijim", + "sorting.newest-to-oldest": "Od novijih ka starijim", + "sorting.most-votes": "Najviše glasova", + "sorting.topic-default": "Uobičajeno sortiranje tema", + "restrictions": "Restrikcije postavljanja", + "restrictions.seconds-between": "Sekundi između postova", + "restrictions.seconds-between-new": "Sekundi između postova za Novog korisnika", + "restrictions.rep-threshold": "Prag reputacije pre nego što su restrikcije skinute", + "restrictions.seconds-defore-new": "Sekundi pre nego što novi korisnik može da postuje", + "restrictions.seconds-edit-after": "Broj sekundi posle kojih korisnik može da preuredi post pošto ga je postavio. (0 onemogućeno)", + "restrictions.seconds-delete-after": "Broj sekundi posle korisniku nije više dozvnoljeno da obriše svoj post posle postavljanja. (0 onemogućeno)", + "restrictions.replies-no-delete": "Broj sekundi posle korisniku nije više dozvnoljeno da obriše svoju temu. (0 onemogućeno)", + "restrictions.min-title-length": "Minimum karaktera za Naslov", + "restrictions.max-title-length": "Maksimum karaktera za Naslov", + "restrictions.min-post-length": "Minimum karaktera za Post", + "restrictions.max-post-length": "Maksimum karaktera za Post", + "restrictions.days-until-stale": "Broj dana koliko je potrebno da prodje pre nego što tema se smatra ustajalom", + "restrictions.stale-help": "Ako se tema smatra \"ustajalom\", onda će upozorenje biti prikazano korisnicima koji su odgovarali na tu temu.", + "timestamp": "Vremenski žig", "timestamp.cut-off": "Date cut-off (in days)", - "timestamp.cut-off-help": "Dates & times will be shown in a relative manner (e.g. \"3 hours ago\" / \"5 days ago\"), and localised into various\n\t\t\t\t\tlanguages. After a certain point, this text can be switched to display the localised date itself\n\t\t\t\t\t(e.g. 5 Nov 2016 15:30).
(Default: 30, or one month). Set to 0 to always display dates, leave blank to always display relative times.", - "teaser": "Teaser Post", - "teaser.last-post": "Last – Show the latest post, including the original post, if no replies", - "teaser.last-reply": "Last – Show the latest reply, or a \"No replies\" placeholder if no replies", - "teaser.first": "First", - "unread": "Unread Settings", - "unread.cutoff": "Unread cutoff days", - "unread.min-track-last": "Minimum posts in topic before tracking last read", - "recent": "Recent Settings", - "recent.categoryFilter.disable": "Disable filtering of topics in ignored categories on the /recent page", - "signature": "Signature Settings", - "signature.disable": "Disable signatures", - "signature.no-links": "Disable links in signatures", - "signature.no-images": "Disable images in signatures", - "signature.max-length": "Maximum Signature Length", - "composer": "Composer Settings", - "composer-help": "The following settings govern the functionality and/or appearance of the post composer shown\n\t\t\t\tto users when they create new topics, or reply to existing topics.", - "composer.show-help": "Show \"Help\" tab", - "composer.enable-plugin-help": "Allow plugins to add content to the help tab", - "composer.custom-help": "Custom Help Text", - "ip-tracking": "IP Tracking", - "ip-tracking.each-post": "Track IP Address for each post" + "timestamp.cut-off-help": "Datumi & vreme će biti pokazano na relativan način (npr. \"pre 3 sata\" / \"pre 5 dana\"), i lokalizovano na različite\n\t\t\t\t\tjezike. Posle određenog vremena, ovaj tekst može biti promenjen na lokalizovani datum\n\t\t\t\t\t(npr. 5 Nov 2016 15:30).
(Uobičajeno: 30, ili jedan mesec). Postavi na 0 da uvek prikaže datume, ostavi prazno da uvek prikaže relativno vreme.", + "teaser": "Post zadirkivač", + "teaser.last-post": "Poslednji &ndashč Pokazuje poslednji post, uključujući originalni post, ako nema odgovora", + "teaser.last-reply": "Poslednji &ndashč Pokaži najnoviji odgovor, ili ako \"Nema odgovora\" placeholder ako nema odgovora", + "teaser.first": "Prvi", + "unread": "Nepročitana podešavanja", + "unread.cutoff": "Nepročitano tokom prekinutih dana", + "unread.min-track-last": "Minimum postova u temi, pre praćenja poslednjeg pročitanog", + "recent": "Nedavna Podešavanja", + "recent.categoryFilter.disable": "Onemogući filtriranje tema u ignorisanim kategorijama na /recent stranici", + "signature": "Podešavanja Potpisa", + "signature.disable": "Onemogući potpise", + "signature.no-links": "Onemogući linkove u potpisima", + "signature.no-images": "Onemogući slike u potpisima", + "signature.max-length": "Minimum karaktera u Potpisu", + "composer": "Podešavanje Composer-a", + "composer-help": "Sledeća podešavanja upravljaju funkcionalnošću i/ili izgledom prikazanom kompozera post-a\n\t\t\t\tprema korisnicima kada prave nove teme, ili odgovaraju na postojeće.", + "composer.show-help": "Prikaži tab \"Pomoć\"", + "composer.enable-plugin-help": "Dozvoli plugin-ovima da dodaju sadržaj na tab-u \"pomoć\"", + "composer.custom-help": "Prilagođen tekst za pomoć", + "ip-tracking": "Praćenje IP adrese", + "ip-tracking.each-post": "Prati IP Adresu za svaki post" } \ No newline at end of file From 6ba913d6e64e76b9406fcf62c7250a4d46cc3fc7 Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Thu, 13 Jul 2017 14:02:42 -0400 Subject: [PATCH 24/67] up themes --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 821dbc2aec..dcf8d58a27 100644 --- a/package.json +++ b/package.json @@ -65,9 +65,9 @@ "nodebb-plugin-spam-be-gone": "0.5.0", "nodebb-rewards-essentials": "0.0.9", "nodebb-theme-lavender": "4.0.5", - "nodebb-theme-persona": "5.0.12", + "nodebb-theme-persona": "5.0.13", "nodebb-theme-slick": "1.1.0", - "nodebb-theme-vanilla": "6.0.9", + "nodebb-theme-vanilla": "6.0.10", "nodebb-widget-essentials": "3.0.0", "nodemailer": "2.6.4", "nodemailer-sendmail-transport": "1.0.0", From 5a9ae8f4c7946bd41a3c1d9354107dd35ba2e25e Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Thu, 13 Jul 2017 17:18:01 -0400 Subject: [PATCH 25/67] rearrange menu items --- src/views/admin/partials/menu.tpl | 32 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/views/admin/partials/menu.tpl b/src/views/admin/partials/menu.tpl index ee1eb8f4a0..fb7f35807a 100644 --- a/src/views/admin/partials/menu.tpl +++ b/src/views/admin/partials/menu.tpl @@ -15,10 +15,10 @@ @@ -27,16 +27,16 @@