From 61c76e4aba1213995af8352250057bb320cd4537 Mon Sep 17 00:00:00 2001 From: akhoury Date: Sun, 7 Feb 2016 13:16:50 -0500 Subject: [PATCH 0001/1109] add continuation-local-storage support --- package.json | 1 + src/middleware/cls.js | 41 +++++++++++++++++++++++++++++++++++++++++ src/middleware/index.js | 2 ++ 3 files changed, 44 insertions(+) create mode 100644 src/middleware/cls.js diff --git a/package.json b/package.json index b7f7ed676a..0fa110de82 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "connect-mongo": "~1.1.0", "connect-multiparty": "^2.0.0", "connect-redis": "~3.0.2", + "continuation-local-storage": "^3.1.6", "cookie-parser": "^1.3.3", "cron": "^1.0.5", "csurf": "^1.6.1", diff --git a/src/middleware/cls.js b/src/middleware/cls.js new file mode 100644 index 0000000000..31a1065891 --- /dev/null +++ b/src/middleware/cls.js @@ -0,0 +1,41 @@ + +var continuationLocalStorage = require('continuation-local-storage'); + +var NAMESPACE = 'nodebb'; +var namespace = continuationLocalStorage.createNamespace(NAMESPACE); + +var cls = function (req, res, next) { + namespace.run(function() { + var value = {req: req}; + if (process.env.NODE_ENV == 'development') { + value.audit = {created: process.hrtime()}; + } + namespace.set('route', { + req: req, + res: res + }); + next(); + }); +}; + +cls.storage = function () { + return cls.getNamespace(NAMESPACE); +}; + +cls.get = function (key) { + return namespace.get(key); +}; + +cls.set = function (key, value) { + return namespace.set(key, value); +}; + +cls.setItem = cls.set; +cls.getItem = cls.set; +cls.getNamespace = cls.storage; +cls.namespace = namespace; +cls.continuationLocalStorage = continuationLocalStorage; + +module.exports = cls; + + diff --git a/src/middleware/index.js b/src/middleware/index.js index 1cbac02323..3efb1a18f2 100644 --- a/src/middleware/index.js +++ b/src/middleware/index.js @@ -14,6 +14,7 @@ var meta = require('../meta'), compression = require('compression'), favicon = require('serve-favicon'), session = require('express-session'), + cls = require('./cls'), useragent = require('express-useragent'); @@ -73,6 +74,7 @@ module.exports = function(app) { app.use(middleware.addHeaders); app.use(middleware.processRender); + app.use(cls); auth.initialize(app, middleware); return middleware; From 852a1a178e95821d33d877272b992352946e8f17 Mon Sep 17 00:00:00 2001 From: akhoury Date: Sun, 7 Feb 2016 13:34:24 -0500 Subject: [PATCH 0002/1109] oops --- src/middleware/cls.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/middleware/cls.js b/src/middleware/cls.js index 31a1065891..76a26f9c4f 100644 --- a/src/middleware/cls.js +++ b/src/middleware/cls.js @@ -6,14 +6,12 @@ var namespace = continuationLocalStorage.createNamespace(NAMESPACE); var cls = function (req, res, next) { namespace.run(function() { - var value = {req: req}; + var routeData = {req: req, res: res}; + if (process.env.NODE_ENV == 'development') { - value.audit = {created: process.hrtime()}; + routeData.audit = {created: process.hrtime()}; } - namespace.set('route', { - req: req, - res: res - }); + namespace.set('route', routeData); next(); }); }; From 4245cb2739595557a713e5b94bc9b56e15f041ec Mon Sep 17 00:00:00 2001 From: akhoury Date: Fri, 12 Feb 2016 12:20:21 -0500 Subject: [PATCH 0003/1109] adding cls support for ws --- src/middleware/cls.js | 27 +++++++++++++++------------ src/middleware/index.js | 2 +- src/socket.io/index.js | 15 +++++++++++---- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/src/middleware/cls.js b/src/middleware/cls.js index 76a26f9c4f..16b0e4f848 100644 --- a/src/middleware/cls.js +++ b/src/middleware/cls.js @@ -1,23 +1,26 @@ - +var path = require('path'); var continuationLocalStorage = require('continuation-local-storage'); +var APP_NAMESPACE = require(path.join(__dirname, '../../package.json')).name; +var namespace = continuationLocalStorage.createNamespace(APP_NAMESPACE); -var NAMESPACE = 'nodebb'; -var namespace = continuationLocalStorage.createNamespace(NAMESPACE); +var cls = {}; -var cls = function (req, res, next) { +cls.http = function (req, res, next) { namespace.run(function() { - var routeData = {req: req, res: res}; - - if (process.env.NODE_ENV == 'development') { - routeData.audit = {created: process.hrtime()}; - } - namespace.set('route', routeData); + namespace.set('http', {req: req, res: res}); next(); }); }; -cls.storage = function () { - return cls.getNamespace(NAMESPACE); +cls.socket = function (socket, payload, event, next) { + namespace.run(function() { + namespace.set('ws', { + socket: socket, + payload: payload, + // if it's a '*' event, then we grab it from the payload + event: event || ((payload || {}).data || [])[0]}); + next(); + }); }; cls.get = function (key) { diff --git a/src/middleware/index.js b/src/middleware/index.js index 3efb1a18f2..f7e41b8f9b 100644 --- a/src/middleware/index.js +++ b/src/middleware/index.js @@ -74,7 +74,7 @@ module.exports = function(app) { app.use(middleware.addHeaders); app.use(middleware.processRender); - app.use(cls); + app.use(cls.http); auth.initialize(app, middleware); return middleware; diff --git a/src/socket.io/index.js b/src/socket.io/index.js index 826e5db452..4e91eb9ca6 100644 --- a/src/socket.io/index.js +++ b/src/socket.io/index.js @@ -11,6 +11,7 @@ var SocketIO = require('socket.io'), user = require('../user'), logger = require('../logger'), ratelimit = require('../middleware/ratelimit'), + cls = require('../middleware/cls'), Sockets = {}, Namespaces = {}; @@ -43,14 +44,20 @@ function onConnection(socket) { logger.io_one(socket, socket.uid); - onConnect(socket); + cls.socket(socket, null, 'connection', function () { + onConnect(socket); + }); - socket.on('disconnect', function(data) { - onDisconnect(socket, data); + socket.on('disconnect', function(payload) { + cls.socket(socket, payload, 'disconnect', function () { + onDisconnect(socket, payload); + }); }); socket.on('*', function(payload) { - onMessage(socket, payload); + cls.socket(socket, payload, null, function() { + onMessage(socket, payload); + }); }); } From 496e5ae8bfe9c8abf55b3a37bde9bdb05662cad5 Mon Sep 17 00:00:00 2001 From: akhoury Date: Fri, 12 Feb 2016 12:30:39 -0500 Subject: [PATCH 0004/1109] comment --- src/middleware/cls.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middleware/cls.js b/src/middleware/cls.js index 16b0e4f848..ce3d79b922 100644 --- a/src/middleware/cls.js +++ b/src/middleware/cls.js @@ -17,7 +17,7 @@ cls.socket = function (socket, payload, event, next) { namespace.set('ws', { socket: socket, payload: payload, - // if it's a '*' event, then we grab it from the payload + // if it's a null event, then we grab it from the payload event: event || ((payload || {}).data || [])[0]}); next(); }); From f47c06279ae1a79a9acbe432b8e6de76e3f6dd53 Mon Sep 17 00:00:00 2001 From: akhoury Date: Tue, 16 Feb 2016 23:07:36 -0500 Subject: [PATCH 0005/1109] added depracation warning --- src/plugins/hooks.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/plugins/hooks.js b/src/plugins/hooks.js index 3330608154..7148654eeb 100644 --- a/src/plugins/hooks.js +++ b/src/plugins/hooks.js @@ -10,6 +10,9 @@ module.exports = function(Plugins) { 'action:user.loggedOut': 'static:user.loggedOut' }; + // todo: remove when breaking all hooks params by removing req/res/socket/uid + Plugins.clsDeprecatedParamsWarnedHooks = {}; + /* `data` is an object consisting of (* is required): `data.hook`*, the name of the NodeBB hook @@ -29,7 +32,7 @@ module.exports = function(Plugins) { var method; if (Object.keys(Plugins.deprecatedHooks).indexOf(data.hook) !== -1) { - winston.warn('[plugins/' + id + '] Hook `' + data.hook + '` is deprecated, ' + + winston.warn('[plugins/' + id + '] Hook `' + data.hook + '` is deprecated, ' + (Plugins.deprecatedHooks[data.hook] ? 'please use `' + Plugins.deprecatedHooks[data.hook] + '` instead.' : 'there is no alternative.' @@ -71,6 +74,20 @@ module.exports = function(Plugins) { var hookList = Plugins.loadedHooks[hook]; var hookType = hook.split(':')[0]; + // todo: remove when breaking all hooks params by removing req/res/socket/uid + if (!Plugins.clsDeprecatedParamsWarnedHooks[hook] + && params + && Array.isArray(hookList) + && hookList.length + && (params.req || params.res || params.socket || params.uid)) { + + Plugins.clsDeprecatedParamsWarnedHooks[hook] = true; + + winston.warn('[plugins] hook `' + hook + '` \'s `params.req`, `params.res`, `params.uid` and `params.socket` are being deprecated, ' + + 'plugins should use the `middleware/cls` module instead to get a reference to the http-req/res and socket (which you can get the current `uid`) ' + + '- for more info, visit https://docs.nodebb.org/en/latest/plugins/create.html#getting-a-reference-to-req-res-socket-and-uid-within-any-plugin-hook'); + } + switch (hookType) { case 'filter': fireFilterHook(hook, hookList, params, callback); From e1323c0295551ccc52274c67a07c6f39ee6fec2f Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 26 Feb 2016 11:29:17 -0500 Subject: [PATCH 0006/1109] Updated js code so vendors can be added to the modules folder, so they can be required properly and we can finally get rid of that really annoying "mismatched anonymous" error in Require.js. First module to make the transition: Chart.js --- Gruntfile.js | 2 +- package.json | 1 + public/src/admin/general/dashboard.js | 4 +-- public/src/admin/manage/category.js | 7 +++-- src/meta.js | 1 + src/meta/js.js | 44 +++++++++++++++++++++++++++ src/views/admin/header.tpl | 1 - src/webserver.js | 1 + 8 files changed, 54 insertions(+), 7 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 36c054445f..0621f8c1a8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -57,7 +57,7 @@ module.exports = function(grunt) { files: ['public/**/*.less', 'node_modules/nodebb-*/*.less', 'node_modules/nodebb-*/*/*.less', 'node_modules/nodebb-*/*/*/*.less', 'node_modules/nodebb-*/*/*/*/*.less'] }, clientUpdated: { - files: ['public/src/**/*.js', 'node_modules/nodebb-*/*.js', 'node_modules/nodebb-*/*/*.js', 'node_modules/nodebb-*/*/*/*.js', 'node_modules/nodebb-*/*/*/*/*.js', 'node_modules/templates.js/lib/templates.js'] + files: ['public/src/**/*.js', '!public/src/modules/*.js', 'node_modules/nodebb-*/*.js', 'node_modules/nodebb-*/*/*.js', 'node_modules/nodebb-*/*/*/*.js', 'node_modules/nodebb-*/*/*/*/*.js', 'node_modules/templates.js/lib/templates.js'] }, serverUpdated: { files: ['*.js', 'install/*.js', 'src/**/*.js'] diff --git a/package.json b/package.json index 5dcb5e8cf8..5ff036175a 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "autoprefixer": "^6.2.3", "bcryptjs": "~2.3.0", "body-parser": "^1.9.0", + "chart.js": "^1.0.2", "colors": "^1.1.0", "compression": "^1.1.0", "connect-ensure-login": "^0.1.1", diff --git a/public/src/admin/general/dashboard.js b/public/src/admin/general/dashboard.js index 930e996cdc..b23f57e3c8 100644 --- a/public/src/admin/general/dashboard.js +++ b/public/src/admin/general/dashboard.js @@ -1,7 +1,7 @@ "use strict"; -/*global define, ajaxify, app, socket, utils, bootbox, Chart, RELATIVE_PATH*/ +/*global define, ajaxify, app, socket, utils, bootbox, RELATIVE_PATH*/ -define('admin/general/dashboard', ['semver'], function(semver) { +define('admin/general/dashboard', ['semver', 'Chart'], function(semver, Chart) { var Admin = {}, intervals = { rooms: false, diff --git a/public/src/admin/manage/category.js b/public/src/admin/manage/category.js index a845b59790..32a4c99e9b 100644 --- a/public/src/admin/manage/category.js +++ b/public/src/admin/manage/category.js @@ -1,12 +1,13 @@ "use strict"; -/*global define, app, socket, ajaxify, RELATIVE_PATH, bootbox, templates, Chart */ +/*global define, app, socket, ajaxify, RELATIVE_PATH, bootbox, templates */ define('admin/manage/category', [ 'uploader', 'iconSelect', 'admin/modules/colorpicker', - 'autocomplete' -], function(uploader, iconSelect, colorpicker, autocomplete) { + 'autocomplete', + 'Chart' +], function(uploader, iconSelect, colorpicker, autocomplete, Chart) { var Category = {}; Category.init = function() { diff --git a/src/meta.js b/src/meta.js index 7a054b1836..8fec4c3444 100644 --- a/src/meta.js +++ b/src/meta.js @@ -62,6 +62,7 @@ var async = require('async'), async.apply(plugins.reloadRoutes), function(next) { async.parallel([ + async.apply(Meta.js.symlinkModules), async.apply(Meta.js.minify, 'nodebb.min.js'), async.apply(Meta.js.minify, 'acp.min.js'), async.apply(Meta.css.minify), diff --git a/src/meta/js.js b/src/meta/js.js index 314e10a400..506d872f87 100644 --- a/src/meta/js.js +++ b/src/meta/js.js @@ -7,6 +7,7 @@ var winston = require('winston'), _ = require('underscore'), nconf = require('nconf'), fs = require('fs'), + rimraf = require('rimraf'), file = require('../file'), plugins = require('../plugins'), emitter = require('../emitter'), @@ -43,6 +44,8 @@ module.exports = function(Meta) { 'public/src/variables.js', 'public/src/widgets.js' ], + + // files listed below are only available client-side, or are bundled in to reduce # of network requests on cold load rjs: [ 'public/src/client/footer.js', 'public/src/client/chats.js', @@ -77,10 +80,51 @@ module.exports = function(Meta) { 'public/src/modules/helpers.js', 'public/src/modules/sounds.js', 'public/src/modules/string.js' + ], + + // modules listed below are symlinked to public/src/modules so they can be defined anonymously + modules: [ + './node_modules/chart.js/Chart.js' ] } }; + Meta.js.symlinkModules = function(callback) { + // Symlink all defined modules to /public/src/modules + var modulesLoaded = 0, + targetPath; + + async.series([ + function(next) { + async.each(Meta.js.scripts.modules, function(localPath, next) { + targetPath = path.join(__dirname, '../../public/src/modules', path.basename(localPath)); + + async.waterfall([ + async.apply(fs.access, localPath, fs.R_OK), + async.apply(rimraf, targetPath), + async.apply(fs.link, localPath, targetPath) + ], function(err) { + if (err) { + winston.error('[meta/js] Could not symlink `' + localPath + '` to modules folder'); + } else { + winston.verbose('[meta/js] Symlinked `' + localPath + '` to modules folder'); + ++modulesLoaded; + } + + next(err); + }); + }, next); + } + ], function(err) { + if (err) { + winston.error('[meta/js] Encountered error while symlinking modules:' + err.message); + } + + winston.verbose('[meta/js] ' + modulesLoaded + ' of ' + Meta.js.scripts.modules.length + ' modules symlinked'); + callback(err); + }); + }; + Meta.js.minify = function(target, callback) { if (nconf.get('isPrimary') !== 'true') { if (typeof callback === 'function') { diff --git a/src/views/admin/header.tpl b/src/views/admin/header.tpl index 19b3b065cb..e445a66403 100644 --- a/src/views/admin/header.tpl +++ b/src/views/admin/header.tpl @@ -27,7 +27,6 @@ - diff --git a/src/webserver.js b/src/webserver.js index 4a46b54520..cf814feda9 100644 --- a/src/webserver.js +++ b/src/webserver.js @@ -92,6 +92,7 @@ function initializeNodeBB(callback) { function(next) { async.parallel([ async.apply(meta.templates.compile), + async.apply(meta.js.symlinkModules), async.apply(!skipJS ? meta.js.minify : meta.js.getFromFile, 'nodebb.min.js'), async.apply(!skipJS ? meta.js.minify : meta.js.getFromFile, 'acp.min.js'), async.apply(!skipLess ? meta.css.minify : meta.css.getFromFile), From 3871f6f191fcf69906c0584fc35c8ed0f4c50fee Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 26 Feb 2016 11:39:02 -0500 Subject: [PATCH 0007/1109] removed chart.js lib from repo --- public/vendor/chart.js/chart.min.js | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 public/vendor/chart.js/chart.min.js diff --git a/public/vendor/chart.js/chart.min.js b/public/vendor/chart.js/chart.min.js deleted file mode 100644 index 626e6c3cdb..0000000000 --- a/public/vendor/chart.js/chart.min.js +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * Chart.js - * http://chartjs.org/ - * Version: 1.0.1-beta.4 - * - * Copyright 2014 Nick Downie - * Released under the MIT license - * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md - */ -(function(){"use strict";var t=this,i=t.Chart,e=function(t){this.canvas=t.canvas,this.ctx=t;this.width=t.canvas.width,this.height=t.canvas.height;return this.aspectRatio=this.width/this.height,s.retinaScale(this),this};e.defaults={global:{animation:!0,animationSteps:60,animationEasing:"easeOutQuart",showScale:!0,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleIntegersOnly:!0,scaleBeginAtZero:!1,scaleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",responsive:!1,maintainAspectRatio:!0,showTooltips:!0,tooltipEvents:["mousemove","touchstart","touchmove","mouseout"],tooltipFillColor:"rgba(0,0,0,0.8)",tooltipFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipFontSize:14,tooltipFontStyle:"normal",tooltipFontColor:"#fff",tooltipTitleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipTitleFontSize:14,tooltipTitleFontStyle:"bold",tooltipTitleFontColor:"#fff",tooltipYPadding:6,tooltipXPadding:6,tooltipCaretSize:8,tooltipCornerRadius:6,tooltipXOffset:10,tooltipTemplate:"<%if (label){%><%=label%>: <%}%><%= value %>",multiTooltipTemplate:"<%= value %>",multiTooltipKeyBackground:"#fff",onAnimationProgress:function(){},onAnimationComplete:function(){}}},e.types={};var s=e.helpers={},n=s.each=function(t,i,e){var s=Array.prototype.slice.call(arguments,3);if(t)if(t.length===+t.length){var n;for(n=0;n=0;s--){var n=t[s];if(i(n))return n}},s.inherits=function(t){var i=this,e=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return i.apply(this,arguments)},s=function(){this.constructor=e};return s.prototype=i.prototype,e.prototype=new s,e.extend=r,t&&a(e.prototype,t),e.__super__=i.prototype,e}),c=s.noop=function(){},u=s.uid=function(){var t=0;return function(){return"chart-"+t++}}(),d=s.warn=function(t){window.console&&"function"==typeof window.console.warn&&console.warn(t)},p=s.amd="function"==typeof t.define&&t.define.amd,f=s.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},g=s.max=function(t){return Math.max.apply(Math,t)},m=s.min=function(t){return Math.min.apply(Math,t)},v=(s.cap=function(t,i,e){if(f(i)){if(t>i)return i}else if(f(e)&&e>t)return e;return t},s.getDecimalPlaces=function(t){return t%1!==0&&f(t)?t.toString().split(".")[1].length:0}),x=s.radians=function(t){return t*(Math.PI/180)},S=(s.getAngleFromPoint=function(t,i){var e=i.x-t.x,s=i.y-t.y,n=Math.sqrt(e*e+s*s),o=2*Math.PI+Math.atan2(s,e);return 0>e&&0>s&&(o+=2*Math.PI),{angle:o,distance:n}},s.aliasPixel=function(t){return t%2===0?0:.5}),y=(s.splineCurve=function(t,i,e,s){var n=Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2)),o=Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2)),a=s*n/(n+o),h=s*o/(n+o);return{inner:{x:i.x-a*(e.x-t.x),y:i.y-a*(e.y-t.y)},outer:{x:i.x+h*(e.x-t.x),y:i.y+h*(e.y-t.y)}}},s.calculateOrderOfMagnitude=function(t){return Math.floor(Math.log(t)/Math.LN10)}),C=(s.calculateScaleRange=function(t,i,e,s,n){var o=2,a=Math.floor(i/(1.5*e)),h=o>=a,l=g(t),r=m(t);l===r&&(l+=.5,r>=.5&&!s?r-=.5:l+=.5);for(var c=Math.abs(l-r),u=y(c),d=Math.ceil(l/(1*Math.pow(10,u)))*Math.pow(10,u),p=s?0:Math.floor(r/(1*Math.pow(10,u)))*Math.pow(10,u),f=d-p,v=Math.pow(10,u),x=Math.round(f/v);(x>a||a>2*x)&&!h;)if(x>a)v*=2,x=Math.round(f/v),x%1!==0&&(h=!0);else if(n&&u>=0){if(v/2%1!==0)break;v/=2,x=Math.round(f/v)}else v/=2,x=Math.round(f/v);return h&&(x=o,v=f/x),{steps:x,stepValue:v,min:p,max:p+x*v}},s.template=function(t,i){function e(t,i){var e=/\W/.test(t)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+t.replace(/[\r\t\n]/g," ").split("<%").join(" ").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split(" ").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):s[t]=s[t];return i?e(i):e}if(t instanceof Function)return t(i);var s={};return e(t,i)}),b=(s.generateLabels=function(t,i,e,s){var o=new Array(i);return labelTemplateString&&n(o,function(i,n){o[n]=C(t,{value:e+s*(n+1)})}),o},s.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-0.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-0.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-0.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(-Math.pow(2,-10*t/1)+1)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-0.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var i=1.70158,e=0,s=1;return 0===t?0:1==(t/=1)?1:(e||(e=.3),st?-.5*s*Math.pow(2,10*(t-=1))*Math.sin(2*(1*t-i)*Math.PI/e):s*Math.pow(2,-10*(t-=1))*Math.sin(2*(1*t-i)*Math.PI/e)*.5+1)},easeInBack:function(t){var i=1.70158;return 1*(t/=1)*t*((i+1)*t-i)},easeOutBack:function(t){var i=1.70158;return 1*((t=t/1-1)*t*((i+1)*t+i)+1)},easeInOutBack:function(t){var i=1.70158;return(t/=.5)<1?.5*t*t*(((i*=1.525)+1)*t-i):.5*((t-=2)*t*(((i*=1.525)+1)*t+i)+2)},easeInBounce:function(t){return 1-b.easeOutBounce(1-t)},easeOutBounce:function(t){return(t/=1)<1/2.75?7.5625*t*t:2/2.75>t?1*(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(7.5625*(t-=2.625/2.75)*t+.984375)},easeInOutBounce:function(t){return.5>t?.5*b.easeInBounce(2*t):.5*b.easeOutBounce(2*t-1)+.5}}),w=s.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),P=(s.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return window.clearTimeout(t,1e3/60)}}(),s.animationLoop=function(t,i,e,s,n,o){var a=0,h=b[e]||b.linear,l=function(){a++;var e=a/i,r=h(e);t.call(o,r,e,a),s.call(o,r,e),i>a?o.animationFrame=w(l):n.apply(o)};w(l)},s.getRelativePosition=function(t){var i,e,s=t.originalEvent||t,n=t.currentTarget||t.srcElement,o=n.getBoundingClientRect();return s.touches?(i=s.touches[0].clientX-o.left,e=s.touches[0].clientY-o.top):(i=s.clientX-o.left,e=s.clientY-o.top),{x:i,y:e}},s.addEvent=function(t,i,e){t.addEventListener?t.addEventListener(i,e):t.attachEvent?t.attachEvent("on"+i,e):t["on"+i]=e}),L=s.removeEvent=function(t,i,e){t.removeEventListener?t.removeEventListener(i,e,!1):t.detachEvent?t.detachEvent("on"+i,e):t["on"+i]=c},k=(s.bindEvents=function(t,i,e){t.events||(t.events={}),n(i,function(i){t.events[i]=function(){e.apply(t,arguments)},P(t.chart.canvas,i,t.events[i])})},s.unbindEvents=function(t,i){n(i,function(i,e){L(t.chart.canvas,e,i)})}),F=s.getMaximumWidth=function(t){var i=t.parentNode;return i.clientWidth},R=s.getMaximumHeight=function(t){var i=t.parentNode;return i.clientHeight},A=(s.getMaximumSize=s.getMaximumWidth,s.retinaScale=function(t){var i=t.ctx,e=t.canvas.width,s=t.canvas.height;window.devicePixelRatio&&(i.canvas.style.width=e+"px",i.canvas.style.height=s+"px",i.canvas.height=s*window.devicePixelRatio,i.canvas.width=e*window.devicePixelRatio,i.scale(window.devicePixelRatio,window.devicePixelRatio))}),T=s.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},M=s.fontString=function(t,i,e){return i+" "+t+"px "+e},W=s.longestText=function(t,i,e){t.font=i;var s=0;return n(e,function(i){var e=t.measureText(i).width;s=e>s?e:s}),s},z=s.drawRoundedRectangle=function(t,i,e,s,n,o){t.beginPath(),t.moveTo(i+o,e),t.lineTo(i+s-o,e),t.quadraticCurveTo(i+s,e,i+s,e+o),t.lineTo(i+s,e+n-o),t.quadraticCurveTo(i+s,e+n,i+s-o,e+n),t.lineTo(i+o,e+n),t.quadraticCurveTo(i,e+n,i,e+n-o),t.lineTo(i,e+o),t.quadraticCurveTo(i,e,i+o,e),t.closePath()};e.instances={},e.Type=function(t,i,s){this.options=i,this.chart=s,this.id=u(),e.instances[this.id]=this,i.responsive&&this.resize(),this.initialize.call(this,t)},a(e.Type.prototype,{initialize:function(){return this},clear:function(){return T(this.chart),this},stop:function(){return s.cancelAnimFrame.call(t,this.animationFrame),this},resize:function(t){this.stop();var i=this.chart.canvas,e=F(this.chart.canvas),s=this.options.maintainAspectRatio?e/this.chart.aspectRatio:R(this.chart.canvas);return i.width=this.chart.width=e,i.height=this.chart.height=s,A(this.chart),"function"==typeof t&&t.apply(this,Array.prototype.slice.call(arguments,1)),this},reflow:c,render:function(t){return t&&this.reflow(),this.options.animation&&!t?s.animationLoop(this.draw,this.options.animationSteps,this.options.animationEasing,this.options.onAnimationProgress,this.options.onAnimationComplete,this):(this.draw(),this.options.onAnimationComplete.call(this)),this},generateLegend:function(){return C(this.options.legendTemplate,this)},destroy:function(){this.clear(),k(this,this.events),delete e.instances[this.id]},showTooltip:function(t,i){"undefined"==typeof this.activeElements&&(this.activeElements=[]);var o=function(t){var i=!1;return t.length!==this.activeElements.length?i=!0:(n(t,function(t,e){t!==this.activeElements[e]&&(i=!0)},this),i)}.call(this,t);if(o||i){if(this.activeElements=t,this.draw(),t.length>0)if(this.datasets&&this.datasets.length>1){for(var a,h,r=this.datasets.length-1;r>=0&&(a=this.datasets[r].points||this.datasets[r].bars||this.datasets[r].segments,h=l(a,t[0]),-1===h);r--);var c=[],u=[],d=function(){var t,i,e,n,o,a=[],l=[],r=[];return s.each(this.datasets,function(i){t=i.points||i.bars||i.segments,t[h]&&t[h].hasValue()&&a.push(t[h])}),s.each(a,function(t){l.push(t.x),r.push(t.y),c.push(s.template(this.options.multiTooltipTemplate,t)),u.push({fill:t._saved.fillColor||t.fillColor,stroke:t._saved.strokeColor||t.strokeColor})},this),o=m(r),e=g(r),n=m(l),i=g(l),{x:n>this.chart.width/2?n:i,y:(o+e)/2}}.call(this,h);new e.MultiTooltip({x:d.x,y:d.y,xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,xOffset:this.options.tooltipXOffset,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,titleTextColor:this.options.tooltipTitleFontColor,titleFontFamily:this.options.tooltipTitleFontFamily,titleFontStyle:this.options.tooltipTitleFontStyle,titleFontSize:this.options.tooltipTitleFontSize,cornerRadius:this.options.tooltipCornerRadius,labels:c,legendColors:u,legendColorBackground:this.options.multiTooltipKeyBackground,title:t[0].label,chart:this.chart,ctx:this.chart.ctx}).draw()}else n(t,function(t){var i=t.tooltipPosition();new e.Tooltip({x:Math.round(i.x),y:Math.round(i.y),xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,caretHeight:this.options.tooltipCaretSize,cornerRadius:this.options.tooltipCornerRadius,text:C(this.options.tooltipTemplate,t),chart:this.chart}).draw()},this);return this}},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)}}),e.Type.extend=function(t){var i=this,s=function(){return i.apply(this,arguments)};if(s.prototype=o(i.prototype),a(s.prototype,t),s.extend=e.Type.extend,t.name||i.prototype.name){var n=t.name||i.prototype.name,l=e.defaults[i.prototype.name]?o(e.defaults[i.prototype.name]):{};e.defaults[n]=a(l,t.defaults),e.types[n]=s,e.prototype[n]=function(t,i){var o=h(e.defaults.global,e.defaults[n],i||{});return new s(t,o,this)}}else d("Name not provided for this chart, so it hasn't been registered");return i},e.Element=function(t){a(this,t),this.initialize.apply(this,arguments),this.save()},a(e.Element.prototype,{initialize:function(){},restore:function(t){return t?n(t,function(t){this[t]=this._saved[t]},this):a(this,this._saved),this},save:function(){return this._saved=o(this),delete this._saved._saved,this},update:function(t){return n(t,function(t,i){this._saved[i]=this[i],this[i]=t},this),this},transition:function(t,i){return n(t,function(t,e){this[e]=(t-this._saved[e])*i+this._saved[e]},this),this},tooltipPosition:function(){return{x:this.x,y:this.y}},hasValue:function(){return f(this.value)}}),e.Element.extend=r,e.Point=e.Element.extend({display:!0,inRange:function(t,i){var e=this.hitDetectionRadius+this.radius;return Math.pow(t-this.x,2)+Math.pow(i-this.y,2)=this.startAngle&&e.angle<=this.endAngle,o=e.distance>=this.innerRadius&&e.distance<=this.outerRadius;return n&&o},tooltipPosition:function(){var t=this.startAngle+(this.endAngle-this.startAngle)/2,i=(this.outerRadius-this.innerRadius)/2+this.innerRadius;return{x:this.x+Math.cos(t)*i,y:this.y+Math.sin(t)*i}},draw:function(t){var i=this.ctx;i.beginPath(),i.arc(this.x,this.y,this.outerRadius,this.startAngle,this.endAngle),i.arc(this.x,this.y,this.innerRadius,this.endAngle,this.startAngle,!0),i.closePath(),i.strokeStyle=this.strokeColor,i.lineWidth=this.strokeWidth,i.fillStyle=this.fillColor,i.fill(),i.lineJoin="bevel",this.showStroke&&i.stroke()}}),e.Rectangle=e.Element.extend({draw:function(){var t=this.ctx,i=this.width/2,e=this.x-i,s=this.x+i,n=this.base-(this.base-this.y),o=this.strokeWidth/2;this.showStroke&&(e+=o,s-=o,n+=o),t.beginPath(),t.fillStyle=this.fillColor,t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.moveTo(e,this.base),t.lineTo(e,n),t.lineTo(s,n),t.lineTo(s,this.base),t.fill(),this.showStroke&&t.stroke()},height:function(){return this.base-this.y},inRange:function(t,i){return t>=this.x-this.width/2&&t<=this.x+this.width/2&&i>=this.y&&i<=this.base}}),e.Tooltip=e.Element.extend({draw:function(){var t=this.chart.ctx;t.font=M(this.fontSize,this.fontStyle,this.fontFamily),this.xAlign="center",this.yAlign="above";var i=2,e=t.measureText(this.text).width+2*this.xPadding,s=this.fontSize+2*this.yPadding,n=s+this.caretHeight+i;this.x+e/2>this.chart.width?this.xAlign="left":this.x-e/2<0&&(this.xAlign="right"),this.y-n<0&&(this.yAlign="below");var o=this.x-e/2,a=this.y-n;switch(t.fillStyle=this.fillColor,this.yAlign){case"above":t.beginPath(),t.moveTo(this.x,this.y-i),t.lineTo(this.x+this.caretHeight,this.y-(i+this.caretHeight)),t.lineTo(this.x-this.caretHeight,this.y-(i+this.caretHeight)),t.closePath(),t.fill();break;case"below":a=this.y+i+this.caretHeight,t.beginPath(),t.moveTo(this.x,this.y+i),t.lineTo(this.x+this.caretHeight,this.y+i+this.caretHeight),t.lineTo(this.x-this.caretHeight,this.y+i+this.caretHeight),t.closePath(),t.fill()}switch(this.xAlign){case"left":o=this.x-e+(this.cornerRadius+this.caretHeight);break;case"right":o=this.x-(this.cornerRadius+this.caretHeight)}z(t,o,a,e,s,this.cornerRadius),t.fill(),t.fillStyle=this.textColor,t.textAlign="center",t.textBaseline="middle",t.fillText(this.text,o+e/2,a+s/2)}}),e.MultiTooltip=e.Element.extend({initialize:function(){this.font=M(this.fontSize,this.fontStyle,this.fontFamily),this.titleFont=M(this.titleFontSize,this.titleFontStyle,this.titleFontFamily),this.height=this.labels.length*this.fontSize+(this.labels.length-1)*(this.fontSize/2)+2*this.yPadding+1.5*this.titleFontSize,this.ctx.font=this.titleFont;var t=this.ctx.measureText(this.title).width,i=W(this.ctx,this.font,this.labels)+this.fontSize+3,e=g([i,t]);this.width=e+2*this.xPadding;var s=this.height/2;this.y-s<0?this.y=s:this.y+s>this.chart.height&&(this.y=this.chart.height-s),this.x>this.chart.width/2?this.x-=this.xOffset+this.width:this.x+=this.xOffset},getLineHeight:function(t){var i=this.y-this.height/2+this.yPadding,e=t-1;return 0===t?i+this.titleFontSize/2:i+(1.5*this.fontSize*e+this.fontSize/2)+1.5*this.titleFontSize},draw:function(){z(this.ctx,this.x,this.y-this.height/2,this.width,this.height,this.cornerRadius);var t=this.ctx;t.fillStyle=this.fillColor,t.fill(),t.closePath(),t.textAlign="left",t.textBaseline="middle",t.fillStyle=this.titleTextColor,t.font=this.titleFont,t.fillText(this.title,this.x+this.xPadding,this.getLineHeight(0)),t.font=this.font,s.each(this.labels,function(i,e){t.fillStyle=this.textColor,t.fillText(i,this.x+this.xPadding+this.fontSize+3,this.getLineHeight(e+1)),t.fillStyle=this.legendColorBackground,t.fillRect(this.x+this.xPadding,this.getLineHeight(e+1)-this.fontSize/2,this.fontSize,this.fontSize),t.fillStyle=this.legendColors[e].fill,t.fillRect(this.x+this.xPadding,this.getLineHeight(e+1)-this.fontSize/2,this.fontSize,this.fontSize)},this)}}),e.Scale=e.Element.extend({initialize:function(){this.fit()},buildYLabels:function(){this.yLabels=[];for(var t=v(this.stepValue),i=0;i<=this.steps;i++)this.yLabels.push(C(this.templateString,{value:(this.min+i*this.stepValue).toFixed(t)}));this.yLabelWidth=this.display&&this.showLabels?W(this.ctx,this.font,this.yLabels):0},addXLabel:function(t){this.xLabels.push(t),this.valuesCount++,this.fit()},removeXLabel:function(){this.xLabels.shift(),this.valuesCount--,this.fit()},fit:function(){this.startPoint=this.display?this.fontSize:0,this.endPoint=this.display?this.height-1.5*this.fontSize-5:this.height,this.startPoint+=this.padding,this.endPoint-=this.padding;var t,i=this.endPoint-this.startPoint;for(this.calculateYRange(i),this.buildYLabels(),this.calculateXLabelRotation();i>this.endPoint-this.startPoint;)i=this.endPoint-this.startPoint,t=this.yLabelWidth,this.calculateYRange(i),this.buildYLabels(),tthis.yLabelWidth+10?e/2:this.yLabelWidth+10,this.xLabelRotation=0,this.display){var n,o=W(this.ctx,this.font,this.xLabels);this.xLabelWidth=o;for(var a=Math.floor(this.calculateX(1)-this.calculateX(0))-6;this.xLabelWidth>a&&0===this.xLabelRotation||this.xLabelWidth>a&&this.xLabelRotation<=90&&this.xLabelRotation>0;)n=Math.cos(x(this.xLabelRotation)),t=n*e,i=n*s,t+this.fontSize/2>this.yLabelWidth+8&&(this.xScalePaddingLeft=t+this.fontSize/2),this.xScalePaddingRight=this.fontSize/2,this.xLabelRotation++,this.xLabelWidth=n*o;this.xLabelRotation>0&&(this.endPoint-=Math.sin(x(this.xLabelRotation))*o+3)}else this.xLabelWidth=0,this.xScalePaddingRight=this.padding,this.xScalePaddingLeft=this.padding},calculateYRange:c,drawingArea:function(){return this.startPoint-this.endPoint},calculateY:function(t){var i=this.drawingArea()/(this.min-this.max);return this.endPoint-i*(t-this.min)},calculateX:function(t){var i=(this.xLabelRotation>0,this.width-(this.xScalePaddingLeft+this.xScalePaddingRight)),e=i/(this.valuesCount-(this.offsetGridLines?0:1)),s=e*t+this.xScalePaddingLeft;return this.offsetGridLines&&(s+=e/2),Math.round(s)},update:function(t){s.extend(this,t),this.fit()},draw:function(){var t=this.ctx,i=(this.endPoint-this.startPoint)/this.steps,e=Math.round(this.xScalePaddingLeft);this.display&&(t.fillStyle=this.textColor,t.font=this.font,n(this.yLabels,function(n,o){var a=this.endPoint-i*o,h=Math.round(a);t.textAlign="right",t.textBaseline="middle",this.showLabels&&t.fillText(n,e-10,a),t.beginPath(),o>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),h+=s.aliasPixel(t.lineWidth),t.moveTo(e,h),t.lineTo(this.width,h),t.stroke(),t.closePath(),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(e-5,h),t.lineTo(e,h),t.stroke(),t.closePath()},this),n(this.xLabels,function(i,e){var s=this.calculateX(e)+S(this.lineWidth),n=this.calculateX(e-(this.offsetGridLines?.5:0))+S(this.lineWidth),o=this.xLabelRotation>0;t.beginPath(),e>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),t.moveTo(n,this.endPoint),t.lineTo(n,this.startPoint-3),t.stroke(),t.closePath(),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(n,this.endPoint),t.lineTo(n,this.endPoint+5),t.stroke(),t.closePath(),t.save(),t.translate(s,o?this.endPoint+12:this.endPoint+8),t.rotate(-1*x(this.xLabelRotation)),t.font=this.font,t.textAlign=o?"right":"center",t.textBaseline=o?"middle":"top",t.fillText(i,0,0),t.restore()},this))}}),e.RadialScale=e.Element.extend({initialize:function(){this.size=m([this.height,this.width]),this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2},calculateCenterOffset:function(t){var i=this.drawingArea/(this.max-this.min);return(t-this.min)*i},update:function(){this.lineArc?this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2:this.setScaleSize(),this.buildYLabels()},buildYLabels:function(){this.yLabels=[];for(var t=v(this.stepValue),i=0;i<=this.steps;i++)this.yLabels.push(C(this.templateString,{value:(this.min+i*this.stepValue).toFixed(t)}))},getCircumference:function(){return 2*Math.PI/this.valuesCount},setScaleSize:function(){var t,i,e,s,n,o,a,h,l,r,c,u,d=m([this.height/2-this.pointLabelFontSize-5,this.width/2]),p=this.width,g=0;for(this.ctx.font=M(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),i=0;ip&&(p=t.x+s,n=i),t.x-sp&&(p=t.x+e,n=i):i>this.valuesCount/2&&t.x-e0){var s,n=e*(this.drawingArea/this.steps),o=this.yCenter-n;if(this.lineWidth>0)if(t.strokeStyle=this.lineColor,t.lineWidth=this.lineWidth,this.lineArc)t.beginPath(),t.arc(this.xCenter,this.yCenter,n,0,2*Math.PI),t.closePath(),t.stroke();else{t.beginPath();for(var a=0;a=0;i--){if(this.angleLineWidth>0){var e=this.getPointPosition(i,this.calculateCenterOffset(this.max));t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(e.x,e.y),t.stroke(),t.closePath()}var s=this.getPointPosition(i,this.calculateCenterOffset(this.max)+5);t.font=M(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),t.fillStyle=this.pointLabelFontColor;var o=this.labels.length,a=this.labels.length/2,h=a/2,l=h>i||i>o-h,r=i===h||i===o-h;t.textAlign=0===i?"center":i===a?"center":a>i?"left":"right",t.textBaseline=r?"middle":l?"bottom":"top",t.fillText(this.labels[i],s.x,s.y)}}}}}),s.addEvent(window,"resize",function(){var t;return function(){clearTimeout(t),t=setTimeout(function(){n(e.instances,function(t){t.options.responsive&&t.resize(t.render,!0)})},50)}}()),p?define(function(){return e}):"object"==typeof module&&module.exports&&(module.exports=e),t.Chart=e,e.noConflict=function(){return t.Chart=i,e}}).call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={scaleBeginAtZero:!0,scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,barShowStroke:!0,barStrokeWidth:2,barValueSpacing:5,barDatasetSpacing:1,legendTemplate:'
    <% for (var i=0; i
  • <%if(datasets[i].label){%><%=datasets[i].label%><%}%>
  • <%}%>
'};i.Type.extend({name:"Bar",defaults:s,initialize:function(t){var s=this.options;this.ScaleClass=i.Scale.extend({offsetGridLines:!0,calculateBarX:function(t,i,e){var n=this.calculateBaseWidth(),o=this.calculateX(e)-n/2,a=this.calculateBarWidth(t);return o+a*i+i*s.barDatasetSpacing+a/2},calculateBaseWidth:function(){return this.calculateX(1)-this.calculateX(0)-2*s.barValueSpacing},calculateBarWidth:function(t){var i=this.calculateBaseWidth()-(t-1)*s.barDatasetSpacing;return i/t}}),this.datasets=[],this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getBarsAtEvent(t):[];this.eachBars(function(t){t.restore(["fillColor","strokeColor"])}),e.each(i,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(i)}),this.BarClass=i.Rectangle.extend({strokeWidth:this.options.barStrokeWidth,showStroke:this.options.barShowStroke,ctx:this.chart.ctx}),e.each(t.datasets,function(i){var s={label:i.label||null,fillColor:i.fillColor,strokeColor:i.strokeColor,bars:[]};this.datasets.push(s),e.each(i.data,function(e,n){s.bars.push(new this.BarClass({value:e,label:t.labels[n],datasetLabel:i.label,strokeColor:i.strokeColor,fillColor:i.fillColor,highlightFill:i.highlightFill||i.fillColor,highlightStroke:i.highlightStroke||i.strokeColor}))},this)},this),this.buildScale(t.labels),this.BarClass.prototype.base=this.scale.endPoint,this.eachBars(function(t,i,s){e.extend(t,{width:this.scale.calculateBarWidth(this.datasets.length),x:this.scale.calculateBarX(this.datasets.length,s,i),y:this.scale.endPoint}),t.save()},this),this.render()},update:function(){this.scale.update(),e.each(this.activeElements,function(t){t.restore(["fillColor","strokeColor"])}),this.eachBars(function(t){t.save()}),this.render()},eachBars:function(t){e.each(this.datasets,function(i,s){e.each(i.bars,t,this,s)},this)},getBarsAtEvent:function(t){for(var i,s=[],n=e.getRelativePosition(t),o=function(t){s.push(t.bars[i])},a=0;a<% for (var i=0; i
  • <%if(segments[i].label){%><%=segments[i].label%><%}%>
  • <%}%>'}; -i.Type.extend({name:"Doughnut",defaults:s,initialize:function(t){this.segments=[],this.outerRadius=(e.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,this.SegmentArc=i.Arc.extend({ctx:this.chart.ctx,x:this.chart.width/2,y:this.chart.height/2}),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getSegmentsAtEvent(t):[];e.each(this.segments,function(t){t.restore(["fillColor"])}),e.each(i,function(t){t.fillColor=t.highlightColor}),this.showTooltip(i)}),this.calculateTotal(t),e.each(t,function(t,i){this.addData(t,i,!0)},this),this.render()},getSegmentsAtEvent:function(t){var i=[],s=e.getRelativePosition(t);return e.each(this.segments,function(t){t.inRange(s.x,s.y)&&i.push(t)},this),i},addData:function(t,i,e){var s=i||this.segments.length;this.segments.splice(s,0,new this.SegmentArc({value:t.value,outerRadius:this.options.animateScale?0:this.outerRadius,innerRadius:this.options.animateScale?0:this.outerRadius/100*this.options.percentageInnerCutout,fillColor:t.color,highlightColor:t.highlight||t.color,showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,startAngle:1.5*Math.PI,circumference:this.options.animateRotate?0:this.calculateCircumference(t.value),label:t.label})),e||(this.reflow(),this.update())},calculateCircumference:function(t){return 2*Math.PI*(t/this.total)},calculateTotal:function(t){this.total=0,e.each(t,function(t){this.total+=t.value},this)},update:function(){this.calculateTotal(this.segments),e.each(this.activeElements,function(t){t.restore(["fillColor"])}),e.each(this.segments,function(t){t.save()}),this.render()},removeData:function(t){var i=e.isNumber(t)?t:this.segments.length-1;this.segments.splice(i,1),this.reflow(),this.update()},reflow:function(){e.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.outerRadius=(e.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,e.each(this.segments,function(t){t.update({outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout})},this)},draw:function(t){var i=t?t:1;this.clear(),e.each(this.segments,function(t,e){t.transition({circumference:this.calculateCircumference(t.value),outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout},i),t.endAngle=t.startAngle+t.circumference,t.draw(),0===e&&(t.startAngle=1.5*Math.PI),e<% for (var i=0; i
  • <%if(datasets[i].label){%><%=datasets[i].label%><%}%>
  • <%}%>'};i.Type.extend({name:"Line",defaults:s,initialize:function(t){this.PointClass=i.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx,inRange:function(t){return Math.pow(t-this.x,2)0&&ithis.scale.endPoint?t.controlPoints.outer.y=this.scale.endPoint:t.controlPoints.outer.ythis.scale.endPoint?t.controlPoints.inner.y=this.scale.endPoint:t.controlPoints.inner.y0&&(s.lineTo(h[h.length-1].x,this.scale.endPoint),s.lineTo(h[0].x,this.scale.endPoint),s.fillStyle=t.fillColor,s.closePath(),s.fill()),e.each(h,function(t){t.draw()})},this)}})}.call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={scaleShowLabelBackdrop:!0,scaleBackdropColor:"rgba(255,255,255,0.75)",scaleBeginAtZero:!0,scaleBackdropPaddingY:2,scaleBackdropPaddingX:2,scaleShowLine:!0,segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'
      <% for (var i=0; i
    • <%if(segments[i].label){%><%=segments[i].label%><%}%>
    • <%}%>
    '};i.Type.extend({name:"PolarArea",defaults:s,initialize:function(t){this.segments=[],this.SegmentArc=i.Arc.extend({showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,ctx:this.chart.ctx,innerRadius:0,x:this.chart.width/2,y:this.chart.height/2}),this.scale=new i.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,lineArc:!0,width:this.chart.width,height:this.chart.height,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,valuesCount:t.length}),this.updateScaleRange(t),this.scale.update(),e.each(t,function(t,i){this.addData(t,i,!0)},this),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getSegmentsAtEvent(t):[];e.each(this.segments,function(t){t.restore(["fillColor"])}),e.each(i,function(t){t.fillColor=t.highlightColor}),this.showTooltip(i)}),this.render()},getSegmentsAtEvent:function(t){var i=[],s=e.getRelativePosition(t);return e.each(this.segments,function(t){t.inRange(s.x,s.y)&&i.push(t)},this),i},addData:function(t,i,e){var s=i||this.segments.length;this.segments.splice(s,0,new this.SegmentArc({fillColor:t.color,highlightColor:t.highlight||t.color,label:t.label,value:t.value,outerRadius:this.options.animateScale?0:this.scale.calculateCenterOffset(t.value),circumference:this.options.animateRotate?0:this.scale.getCircumference(),startAngle:1.5*Math.PI})),e||(this.reflow(),this.update())},removeData:function(t){var i=e.isNumber(t)?t:this.segments.length-1;this.segments.splice(i,1),this.reflow(),this.update()},calculateTotal:function(t){this.total=0,e.each(t,function(t){this.total+=t.value},this),this.scale.valuesCount=this.segments.length},updateScaleRange:function(t){var i=[];e.each(t,function(t){i.push(t.value)});var s=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:e.calculateScaleRange(i,e.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);e.extend(this.scale,s,{size:e.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2})},update:function(){this.calculateTotal(this.segments),e.each(this.segments,function(t){t.save()}),this.render()},reflow:function(){e.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.updateScaleRange(this.segments),this.scale.update(),e.extend(this.scale,{xCenter:this.chart.width/2,yCenter:this.chart.height/2}),e.each(this.segments,function(t){t.update({outerRadius:this.scale.calculateCenterOffset(t.value)})},this)},draw:function(t){var i=t||1;this.clear(),e.each(this.segments,function(t,e){t.transition({circumference:this.scale.getCircumference(),outerRadius:this.scale.calculateCenterOffset(t.value)},i),t.endAngle=t.startAngle+t.circumference,0===e&&(t.startAngle=1.5*Math.PI),e<% for (var i=0; i
  • <%if(datasets[i].label){%><%=datasets[i].label%><%}%>
  • <%}%>'},initialize:function(t){this.PointClass=i.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx}),this.datasets=[],this.buildScale(t),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getPointsAtEvent(t):[];this.eachPoints(function(t){t.restore(["fillColor","strokeColor"])}),e.each(i,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(i)}),e.each(t.datasets,function(i){var s={label:i.label||null,fillColor:i.fillColor,strokeColor:i.strokeColor,pointColor:i.pointColor,pointStrokeColor:i.pointStrokeColor,points:[]};this.datasets.push(s),e.each(i.data,function(e,n){var o;this.scale.animation||(o=this.scale.getPointPosition(n,this.scale.calculateCenterOffset(e))),s.points.push(new this.PointClass({value:e,label:t.labels[n],datasetLabel:i.label,x:this.options.animation?this.scale.xCenter:o.x,y:this.options.animation?this.scale.yCenter:o.y,strokeColor:i.pointStrokeColor,fillColor:i.pointColor,highlightFill:i.pointHighlightFill||i.pointColor,highlightStroke:i.pointHighlightStroke||i.pointStrokeColor}))},this)},this),this.render()},eachPoints:function(t){e.each(this.datasets,function(i){e.each(i.points,t,this)},this)},getPointsAtEvent:function(t){var i=e.getRelativePosition(t),s=e.getAngleFromPoint({x:this.scale.xCenter,y:this.scale.yCenter},i),n=2*Math.PI/this.scale.valuesCount,o=Math.round((s.angle-1.5*Math.PI)/n),a=[];return(o>=this.scale.valuesCount||0>o)&&(o=0),s.distance<=this.scale.drawingArea&&e.each(this.datasets,function(t){a.push(t.points[o])}),a},buildScale:function(t){this.scale=new i.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,angleLineColor:this.options.angleLineColor,angleLineWidth:this.options.angleShowLineOut?this.options.angleLineWidth:0,pointLabelFontColor:this.options.pointLabelFontColor,pointLabelFontSize:this.options.pointLabelFontSize,pointLabelFontFamily:this.options.pointLabelFontFamily,pointLabelFontStyle:this.options.pointLabelFontStyle,height:this.chart.height,width:this.chart.width,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,labels:t.labels,valuesCount:t.datasets[0].data.length}),this.scale.setScaleSize(),this.updateScaleRange(t.datasets),this.scale.buildYLabels()},updateScaleRange:function(t){var i=function(){var i=[];return e.each(t,function(t){t.data?i=i.concat(t.data):e.each(t.points,function(t){i.push(t.value)})}),i}(),s=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:e.calculateScaleRange(i,e.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);e.extend(this.scale,s)},addData:function(t,i){this.scale.valuesCount++,e.each(t,function(t,e){var s=this.scale.getPointPosition(this.scale.valuesCount,this.scale.calculateCenterOffset(t));this.datasets[e].points.push(new this.PointClass({value:t,label:i,x:s.x,y:s.y,strokeColor:this.datasets[e].pointStrokeColor,fillColor:this.datasets[e].pointColor}))},this),this.scale.labels.push(i),this.reflow(),this.update()},removeData:function(){this.scale.valuesCount--,this.scale.labels.shift(),e.each(this.datasets,function(t){t.points.shift()},this),this.reflow(),this.update()},update:function(){this.eachPoints(function(t){t.save()}),this.reflow(),this.render()},reflow:function(){e.extend(this.scale,{width:this.chart.width,height:this.chart.height,size:e.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2}),this.updateScaleRange(this.datasets),this.scale.setScaleSize(),this.scale.buildYLabels()},draw:function(t){var i=t||1,s=this.chart.ctx;this.clear(),this.scale.draw(),e.each(this.datasets,function(t){e.each(t.points,function(t,e){t.hasValue()&&t.transition(this.scale.getPointPosition(e,this.scale.calculateCenterOffset(t.value)),i)},this),s.lineWidth=this.options.datasetStrokeWidth,s.strokeStyle=t.strokeColor,s.beginPath(),e.each(t.points,function(t,i){0===i?s.moveTo(t.x,t.y):s.lineTo(t.x,t.y)},this),s.closePath(),s.stroke(),s.fillStyle=t.fillColor,s.fill(),e.each(t.points,function(t){t.hasValue()&&t.draw()})},this)}})}.call(this); \ No newline at end of file From 44aae7daa5e6751dac75bec2ccb264e609563b17 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 26 Feb 2016 12:12:12 -0500 Subject: [PATCH 0008/1109] removed hammer, updated semver, added mousetrap --- package.json | 3 ++- public/src/admin/admin.js | 24 +++++++++++++----------- public/src/client/chats.js | 10 +++++----- public/src/client/topic.js | 4 ++-- public/src/modules/search.js | 8 ++++---- public/vendor/hammer/hammer.min.js | 6 ------ public/vendor/mousetrap/mousetrap.js | 9 --------- src/meta/js.js | 4 ++-- src/views/admin/header.tpl | 2 -- 9 files changed, 28 insertions(+), 42 deletions(-) delete mode 100644 public/vendor/hammer/hammer.min.js delete mode 100644 public/vendor/mousetrap/mousetrap.js diff --git a/package.json b/package.json index 5ff036175a..4a24daa2d7 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "mkdirp": "~0.5.0", "mongodb": "~2.1.3", "morgan": "^1.3.2", + "mousetrap": "^1.5.3", "nconf": "~0.8.2", "nodebb-plugin-composer-default": "3.0.6", "nodebb-plugin-dbsearch": "0.3.1", @@ -67,7 +68,7 @@ "request": "^2.44.0", "rimraf": "~2.5.0", "rss": "^1.0.0", - "semver": "^5.0.1", + "semver": "^5.1.0", "serve-favicon": "^2.1.5", "sitemap": "^1.4.0", "socket.io": "^1.4.0", diff --git a/public/src/admin/admin.js b/public/src/admin/admin.js index 22258d4f66..173148ef5e 100644 --- a/public/src/admin/admin.js +++ b/public/src/admin/admin.js @@ -1,5 +1,5 @@ "use strict"; -/*global config, translator, componentHandler, define, socket, app, ajaxify, utils, bootbox, Mousetrap, Hammer, Slideout, RELATIVE_PATH*/ +/*global config, translator, componentHandler, define, socket, app, ajaxify, utils, bootbox, Slideout, RELATIVE_PATH*/ (function() { $(document).ready(function() { @@ -32,20 +32,22 @@ }); function setupKeybindings() { - Mousetrap.bind('ctrl+shift+a r', function() { - require(['admin/modules/instance'], function(instance) { - instance.reload(); + require(['mousetrap'], function(mousetrap) { + mousetrap.bind('ctrl+shift+a r', function() { + require(['admin/modules/instance'], function(instance) { + instance.reload(); + }); }); - }); - Mousetrap.bind('ctrl+shift+a R', function() { - socket.emit('admin.restart'); - }); + mousetrap.bind('ctrl+shift+a R', function() { + socket.emit('admin.restart'); + }); - Mousetrap.bind('/', function(e) { - $('#acp-search input').focus(); + mousetrap.bind('/', function(e) { + $('#acp-search input').focus(); - return false; + return false; + }); }); } diff --git a/public/src/client/chats.js b/public/src/client/chats.js index 21da307713..24c7a89192 100644 --- a/public/src/client/chats.js +++ b/public/src/client/chats.js @@ -1,8 +1,8 @@ 'use strict'; -/* globals define, config, app, ajaxify, utils, socket, templates, Mousetrap, bootbox */ +/* globals define, config, app, ajaxify, utils, socket, templates, bootbox */ -define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll', 'translator'], function(components, S, sounds, infinitescroll, translator) { +define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll', 'translator', 'mousetrap'], function(components, S, sounds, infinitescroll, translator, mousetrap) { var Chats = { initialised: false }; @@ -92,7 +92,7 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll', }; Chats.addHotkeys = function() { - Mousetrap.bind('ctrl+up', function() { + mousetrap.bind('ctrl+up', function() { var activeContact = $('.chats-list .bg-primary'), prev = activeContact.prev(); @@ -100,7 +100,7 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll', Chats.switchChat(prev.attr('data-roomid')); } }); - Mousetrap.bind('ctrl+down', function() { + mousetrap.bind('ctrl+down', function() { var activeContact = $('.chats-list .bg-primary'), next = activeContact.next(); @@ -108,7 +108,7 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll', Chats.switchChat(next.attr('data-roomid')); } }); - Mousetrap.bind('up', function(e) { + mousetrap.bind('up', function(e) { if (e.target === components.get('chat/input').get(0)) { // Retrieve message id from messages list var message = components.get('chat/messages').find('.chat-message[data-self="1"]').last(); diff --git a/public/src/client/topic.js b/public/src/client/topic.js index c3e228f9ae..5772a570b3 100644 --- a/public/src/client/topic.js +++ b/public/src/client/topic.js @@ -93,7 +93,7 @@ define('forum/topic', [ } function handleTopicSearch() { - require(['search', 'mousetrap'], function(search, Mousetrap) { + require(['search', 'mousetrap'], function(search, mousetrap) { $('.topic-search') .on('click', '.prev', function() { search.topicDOM.prev(); @@ -102,7 +102,7 @@ define('forum/topic', [ search.topicDOM.next(); }); - Mousetrap.bind('ctrl+f', function(e) { + mousetrap.bind('ctrl+f', function(e) { if (config.topicSearchEnabled) { // If in topic, open search window and populate, otherwise regular behaviour var match = ajaxify.currentPage.match(/^topic\/([\d]+)/), diff --git a/public/src/modules/search.js b/public/src/modules/search.js index 7b889999ea..e24ecbed61 100644 --- a/public/src/modules/search.js +++ b/public/src/modules/search.js @@ -150,8 +150,8 @@ define('search', ['navigator', 'translator'], function(nav, translator) { Search.topicDOM.active = true; // Bind to esc - require(['mousetrap'], function(Mousetrap) { - Mousetrap.bind('esc', Search.topicDOM.end); + require(['mousetrap'], function(mousetrap) { + mousetrap.bind('esc', Search.topicDOM.end); }); } }; @@ -161,8 +161,8 @@ define('search', ['navigator', 'translator'], function(nav, translator) { Search.topicDOM.active = false; // Unbind esc - require(['mousetrap'], function(Mousetrap) { - Mousetrap.unbind('esc', Search.topicDOM.end); + require(['mousetrap'], function(mousetrap) { + mousetrap.unbind('esc', Search.topicDOM.end); }); }; diff --git a/public/vendor/hammer/hammer.min.js b/public/vendor/hammer/hammer.min.js deleted file mode 100644 index 575b810f47..0000000000 --- a/public/vendor/hammer/hammer.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! Hammer.JS - v2.0.4 - 2014-09-28 - * http://hammerjs.github.io/ - * - * Copyright (c) 2014 Jorik Tangelder; - * Licensed under the MIT license */ -!function(a,b,c,d){"use strict";function e(a,b,c){return setTimeout(k(a,c),b)}function f(a,b,c){return Array.isArray(a)?(g(a,c[b],c),!0):!1}function g(a,b,c){var e;if(a)if(a.forEach)a.forEach(b,c);else if(a.length!==d)for(e=0;e-1}function r(a){return a.trim().split(/\s+/g)}function s(a,b,c){if(a.indexOf&&!c)return a.indexOf(b);for(var d=0;dc[b]}):d.sort()),d}function v(a,b){for(var c,e,f=b[0].toUpperCase()+b.slice(1),g=0;g1&&!c.firstMultiple?c.firstMultiple=E(b):1===e&&(c.firstMultiple=!1);var f=c.firstInput,g=c.firstMultiple,h=g?g.center:f.center,i=b.center=F(d);b.timeStamp=nb(),b.deltaTime=b.timeStamp-f.timeStamp,b.angle=J(h,i),b.distance=I(h,i),C(c,b),b.offsetDirection=H(b.deltaX,b.deltaY),b.scale=g?L(g.pointers,d):1,b.rotation=g?K(g.pointers,d):0,D(c,b);var j=a.element;p(b.srcEvent.target,j)&&(j=b.srcEvent.target),b.target=j}function C(a,b){var c=b.center,d=a.offsetDelta||{},e=a.prevDelta||{},f=a.prevInput||{};(b.eventType===yb||f.eventType===Ab)&&(e=a.prevDelta={x:f.deltaX||0,y:f.deltaY||0},d=a.offsetDelta={x:c.x,y:c.y}),b.deltaX=e.x+(c.x-d.x),b.deltaY=e.y+(c.y-d.y)}function D(a,b){var c,e,f,g,h=a.lastInterval||b,i=b.timeStamp-h.timeStamp;if(b.eventType!=Bb&&(i>xb||h.velocity===d)){var j=h.deltaX-b.deltaX,k=h.deltaY-b.deltaY,l=G(i,j,k);e=l.x,f=l.y,c=mb(l.x)>mb(l.y)?l.x:l.y,g=H(j,k),a.lastInterval=b}else c=h.velocity,e=h.velocityX,f=h.velocityY,g=h.direction;b.velocity=c,b.velocityX=e,b.velocityY=f,b.direction=g}function E(a){for(var b=[],c=0;ce;)c+=a[e].clientX,d+=a[e].clientY,e++;return{x:lb(c/b),y:lb(d/b)}}function G(a,b,c){return{x:b/a||0,y:c/a||0}}function H(a,b){return a===b?Cb:mb(a)>=mb(b)?a>0?Db:Eb:b>0?Fb:Gb}function I(a,b,c){c||(c=Kb);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return Math.sqrt(d*d+e*e)}function J(a,b,c){c||(c=Kb);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return 180*Math.atan2(e,d)/Math.PI}function K(a,b){return J(b[1],b[0],Lb)-J(a[1],a[0],Lb)}function L(a,b){return I(b[0],b[1],Lb)/I(a[0],a[1],Lb)}function M(){this.evEl=Nb,this.evWin=Ob,this.allow=!0,this.pressed=!1,y.apply(this,arguments)}function N(){this.evEl=Rb,this.evWin=Sb,y.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function O(){this.evTarget=Ub,this.evWin=Vb,this.started=!1,y.apply(this,arguments)}function P(a,b){var c=t(a.touches),d=t(a.changedTouches);return b&(Ab|Bb)&&(c=u(c.concat(d),"identifier",!0)),[c,d]}function Q(){this.evTarget=Xb,this.targetIds={},y.apply(this,arguments)}function R(a,b){var c=t(a.touches),d=this.targetIds;if(b&(yb|zb)&&1===c.length)return d[c[0].identifier]=!0,[c,c];var e,f,g=t(a.changedTouches),h=[],i=this.target;if(f=c.filter(function(a){return p(a.target,i)}),b===yb)for(e=0;eh&&(b.push(a),h=b.length-1):e&(Ab|Bb)&&(c=!0),0>h||(b[h]=a,this.callback(this.manager,e,{pointers:b,changedPointers:[a],pointerType:f,srcEvent:a}),c&&b.splice(h,1))}});var Tb={touchstart:yb,touchmove:zb,touchend:Ab,touchcancel:Bb},Ub="touchstart",Vb="touchstart touchmove touchend touchcancel";j(O,y,{handler:function(a){var b=Tb[a.type];if(b===yb&&(this.started=!0),this.started){var c=P.call(this,a,b);b&(Ab|Bb)&&c[0].length-c[1].length===0&&(this.started=!1),this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:tb,srcEvent:a})}}});var Wb={touchstart:yb,touchmove:zb,touchend:Ab,touchcancel:Bb},Xb="touchstart touchmove touchend touchcancel";j(Q,y,{handler:function(a){var b=Wb[a.type],c=R.call(this,a,b);c&&this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:tb,srcEvent:a})}}),j(S,y,{handler:function(a,b,c){var d=c.pointerType==tb,e=c.pointerType==vb;if(d)this.mouse.allow=!1;else if(e&&!this.mouse.allow)return;b&(Ab|Bb)&&(this.mouse.allow=!0),this.callback(a,b,c)},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Yb=v(jb.style,"touchAction"),Zb=Yb!==d,$b="compute",_b="auto",ac="manipulation",bc="none",cc="pan-x",dc="pan-y";T.prototype={set:function(a){a==$b&&(a=this.compute()),Zb&&(this.manager.element.style[Yb]=a),this.actions=a.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var a=[];return g(this.manager.recognizers,function(b){l(b.options.enable,[b])&&(a=a.concat(b.getTouchAction()))}),U(a.join(" "))},preventDefaults:function(a){if(!Zb){var b=a.srcEvent,c=a.offsetDirection;if(this.manager.session.prevented)return void b.preventDefault();var d=this.actions,e=q(d,bc),f=q(d,dc),g=q(d,cc);return e||f&&c&Hb||g&&c&Ib?this.preventSrc(b):void 0}},preventSrc:function(a){this.manager.session.prevented=!0,a.preventDefault()}};var ec=1,fc=2,gc=4,hc=8,ic=hc,jc=16,kc=32;V.prototype={defaults:{},set:function(a){return h(this.options,a),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(a){if(f(a,"recognizeWith",this))return this;var b=this.simultaneous;return a=Y(a,this),b[a.id]||(b[a.id]=a,a.recognizeWith(this)),this},dropRecognizeWith:function(a){return f(a,"dropRecognizeWith",this)?this:(a=Y(a,this),delete this.simultaneous[a.id],this)},requireFailure:function(a){if(f(a,"requireFailure",this))return this;var b=this.requireFail;return a=Y(a,this),-1===s(b,a)&&(b.push(a),a.requireFailure(this)),this},dropRequireFailure:function(a){if(f(a,"dropRequireFailure",this))return this;a=Y(a,this);var b=s(this.requireFail,a);return b>-1&&this.requireFail.splice(b,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(a){return!!this.simultaneous[a.id]},emit:function(a){function b(b){c.manager.emit(c.options.event+(b?W(d):""),a)}var c=this,d=this.state;hc>d&&b(!0),b(),d>=hc&&b(!0)},tryEmit:function(a){return this.canEmit()?this.emit(a):void(this.state=kc)},canEmit:function(){for(var a=0;af?Db:Eb,c=f!=this.pX,d=Math.abs(a.deltaX)):(e=0===g?Cb:0>g?Fb:Gb,c=g!=this.pY,d=Math.abs(a.deltaY))),a.direction=e,c&&d>b.threshold&&e&b.direction},attrTest:function(a){return Z.prototype.attrTest.call(this,a)&&(this.state&fc||!(this.state&fc)&&this.directionTest(a))},emit:function(a){this.pX=a.deltaX,this.pY=a.deltaY;var b=X(a.direction);b&&this.manager.emit(this.options.event+b,a),this._super.emit.call(this,a)}}),j(_,Z,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[bc]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.scale-1)>this.options.threshold||this.state&fc)},emit:function(a){if(this._super.emit.call(this,a),1!==a.scale){var b=a.scale<1?"in":"out";this.manager.emit(this.options.event+b,a)}}}),j(ab,V,{defaults:{event:"press",pointers:1,time:500,threshold:5},getTouchAction:function(){return[_b]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distanceb.time;if(this._input=a,!d||!c||a.eventType&(Ab|Bb)&&!f)this.reset();else if(a.eventType&yb)this.reset(),this._timer=e(function(){this.state=ic,this.tryEmit()},b.time,this);else if(a.eventType&Ab)return ic;return kc},reset:function(){clearTimeout(this._timer)},emit:function(a){this.state===ic&&(a&&a.eventType&Ab?this.manager.emit(this.options.event+"up",a):(this._input.timeStamp=nb(),this.manager.emit(this.options.event,this._input)))}}),j(bb,Z,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[bc]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.rotation)>this.options.threshold||this.state&fc)}}),j(cb,Z,{defaults:{event:"swipe",threshold:10,velocity:.65,direction:Hb|Ib,pointers:1},getTouchAction:function(){return $.prototype.getTouchAction.call(this)},attrTest:function(a){var b,c=this.options.direction;return c&(Hb|Ib)?b=a.velocity:c&Hb?b=a.velocityX:c&Ib&&(b=a.velocityY),this._super.attrTest.call(this,a)&&c&a.direction&&a.distance>this.options.threshold&&mb(b)>this.options.velocity&&a.eventType&Ab},emit:function(a){var b=X(a.direction);b&&this.manager.emit(this.options.event+b,a),this.manager.emit(this.options.event,a)}}),j(db,V,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:2,posThreshold:10},getTouchAction:function(){return[ac]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distanceg||h.hasOwnProperty(g)&&(p[h[g]]=g)}e=p[d]?"keydown":"keypress"}"keypress"==e&&f.length&&(e="keydown");return{key:c,modifiers:f,action:e}}function F(a,b,d,c,e){q[a+":"+d]=b;a=a.replace(/\s+/g," ");var f=a.split(" ");1":".","?":"/","|":"\\"},G={option:"alt",command:"meta","return":"enter",escape:"esc",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},p,l={},q={},n={},D,z=!1,I=!1,u=!1;for(f=1;20>f;++f)h[111+f]="f"+f;for(f=0;9>=f;++f)h[f+96]=f;s(r,"keypress",y);s(r,"keydown",y);s(r,"keyup",y);var m={bind:function(a,b,d){a=a instanceof Array?a:[a];for(var c=0;c - - From 3f2872979fd8adb9f38c2d22d1384fba5c5d7fae Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 26 Feb 2016 12:34:48 -0500 Subject: [PATCH 0009/1109] added buzz --- public/vendor/buzz/buzz.js | 11 +++++++++++ public/vendor/buzz/buzz.min.js | 11 ----------- src/meta/js.js | 5 +++-- src/views/admin/header.tpl | 3 +-- src/views/partials/requirejs-config.tpl | 3 +-- 5 files changed, 16 insertions(+), 17 deletions(-) create mode 100644 public/vendor/buzz/buzz.js delete mode 100644 public/vendor/buzz/buzz.min.js diff --git a/public/vendor/buzz/buzz.js b/public/vendor/buzz/buzz.js new file mode 100644 index 0000000000..eae98a9dfe --- /dev/null +++ b/public/vendor/buzz/buzz.js @@ -0,0 +1,11 @@ + // ---------------------------------------------------------------------------- + // Buzz, a Javascript HTML5 Audio library + // v1.1.10 - Built 2015-04-20 13:05 + // Licensed under the MIT license. + // http://buzz.jaysalvat.com/ + // ---------------------------------------------------------------------------- + // Copyright (C) 2010-2015 Jay Salvat + // http://jaysalvat.com/ + // ---------------------------------------------------------------------------- + +(function(t,e){"use strict";"undefined"!=typeof module&&module.exports?module.exports=e():"function"==typeof define&&define.amd?define([],e):t.buzz=e()})(this,function(){"use strict";var t=window.AudioContext||window.webkitAudioContext,e={defaults:{autoplay:!1,duration:5e3,formats:[],loop:!1,placeholder:"--",preload:"metadata",volume:80,webAudioApi:!1,document:window.document},types:{mp3:"audio/mpeg",ogg:"audio/ogg",wav:"audio/wav",aac:"audio/aac",m4a:"audio/x-m4a"},sounds:[],el:document.createElement("audio"),getAudioContext:function(){if(void 0===this.audioCtx)try{this.audioCtx=t?new t:null}catch(e){this.audioCtx=null}return this.audioCtx},sound:function(t,n){function i(t){for(var e=[],n=t.length-1,i=0;n>=i;i++)e.push({start:t.start(i),end:t.end(i)});return e}function u(t){return t.split(".").pop()}n=n||{};var s=n.document||e.defaults.document,r=0,o=[],a={},h=e.isSupported();if(this.load=function(){return h?(this.sound.load(),this):this},this.play=function(){return h?(this.sound.play(),this):this},this.togglePlay=function(){return h?(this.sound.paused?this.sound.play():this.sound.pause(),this):this},this.pause=function(){return h?(this.sound.pause(),this):this},this.isPaused=function(){return h?this.sound.paused:null},this.stop=function(){return h?(this.setTime(0),this.sound.pause(),this):this},this.isEnded=function(){return h?this.sound.ended:null},this.loop=function(){return h?(this.sound.loop="loop",this.bind("ended.buzzloop",function(){this.currentTime=0,this.play()}),this):this},this.unloop=function(){return h?(this.sound.removeAttribute("loop"),this.unbind("ended.buzzloop"),this):this},this.mute=function(){return h?(this.sound.muted=!0,this):this},this.unmute=function(){return h?(this.sound.muted=!1,this):this},this.toggleMute=function(){return h?(this.sound.muted=!this.sound.muted,this):this},this.isMuted=function(){return h?this.sound.muted:null},this.setVolume=function(t){return h?(0>t&&(t=0),t>100&&(t=100),this.volume=t,this.sound.volume=t/100,this):this},this.getVolume=function(){return h?this.volume:this},this.increaseVolume=function(t){return this.setVolume(this.volume+(t||1))},this.decreaseVolume=function(t){return this.setVolume(this.volume-(t||1))},this.setTime=function(t){if(!h)return this;var e=!0;return this.whenReady(function(){e===!0&&(e=!1,this.sound.currentTime=t)}),this},this.getTime=function(){if(!h)return null;var t=Math.round(100*this.sound.currentTime)/100;return isNaN(t)?e.defaults.placeholder:t},this.setPercent=function(t){return h?this.setTime(e.fromPercent(t,this.sound.duration)):this},this.getPercent=function(){if(!h)return null;var t=Math.round(e.toPercent(this.sound.currentTime,this.sound.duration));return isNaN(t)?e.defaults.placeholder:t},this.setSpeed=function(t){return h?(this.sound.playbackRate=t,this):this},this.getSpeed=function(){return h?this.sound.playbackRate:null},this.getDuration=function(){if(!h)return null;var t=Math.round(100*this.sound.duration)/100;return isNaN(t)?e.defaults.placeholder:t},this.getPlayed=function(){return h?i(this.sound.played):null},this.getBuffered=function(){return h?i(this.sound.buffered):null},this.getSeekable=function(){return h?i(this.sound.seekable):null},this.getErrorCode=function(){return h&&this.sound.error?this.sound.error.code:0},this.getErrorMessage=function(){if(!h)return null;switch(this.getErrorCode()){case 1:return"MEDIA_ERR_ABORTED";case 2:return"MEDIA_ERR_NETWORK";case 3:return"MEDIA_ERR_DECODE";case 4:return"MEDIA_ERR_SRC_NOT_SUPPORTED";default:return null}},this.getStateCode=function(){return h?this.sound.readyState:null},this.getStateMessage=function(){if(!h)return null;switch(this.getStateCode()){case 0:return"HAVE_NOTHING";case 1:return"HAVE_METADATA";case 2:return"HAVE_CURRENT_DATA";case 3:return"HAVE_FUTURE_DATA";case 4:return"HAVE_ENOUGH_DATA";default:return null}},this.getNetworkStateCode=function(){return h?this.sound.networkState:null},this.getNetworkStateMessage=function(){if(!h)return null;switch(this.getNetworkStateCode()){case 0:return"NETWORK_EMPTY";case 1:return"NETWORK_IDLE";case 2:return"NETWORK_LOADING";case 3:return"NETWORK_NO_SOURCE";default:return null}},this.set=function(t,e){return h?(this.sound[t]=e,this):this},this.get=function(t){return h?t?this.sound[t]:this.sound:null},this.bind=function(t,e){if(!h)return this;t=t.split(" ");for(var n=this,i=function(t){e.call(n,t)},u=0;t.length>u;u++){var s=t[u],r=s;s=r.split(".")[0],o.push({idx:r,func:i}),this.sound.addEventListener(s,i,!0)}return this},this.unbind=function(t){if(!h)return this;t=t.split(" ");for(var e=0;t.length>e;e++)for(var n=t[e],i=n.split(".")[0],u=0;o.length>u;u++){var s=o[u].idx.split(".");(o[u].idx===n||s[1]&&s[1]===n.replace(".",""))&&(this.sound.removeEventListener(i,o[u].func,!0),o.splice(u,1))}return this},this.bindOnce=function(t,e){if(!h)return this;var n=this;return a[r++]=!1,this.bind(t+"."+r,function(){a[r]||(a[r]=!0,e.call(n)),n.unbind(t+"."+r)}),this},this.trigger=function(t,e){if(!h)return this;t=t.split(" ");for(var n=0;t.length>n;n++)for(var i=t[n],u=0;o.length>u;u++){var r=o[u].idx.split(".");if(o[u].idx===i||r[0]&&r[0]===i.replace(".","")){var a=s.createEvent("HTMLEvents");a.initEvent(r[0],!1,!0),a.originalEvent=e,this.sound.dispatchEvent(a)}}return this},this.fadeTo=function(t,n,i){function u(){setTimeout(function(){t>s&&t>o.volume?(o.setVolume(o.volume+=1),u()):s>t&&o.volume>t?(o.setVolume(o.volume-=1),u()):i instanceof Function&&i.apply(o)},r)}if(!h)return this;n instanceof Function?(i=n,n=e.defaults.duration):n=n||e.defaults.duration;var s=this.volume,r=n/Math.abs(s-t),o=this;return this.play(),this.whenReady(function(){u()}),this},this.fadeIn=function(t,e){return h?this.setVolume(0).fadeTo(100,t,e):this},this.fadeOut=function(t,e){return h?this.fadeTo(0,t,e):this},this.fadeWith=function(t,e){return h?(this.fadeOut(e,function(){this.stop()}),t.play().fadeIn(e),this):this},this.whenReady=function(t){if(!h)return null;var e=this;0===this.sound.readyState?this.bind("canplay.buzzwhenready",function(){t.call(e)}):t.call(e)},this.addSource=function(t){var n=this,i=s.createElement("source");return i.src=t,e.types[u(t)]&&(i.type=e.types[u(t)]),this.sound.appendChild(i),i.addEventListener("error",function(t){n.trigger("sourceerror",t)}),i},h&&t){for(var d in e.defaults)e.defaults.hasOwnProperty(d)&&void 0===n[d]&&(n[d]=e.defaults[d]);if(this.sound=s.createElement("audio"),n.webAudioApi){var l=e.getAudioContext();l&&(this.source=l.createMediaElementSource(this.sound),this.source.connect(l.destination))}if(t instanceof Array)for(var c in t)t.hasOwnProperty(c)&&this.addSource(t[c]);else if(n.formats.length)for(var f in n.formats)n.formats.hasOwnProperty(f)&&this.addSource(t+"."+n.formats[f]);else this.addSource(t);n.loop&&this.loop(),n.autoplay&&(this.sound.autoplay="autoplay"),this.sound.preload=n.preload===!0?"auto":n.preload===!1?"none":n.preload,this.setVolume(n.volume),e.sounds.push(this)}},group:function(t){function e(){for(var e=n(null,arguments),i=e.shift(),u=0;t.length>u;u++)t[u][i].apply(t[u],e)}function n(t,e){return t instanceof Array?t:Array.prototype.slice.call(e)}t=n(t,arguments),this.getSounds=function(){return t},this.add=function(e){e=n(e,arguments);for(var i=0;e.length>i;i++)t.push(e[i])},this.remove=function(e){e=n(e,arguments);for(var i=0;e.length>i;i++)for(var u=0;t.length>u;u++)if(t[u]===e[i]){t.splice(u,1);break}},this.load=function(){return e("load"),this},this.play=function(){return e("play"),this},this.togglePlay=function(){return e("togglePlay"),this},this.pause=function(t){return e("pause",t),this},this.stop=function(){return e("stop"),this},this.mute=function(){return e("mute"),this},this.unmute=function(){return e("unmute"),this},this.toggleMute=function(){return e("toggleMute"),this},this.setVolume=function(t){return e("setVolume",t),this},this.increaseVolume=function(t){return e("increaseVolume",t),this},this.decreaseVolume=function(t){return e("decreaseVolume",t),this},this.loop=function(){return e("loop"),this},this.unloop=function(){return e("unloop"),this},this.setSpeed=function(t){return e("setSpeed",t),this},this.setTime=function(t){return e("setTime",t),this},this.set=function(t,n){return e("set",t,n),this},this.bind=function(t,n){return e("bind",t,n),this},this.unbind=function(t){return e("unbind",t),this},this.bindOnce=function(t,n){return e("bindOnce",t,n),this},this.trigger=function(t){return e("trigger",t),this},this.fade=function(t,n,i,u){return e("fade",t,n,i,u),this},this.fadeIn=function(t,n){return e("fadeIn",t,n),this},this.fadeOut=function(t,n){return e("fadeOut",t,n),this}},all:function(){return new e.group(e.sounds)},isSupported:function(){return!!e.el.canPlayType},isOGGSupported:function(){return!!e.el.canPlayType&&e.el.canPlayType('audio/ogg; codecs="vorbis"')},isWAVSupported:function(){return!!e.el.canPlayType&&e.el.canPlayType('audio/wav; codecs="1"')},isMP3Supported:function(){return!!e.el.canPlayType&&e.el.canPlayType("audio/mpeg;")},isAACSupported:function(){return!!e.el.canPlayType&&(e.el.canPlayType("audio/x-m4a;")||e.el.canPlayType("audio/aac;"))},toTimer:function(t,e){var n,i,u;return n=Math.floor(t/3600),n=isNaN(n)?"--":n>=10?n:"0"+n,i=e?Math.floor(t/60%60):Math.floor(t/60),i=isNaN(i)?"--":i>=10?i:"0"+i,u=Math.floor(t%60),u=isNaN(u)?"--":u>=10?u:"0"+u,e?n+":"+i+":"+u:i+":"+u},fromTimer:function(t){var e=(""+t).split(":");return e&&3===e.length&&(t=3600*parseInt(e[0],10)+60*parseInt(e[1],10)+parseInt(e[2],10)),e&&2===e.length&&(t=60*parseInt(e[0],10)+parseInt(e[1],10)),t},toPercent:function(t,e,n){var i=Math.pow(10,n||0);return Math.round(100*t/e*i)/i},fromPercent:function(t,e,n){var i=Math.pow(10,n||0);return Math.round(e/100*t*i)/i}};return e}); \ No newline at end of file diff --git a/public/vendor/buzz/buzz.min.js b/public/vendor/buzz/buzz.min.js deleted file mode 100644 index 556ce7663b..0000000000 --- a/public/vendor/buzz/buzz.min.js +++ /dev/null @@ -1,11 +0,0 @@ - // ---------------------------------------------------------------------------- - // Buzz, a Javascript HTML5 Audio library - // v1.1.0 - released 2013-08-15 13:18 - // Licensed under the MIT license. - // http://buzz.jaysalvat.com/ - // ---------------------------------------------------------------------------- - // Copyright (C) 2010-2013 Jay Salvat - // http://jaysalvat.com/ - // ---------------------------------------------------------------------------- - -(function(t,n,e){"undefined"!=typeof module&&module.exports?module.exports=e():"function"==typeof n.define&&n.define.amd?define(t,[],e):n[t]=e()})("buzz",this,function(){var t={defaults:{autoplay:!1,duration:5e3,formats:[],loop:!1,placeholder:"--",preload:"metadata",volume:80,document:document},types:{mp3:"audio/mpeg",ogg:"audio/ogg",wav:"audio/wav",aac:"audio/aac",m4a:"audio/x-m4a"},sounds:[],el:document.createElement("audio"),sound:function(n,e){function i(t){for(var n=[],e=t.length-1,i=0;e>=i;i++)n.push({start:t.start(i),end:t.end(i)});return n}function u(t){return t.split(".").pop()}function s(n,e){var i=r.createElement("source");i.src=e,t.types[u(e)]&&(i.type=t.types[u(e)]),n.appendChild(i)}e=e||{};var r=e.document||t.defaults.document,o=0,a=[],h={},l=t.isSupported();if(this.load=function(){return l?(this.sound.load(),this):this},this.play=function(){return l?(this.sound.play(),this):this},this.togglePlay=function(){return l?(this.sound.paused?this.sound.play():this.sound.pause(),this):this},this.pause=function(){return l?(this.sound.pause(),this):this},this.isPaused=function(){return l?this.sound.paused:null},this.stop=function(){return l?(this.setTime(0),this.sound.pause(),this):this},this.isEnded=function(){return l?this.sound.ended:null},this.loop=function(){return l?(this.sound.loop="loop",this.bind("ended.buzzloop",function(){this.currentTime=0,this.play()}),this):this},this.unloop=function(){return l?(this.sound.removeAttribute("loop"),this.unbind("ended.buzzloop"),this):this},this.mute=function(){return l?(this.sound.muted=!0,this):this},this.unmute=function(){return l?(this.sound.muted=!1,this):this},this.toggleMute=function(){return l?(this.sound.muted=!this.sound.muted,this):this},this.isMuted=function(){return l?this.sound.muted:null},this.setVolume=function(t){return l?(0>t&&(t=0),t>100&&(t=100),this.volume=t,this.sound.volume=t/100,this):this},this.getVolume=function(){return l?this.volume:this},this.increaseVolume=function(t){return this.setVolume(this.volume+(t||1))},this.decreaseVolume=function(t){return this.setVolume(this.volume-(t||1))},this.setTime=function(t){if(!l)return this;var n=!0;return this.whenReady(function(){n===!0&&(n=!1,this.sound.currentTime=t)}),this},this.getTime=function(){if(!l)return null;var n=Math.round(100*this.sound.currentTime)/100;return isNaN(n)?t.defaults.placeholder:n},this.setPercent=function(n){return l?this.setTime(t.fromPercent(n,this.sound.duration)):this},this.getPercent=function(){if(!l)return null;var n=Math.round(t.toPercent(this.sound.currentTime,this.sound.duration));return isNaN(n)?t.defaults.placeholder:n},this.setSpeed=function(t){return l?(this.sound.playbackRate=t,this):this},this.getSpeed=function(){return l?this.sound.playbackRate:null},this.getDuration=function(){if(!l)return null;var n=Math.round(100*this.sound.duration)/100;return isNaN(n)?t.defaults.placeholder:n},this.getPlayed=function(){return l?i(this.sound.played):null},this.getBuffered=function(){return l?i(this.sound.buffered):null},this.getSeekable=function(){return l?i(this.sound.seekable):null},this.getErrorCode=function(){return l&&this.sound.error?this.sound.error.code:0},this.getErrorMessage=function(){if(!l)return null;switch(this.getErrorCode()){case 1:return"MEDIA_ERR_ABORTED";case 2:return"MEDIA_ERR_NETWORK";case 3:return"MEDIA_ERR_DECODE";case 4:return"MEDIA_ERR_SRC_NOT_SUPPORTED";default:return null}},this.getStateCode=function(){return l?this.sound.readyState:null},this.getStateMessage=function(){if(!l)return null;switch(this.getStateCode()){case 0:return"HAVE_NOTHING";case 1:return"HAVE_METADATA";case 2:return"HAVE_CURRENT_DATA";case 3:return"HAVE_FUTURE_DATA";case 4:return"HAVE_ENOUGH_DATA";default:return null}},this.getNetworkStateCode=function(){return l?this.sound.networkState:null},this.getNetworkStateMessage=function(){if(!l)return null;switch(this.getNetworkStateCode()){case 0:return"NETWORK_EMPTY";case 1:return"NETWORK_IDLE";case 2:return"NETWORK_LOADING";case 3:return"NETWORK_NO_SOURCE";default:return null}},this.set=function(t,n){return l?(this.sound[t]=n,this):this},this.get=function(t){return l?t?this.sound[t]:this.sound:null},this.bind=function(t,n){if(!l)return this;t=t.split(" ");for(var e=this,i=function(t){n.call(e,t)},u=0;t.length>u;u++){var s=t[u],r=s;s=r.split(".")[0],a.push({idx:r,func:i}),this.sound.addEventListener(s,i,!0)}return this},this.unbind=function(t){if(!l)return this;t=t.split(" ");for(var n=0;t.length>n;n++)for(var e=t[n],i=e.split(".")[0],u=0;a.length>u;u++){var s=a[u].idx.split(".");(a[u].idx==e||s[1]&&s[1]==e.replace(".",""))&&(this.sound.removeEventListener(i,a[u].func,!0),a.splice(u,1))}return this},this.bindOnce=function(t,n){if(!l)return this;var e=this;return h[o++]=!1,this.bind(t+"."+o,function(){h[o]||(h[o]=!0,n.call(e)),e.unbind(t+"."+o)}),this},this.trigger=function(t){if(!l)return this;t=t.split(" ");for(var n=0;t.length>n;n++)for(var e=t[n],i=0;a.length>i;i++){var u=a[i].idx.split(".");if(a[i].idx==e||u[0]&&u[0]==e.replace(".","")){var s=r.createEvent("HTMLEvents");s.initEvent(u[0],!1,!0),this.sound.dispatchEvent(s)}}return this},this.fadeTo=function(n,e,i){function u(){setTimeout(function(){n>s&&n>o.volume?(o.setVolume(o.volume+=1),u()):s>n&&o.volume>n?(o.setVolume(o.volume-=1),u()):i instanceof Function&&i.apply(o)},r)}if(!l)return this;e instanceof Function?(i=e,e=t.defaults.duration):e=e||t.defaults.duration;var s=this.volume,r=e/Math.abs(s-n),o=this;return this.play(),this.whenReady(function(){u()}),this},this.fadeIn=function(t,n){return l?this.setVolume(0).fadeTo(100,t,n):this},this.fadeOut=function(t,n){return l?this.fadeTo(0,t,n):this},this.fadeWith=function(t,n){return l?(this.fadeOut(n,function(){this.stop()}),t.play().fadeIn(n),this):this},this.whenReady=function(t){if(!l)return null;var n=this;0===this.sound.readyState?this.bind("canplay.buzzwhenready",function(){t.call(n)}):t.call(n)},l&&n){for(var d in t.defaults)t.defaults.hasOwnProperty(d)&&(e[d]=e[d]||t.defaults[d]);if(this.sound=r.createElement("audio"),n instanceof Array)for(var c in n)n.hasOwnProperty(c)&&s(this.sound,n[c]);else if(e.formats.length)for(var f in e.formats)e.formats.hasOwnProperty(f)&&s(this.sound,n+"."+e.formats[f]);else s(this.sound,n);e.loop&&this.loop(),e.autoplay&&(this.sound.autoplay="autoplay"),this.sound.preload=e.preload===!0?"auto":e.preload===!1?"none":e.preload,this.setVolume(e.volume),t.sounds.push(this)}},group:function(t){function n(){for(var n=e(null,arguments),i=n.shift(),u=0;t.length>u;u++)t[u][i].apply(t[u],n)}function e(t,n){return t instanceof Array?t:Array.prototype.slice.call(n)}t=e(t,arguments),this.getSounds=function(){return t},this.add=function(n){n=e(n,arguments);for(var i=0;n.length>i;i++)t.push(n[i])},this.remove=function(n){n=e(n,arguments);for(var i=0;n.length>i;i++)for(var u=0;t.length>u;u++)if(t[u]==n[i]){t.splice(u,1);break}},this.load=function(){return n("load"),this},this.play=function(){return n("play"),this},this.togglePlay=function(){return n("togglePlay"),this},this.pause=function(t){return n("pause",t),this},this.stop=function(){return n("stop"),this},this.mute=function(){return n("mute"),this},this.unmute=function(){return n("unmute"),this},this.toggleMute=function(){return n("toggleMute"),this},this.setVolume=function(t){return n("setVolume",t),this},this.increaseVolume=function(t){return n("increaseVolume",t),this},this.decreaseVolume=function(t){return n("decreaseVolume",t),this},this.loop=function(){return n("loop"),this},this.unloop=function(){return n("unloop"),this},this.setTime=function(t){return n("setTime",t),this},this.set=function(t,e){return n("set",t,e),this},this.bind=function(t,e){return n("bind",t,e),this},this.unbind=function(t){return n("unbind",t),this},this.bindOnce=function(t,e){return n("bindOnce",t,e),this},this.trigger=function(t){return n("trigger",t),this},this.fade=function(t,e,i,u){return n("fade",t,e,i,u),this},this.fadeIn=function(t,e){return n("fadeIn",t,e),this},this.fadeOut=function(t,e){return n("fadeOut",t,e),this}},all:function(){return new t.group(t.sounds)},isSupported:function(){return!!t.el.canPlayType},isOGGSupported:function(){return!!t.el.canPlayType&&t.el.canPlayType('audio/ogg; codecs="vorbis"')},isWAVSupported:function(){return!!t.el.canPlayType&&t.el.canPlayType('audio/wav; codecs="1"')},isMP3Supported:function(){return!!t.el.canPlayType&&t.el.canPlayType("audio/mpeg;")},isAACSupported:function(){return!!t.el.canPlayType&&(t.el.canPlayType("audio/x-m4a;")||t.el.canPlayType("audio/aac;"))},toTimer:function(t,n){var e,i,u;return e=Math.floor(t/3600),e=isNaN(e)?"--":e>=10?e:"0"+e,i=n?Math.floor(t/60%60):Math.floor(t/60),i=isNaN(i)?"--":i>=10?i:"0"+i,u=Math.floor(t%60),u=isNaN(u)?"--":u>=10?u:"0"+u,n?e+":"+i+":"+u:i+":"+u},fromTimer:function(t){var n=(""+t).split(":");return n&&3==n.length&&(t=3600*parseInt(n[0],10)+60*parseInt(n[1],10)+parseInt(n[2],10)),n&&2==n.length&&(t=60*parseInt(n[0],10)+parseInt(n[1],10)),t},toPercent:function(t,n,e){var i=Math.pow(10,e||0);return Math.round(100*t/n*i)/i},fromPercent:function(t,n,e){var i=Math.pow(10,e||0);return Math.round(n/100*t*i)/i}};return t}); \ No newline at end of file diff --git a/src/meta/js.js b/src/meta/js.js index 14356019c3..9476141ed1 100644 --- a/src/meta/js.js +++ b/src/meta/js.js @@ -32,7 +32,6 @@ module.exports = function(Meta) { 'public/vendor/tinycon/tinycon.js', 'public/vendor/xregexp/xregexp.js', 'public/vendor/xregexp/unicode/unicode-base.js', - 'public/vendor/buzz/buzz.min.js', 'public/vendor/autosize.js', './node_modules/templates.js/lib/templates.js', 'public/src/utils.js', @@ -84,7 +83,9 @@ module.exports = function(Meta) { // modules listed below are symlinked to public/src/modules so they can be defined anonymously modules: [ './node_modules/chart.js/Chart.js', - './node_modules/mousetrap/mousetrap.js' + './node_modules/mousetrap/mousetrap.js', + + 'public/vendor/buzz/buzz.js' ] } }; diff --git a/src/views/admin/header.tpl b/src/views/admin/header.tpl index ca1bf47f82..476ebda7a6 100644 --- a/src/views/admin/header.tpl +++ b/src/views/admin/header.tpl @@ -37,8 +37,7 @@ paths: { 'forum': '../client', 'admin': '../admin', - 'vendor': '../../vendor', - 'buzz': '../../vendor/buzz/buzz.min' + 'vendor': '../../vendor' } }); diff --git a/src/views/partials/requirejs-config.tpl b/src/views/partials/requirejs-config.tpl index 9ad5ea48fc..2d7332afd9 100644 --- a/src/views/partials/requirejs-config.tpl +++ b/src/views/partials/requirejs-config.tpl @@ -6,8 +6,7 @@ paths: { 'forum': '../client', 'admin': '../admin', - 'vendor': '../../vendor', - 'mousetrap': '../../bower/mousetrap/mousetrap' + 'vendor': '../../vendor' } }); \ No newline at end of file From a8411d44fdc7bd143ec34a73e98caff0584bf4b4 Mon Sep 17 00:00:00 2001 From: akhoury Date: Sun, 28 Feb 2016 14:52:51 -0500 Subject: [PATCH 0010/1109] merge --- src/socket.io/index.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/socket.io/index.js b/src/socket.io/index.js index 8f176e5241..de504ab523 100644 --- a/src/socket.io/index.js +++ b/src/socket.io/index.js @@ -1,11 +1,5 @@ "use strict"; -var SocketIO = require('socket.io'), - socketioWildcard = require('socketio-wildcard')(), - async = require('async'), - nconf = require('nconf'), - cookieParser = require('cookie-parser')(nconf.get('secret')), - winston = require('winston'), var SocketIO = require('socket.io'); var socketioWildcard = require('socketio-wildcard')(); var async = require('async'); From 509676fdf40d17a6867418d7d6ad176e4f0d028e Mon Sep 17 00:00:00 2001 From: akhoury Date: Sun, 28 Feb 2016 15:24:31 -0500 Subject: [PATCH 0011/1109] add deprecation warnings for CLS --- src/plugins/hooks.js | 48 +++++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/src/plugins/hooks.js b/src/plugins/hooks.js index 7148654eeb..04691bce71 100644 --- a/src/plugins/hooks.js +++ b/src/plugins/hooks.js @@ -10,8 +10,27 @@ module.exports = function(Plugins) { 'action:user.loggedOut': 'static:user.loggedOut' }; - // todo: remove when breaking all hooks params by removing req/res/socket/uid - Plugins.clsDeprecatedParamsWarnedHooks = {}; + Plugins.deprecatedHooksParams = { + 'action:homepage.get': '{req, res}', + 'filter:register.check': '{req, res}', + 'action:user.loggedOut': '{req, res}', + 'static:user.loggedOut': '{req, res}', + 'filter:categories.build': '{req, res}', + 'filter:category.build': '{req, res}', + 'filter:group.build': '{req, res}', + 'filter:register.build': '{req, res}', + 'filter:composer.build': '{req, res}', + 'filter:popular.build': '{req, res}', + 'filter:recent.build': '{req, res}', + 'filter:topic.build': '{req, res}', + 'filter:users.build': '{req, res}', + 'filter:admin.category.get': '{req, res}', + 'filter:middleware.renderHeader': '{req, res}', + 'filter:widget.render': '{req, res}', + 'filter:middleware.buildHeader': '{req, locals}', + 'action:middleware.pageView': '{req}', + 'action:meta.override404': '{req}' + }; /* `data` is an object consisting of (* is required): @@ -38,6 +57,17 @@ module.exports = function(Plugins) { 'there is no alternative.' ) ); + } else { + // handle hook's startsWith, i.e. action:homepage.get + var _parts = data.hook.split(':'); + _parts.pop(); + var _hook = _parts.join(':'); + if (Plugins.deprecatedHooksParams[_hook]) { + winston.warn('[plugins/' + id + '] Hook `' + _hook + '` parameters: `' + Plugins.deprecatedHooksParams[_hook] + '`, are being deprecated, ' + + 'all plugins should now use the `middleware/cls` module instead of hook\'s arguments to get a reference to the `req`, `res` and/or `socket` object(s) (from which you can get the current `uid` if you need to.) ' + + '- for more info, visit https://docs.nodebb.org/en/latest/plugins/create.html#getting-a-reference-to-req-res-socket-and-uid-within-any-plugin-hook') + delete Plugins.deprecatedHooksParams[_hook]; + } } if (data.hook && data.method) { @@ -74,20 +104,6 @@ module.exports = function(Plugins) { var hookList = Plugins.loadedHooks[hook]; var hookType = hook.split(':')[0]; - // todo: remove when breaking all hooks params by removing req/res/socket/uid - if (!Plugins.clsDeprecatedParamsWarnedHooks[hook] - && params - && Array.isArray(hookList) - && hookList.length - && (params.req || params.res || params.socket || params.uid)) { - - Plugins.clsDeprecatedParamsWarnedHooks[hook] = true; - - winston.warn('[plugins] hook `' + hook + '` \'s `params.req`, `params.res`, `params.uid` and `params.socket` are being deprecated, ' - + 'plugins should use the `middleware/cls` module instead to get a reference to the http-req/res and socket (which you can get the current `uid`) ' - + '- for more info, visit https://docs.nodebb.org/en/latest/plugins/create.html#getting-a-reference-to-req-res-socket-and-uid-within-any-plugin-hook'); - } - switch (hookType) { case 'filter': fireFilterHook(hook, hookList, params, callback); From cd99a469185c9f9f77c9c98cbd74b9920a68a38e Mon Sep 17 00:00:00 2001 From: pichalite Date: Mon, 29 Feb 2016 06:19:43 +0000 Subject: [PATCH 0012/1109] don't show rooms without messages --- public/src/modules/chat.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/src/modules/chat.js b/public/src/modules/chat.js index 7721b6e70a..15cda10308 100644 --- a/public/src/modules/chat.js +++ b/public/src/modules/chat.js @@ -83,7 +83,9 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra return app.alertError(err.message); } - var rooms = data.rooms; + var rooms = data.rooms.filter(function(room) { + return room.teaser; + }); chatsListEl.empty(); From b73af30a2bb9677aa93d04bbefc30c209a694f6d Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Sat, 12 Mar 2016 10:57:31 -0500 Subject: [PATCH 0013/1109] added git ignore file for modules directory --- public/src/modules/.gitignore | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 public/src/modules/.gitignore diff --git a/public/src/modules/.gitignore b/public/src/modules/.gitignore new file mode 100644 index 0000000000..d18329c844 --- /dev/null +++ b/public/src/modules/.gitignore @@ -0,0 +1,35 @@ +# Warning: This directory contains auto-generated files (symlinked), and should +# not be tracked by git. If you want to specifically have a file tracked by git, +# please include it in this file. + + + +# Ignore all files in this directory... +/* + +# except these folders... +!/settings + +# and these files... +!/.gitignore +!/alerts.js +!/autocomplete.js +!/chat.js +!/components.js +!/coverPhoto.js +!/csrf.js +!/helpers.js +!/iconSelect.js +!/navigator.js +!/notifications.js +!/postSelect.js +!/search.js +!/settings.js +!/share.js +!/sort.js +!/sounds.js +!/string.js +!/taskbar.js +!/topicSelect.js +!/translator.js +!/uploader.js From ad16c3db6b8a4a0bcc16f075e4d25d1653b49b1a Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 4 Apr 2016 18:51:10 -0400 Subject: [PATCH 0014/1109] updated Gruntfile to ignore js files in public/src/modules --- Gruntfile.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Gruntfile.js b/Gruntfile.js index a6aca2083a..f02fa6bf19 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -70,6 +70,7 @@ module.exports = function(grunt) { clientUpdated: { files: [ 'public/src/**/*.js', + '!public/src/modules/*.js', 'node_modules/nodebb-*/*.js', 'node_modules/nodebb-*/**/*.js', '!node_modules/nodebb-*/node_modules/**', 'node_modules/templates.js/lib/templates.js', From 94a505a6bbca6d36332ef723bdf88d3fff3ad72c Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 4 Apr 2016 20:43:21 -0400 Subject: [PATCH 0015/1109] removed symlink logic and using route bridging instead. Also allowed plugins to define modules from their plugin.json --- Gruntfile.js | 1 - public/src/modules/.gitignore | 35 --------------------------------- src/meta.js | 1 - src/meta/js.js | 37 +++++++++++++---------------------- src/plugins/load.js | 25 ++++++++++++++++++++--- src/webserver.js | 2 +- 6 files changed, 37 insertions(+), 64 deletions(-) delete mode 100644 public/src/modules/.gitignore diff --git a/Gruntfile.js b/Gruntfile.js index f02fa6bf19..a6aca2083a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -70,7 +70,6 @@ module.exports = function(grunt) { clientUpdated: { files: [ 'public/src/**/*.js', - '!public/src/modules/*.js', 'node_modules/nodebb-*/*.js', 'node_modules/nodebb-*/**/*.js', '!node_modules/nodebb-*/node_modules/**', 'node_modules/templates.js/lib/templates.js', diff --git a/public/src/modules/.gitignore b/public/src/modules/.gitignore deleted file mode 100644 index d18329c844..0000000000 --- a/public/src/modules/.gitignore +++ /dev/null @@ -1,35 +0,0 @@ -# Warning: This directory contains auto-generated files (symlinked), and should -# not be tracked by git. If you want to specifically have a file tracked by git, -# please include it in this file. - - - -# Ignore all files in this directory... -/* - -# except these folders... -!/settings - -# and these files... -!/.gitignore -!/alerts.js -!/autocomplete.js -!/chat.js -!/components.js -!/coverPhoto.js -!/csrf.js -!/helpers.js -!/iconSelect.js -!/navigator.js -!/notifications.js -!/postSelect.js -!/search.js -!/settings.js -!/share.js -!/sort.js -!/sounds.js -!/string.js -!/taskbar.js -!/topicSelect.js -!/translator.js -!/uploader.js diff --git a/src/meta.js b/src/meta.js index 78251d4996..ffc85c98bf 100644 --- a/src/meta.js +++ b/src/meta.js @@ -61,7 +61,6 @@ var async = require('async'), async.apply(plugins.clearRequireCache), async.apply(plugins.reload), async.apply(plugins.reloadRoutes), - async.apply(Meta.js.symlinkModules), async.apply(Meta.css.minify), async.apply(Meta.js.minify, 'nodebb.min.js'), async.apply(Meta.js.minify, 'acp.min.js'), diff --git a/src/meta/js.js b/src/meta/js.js index eaa7824705..168dce916c 100644 --- a/src/meta/js.js +++ b/src/meta/js.js @@ -6,7 +6,6 @@ var winston = require('winston'), async = require('async'), nconf = require('nconf'), fs = require('fs'), - rimraf = require('rimraf'), file = require('../file'), plugins = require('../plugins'), emitter = require('../emitter'), @@ -79,7 +78,7 @@ module.exports = function(Meta) { 'public/src/modules/string.js' ], - // modules listed below are symlinked to public/src/modules so they can be defined anonymously + // modules listed below are routed through express (/src/modules) so they can be defined anonymously modules: [ './node_modules/chart.js/Chart.js', './node_modules/mousetrap/mousetrap.js', @@ -89,38 +88,30 @@ module.exports = function(Meta) { } }; - Meta.js.symlinkModules = function(callback) { - // Symlink all defined modules to /public/src/modules - var modulesLoaded = 0, - targetPath; + Meta.js.bridgeModules = function(app, callback) { + // Add routes for AMD-type modules to serve those files + console.log('bridging modules:', Meta.js.scripts.modules); + var numBridged = 0; async.series([ function(next) { async.each(Meta.js.scripts.modules, function(localPath, next) { - targetPath = path.join(__dirname, '../../public/src/modules', path.basename(localPath)); - - async.waterfall([ - async.apply(fs.access, localPath, fs.R_OK), - async.apply(rimraf, targetPath), - async.apply(fs.link, localPath, targetPath) - ], function(err) { - if (err) { - winston.error('[meta/js] Could not symlink `' + localPath + '` to modules folder'); - } else { - winston.verbose('[meta/js] Symlinked `' + localPath + '` to modules folder'); - ++modulesLoaded; - } - - next(err); + app.get(path.join('/src/modules/', path.basename(localPath)), function(req, res) { + return res.sendFile(path.join(__dirname, '../../', localPath), { + maxAge: app.enabled('cache') ? 5184000000 : 0 + }); }); + + ++numBridged; + next(); }, next); } ], function(err) { if (err) { - winston.error('[meta/js] Encountered error while symlinking modules:' + err.message); + winston.error('[meta/js] Encountered error while bridging modules:' + err.message); } - winston.verbose('[meta/js] ' + modulesLoaded + ' of ' + Meta.js.scripts.modules.length + ' modules symlinked'); + winston.verbose('[meta/js] ' + numBridged + ' of ' + Meta.js.scripts.modules.length + ' modules bridged'); callback(err); }); }; diff --git a/src/plugins/load.js b/src/plugins/load.js index cf1ff27d9a..676008a85c 100644 --- a/src/plugins/load.js +++ b/src/plugins/load.js @@ -7,8 +7,10 @@ var fs = require('fs'), winston = require('winston'), nconf = require('nconf'), _ = require('underscore'), - file = require('../file'), - utils = require('../../public/src/utils'); + file = require('../file'); + +var utils = require('../../public/src/utils'), + meta = require('../meta'); module.exports = function(Plugins) { @@ -40,6 +42,9 @@ module.exports = function(Plugins) { function(next) { mapClientSideScripts(pluginData, next); }, + function(next) { + mapClientModules(pluginData, next); + }, function(next) { loadLanguages(pluginData, next); } @@ -163,7 +168,21 @@ module.exports = function(Plugins) { } callback(); - } + }; + + function mapClientModules(pluginData, callback) { + if (Array.isArray(pluginData.modules)) { + if (global.env === 'development') { + winston.verbose('[plugins] Found ' + pluginData.modules.length + ' AMD-style module(s) for plugin ' + pluginData.id); + } + + meta.js.scripts.modules = meta.js.scripts.modules.concat(pluginData.modules.map(function(file) { + return path.join('./node_modules/', pluginData.id, file); + })); + } + + callback(); + }; function loadLanguages(pluginData, callback) { if (typeof pluginData.languages !== 'string') { diff --git a/src/webserver.js b/src/webserver.js index 03375c4281..e667862561 100644 --- a/src/webserver.js +++ b/src/webserver.js @@ -84,10 +84,10 @@ function initializeNodeBB(callback) { function(next) { plugins.init(app, middleware, next); }, + async.apply(meta.js.bridgeModules, app), function(next) { async.series([ async.apply(meta.templates.compile), - async.apply(meta.js.symlinkModules), async.apply(!skipJS ? meta.js.minify : meta.js.getFromFile, 'nodebb.min.js'), async.apply(!skipJS ? meta.js.minify : meta.js.getFromFile, 'acp.min.js'), async.apply(meta.css.minify), From b6a10c77293d5a5993b8412470c89e4803ce4fbe Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 4 Apr 2016 21:26:49 -0400 Subject: [PATCH 0016/1109] removed console log --- src/meta/js.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/meta/js.js b/src/meta/js.js index 168dce916c..63c265a9cf 100644 --- a/src/meta/js.js +++ b/src/meta/js.js @@ -90,7 +90,6 @@ module.exports = function(Meta) { Meta.js.bridgeModules = function(app, callback) { // Add routes for AMD-type modules to serve those files - console.log('bridging modules:', Meta.js.scripts.modules); var numBridged = 0; async.series([ From bf73c0de5f028f04882e8522045cb3f8ef5d4c94 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 5 Apr 2016 21:34:53 -0400 Subject: [PATCH 0017/1109] closes #3286 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 53958971bd..f00ed4dcac 100644 --- a/package.json +++ b/package.json @@ -54,8 +54,8 @@ "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", "nodebb-theme-lavender": "3.0.9", - "nodebb-theme-persona": "4.0.115", - "nodebb-theme-vanilla": "5.0.61", + "nodebb-theme-persona": "4.0.117", + "nodebb-theme-vanilla": "5.0.62", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", "nodemailer-sendmail-transport": "1.0.0", From 0d0e4fa94feb1803fcb83d192db184b5d93c4855 Mon Sep 17 00:00:00 2001 From: Ole R Date: Wed, 6 Apr 2016 23:57:45 +0200 Subject: [PATCH 0018/1109] Update dependencies --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f00ed4dcac..b194a0484a 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,8 @@ "nconf": "~0.8.2", "nodebb-plugin-composer-default": "3.0.19", "nodebb-plugin-dbsearch": "1.0.1", - "nodebb-plugin-emoji-apple": "1.0.3", - "nodebb-plugin-emoji-extended": "1.0.5", + "nodebb-plugin-emoji-one": "1.1.0", + "nodebb-plugin-emoji-extended": "1.1.0", "nodebb-plugin-markdown": "5.0.1", "nodebb-plugin-mentions": "1.0.21", "nodebb-plugin-soundpack-default": "0.1.6", From 5023935baf2cc1d75d0a4285fe39b5c0f130e6e9 Mon Sep 17 00:00:00 2001 From: Ole R Date: Wed, 6 Apr 2016 23:58:48 +0200 Subject: [PATCH 0019/1109] Enable nodebb-plugin-emoji-one by default --- src/install.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/install.js b/src/install.js index aae92e5c23..900a0e3ee4 100644 --- a/src/install.js +++ b/src/install.js @@ -441,7 +441,7 @@ function enableDefaultPlugins(next) { 'nodebb-rewards-essentials', 'nodebb-plugin-soundpack-default', 'nodebb-plugin-emoji-extended', - 'nodebb-plugin-emoji-apple' + 'nodebb-plugin-emoji-one' ], customDefaults = nconf.get('defaultPlugins'); From 430adc366c18573fce174a89e699fdc324f1769d Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 6 Apr 2016 21:49:43 -0400 Subject: [PATCH 0020/1109] fix #4498 --- public/src/modules/navigator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/modules/navigator.js b/public/src/modules/navigator.js index 3d65f6b8a0..0d1747598c 100644 --- a/public/src/modules/navigator.js +++ b/public/src/modules/navigator.js @@ -131,7 +131,7 @@ define('navigator', ['forum/pagination', 'components'], function(pagination, com } // If a threshold is undefined, try to determine one based on new index - if (threshold === undefined) { + if (threshold === undefined && ajaxify.data.template.topic === true) { if (atTop) { threshold = 0; } else { From 2e65e8ae7d5845d64e3615bb4d4b1e333d8bdbc7 Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Thu, 7 Apr 2016 09:02:29 -0400 Subject: [PATCH 0021/1109] Latest translations and fallbacks --- public/language/ms/notifications.json | 12 ++++++------ public/language/ms/uploads.json | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/public/language/ms/notifications.json b/public/language/ms/notifications.json index dab972b82d..51291962f1 100644 --- a/public/language/ms/notifications.json +++ b/public/language/ms/notifications.json @@ -13,15 +13,15 @@ "new_message_from": "Pesanan baru daripada %1", "upvoted_your_post_in": "%1 telah mengundi naik kiriman and di %2.", "upvoted_your_post_in_dual": "%1dan %2 telah menambah undi pada kiriman anda di %3.", - "upvoted_your_post_in_multiple": "%1 dan %2 lagi telah menambah undi pada kiriman anda di %3. ", + "upvoted_your_post_in_multiple": "%1 dan %2 lagi telah menambah undi pada kiriman anda di %3.", "moved_your_post": "%1 telah memindahkan kiriman anda ke %2", "moved_your_topic": "%1 telah memindahkan %2", - "favourited_your_post_in": "%1 has bookmarked your post in %2.", - "favourited_your_post_in_dual": "%1 and %2 have bookmarked your post in %3.", - "favourited_your_post_in_multiple": "%1 and %2 others have bookmarked your post in %3.", + "favourited_your_post_in": "%1 telah menyukai kiriman anda di %2.", + "favourited_your_post_in_dual": "%1 dan %2 telah menyukai kiriman anda di %3.", + "favourited_your_post_in_multiple": "%1 dan %2 yang lain, telah menyukai kiriman anda di %3.", "user_flagged_post_in": "%1 menanda kiriman anda di %2", "user_flagged_post_in_dual": "%1 dan %2 telah menanda kiriman anda pada %3", - "user_flagged_post_in_multiple": "%1 dan %2 lagi telah mendanda kiriman anda pada %3", + "user_flagged_post_in_multiple": "%1 dan %2 lagi telah menanda kiriman anda pada %3", "user_posted_to": "%1 telah membalas kiriman kepada: %2", "user_posted_to_dual": "%1 dan %2 membalas kiriman : %3", "user_posted_to_multiple": "%1 dan %2 lagu membalas kiriman: %3", @@ -30,7 +30,7 @@ "user_started_following_you_dual": "%1 dan %2 mula mengikuti anda.", "user_started_following_you_multiple": "%1 dan %2 lagi mula mengikuti anda.", "new_register": "%1 menghantar jemputan pendaftaran.", - "new_register_multiple": "There are %1 registration requests awaiting review.", + "new_register_multiple": "Ada %1 permohonan ingin daftar yang sedang menunggu pengesahan.", "email-confirmed": "Emel Disahkan", "email-confirmed-message": "Terima kasih kerana mengesahkan emel anda. Akaun anda telah diaktifkan sepenuhnya.", "email-confirm-error-message": "Berlaku masalah semasa mengesahkan emel anda. Mungkin kod tidak sah atau tamat tempoh.", diff --git a/public/language/ms/uploads.json b/public/language/ms/uploads.json index 1622cb5693..c637c43fad 100644 --- a/public/language/ms/uploads.json +++ b/public/language/ms/uploads.json @@ -1,6 +1,6 @@ { - "uploading-file": "Uploading the file...", - "select-file-to-upload": "Select a file to upload!", - "upload-success": "File uploaded successfully!", - "maximum-file-size": "Maximum %1 kb" + "uploading-file": "Sedang memuatnaik fail...", + "select-file-to-upload": "Pilih fail yang hendak dimuatnaik!", + "upload-success": "Muatnaik fail berjaya!", + "maximum-file-size": "Maksima %1 kb" } \ No newline at end of file From ba44db5b5b6450c49226a18d1304c4e0de45b1e8 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 7 Apr 2016 10:47:13 -0400 Subject: [PATCH 0022/1109] updated dependency check logic to better handle missing dependencies --- app.js | 4 ++++ src/meta/dependencies.js | 20 +++++++++++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/app.js b/app.js index ed5238285e..fa8964fb35 100644 --- a/app.js +++ b/app.js @@ -207,6 +207,10 @@ function start() { winston.warn('One or more of NodeBB\'s dependent packages are out-of-date. Please run the following command to update them:'); winston.warn(' ./nodebb upgrade'); break; + case 'dependencies-missing': + winston.warn('One or more of NodeBB\'s dependent packages are missing. Please run the following command to update them:'); + winston.warn(' ./nodebb upgrade'); + break; default: if (err.stacktrace !== false) { winston.error(err.stack); diff --git a/src/meta/dependencies.js b/src/meta/dependencies.js index 5482ad3e7f..7da86113cf 100644 --- a/src/meta/dependencies.js +++ b/src/meta/dependencies.js @@ -12,7 +12,9 @@ module.exports = function(Meta) { Meta.dependencies = {}; Meta.dependencies.check = function(callback) { - var modules = Object.keys(pkg.dependencies); + var modules = Object.keys(pkg.dependencies), + depsOutdated = false, + depsMissing = false; winston.verbose('Checking dependencies for outdated modules'); async.every(modules, function(module, next) { @@ -33,15 +35,23 @@ module.exports = function(Meta) { next(true); } else { process.stdout.write('[' + 'outdated'.yellow + '] ' + module.bold + ' installed v' + pkgData.version + ', package.json requires ' + pkg.dependencies[module] + '\n'); - next(false); + depsOutdated = true; + next(true); } } catch(e) { - winston.error('[meta/dependencies] Could not read: ' + module); - process.exit(); + process.stdout.write('[' + 'missing'.red + '] ' + module.bold + ' is a required dependency but could not be found\n'); + depsMissing = true; + next(true); } }); }, function(ok) { - callback(!ok && global.env !== 'development' ? new Error('dependencies-out-of-date') : null); + if (depsMissing) { + callback(new Error('dependencies-missing')); + } else if (depsOutdated) { + callback(global.env !== 'development' ? new Error('dependencies-out-of-date') : null); + } else { + callback(null); + } }); }; }; From a9f966f23c4e56189fdfeae27a2111c312eff0e4 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 7 Apr 2016 11:32:18 -0400 Subject: [PATCH 0023/1109] closes #4503, /cc @BenLubar --- package.json | 4 ++-- public/language/en_GB/user.json | 3 +++ public/src/client/topic/posts.js | 2 +- src/controllers/api.js | 1 + src/user/settings.js | 2 ++ 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 85b43ccb9f..18a2444b9e 100644 --- a/package.json +++ b/package.json @@ -56,8 +56,8 @@ "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", "nodebb-theme-lavender": "3.0.9", - "nodebb-theme-persona": "4.0.117", - "nodebb-theme-vanilla": "5.0.62", + "nodebb-theme-persona": "4.0.118", + "nodebb-theme-vanilla": "5.0.63", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", "nodemailer-sendmail-transport": "1.0.0", diff --git a/public/language/en_GB/user.json b/public/language/en_GB/user.json index 07c85aa19f..a6ae357177 100644 --- a/public/language/en_GB/user.json +++ b/public/language/en_GB/user.json @@ -104,6 +104,9 @@ "enable_topic_searching": "Enable In-Topic Searching", "topic_search_help": "If enabled, in-topic searching will override the browser's default page search behaviour and allow you to search through the entire topic, instead of what is only shown on screen", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", + "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", diff --git a/public/src/client/topic/posts.js b/public/src/client/topic/posts.js index b79067ec3b..996dcbc6b9 100644 --- a/public/src/client/topic/posts.js +++ b/public/src/client/topic/posts.js @@ -263,7 +263,7 @@ define('forum/topic/posts', [ var images = components.get('post/content').find('img[data-state="unloaded"]'), visible = images.filter(function() { - return utils.isElementInViewport(this); + return config.delayImageLoading ? utils.isElementInViewport(this) : true; }), scrollTop = $(window).scrollTop(), adjusting = false, diff --git a/src/controllers/api.js b/src/controllers/api.js index 77ae7131ad..8a109aa9df 100644 --- a/src/controllers/api.js +++ b/src/controllers/api.js @@ -79,6 +79,7 @@ apiController.getConfig = function(req, res, next) { config.topicPostSort = settings.topicPostSort || config.topicPostSort; config.categoryTopicSort = settings.categoryTopicSort || config.categoryTopicSort; config.topicSearchEnabled = settings.topicSearchEnabled || false; + config.delayImageLoading = settings.delayImageLoading !== undefined ? settings.delayImageLoading : true; config.bootswatchSkin = settings.bootswatchSkin || config.bootswatchSkin; next(null, config); }); diff --git a/src/user/settings.js b/src/user/settings.js index 04e23e1152..e37e012f7e 100644 --- a/src/user/settings.js +++ b/src/user/settings.js @@ -75,6 +75,7 @@ module.exports = function(User) { settings.sendPostNotifications = parseInt(getSetting(settings, 'sendPostNotifications', 0), 10) === 1; settings.restrictChat = parseInt(getSetting(settings, 'restrictChat', 0), 10) === 1; settings.topicSearchEnabled = parseInt(getSetting(settings, 'topicSearchEnabled', 0), 10) === 1; + settings.delayImageLoading = parseInt(getSetting(settings, 'delayImageLoading', 1), 10) === 1; settings.bootswatchSkin = settings.bootswatchSkin || 'default'; settings.scrollToMyPost = parseInt(getSetting(settings, 'scrollToMyPost', 1), 10) === 1; @@ -120,6 +121,7 @@ module.exports = function(User) { sendPostNotifications: data.sendPostNotifications, restrictChat: data.restrictChat, topicSearchEnabled: data.topicSearchEnabled, + delayImageLoading: data.delayImageLoading, groupTitle: data.groupTitle, homePageRoute: data.homePageCustom || data.homePageRoute, scrollToMyPost: data.scrollToMyPost From c88ed663120fdeafee404a4ba5678188e3742102 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Thu, 7 Apr 2016 16:55:41 -0400 Subject: [PATCH 0024/1109] closes #4502 --- src/meta/css.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/meta/css.js b/src/meta/css.js index 12c5d49c20..264267d7c6 100644 --- a/src/meta/css.js +++ b/src/meta/css.js @@ -68,6 +68,7 @@ module.exports = function(Meta) { source += '\n@import (inline) "..' + path.sep + '..' + path.sep + 'public/vendor/jquery/css/smoothness/jquery-ui-1.10.4.custom.min.css";'; source += '\n@import (inline) "..' + path.sep + '..' + path.sep + 'public/vendor/jquery/bootstrap-tagsinput/bootstrap-tagsinput.css";'; + source += '\n@import (inline) "..' + path.sep + 'public/vendor/colorpicker/colorpicker.css";'; source += '\n@import "..' + path.sep + '..' + path.sep + 'public/less/flags.less";'; source += '\n@import "..' + path.sep + '..' + path.sep + 'public/less/blacklist.less";'; source += '\n@import "..' + path.sep + '..' + path.sep + 'public/less/generics.less";'; From 0449e014f669050677ac08a392896274bc2bf58f Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 7 Apr 2016 17:47:17 -0400 Subject: [PATCH 0025/1109] updated some help text --- src/controllers/accounts/edit.js | 4 +++- src/views/admin/settings/uploads.tpl | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/controllers/accounts/edit.js b/src/controllers/accounts/edit.js index 09e824ecd9..2ae429b248 100644 --- a/src/controllers/accounts/edit.js +++ b/src/controllers/accounts/edit.js @@ -126,7 +126,9 @@ editController.uploadPicture = function (req, res, next) { } ], function(err, image) { fs.unlink(userPhoto.path, function(err) { - winston.error('unable to delete picture ' + userPhoto.path, err); + if (err) { + winston.warn('[user/picture] Unable to delete picture ' + userPhoto.path, err); + } }); if (err) { return next(err); diff --git a/src/views/admin/settings/uploads.tpl b/src/views/admin/settings/uploads.tpl index 76b053332b..4881f8dcd7 100644 --- a/src/views/admin/settings/uploads.tpl +++ b/src/views/admin/settings/uploads.tpl @@ -91,16 +91,25 @@
    +

    + (in pixels, default: 128 pixels) +

    +

    + (in kilobytes, default: 256 KiB) +

    +

    + (in kilobytes, default: 2,048 KiB) +

    From 4105565ed1cbd5f209d2d1a2e16e67ea0cde67e5 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 7 Apr 2016 17:50:53 -0400 Subject: [PATCH 0026/1109] upped composer version @BenLubar @RaceProUK --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 18a2444b9e..a973a3e5b1 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "morgan": "^1.3.2", "mousetrap": "^1.5.3", "nconf": "~0.8.2", - "nodebb-plugin-composer-default": "3.0.19", + "nodebb-plugin-composer-default": "3.0.20", "nodebb-plugin-dbsearch": "1.0.1", "nodebb-plugin-emoji-one": "1.1.0", "nodebb-plugin-emoji-extended": "1.1.0", From c89a02bfb910c52d2550f58f6b6b2362b0f5bc5c Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 7 Apr 2016 17:53:11 -0400 Subject: [PATCH 0027/1109] upped composer again --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a973a3e5b1..d817fbd210 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "morgan": "^1.3.2", "mousetrap": "^1.5.3", "nconf": "~0.8.2", - "nodebb-plugin-composer-default": "3.0.20", + "nodebb-plugin-composer-default": "3.0.21", "nodebb-plugin-dbsearch": "1.0.1", "nodebb-plugin-emoji-one": "1.1.0", "nodebb-plugin-emoji-extended": "1.1.0", From e481ed21eb056fd4c37a779c8df20b4c7771b36f Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 7 Apr 2016 21:22:56 -0400 Subject: [PATCH 0028/1109] Using pid as discriminator for mergeId ... for favourite and upvote notifications. --- src/socket.io/helpers.js | 2 +- src/socket.io/posts/favourites.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/socket.io/helpers.js b/src/socket.io/helpers.js index 12a0e9d9b5..e4621811ca 100644 --- a/src/socket.io/helpers.js +++ b/src/socket.io/helpers.js @@ -80,7 +80,7 @@ SocketHelpers.sendNotificationToPostOwner = function(pid, fromuid, notification) pid: pid, nid: 'post:' + pid + ':uid:' + fromuid, from: fromuid, - mergeId: notification + '|' + postData.tid, + mergeId: notification + '|' + pid, topicTitle: results.topicTitle }, function(err, notification) { if (!err && notification) { diff --git a/src/socket.io/posts/favourites.js b/src/socket.io/posts/favourites.js index 6883ece06a..3d93afac08 100644 --- a/src/socket.io/posts/favourites.js +++ b/src/socket.io/posts/favourites.js @@ -124,11 +124,11 @@ module.exports = function(SocketPosts) { /* hooks: - filter.post.upvote - filter.post.downvote - filter.post.unvote - filter.post.favourite - filter.post.unfavourite + filter:post.upvote + filter:post.downvote + filter:post.unvote + filter:post.favourite + filter:post.unfavourite */ plugins.fireHook('filter:post.' + command, {data: data, uid: socket.uid}, function(err, filteredData) { if (err) { From a81285befa35899a8bd9c6aea656bf1fc2073903 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 8 Apr 2016 18:09:35 +0300 Subject: [PATCH 0029/1109] dont crash if category doesn't exist --- src/controllers/admin/categories.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/controllers/admin/categories.js b/src/controllers/admin/categories.js index 5444a087ea..04001e0f65 100644 --- a/src/controllers/admin/categories.js +++ b/src/controllers/admin/categories.js @@ -6,7 +6,7 @@ var categories = require('../../categories'); var privileges = require('../../privileges'); var analytics = require('../../analytics'); var plugins = require('../../plugins'); -var translator = require('../../../public/src/modules/translator') +var translator = require('../../../public/src/modules/translator'); var categoriesController = {}; @@ -19,12 +19,17 @@ categoriesController.get = function(req, res, next) { if (err) { return next(err); } + var category = data.category[0]; - plugins.fireHook('filter:admin.category.get', { req: req, res: res, category: data.category[0], privileges: data.privileges }, function(err, data) { + if (!category) { + return next(); + } + + plugins.fireHook('filter:admin.category.get', { req: req, res: res, category: category, privileges: data.privileges }, function(err, data) { if (err) { return next(err); } - data.category.name = translator.escape(data.category.name); + data.category.name = translator.escape(String(data.category.name)); res.render('admin/manage/category', { category: data.category, privileges: data.privileges From a61d9472956ca4d23bc70919ff32fb628c38433d Mon Sep 17 00:00:00 2001 From: Ben Lubar Date: Fri, 25 Mar 2016 22:18:49 -0500 Subject: [PATCH 0030/1109] allow filtering /unread to only topics that have not yet been seen --- src/controllers/unread.js | 5 +++-- src/topics/unread.js | 27 +++++++++++++++++++++------ 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/controllers/unread.js b/src/controllers/unread.js index d81774661f..d07c2d16a1 100644 --- a/src/controllers/unread.js +++ b/src/controllers/unread.js @@ -16,6 +16,7 @@ unreadController.get = function(req, res, next) { var stop = (parseInt(meta.config.topicsPerList, 10) || 20) - 1; var results; var cid = req.query.cid; + var seen = !req.query.unseen; async.waterfall([ function(next) { @@ -24,7 +25,7 @@ unreadController.get = function(req, res, next) { user.getWatchedCategories(req.uid, next); }, unreadTopics: function(next) { - topics.getUnreadTopics(cid, req.uid, 0, stop, next); + topics.getUnreadTopics(cid, req.uid, 0, stop, seen, next); } }, next); }, @@ -64,7 +65,7 @@ unreadController.get = function(req, res, next) { unreadController.unreadTotal = function(req, res, next) { - topics.getTotalUnread(req.uid, function (err, data) { + topics.getTotalUnread(req.uid, !req.query.unseen, function (err, data) { if (err) { return next(err); } diff --git a/src/topics/unread.js b/src/topics/unread.js index 28846640b7..713f4732fa 100644 --- a/src/topics/unread.js +++ b/src/topics/unread.js @@ -14,13 +14,23 @@ var utils = require('../../public/src/utils'); module.exports = function(Topics) { - Topics.getTotalUnread = function(uid, callback) { - Topics.getUnreadTids(0, uid, 0, 99, function(err, tids) { + Topics.getTotalUnread = function(uid, allowSeen, callback) { + if (!callback) { + callback = allowSeen; + allowSeen = true; + } + + Topics.getUnreadTids(0, uid, 0, 99, allowSeen, function(err, tids) { callback(err, tids ? tids.length : 0); }); }; - Topics.getUnreadTopics = function(cid, uid, start, stop, callback) { + Topics.getUnreadTopics = function(cid, uid, start, stop, allowSeen, callback) { + if (!callback) { + callback = allowSeen; + allowSeen = true; + } + var unreadTopics = { showSelect: true, @@ -30,7 +40,7 @@ module.exports = function(Topics) { async.waterfall([ function(next) { - Topics.getUnreadTids(cid, uid, start, stop, next); + Topics.getUnreadTids(cid, uid, start, stop, allowSeen, next); }, function(tids, next) { if (!tids.length) { @@ -54,7 +64,12 @@ module.exports = function(Topics) { return Date.now() - (parseInt(meta.config.unreadCutoff, 10) || 2) * 86400000; }; - Topics.getUnreadTids = function(cid, uid, start, stop, callback) { + Topics.getUnreadTids = function(cid, uid, start, stop, allowSeen, callback) { + if (!callback) { + callback = allowSeen; + allowSeen = true; + } + uid = parseInt(uid, 10); if (uid === 0) { return callback(null, []); @@ -95,7 +110,7 @@ module.exports = function(Topics) { }); var tids = results.recentTids.filter(function(recentTopic) { - return !userRead[recentTopic.value] || recentTopic.score > userRead[recentTopic.value]; + return !userRead[recentTopic.value] || allowSeen && recentTopic.score > userRead[recentTopic.value]; }).map(function(topic) { return topic.value; }).filter(function(tid, index, array) { From 217f0c5652cd313db5489874791c5c5b4d2b8f8a Mon Sep 17 00:00:00 2001 From: Ben Lubar Date: Fri, 8 Apr 2016 13:42:47 -0500 Subject: [PATCH 0031/1109] Switch to a named filter for unread to allow future expansion. Don't use the query string as it is not passed to infinite scroll. --- src/controllers/unread.js | 18 +++++++++++++++--- src/routes/api.js | 2 +- src/routes/index.js | 2 +- src/topics/unread.js | 29 +++++++++++++++++------------ 4 files changed, 34 insertions(+), 17 deletions(-) diff --git a/src/controllers/unread.js b/src/controllers/unread.js index d07c2d16a1..e7aacb2465 100644 --- a/src/controllers/unread.js +++ b/src/controllers/unread.js @@ -12,11 +12,17 @@ var plugins = require('../plugins'); var unreadController = {}; +var validFilter = {'': true, 'new': true}; + unreadController.get = function(req, res, next) { var stop = (parseInt(meta.config.topicsPerList, 10) || 20) - 1; var results; var cid = req.query.cid; - var seen = !req.query.unseen; + var filter = req.params.filter || ''; + + if (!validFilter[filter]) { + return next(); + } async.waterfall([ function(next) { @@ -25,7 +31,7 @@ unreadController.get = function(req, res, next) { user.getWatchedCategories(req.uid, next); }, unreadTopics: function(next) { - topics.getUnreadTopics(cid, req.uid, 0, stop, seen, next); + topics.getUnreadTopics(cid, req.uid, 0, stop, filter, next); } }, next); }, @@ -65,7 +71,13 @@ unreadController.get = function(req, res, next) { unreadController.unreadTotal = function(req, res, next) { - topics.getTotalUnread(req.uid, !req.query.unseen, function (err, data) { + var filter = req.params.filter || ''; + + if (!validFilter[filter]) { + return next(); + } + + topics.getTotalUnread(req.uid, filter, function (err, data) { if (err) { return next(err); } diff --git a/src/routes/api.js b/src/routes/api.js index 34cf142b37..4806663460 100644 --- a/src/routes/api.js +++ b/src/routes/api.js @@ -22,7 +22,7 @@ module.exports = function(app, middleware, controllers) { router.get('/categories/:cid/moderators', controllers.api.getModerators); router.get('/recent/posts/:term?', controllers.api.getRecentPosts); - router.get('/unread/total', middleware.authenticate, controllers.unread.unreadTotal); + router.get('/unread/:filter?/total', middleware.authenticate, controllers.unread.unreadTotal); router.get('/topic/teaser/:topic_id', controllers.topics.teaser); var multipart = require('connect-multiparty'); diff --git a/src/routes/index.js b/src/routes/index.js index a80eb2e46a..539f26b3db 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -55,7 +55,7 @@ function categoryRoutes(app, middleware, controllers) { setupPageRoute(app, '/categories', middleware, [], controllers.categories.list); setupPageRoute(app, '/popular/:term?', middleware, [], controllers.popular.get); setupPageRoute(app, '/recent', middleware, [], controllers.recent.get); - setupPageRoute(app, '/unread', middleware, [middleware.authenticate], controllers.unread.get); + setupPageRoute(app, '/unread/:filter?', middleware, [middleware.authenticate], controllers.unread.get); setupPageRoute(app, '/category/:category_id/:slug/:topic_index', middleware, [], controllers.category.get); setupPageRoute(app, '/category/:category_id/:slug?', middleware, [], controllers.category.get); diff --git a/src/topics/unread.js b/src/topics/unread.js index 713f4732fa..63941cd01a 100644 --- a/src/topics/unread.js +++ b/src/topics/unread.js @@ -14,21 +14,21 @@ var utils = require('../../public/src/utils'); module.exports = function(Topics) { - Topics.getTotalUnread = function(uid, allowSeen, callback) { + Topics.getTotalUnread = function(uid, filter, callback) { if (!callback) { - callback = allowSeen; - allowSeen = true; + callback = filter; + filter = ''; } - Topics.getUnreadTids(0, uid, 0, 99, allowSeen, function(err, tids) { + Topics.getUnreadTids(0, uid, 0, 99, filter, function(err, tids) { callback(err, tids ? tids.length : 0); }); }; - Topics.getUnreadTopics = function(cid, uid, start, stop, allowSeen, callback) { + Topics.getUnreadTopics = function(cid, uid, start, stop, filter, callback) { if (!callback) { - callback = allowSeen; - allowSeen = true; + callback = filter; + filter = ''; } @@ -40,7 +40,7 @@ module.exports = function(Topics) { async.waterfall([ function(next) { - Topics.getUnreadTids(cid, uid, start, stop, allowSeen, next); + Topics.getUnreadTids(cid, uid, start, stop, filter, next); }, function(tids, next) { if (!tids.length) { @@ -64,10 +64,10 @@ module.exports = function(Topics) { return Date.now() - (parseInt(meta.config.unreadCutoff, 10) || 2) * 86400000; }; - Topics.getUnreadTids = function(cid, uid, start, stop, allowSeen, callback) { + Topics.getUnreadTids = function(cid, uid, start, stop, filter, callback) { if (!callback) { - callback = allowSeen; - allowSeen = true; + callback = filter; + filter = ''; } uid = parseInt(uid, 10); @@ -110,7 +110,12 @@ module.exports = function(Topics) { }); var tids = results.recentTids.filter(function(recentTopic) { - return !userRead[recentTopic.value] || allowSeen && recentTopic.score > userRead[recentTopic.value]; + switch (filter) { + default: + return !userRead[recentTopic.value] || recentTopic.score > userRead[recentTopic.value]; + case 'new': + return !userRead[recentTopic.value]; + } }).map(function(topic) { return topic.value; }).filter(function(tid, index, array) { From 114e957b0f4a1ae50ecd4d84bb44fc64d6874dc5 Mon Sep 17 00:00:00 2001 From: Ben Lubar Date: Fri, 8 Apr 2016 13:54:51 -0500 Subject: [PATCH 0032/1109] add client-side unread count support for the "new" filter --- public/src/client/footer.js | 7 +++++++ src/socket.io/user.js | 1 + 2 files changed, 8 insertions(+) diff --git a/public/src/client/footer.js b/public/src/client/footer.js index d8e54d4fc3..f1d05d4bfe 100644 --- a/public/src/client/footer.js +++ b/public/src/client/footer.js @@ -13,6 +13,12 @@ define('forum/footer', ['notifications', 'chat', 'components', 'translator'], fu .attr('data-content', count > 99 ? '99+' : count); } + function updateUnreadNewTopicCount(count) { + $('#unread-new-count i') + .toggleClass('unread-count', count > 0) + .attr('data-content', count > 99 ? '99+' : count); + } + function updateUnreadChatCount(count) { components.get('chat/icon') .toggleClass('unread-count', count > 0) @@ -61,6 +67,7 @@ define('forum/footer', ['notifications', 'chat', 'components', 'translator'], fu } updateUnreadTopicCount(data.unreadTopicCount); + updateUnreadNewTopicCount(data.unreadNewTopicCount); updateUnreadChatCount(data.unreadChatCount); Notifications.updateNotifCount(data.unreadNotificationCount); }); diff --git a/src/socket.io/user.js b/src/socket.io/user.js index 06acacd520..8ca3e4231e 100644 --- a/src/socket.io/user.js +++ b/src/socket.io/user.js @@ -245,6 +245,7 @@ SocketUser.getUnreadCounts = function(socket, data, callback) { } async.parallel({ unreadTopicCount: async.apply(topics.getTotalUnread, socket.uid), + unreadNewTopicCount: async.apply(topics.getTotalUnread, socket.uid, 'new'), unreadChatCount: async.apply(messaging.getUnreadCount, socket.uid), unreadNotificationCount: async.apply(user.notifications.getUnreadCount, socket.uid) }, callback); From e23377580d3c02c7fa9148333e6e0e4685008e22 Mon Sep 17 00:00:00 2001 From: pichalite Date: Fri, 8 Apr 2016 23:55:10 +0000 Subject: [PATCH 0033/1109] fixes #4506 --- src/messaging/notifications.js | 2 +- src/views/emails/notif_chat.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/messaging/notifications.js b/src/messaging/notifications.js index c93cb16590..61f4f5d9ce 100644 --- a/src/messaging/notifications.js +++ b/src/messaging/notifications.js @@ -96,7 +96,7 @@ module.exports = function(Messaging) { message: messageObj, site_title: meta.config.title || 'NodeBB', url: nconf.get('url'), - fromUserslug: utils.slugify(messageObj.fromUser.username) + roomId: messageObj.roomId }, next); }, callback); }); diff --git a/src/views/emails/notif_chat.tpl b/src/views/emails/notif_chat.tpl index a0669f3bac..f1d5a5fc42 100644 --- a/src/views/emails/notif_chat.tpl +++ b/src/views/emails/notif_chat.tpl @@ -3,7 +3,7 @@

    {summary}:

    {message.content}
    -[[email:notif.chat.cta]] +[[email:notif.chat.cta]] From 006496efe350ed6d1dd82060b80c174b6a9635c2 Mon Sep 17 00:00:00 2001 From: Raphael Beer Date: Sun, 10 Apr 2016 14:09:33 +0200 Subject: [PATCH 0034/1109] Add pid to teaser ajaxify data --- src/controllers/categories.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/controllers/categories.js b/src/controllers/categories.js index 7ed087c704..aa882b9b43 100644 --- a/src/controllers/categories.js +++ b/src/controllers/categories.js @@ -66,7 +66,8 @@ categoriesController.list = function(req, res, next) { if (category && Array.isArray(category.posts) && category.posts.length) { category.teaser = { url: nconf.get('relative_path') + '/topic/' + category.posts[0].topic.slug + '/' + category.posts[0].index, - timestampISO: category.posts[0].timestampISO + timestampISO: category.posts[0].timestampISO, + pid: category.posts[0].pid }; } }); From f7ac1d89ffad60d810d639f53ca4303d9574021c Mon Sep 17 00:00:00 2001 From: barisusakli Date: Mon, 11 Apr 2016 14:40:54 +0300 Subject: [PATCH 0035/1109] fix undefined next --- src/routes/feeds.js | 4 ++-- src/sitemap.js | 23 +++++++++++------------ 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/routes/feeds.js b/src/routes/feeds.js index bfa2945fb5..09f3f1826e 100644 --- a/src/routes/feeds.js +++ b/src/routes/feeds.js @@ -107,7 +107,7 @@ function generateForUserTopics(req, res, callback) { } ], function(err, userData) { if (err) { - return next(err); + return callback(err); } generateForTopics({ @@ -116,7 +116,7 @@ function generateForUserTopics(req, res, callback) { description: 'A list of topics that are posted by ' + userData.username, feed_url: '/user/' + userslug + '/topics.rss', site_url: '/user/' + userslug + '/topics' - }, 'uid:' + userData.uid + ':topics', req, res, next); + }, 'uid:' + userData.uid + ':topics', req, res, callback); }); } diff --git a/src/sitemap.js b/src/sitemap.js index 4c7efb73b5..00bb195809 100644 --- a/src/sitemap.js +++ b/src/sitemap.js @@ -1,16 +1,15 @@ 'use strict'; -var path = require('path'), - async = require('async'), - sm = require('sitemap'), - url = require('url'), - nconf = require('nconf'), - db = require('./database'), - categories = require('./categories'), - topics = require('./topics'), - privileges = require('./privileges'), - meta = require('./meta'), - utils = require('../public/src/utils'); +var async = require('async'); +var sm = require('sitemap'); +var nconf = require('nconf'); + +var db = require('./database'); +var categories = require('./categories'); +var topics = require('./topics'); +var privileges = require('./privileges'); +var meta = require('./meta'); +var utils = require('../public/src/utils'); var sitemap = { maps: { @@ -88,7 +87,7 @@ sitemap.getPages = function(callback) { changefreq: 'daily', priority: '0.4' }]; - + sitemap.maps.pages = sm.createSitemap({ hostname: nconf.get('url'), cacheTime: 1000 * 60 * 60 * 24, // Cached for 24 hours From aad64cad35da27d7ef11b9d8f5885b36b68bd37b Mon Sep 17 00:00:00 2001 From: pichalite Date: Tue, 12 Apr 2016 05:37:39 +0000 Subject: [PATCH 0036/1109] show post tools for global mod on delete --- public/src/client/topic/events.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/client/topic/events.js b/public/src/client/topic/events.js index 7f769f984b..07a73809ed 100644 --- a/public/src/client/topic/events.js +++ b/public/src/client/topic/events.js @@ -183,7 +183,7 @@ define('forum/topic/events', [ var isDeleted = postEl.hasClass('deleted'); postTools.toggle(data.pid, isDeleted); - if (!app.user.isAdmin && parseInt(data.uid, 10) !== parseInt(app.user.uid, 10)) { + if (!app.user.isAdmin && !app.user.isGlobalMod && parseInt(data.uid, 10) !== parseInt(app.user.uid, 10)) { postEl.find('[component="post/tools"]').toggleClass('hidden', isDeleted); if (isDeleted) { postEl.find('[component="post/content"]').translateHtml('[[topic:post_is_deleted]]'); From bec688cea043cd0336c27d1a26ff9d82459056f4 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 13 Apr 2016 10:31:59 +0300 Subject: [PATCH 0037/1109] relative path fix --- src/routes/plugins.js | 48 +++++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 29 deletions(-) diff --git a/src/routes/plugins.js b/src/routes/plugins.js index 72af49fbed..3f868bbc62 100644 --- a/src/routes/plugins.js +++ b/src/routes/plugins.js @@ -1,41 +1,31 @@ "use strict"; -var _ = require('underscore'), - nconf = require('nconf'), - path = require('path'), - fs = require('fs'), - validator = require('validator'), - async = require('async'), - winston = require('winston'), - - plugins = require('../plugins'), - helpers = require('../controllers/helpers'); +var _ = require('underscore'); +var path = require('path'); +var plugins = require('../plugins'); module.exports = function(app, middleware, controllers) { // Static Assets app.get('/plugins/:id/*', middleware.addExpiresHeaders, function(req, res, next) { - var relPath = req._parsedUrl.pathname.replace('/plugins/', ''), - matches = _.map(plugins.staticDirs, function(realPath, mappedPath) { - if (relPath.match(mappedPath)) { - return mappedPath; - } else { - return null; - } - }).filter(Boolean); - if (!matches) { + var relPath = req._parsedUrl.pathname.replace('/plugins/', ''); + + var matches = _.map(plugins.staticDirs, function(realPath, mappedPath) { + if (relPath.match(mappedPath)) { + var pathToFile = path.join(plugins.staticDirs[mappedPath], decodeURIComponent(relPath.slice(mappedPath.length))); + if (pathToFile.startsWith(plugins.staticDirs[mappedPath])) { + return pathToFile; + } + } + + return null; + }).filter(Boolean); + + if (!matches || !matches.length) { return next(); } - matches = matches.map(function(mappedPath) { - return path.join(plugins.staticDirs[mappedPath], decodeURIComponent(relPath.slice(mappedPath.length))); - }); - - if (matches.length) { - res.sendFile(matches[0]); - } else { - next(); - } + res.sendFile(matches[0]); }); -}; +}; \ No newline at end of file From f43be13f871a2c574ce3994d02f0c38ac09b873f Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 13 Apr 2016 10:32:31 +0300 Subject: [PATCH 0038/1109] fix indent --- src/routes/plugins.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/plugins.js b/src/routes/plugins.js index 3f868bbc62..c8798777e4 100644 --- a/src/routes/plugins.js +++ b/src/routes/plugins.js @@ -1,6 +1,6 @@ "use strict"; -var _ = require('underscore'); +var _ = require('underscore'); var path = require('path'); var plugins = require('../plugins'); From 229326acd6a19d27dda41aa70a1618112ae573f9 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 13 Apr 2016 10:32:59 +0300 Subject: [PATCH 0039/1109] another tab --- src/routes/plugins.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/plugins.js b/src/routes/plugins.js index c8798777e4..0123433db9 100644 --- a/src/routes/plugins.js +++ b/src/routes/plugins.js @@ -9,7 +9,7 @@ module.exports = function(app, middleware, controllers) { // Static Assets app.get('/plugins/:id/*', middleware.addExpiresHeaders, function(req, res, next) { - var relPath = req._parsedUrl.pathname.replace('/plugins/', ''); + var relPath = req._parsedUrl.pathname.replace('/plugins/', ''); var matches = _.map(plugins.staticDirs, function(realPath, mappedPath) { if (relPath.match(mappedPath)) { From 099749e9087b069f1d3bf41a4e70a2b0029c426e Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 13 Apr 2016 09:18:13 -0400 Subject: [PATCH 0040/1109] upped composer, re: nodebb/nodebb-plugin-composer-default#33 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d817fbd210..f7f7225cdd 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "morgan": "^1.3.2", "mousetrap": "^1.5.3", "nconf": "~0.8.2", - "nodebb-plugin-composer-default": "3.0.21", + "nodebb-plugin-composer-default": "3.0.22", "nodebb-plugin-dbsearch": "1.0.1", "nodebb-plugin-emoji-one": "1.1.0", "nodebb-plugin-emoji-extended": "1.1.0", From 604373b5e41bb500d9baf2287d9add1e7d07721f Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 13 Apr 2016 10:43:29 -0400 Subject: [PATCH 0041/1109] fixing plugin checker which erroneously always returned success --- nodebb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nodebb b/nodebb index 417c6a9d80..3e3aac5890 100755 --- a/nodebb +++ b/nodebb @@ -118,12 +118,13 @@ var getRunningPid = function(callback) { version: async.apply(getCurrentVersion) }), function(payload, next) { - if (!payload.plugins.length) { + var toCheck = Object.keys(payload.plugins); + + if (!toCheck.length) { process.stdout.write('OK'.green + '\n'.reset); return next(null, []); // no extraneous plugins installed } - var toCheck = Object.keys(payload.plugins); request({ method: 'GET', url: 'https://packages.nodebb.org/api/v1/suggest?version=' + payload.version + '&package[]=' + toCheck.join('&package[]='), From 3390b7d7f6e9b4f6bd5f0bc6a5d554c21eb2b9ff Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 13 Apr 2016 11:58:14 -0400 Subject: [PATCH 0042/1109] closes #4516 --- public/src/ajaxify.js | 13 +++++++------ src/controllers/index.js | 6 ++++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js index b72447a980..e31786294b 100644 --- a/public/src/ajaxify.js +++ b/public/src/ajaxify.js @@ -70,6 +70,13 @@ $(document).ready(function() { if (err) { return onAjaxError(err, url, callback, quiet); } + + if (window.history && window.history.pushState) { + window.history[!quiet ? 'pushState' : 'replaceState']({ + url: url + }, url, RELATIVE_PATH + '/' + url); + } + retry = true; app.template = data.template.name; @@ -104,12 +111,6 @@ $(document).ready(function() { } ajaxify.currentPage = url.split(/[?#]/)[0]; - - if (window.history && window.history.pushState) { - window.history[!quiet ? 'pushState' : 'replaceState']({ - url: url - }, url, RELATIVE_PATH + '/' + url); - } return url; }; diff --git a/src/controllers/index.js b/src/controllers/index.js index fa35523c2b..d0cc1fe83e 100644 --- a/src/controllers/index.js +++ b/src/controllers/index.js @@ -108,6 +108,12 @@ Controllers.login = function(req, res, next) { data.error = req.flash('error')[0]; data.title = '[[pages:login]]'; + if (!data.allowLocalLogin && !data.allowRegistration && data.alternate_logins && data.authentication.length === 1) { + return helpers.redirect(res, { + external: data.authentication[0].url + }); + } + res.render('login', data); }; From dde7f26944fdb9291e7b7545cdb3f47f6b11cf95 Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Wed, 13 Apr 2016 13:20:13 -0400 Subject: [PATCH 0043/1109] Incremented version number --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f7f7225cdd..68da7bd634 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "nodebb", "license": "GPL-3.0", "description": "NodeBB Forum", - "version": "1.0.2", + "version": "1.0.3", "homepage": "http://www.nodebb.org", "repository": { "type": "git", @@ -115,4 +115,4 @@ "url": "https://github.com/barisusakli" } ] -} +} \ No newline at end of file From 2ddcaa9ce12c1a8d7108f2a5a8924963f0fd8874 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 14 Apr 2016 11:16:12 -0400 Subject: [PATCH 0044/1109] added new hook for hotswap preparation --- src/routes/index.js | 26 +++++++++++++++++++------- src/webserver.js | 5 +++-- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/src/routes/index.js b/src/routes/index.js index a80eb2e46a..526d9e697c 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -80,13 +80,25 @@ function groupRoutes(app, middleware, controllers) { setupPageRoute(app, '/groups/:slug/members', middleware, middlewares, controllers.groups.members); } -module.exports = function(app, middleware) { - var router = express.Router(), - pluginRouter = express.Router(), - authRouter = express.Router(), +module.exports = function(app, middleware, hotswapIds) { + var routers = [ + express.Router(), // plugin router + express.Router(), // main app router + express.Router() // auth router + ], + router = routers[1], + pluginRouter = routers[0], + authRouter = routers[2], relativePath = nconf.get('relative_path'), ensureLoggedIn = require('connect-ensure-login'); + if (Array.isArray(hotswapIds) && hotswapIds.length) { + for(var idx,x=0;x Date: Thu, 14 Apr 2016 18:41:47 +0300 Subject: [PATCH 0045/1109] moved groupTitle from user settings to user profile/edit --- package.json | 4 +- public/language/en_GB/user.json | 2 +- public/src/client/account/edit.js | 1 + src/controllers/accounts/edit.js | 13 +++-- src/controllers/accounts/helpers.js | 2 +- src/groups/membership.js | 35 ++++++++---- src/posts/user.js | 84 ++++++++++++----------------- src/upgrade.js | 40 +++++++++++++- src/user/profile.js | 2 +- src/user/settings.js | 21 ++------ 10 files changed, 117 insertions(+), 87 deletions(-) diff --git a/package.json b/package.json index 68da7bd634..9c491af2a0 100644 --- a/package.json +++ b/package.json @@ -56,8 +56,8 @@ "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", "nodebb-theme-lavender": "3.0.9", - "nodebb-theme-persona": "4.0.118", - "nodebb-theme-vanilla": "5.0.63", + "nodebb-theme-persona": "4.0.119", + "nodebb-theme-vanilla": "5.0.64", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", "nodemailer-sendmail-transport": "1.0.0", diff --git a/public/language/en_GB/user.json b/public/language/en_GB/user.json index a6ae357177..cb0f3d27e0 100644 --- a/public/language/en_GB/user.json +++ b/public/language/en_GB/user.json @@ -112,7 +112,7 @@ "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", - "grouptitle": "Select the group title you would like to display", + "grouptitle": "Group Title", "no-group-title": "No group title", "select-skin": "Select a Skin", diff --git a/public/src/client/account/edit.js b/public/src/client/account/edit.js index de5b01e809..385d5e0ed1 100644 --- a/public/src/client/account/edit.js +++ b/public/src/client/account/edit.js @@ -36,6 +36,7 @@ define('forum/account/edit', ['forum/account/header', 'uploader', 'translator'], website: $('#inputWebsite').val(), birthday: $('#inputBirthday').val(), location: $('#inputLocation').val(), + groupTitle: $('#groupTitle').val(), signature: $('#inputSignature').val(), aboutme: $('#inputAboutMe').val() }; diff --git a/src/controllers/accounts/edit.js b/src/controllers/accounts/edit.js index 2ae429b248..9f63df0894 100644 --- a/src/controllers/accounts/edit.js +++ b/src/controllers/accounts/edit.js @@ -10,6 +10,7 @@ var user = require('../../user'); var meta = require('../../meta'); var plugins = require('../../plugins'); var helpers = require('../helpers'); +var groups = require('../../groups'); var accountHelpers = require('./helpers'); var editController = {}; @@ -25,7 +26,13 @@ editController.get = function(req, res, callback) { userData.maximumProfileImageSize = parseInt(meta.config.maximumProfileImageSize, 10); userData.allowProfileImageUploads = parseInt(meta.config.allowProfileImageUploads) === 1; userData.allowAccountDelete = parseInt(meta.config.allowAccountDelete, 10) === 1; - + + userData.groups = userData.groups.filter(function(group) { + return group && group.userTitleEnabled && !groups.isPrivilegeGroup(group.name) && group.name !== 'registered-users'; + }); + userData.groups.forEach(function(group) { + group.selected = group.name === userData.groupTitle; + }); userData.title = '[[pages:account/edit, ' + userData.username + ']]'; userData.breadcrumbs = helpers.buildBreadcrumbs([{text: userData.username, url: '/user/' + userData.userslug}, {text: '[[user:edit]]'}]); @@ -33,7 +40,7 @@ editController.get = function(req, res, callback) { plugins.fireHook('filter:user.account.edit', userData, function(err, userData) { if (err) { - return next(err); + return callback(err); } res.render('account/edit', userData); @@ -121,7 +128,7 @@ editController.uploadPicture = function (req, res, next) { if (!isAllowed) { return helpers.notAllowed(req, res); } - + user.uploadPicture(updateUid, userPhoto, next); } ], function(err, image) { diff --git a/src/controllers/accounts/helpers.js b/src/controllers/accounts/helpers.js index 8acbdc08c8..2502d7fdd0 100644 --- a/src/controllers/accounts/helpers.js +++ b/src/controllers/accounts/helpers.js @@ -133,7 +133,7 @@ helpers.getBaseUser = function(userslug, callerUID, callback) { async.parallel({ user: function(next) { - user.getUserFields(uid, ['uid', 'username', 'userslug', 'picture', 'cover:url', 'cover:position', 'status', 'lastonline'], next); + user.getUserFields(uid, ['uid', 'username', 'userslug', 'picture', 'cover:url', 'cover:position', 'status', 'lastonline', 'groupTitle'], next); }, isAdmin: function(next) { user.isAdministrator(callerUID, next); diff --git a/src/groups/membership.js b/src/groups/membership.js index 747fa9d3d7..96962695a1 100644 --- a/src/groups/membership.js +++ b/src/groups/membership.js @@ -1,16 +1,17 @@ 'use strict'; -var async = require('async'), - winston = require('winston'), - _ = require('underscore'), +var async = require('async'); +var winston = require('winston'); +var _ = require('underscore'); - user = require('../user'), - utils = require('../../public/src/utils'), - plugins = require('../plugins'), - notifications = require('../notifications'), - db = require('./../database'); +var user = require('../user'); +var utils = require('../../public/src/utils'); +var plugins = require('../plugins'); +var notifications = require('../notifications'); +var db = require('./../database'); module.exports = function(Groups) { + Groups.join = function(groupName, uid, callback) { function join() { var tasks = [ @@ -39,7 +40,7 @@ module.exports = function(Groups) { async.parallel(tasks, next); }, function(results, next) { - user.setGroupTitle(groupName, uid, next); + setGroupTitleIfNotSet(groupName, uid, next); }, function(next) { plugins.fireHook('action:group.join', { @@ -80,6 +81,20 @@ module.exports = function(Groups) { }); }; + function setGroupTitleIfNotSet(groupName, uid, callback) { + if (groupName === 'registered-users') { + return callback(); + } + + db.getObjectField('user:' + uid, 'groupTitle', function(err, currentTitle) { + if (err || (currentTitle || currentTitle === '')) { + return callback(err); + } + + user.setUserField(uid, 'groupTitle', groupName, callback); + }); + } + Groups.requestMembership = function(groupName, uid, callback) { async.waterfall([ async.apply(inviteOrRequestMembership, groupName, uid, 'request'), @@ -414,7 +429,7 @@ module.exports = function(Groups) { } db.getSetMembers('group:' + groupName + ':pending', callback); }; - + Groups.kick = function(uid, groupName, isOwner, callback) { if (isOwner) { // If the owners set only contains one member, error out! diff --git a/src/posts/user.js b/src/posts/user.js index cd675cbfa3..275264f808 100644 --- a/src/posts/user.js +++ b/src/posts/user.js @@ -1,66 +1,49 @@ 'use strict'; -var async = require('async'), - validator = require('validator'), - - db = require('../database'), - user = require('../user'), - groups = require('../groups'), - meta = require('../meta'), - plugins = require('../plugins'); +var async = require('async'); +var validator = require('validator'); +var user = require('../user'); +var groups = require('../groups'); +var meta = require('../meta'); +var plugins = require('../plugins'); module.exports = function(Posts) { Posts.getUserInfoForPosts = function(uids, uid, callback) { var groupsMap = {}; - var userSettings; - async.parallel({ - groupTitles: function(next) { - var keys = uids.map(function(uid) { - return 'user:' + uid + ':settings'; - }); - async.waterfall([ - function (next) { - db.getObjectsFields(keys, ['groupTitle'], next); - }, - function (_userSettings, next) { - userSettings = _userSettings; - var groupKeys = userSettings.filter(function(userSetting) { - return userSetting && userSetting.groupTitle; - }).map(function(userSetting) { - return userSetting.groupTitle; - }).filter(function(groupTitle, index, array) { - return groupTitle && array.indexOf(groupTitle) === index; - }); - groups.getGroupsData(groupKeys, next); - }, - function (groupsData, next) { - groupsData.forEach(function(group) { - if (group && group.userTitleEnabled) { - groupsMap[group.name] = { - name: group.name, - slug: group.slug, - labelColor: group.labelColor, - icon: group.icon, - userTitle: group.userTitle - }; - } - }); - next(null, userSettings); - } - ], next); + var userData; + async.waterfall([ + function(next) { + user.getUsersFields(uids, ['uid', 'username', 'fullname', 'userslug', 'reputation', 'postcount', 'picture', 'signature', 'banned', 'status', 'lastonline', 'groupTitle'], next); }, - userData: function(next) { - user.getUsersFields(uids, ['uid', 'username', 'fullname', 'userslug', 'reputation', 'postcount', 'picture', 'signature', 'banned', 'status', 'lastonline'], next); + function(_userData, next) { + userData = _userData; + var groupTitles = userData.map(function(userData) { + return userData && userData.groupTitle; + }).filter(function(groupTitle, index, array) { + return groupTitle && array.indexOf(groupTitle) === index; + }); + groups.getGroupsData(groupTitles, next); } - }, function(err, results) { + ], function(err, groupsData) { if (err) { return callback(err); } - var userData = results.userData; - userData.forEach(function(userData, i) { + groupsData.forEach(function(group) { + if (group && group.userTitleEnabled) { + groupsMap[group.name] = { + name: group.name, + slug: group.slug, + labelColor: group.labelColor, + icon: group.icon, + userTitle: group.userTitle + }; + } + }); + + userData.forEach(function(userData) { userData.uid = userData.uid || 0; userData.username = userData.username || '[[global:guest]]'; userData.userslug = userData.userslug || ''; @@ -69,7 +52,6 @@ module.exports = function(Posts) { userData.banned = parseInt(userData.banned, 10) === 1; userData.picture = userData.picture || ''; userData.status = user.getStatus(userData); - userData.groupTitle = results.groupTitles[i].groupTitle; userData.signature = validator.escape(userData.signature || ''); userData.fullname = validator.escape(userData.fullname || ''); }); @@ -77,7 +59,7 @@ module.exports = function(Posts) { async.map(userData, function(userData, next) { async.parallel({ isMemberOfGroup: function (next) { - if (!userData.groupTitle) { + if (!userData.groupTitle || !groupsMap[userData.groupTitle]) { return next(); } groups.isMember(userData.uid, userData.groupTitle, next); diff --git a/src/upgrade.js b/src/upgrade.js index f6f1ce0093..68f830ef3c 100644 --- a/src/upgrade.js +++ b/src/upgrade.js @@ -10,7 +10,7 @@ var db = require('./database'), schemaDate, thisSchemaDate, // IMPORTANT: REMEMBER TO UPDATE VALUE OF latestSchema - latestSchema = Date.UTC(2016, 1, 25); + latestSchema = Date.UTC(2016, 3, 14); Upgrade.check = function(callback) { db.get('schemaDate', function(err, value) { @@ -438,6 +438,44 @@ Upgrade.upgrade = function(callback) { winston.info('[2016/02/25] Social: Post Sharing skipped!'); next(); } + }, + function(next) { + thisSchemaDate = Date.UTC(2016, 3, 14); + + if (schemaDate < thisSchemaDate) { + updatesMade = true; + winston.info('[2016/04/14] Group title from settings to user profile'); + + var user = require('./user'); + var batch = require('./batch'); + var count = 0; + batch.processSortedSet('users:joindate', function(uids, next) { + winston.info('upgraded ' + count + ' users'); + user.getMultipleUserSettings(uids, function(err, settings) { + if (err) { + return next(err); + } + count += uids.length; + settings = settings.filter(function(setting) { + return setting && setting.groupTitle; + }); + + async.each(settings, function(setting, next) { + db.setObjectField('user:' + setting.uid, 'groupTitle', setting.groupTitle, next); + }, next); + }); + }, {}, function(err) { + if (err) { + return next(err); + } + + winston.info('[2016/04/14] Group title from settings to user profile done'); + Upgrade.update(thisSchemaDate, next); + }); + } else { + winston.info('[2016/04/14] Group title from settings to user profile skipped!'); + next(); + } } // Add new schema updates here // IMPORTANT: REMEMBER TO UPDATE VALUE OF latestSchema IN LINE 24!!! diff --git a/src/user/profile.js b/src/user/profile.js index 50aa92c1d0..e24d5f08d0 100644 --- a/src/user/profile.js +++ b/src/user/profile.js @@ -12,7 +12,7 @@ var plugins = require('../plugins'); module.exports = function(User) { User.updateProfile = function(uid, data, callback) { - var fields = ['username', 'email', 'fullname', 'website', 'location', 'birthday', 'signature', 'aboutme']; + var fields = ['username', 'email', 'fullname', 'website', 'location', 'groupTitle', 'birthday', 'signature', 'aboutme']; plugins.fireHook('filter:user.updateProfile', {uid: uid, data: data, fields: fields}, function(err, data) { if (err) { diff --git a/src/user/settings.js b/src/user/settings.js index e37e012f7e..8cd38d3a01 100644 --- a/src/user/settings.js +++ b/src/user/settings.js @@ -1,10 +1,10 @@ 'use strict'; -var async = require('async'), - meta = require('../meta'), - db = require('../database'), - plugins = require('../plugins'); +var async = require('async'); +var meta = require('../meta'); +var db = require('../database'); +var plugins = require('../plugins'); module.exports = function(User) { @@ -162,17 +162,4 @@ module.exports = function(User) { User.setSetting = function(uid, key, value, callback) { db.setObjectField('user:' + uid + ':settings', key, value, callback); }; - - User.setGroupTitle = function(groupName, uid, callback) { - if (groupName === 'registered-users') { - return callback(); - } - db.getObjectField('user:' + uid + ':settings', 'groupTitle', function(err, currentTitle) { - if (err || (currentTitle || currentTitle === '')) { - return callback(err); - } - - User.setSetting(uid, 'groupTitle', groupName, callback); - }); - }; }; From 6cc08f38685fb3aff339fc3434d22fa0bf6df3d1 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 14 Apr 2016 18:44:44 +0300 Subject: [PATCH 0046/1109] fix indent --- src/user/settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/user/settings.js b/src/user/settings.js index 8cd38d3a01..a1a21dd354 100644 --- a/src/user/settings.js +++ b/src/user/settings.js @@ -1,7 +1,7 @@ 'use strict'; -var async = require('async'); +var async = require('async'); var meta = require('../meta'); var db = require('../database'); var plugins = require('../plugins'); From 19bc6fa1337ce691938b587c448822259511e465 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 14 Apr 2016 18:52:54 +0300 Subject: [PATCH 0047/1109] fix undefined callback in sounds --- public/src/modules/sounds.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/public/src/modules/sounds.js b/public/src/modules/sounds.js index 4a6bb80f51..052e804f6e 100644 --- a/public/src/modules/sounds.js +++ b/public/src/modules/sounds.js @@ -8,18 +8,14 @@ define('sounds', ['buzz'], function(buzz) { var eventSoundMapping; var files; - socket.on('event:sounds.reloadMapping', loadMapping); - - function loadMapping(callback) { - callback = callback || function() {}; + socket.on('event:sounds.reloadMapping', function() { socket.emit('modules.sounds.getMapping', function(err, mapping) { if (err) { return app.alertError('[sounds] Could not load sound mapping!'); } eventSoundMapping = mapping; - callback(); }); - } + }); function loadData(callback) { socket.emit('modules.sounds.getData', function(err, data) { From 54859e86348a37b2db6476052fb15af001e14cfb Mon Sep 17 00:00:00 2001 From: psychobunny Date: Thu, 14 Apr 2016 13:46:23 -0400 Subject: [PATCH 0048/1109] up persona --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9c491af2a0..48b35953b5 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", "nodebb-theme-lavender": "3.0.9", - "nodebb-theme-persona": "4.0.119", + "nodebb-theme-persona": "4.0.120", "nodebb-theme-vanilla": "5.0.64", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", From e551cbfa74896038e4fd14eb0a19233864b6e35a Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Fri, 15 Apr 2016 09:02:24 -0400 Subject: [PATCH 0049/1109] Latest translations and fallbacks --- public/language/ar/user.json | 2 ++ public/language/bg/user.json | 2 ++ public/language/bn/user.json | 2 ++ public/language/cs/user.json | 2 ++ public/language/da/user.json | 2 ++ public/language/de/user.json | 2 ++ public/language/el/user.json | 2 ++ public/language/en@pirate/user.json | 2 ++ public/language/en_US/user.json | 2 ++ public/language/es/user.json | 2 ++ public/language/et/user.json | 2 ++ public/language/fa_IR/user.json | 2 ++ public/language/fi/user.json | 2 ++ public/language/fr/user.json | 2 ++ public/language/gl/user.json | 2 ++ public/language/he/user.json | 2 ++ public/language/hu/user.json | 2 ++ public/language/id/user.json | 2 ++ public/language/it/user.json | 2 ++ public/language/ja/user.json | 2 ++ public/language/ko/user.json | 2 ++ public/language/lt/user.json | 2 ++ public/language/ms/user.json | 2 ++ public/language/nb/user.json | 2 ++ public/language/nl/user.json | 2 ++ public/language/pl/user.json | 2 ++ public/language/pt_BR/user.json | 2 ++ public/language/ro/user.json | 2 ++ public/language/ru/user.json | 2 ++ public/language/rw/user.json | 2 ++ public/language/sc/user.json | 2 ++ public/language/sk/user.json | 2 ++ public/language/sl/user.json | 2 ++ public/language/sr/user.json | 2 ++ public/language/sv/user.json | 2 ++ public/language/th/user.json | 2 ++ public/language/tr/user.json | 2 ++ public/language/vi/user.json | 2 ++ public/language/zh_CN/user.json | 2 ++ public/language/zh_TW/user.json | 2 ++ 40 files changed, 80 insertions(+) diff --git a/public/language/ar/user.json b/public/language/ar/user.json index 23519da3a5..47d51308ac 100644 --- a/public/language/ar/user.json +++ b/public/language/ar/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "فتح الروابط الخارجية في نافدة جديدة", "enable_topic_searching": "تفعيل خاصية البحث داخل المواضيع", "topic_search_help": "If enabled, in-topic searching will override the browser's default page search behaviour and allow you to search through the entire topic, instead of what is only shown on screen", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "متابعة المواضيع التي تقوم بالرد فيها", "follow_topics_you_create": "متابعة المواضيع التي تنشئها", diff --git a/public/language/bg/user.json b/public/language/bg/user.json index 6e16e70603..e0b18bff83 100644 --- a/public/language/bg/user.json +++ b/public/language/bg/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Отваряне на външните връзки в нов подпрозорец", "enable_topic_searching": "Включване на търсенето в темите", "topic_search_help": "Ако е включено, търсенето в темата ще замени стандартното поведение на браузъра при търсене в страницата и ще Ви позволи да претърсвате цялата тема, а не само това, което се вижда на екрана", + "delay_image_loading": "Отлагане на зареждането на изображения", + "image_load_delay_help": "Ако е включено, изображенията в темите няма да бъдат зареждани, докато не превъртите страницата до тях", "scroll_to_my_post": "След публикуване на отговор, да се показва новата публикация", "follow_topics_you_reply_to": "Следване на темите, на които отговаряте", "follow_topics_you_create": "Следване на темите, които създавате", diff --git a/public/language/bn/user.json b/public/language/bn/user.json index 9e26660f70..1f954b1a31 100644 --- a/public/language/bn/user.json +++ b/public/language/bn/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "আউটগোয়িং লিংকগুলো নতুন ট্যাবে খুলুন", "enable_topic_searching": "In-Topic সার্চ সক্রীয় করো", "topic_search_help": "If enabled, in-topic searching will override the browser's default page search behaviour and allow you to search through the entire topic, instead of what is only shown on screen", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", diff --git a/public/language/cs/user.json b/public/language/cs/user.json index 35fdc4db9b..ab3bf570d0 100644 --- a/public/language/cs/user.json +++ b/public/language/cs/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Open outgoing links in new tab", "enable_topic_searching": "Enable In-Topic Searching", "topic_search_help": "If enabled, in-topic searching will override the browser's default page search behaviour and allow you to search through the entire topic, instead of what is only shown on screen", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", diff --git a/public/language/da/user.json b/public/language/da/user.json index ebc1cba887..a2f250767e 100644 --- a/public/language/da/user.json +++ b/public/language/da/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Åben udgående link i en ny tab", "enable_topic_searching": "Slå In-Topic søgning til", "topic_search_help": "Hvis slået til, så vil in-topic søgning overskrive browserens almindelige søge function og tillade dig at søge hele emnet, istedet for kun det der er vist på skærmen", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Følg emner du har skrevet indlæg i", "follow_topics_you_create": "Følg emner du opretter", diff --git a/public/language/de/user.json b/public/language/de/user.json index e4fd8b8f8e..428add8a6e 100644 --- a/public/language/de/user.json +++ b/public/language/de/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Ausgehende Links in neuem Tab öffnen", "enable_topic_searching": "Suchen innerhalb von Themen aktivieren", "topic_search_help": "Wenn aktiviert, ersetzt die im-Thema-Suche die Standardsuche des Browsers. Dadurch kannst du im ganzen Thema suchen, nicht nur im sichtbaren Abschnitt.", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "Zeige eigene Antwort nach dem Erstellen im Thema an", "follow_topics_you_reply_to": "Themen folgen, in denen auf dich geantwortet wird", "follow_topics_you_create": "Themen folgen, die du erstellst", diff --git a/public/language/el/user.json b/public/language/el/user.json index 7b6eed3269..9497dbac3c 100644 --- a/public/language/el/user.json +++ b/public/language/el/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Open outgoing links in new tab", "enable_topic_searching": "Enable In-Topic Searching", "topic_search_help": "If enabled, in-topic searching will override the browser's default page search behaviour and allow you to search through the entire topic, instead of what is only shown on screen", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", diff --git a/public/language/en@pirate/user.json b/public/language/en@pirate/user.json index 0b5959462f..4224d972cc 100644 --- a/public/language/en@pirate/user.json +++ b/public/language/en@pirate/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Open outgoing links in new tab", "enable_topic_searching": "Enable In-Topic Searching", "topic_search_help": "If enabled, in-topic searching will override the browser's default page search behaviour and allow you to search through the entire topic, instead of what is only shown on screen", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", diff --git a/public/language/en_US/user.json b/public/language/en_US/user.json index 86d31e818d..34ca82ae52 100644 --- a/public/language/en_US/user.json +++ b/public/language/en_US/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Open outgoing links in new tab", "enable_topic_searching": "Enable In-Topic Searching", "topic_search_help": "If enabled, in-topic searching will override the browser's default page search behavior and allow you to search through the entire topic, instead of what is only shown on screen", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", diff --git a/public/language/es/user.json b/public/language/es/user.json index b518f7c38c..78fa65e455 100644 --- a/public/language/es/user.json +++ b/public/language/es/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Abrir los enlaces externos en una nueva pestaña", "enable_topic_searching": "Activar la búsqueda \"in-topic\"", "topic_search_help": "Si está activada, la búsqueda 'in-topic' sustituirá el comportamiento por defecto del navegador y le permitirá buscar en el tema al completo, en vez de hacer una búsqueda únicamente sobre el contenido mostrado en pantalla", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Seguir los temas en los que respondes", "follow_topics_you_create": "Seguir publicaciones que creas", diff --git a/public/language/et/user.json b/public/language/et/user.json index 463b4c5e8e..3eb200314a 100644 --- a/public/language/et/user.json +++ b/public/language/et/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Ava väljaminevad lingid uues aknas", "enable_topic_searching": "Võimalda teemasisene otsing", "topic_search_help": "Kui see on sisse lükatud, siis teemasisene otsing võtab üle brauseri tavapärase otsingu ning võimaldab otsida ainult ekraanile mahtuva teema asemel terve teema ulatuses.", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Järgi teemasid, millele olete vastanud.", "follow_topics_you_create": "Järgi teemasi, mis on teie loodud.", diff --git a/public/language/fa_IR/user.json b/public/language/fa_IR/user.json index 57d8e534b7..30ce8a55a9 100644 --- a/public/language/fa_IR/user.json +++ b/public/language/fa_IR/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "پیوندهای به بیرون را در برگ جدید باز کن", "enable_topic_searching": "فعال کردن جستجوی داخل-موضوع", "topic_search_help": "If enabled, in-topic searching will override the browser's default page search behaviour and allow you to search through the entire topic, instead of what is only shown on screen", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "تاپیک هایی که پاسخ داده ای را دنبال کن", "follow_topics_you_create": "موضوع هایی که ایجاد کرده ای را دنبال کن", diff --git a/public/language/fi/user.json b/public/language/fi/user.json index f7218528a3..76d5f5bdfb 100644 --- a/public/language/fi/user.json +++ b/public/language/fi/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Open outgoing links in new tab", "enable_topic_searching": "Salli aiheen sisäiset haut", "topic_search_help": "If enabled, in-topic searching will override the browser's default page search behaviour and allow you to search through the entire topic, instead of what is only shown on screen", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", diff --git a/public/language/fr/user.json b/public/language/fr/user.json index 0a6450fdd3..1d2a509176 100644 --- a/public/language/fr/user.json +++ b/public/language/fr/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Ouvrir les liens externes dans un nouvel onglet", "enable_topic_searching": "Activer la recherche dans les sujets", "topic_search_help": "Une fois activé, la recherche dans les sujets va remplacer la recherche de page du navigateur et vous permettra de rechercher dans l'intégralité d'un sujet au lieu des seuls posts affichés à l'écran.", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "Après avoir répondu, montrer le nouveau message", "follow_topics_you_reply_to": "Suivre les sujets auxquels vous répondez", "follow_topics_you_create": "Suivre les sujets que vous créez", diff --git a/public/language/gl/user.json b/public/language/gl/user.json index 014b7aead3..83c36e77ee 100644 --- a/public/language/gl/user.json +++ b/public/language/gl/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Abrir ligazóns externos nunca nova pestaña", "enable_topic_searching": "Permitir buscar dentro dun tema", "topic_search_help": "Se se activa, o buscador do NodeBB superporase ao propio do navegador dentro de cada tema, permitindo buscar en todo o tema e non só naquilo que se presenta na pantalla.", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Segui-los temas nos que respostas", "follow_topics_you_create": "Segui-los temas que ti fas", diff --git a/public/language/he/user.json b/public/language/he/user.json index a442d5fd10..ccd8366612 100644 --- a/public/language/he/user.json +++ b/public/language/he/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "פתח קישורים חיצוניים בכרטיסייה חדשה", "enable_topic_searching": "הפעל חיפוש בתוך נושא", "topic_search_help": "אם מאופשר, החיפוש בתוך הנושא יעקוף את שיטת החיפוש של הדפדפן, ויאפשר לך לחפש בכל הנושא - ולא רק במה שמוצג על המסך", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "עקוב אחרת נושאים שהגבת בהם", "follow_topics_you_create": "עקוב אחר נושאים שיצרת", diff --git a/public/language/hu/user.json b/public/language/hu/user.json index fd2a183e03..edb8f7cd77 100644 --- a/public/language/hu/user.json +++ b/public/language/hu/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Open outgoing links in new tab", "enable_topic_searching": "Témán belüli keresés bekapcsolása", "topic_search_help": "If enabled, in-topic searching will override the browser's default page search behaviour and allow you to search through the entire topic, instead of what is only shown on screen", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", diff --git a/public/language/id/user.json b/public/language/id/user.json index 4610dd8f43..2ebb304cd0 100644 --- a/public/language/id/user.json +++ b/public/language/id/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Open outgoing links in new tab", "enable_topic_searching": "Gunakan Pencarian Di dalam Topik", "topic_search_help": "If enabled, in-topic searching will override the browser's default page search behaviour and allow you to search through the entire topic, instead of what is only shown on screen", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", diff --git a/public/language/it/user.json b/public/language/it/user.json index 6202ea0bd8..80b3cc665b 100644 --- a/public/language/it/user.json +++ b/public/language/it/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Apri i link web in una nuova pagina", "enable_topic_searching": "Abilita la ricerca negli argomenti", "topic_search_help": "Se abilitata, la ricerca negli argomenti ignorerà il comportamento predefinito del browser per consentirti di cercare all'interno delle discussioni, anziché soltanto nel contenuto visibile a schermo", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Segui le discussioni a cui hai risposto", "follow_topics_you_create": "Segui le discussioni che hai iniziato", diff --git a/public/language/ja/user.json b/public/language/ja/user.json index 539809537d..2d7dd3a23d 100644 --- a/public/language/ja/user.json +++ b/public/language/ja/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "外リンクを新しいタブに開きます", "enable_topic_searching": "インートピックの検索を有効にします", "topic_search_help": "有効にしたら、インートピックの検索はブラウザの既定機能を無視して、スクリーンに示したよりトピック内からの全部を検索します", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "返信したトピックをフォローします", "follow_topics_you_create": "投稿したトピックをフォローします", diff --git a/public/language/ko/user.json b/public/language/ko/user.json index b86ed76b19..c5dc94de20 100644 --- a/public/language/ko/user.json +++ b/public/language/ko/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "외부 링크를 새로운 탭을 사용하여 열람", "enable_topic_searching": "주제 내 검색 허용", "topic_search_help": "활성화 된후 브라우저의 기본 페이지 검색 기능을 연관 주제 검색 기능으로 대신하고 화면에 보여지는 것 뿐만 아니라 주제와 연관된 모든것을 검색합니다.", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "답글 게시 후 새 포스트 보여주기", "follow_topics_you_reply_to": "답글 단 게시물을 팔로우 합니다.", "follow_topics_you_create": "생성한 주제를 팔로우 합니다.", diff --git a/public/language/lt/user.json b/public/language/lt/user.json index 13f3b36b7b..518ff463a5 100644 --- a/public/language/lt/user.json +++ b/public/language/lt/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Atidaryti išeinančias nuorodas naujam skirtuke", "enable_topic_searching": "Įjungti Temų Ieškojimą ", "topic_search_help": "Jeigu įjungtas, temų ieškojimas, nepaisys naršyklės puslapio ieškojimo, ir pradės ieškoti tik toje temoje kuri bus rodoma ekrane", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Sekti tas temas kur atrašai tu", "follow_topics_you_create": "Sekti tas temas kurias sukuri tu", diff --git a/public/language/ms/user.json b/public/language/ms/user.json index 39d38cc538..03f3c77145 100644 --- a/public/language/ms/user.json +++ b/public/language/ms/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Buka pautan luar di tab yang baru", "enable_topic_searching": "Aktifkan Pencarian Dalam-Topik", "topic_search_help": "Jika diaktifkan, pencarian dalam-topik akan membatalkan fungsi asal pencarian pelayan dan membenarkan anda untuk mencari seluruh topik, daripada menunjukkan apa yang terdapat pada skrin sahaja", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Ikut topik yang anda balas", "follow_topics_you_create": "Ikut topik yang anda buat", diff --git a/public/language/nb/user.json b/public/language/nb/user.json index 48cc0e0359..df31e220f3 100644 --- a/public/language/nb/user.json +++ b/public/language/nb/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Åpne utgående lenker i en ny fane", "enable_topic_searching": "Aktiver søk-i-emne", "topic_search_help": "Hvis søk-i-emne er aktivert, overstyres nettleserens standard sidesøk og gir mulighet til å søke gjennom hele emnet, ikke bare det som vises på skjermen", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Følg emner du besvarer", "follow_topics_you_create": "Følg emner du oppretter", diff --git a/public/language/nl/user.json b/public/language/nl/user.json index 70d646156b..0cac89a08b 100644 --- a/public/language/nl/user.json +++ b/public/language/nl/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Open uitgaande links naar een externe site in een nieuw tabblad", "enable_topic_searching": "Inschakelen mogelijkheid op onderwerp te kunnen zoeken", "topic_search_help": "Wanneer ingeschakeld zal de standaard zoekfunctie, met een aangepaste methode voor onderwerpen, overschreven worden", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "Toon het nieuwe bericht na het plaatsen van een antwoord", "follow_topics_you_reply_to": "Volg de onderwerpen waarop ik gereageerd heb", "follow_topics_you_create": "Volg de onderwerpen waarvan ik de oorspronkelijke auteur ben", diff --git a/public/language/pl/user.json b/public/language/pl/user.json index a5f79daab8..e3ced448d7 100644 --- a/public/language/pl/user.json +++ b/public/language/pl/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Otwieraj linki wychodzące w nowej karcie", "enable_topic_searching": "Odblokuj szukanie w temacie", "topic_search_help": "Jeśli włączone, wyszukiwanie w tematach zastąpi przeglądarkowe przeszukiwanie strony i pozwoli na przeszukanie całego tematu, zamiast ograniczonej zawartości aktualnie wyświetlonej na ekranie", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Śledź tematy, na które odpowiadasz", "follow_topics_you_create": "Śledź tematy, które tworzysz", diff --git a/public/language/pt_BR/user.json b/public/language/pt_BR/user.json index 21df201b80..34a77ea5cb 100644 --- a/public/language/pt_BR/user.json +++ b/public/language/pt_BR/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Abrir links externos em nova aba", "enable_topic_searching": "Habilitar Pesquisa dentro de Tópico", "topic_search_help": "Se habilitado, a pesquisa dentro do tópico irá substituir a pesquisa padrão do seu navegador. Assim, você poderá pesquisar pelo tópico inteiro, e não apenas pelo o que está sendo exibido na tela.", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "Após postar uma réplica, mostre o novo post", "follow_topics_you_reply_to": "Seguir tópicos que você responde", "follow_topics_you_create": "Seguir tópicos que você cria", diff --git a/public/language/ro/user.json b/public/language/ro/user.json index 8a61af9abf..f11f19dee6 100644 --- a/public/language/ro/user.json +++ b/public/language/ro/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Open outgoing links in new tab", "enable_topic_searching": "Enable In-Topic Searching", "topic_search_help": "If enabled, in-topic searching will override the browser's default page search behaviour and allow you to search through the entire topic, instead of what is only shown on screen", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", diff --git a/public/language/ru/user.json b/public/language/ru/user.json index 5e14dc8004..d9211b80af 100644 --- a/public/language/ru/user.json +++ b/public/language/ru/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Открывать внешние ссылки в новых вкладках", "enable_topic_searching": "Активировать поиск внутри тем", "topic_search_help": "Если опция включена, поиск в теме будет осуществляться за счёт собственного поиска, который позволит искать во всей теме, а не только в загруженных сообщениях", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Следить за темами в которых вы отвечаете", "follow_topics_you_create": "Следить за темами которые вы создаёте", diff --git a/public/language/rw/user.json b/public/language/rw/user.json index 9ca89d0160..1e612bb2cf 100644 --- a/public/language/rw/user.json +++ b/public/language/rw/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Fungurira imirongo ijya hanze mu idirishya rishya", "enable_topic_searching": "Emerera Ugushakira mu Kiganiro", "topic_search_help": "Nibyemerwa, ugushakira mu kiganiro bizajya biba ari byo bikorwa maze bitume umuntu abasha gushakira mu kiganiro hose aho gushakira kuri paji igaragarira amaso, imbere yawe gusa", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "Nyuma yo gushyiraho igisubizo, hagaragare icyashyizweho gishya", "follow_topics_you_reply_to": "Kurikira ibiganiro ushyiraho ibisubizo", "follow_topics_you_create": "Kurikira ibiganiro uba watangije", diff --git a/public/language/sc/user.json b/public/language/sc/user.json index 2b30121863..9c01aa6133 100644 --- a/public/language/sc/user.json +++ b/public/language/sc/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Open outgoing links in new tab", "enable_topic_searching": "Enable In-Topic Searching", "topic_search_help": "If enabled, in-topic searching will override the browser's default page search behaviour and allow you to search through the entire topic, instead of what is only shown on screen", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", diff --git a/public/language/sk/user.json b/public/language/sk/user.json index 6baaf337ce..ea4a0963ab 100644 --- a/public/language/sk/user.json +++ b/public/language/sk/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Open outgoing links in new tab", "enable_topic_searching": "Enable In-Topic Searching", "topic_search_help": "If enabled, in-topic searching will override the browser's default page search behaviour and allow you to search through the entire topic, instead of what is only shown on screen", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", diff --git a/public/language/sl/user.json b/public/language/sl/user.json index 2f13808e59..9267903016 100644 --- a/public/language/sl/user.json +++ b/public/language/sl/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Zunanje povezave odpri v novem zavihku", "enable_topic_searching": "Omogoči iskanje znotraj teme", "topic_search_help": "Če omogočite, bo iskanje prepisalo brskalnikove prevzete nastavitve in vam omogočilo iskanje skozi celotno temo.", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Spremljaj teme v katerih si sodeloval", "follow_topics_you_create": "Spremljaj teme, ki si jih ustvaril/a", diff --git a/public/language/sr/user.json b/public/language/sr/user.json index 66280af2d3..efe4780b07 100644 --- a/public/language/sr/user.json +++ b/public/language/sr/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Open outgoing links in new tab", "enable_topic_searching": "Enable In-Topic Searching", "topic_search_help": "If enabled, in-topic searching will override the browser's default page search behaviour and allow you to search through the entire topic, instead of what is only shown on screen", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", diff --git a/public/language/sv/user.json b/public/language/sv/user.json index ab893029e1..98a9d303d7 100644 --- a/public/language/sv/user.json +++ b/public/language/sv/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Öppna utgående länkar på ny flik", "enable_topic_searching": "Aktivera Sökning Inom Ämne", "topic_search_help": "Om aktiverat kommer sökning inom ämne överskrida webbläsarens vanliga funktionen för sökning bland sidor och tillåta dig att söka genom hela ämnet istället för det som endast visas på skärmen.", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Följ ämnen som du svarat på", "follow_topics_you_create": "Följ ämnen du skapat", diff --git a/public/language/th/user.json b/public/language/th/user.json index 092f19cf70..e7be1d4c47 100644 --- a/public/language/th/user.json +++ b/public/language/th/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Open outgoing links in new tab", "enable_topic_searching": "เปิดใช้การค้นหาแบบ In-Topic", "topic_search_help": "If enabled, in-topic searching will override the browser's default page search behaviour and allow you to search through the entire topic, instead of what is only shown on screen", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", diff --git a/public/language/tr/user.json b/public/language/tr/user.json index 1664a6ec81..346c3d775e 100644 --- a/public/language/tr/user.json +++ b/public/language/tr/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Dışarı giden bağlantıları yeni sekmede aç", "enable_topic_searching": "Konu içi aramayı aktive et", "topic_search_help": "Aktive edilirse, konu içi arama tarayıcının normal arama davranışını değiştirerek tüm konuyu aramanızı sağlar", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "Cevap yazdıktan sonra yeni gönderiyi göster", "follow_topics_you_reply_to": "Cevap verdiğim konuları takip et", "follow_topics_you_create": "Kendi konularımı takip et", diff --git a/public/language/vi/user.json b/public/language/vi/user.json index c98cd1b9f9..aa0753ffd3 100644 --- a/public/language/vi/user.json +++ b/public/language/vi/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Mở link trong tab mới.", "enable_topic_searching": "Bật In-topic Searching", "topic_search_help": "Nếu bật, tìm kiếm trong chủ đề sẽ thay thế tính năng tính năng tìm kiếm của trình duyệt và cho phép bạn tìm kiếm trong toàn bộ chủ đề, thay vì chỉ tìm kiếm nội dung đang hiện thị trên màn hình", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Theo dõi chủ đề bạn trả lời", "follow_topics_you_create": "Theo dõi chủ đề bạn tạo", diff --git a/public/language/zh_CN/user.json b/public/language/zh_CN/user.json index e713189b25..9e30afc3f6 100644 --- a/public/language/zh_CN/user.json +++ b/public/language/zh_CN/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "在新标签打开外部链接", "enable_topic_searching": "启用主题内搜索", "topic_search_help": "如果启用此项,主题内搜索会替代浏览器默认的页面搜索,您将可以在整个主题内搜索,而不仅仅只搜索页面上展现的内容。", + "delay_image_loading": "延迟图片加载", + "image_load_delay_help": "启用后,帖子中的图片仅在用户滚动到图片所在位置时加载", "scroll_to_my_post": "在提交回复之后显示新帖子", "follow_topics_you_reply_to": "关注您回复的主题", "follow_topics_you_create": "关注您创建的主题", diff --git a/public/language/zh_TW/user.json b/public/language/zh_TW/user.json index 118ba2f471..a848ac6990 100644 --- a/public/language/zh_TW/user.json +++ b/public/language/zh_TW/user.json @@ -92,6 +92,8 @@ "open_links_in_new_tab": "Open outgoing links in new tab", "enable_topic_searching": "Enable In-Topic Searching", "topic_search_help": "If enabled, in-topic searching will override the browser's default page search behaviour and allow you to search through the entire topic, instead of what is only shown on screen", + "delay_image_loading": "Delay Image Loading", + "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", From 83d863f3db96b4bb3bd7aecd34bb92919c88aecc Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 15 Apr 2016 16:07:56 +0300 Subject: [PATCH 0050/1109] closes #4517 --- nodebb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodebb b/nodebb index 3e3aac5890..fb8d0a6911 100755 --- a/nodebb +++ b/nodebb @@ -196,7 +196,7 @@ var getRunningPid = function(callback) { description: 'Proceed with upgrade (y|n)?'.reset, type: 'string' }, function(err, result) { - if (result.upgrade === 'y' || result.upgrade === 'yes') { + if (['y', 'Y', 'yes', 'YES'].indexOf(result.upgrade) !== -1) { process.stdout.write('\nUpgrading packages...'); var args = ['npm', 'i']; found.forEach(function(suggestObj) { From 30ce17ef735aa26603703c82efe38d32ab99ba09 Mon Sep 17 00:00:00 2001 From: pichalite Date: Fri, 15 Apr 2016 17:44:16 +0000 Subject: [PATCH 0051/1109] mark room unread on new message --- public/src/client/chats.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/public/src/client/chats.js b/public/src/client/chats.js index 672a12b57a..3ed356e876 100644 --- a/public/src/client/chats.js +++ b/public/src/client/chats.js @@ -366,6 +366,24 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll', data.message.self = data.self; Chats.appendChatMessage($('.expanded-chat .chat-content'), data.message); + } else { + if (ajaxify.currentPage.startsWith("chats")) { + var roomEl = $('[data-roomid=' + data.roomId + ']'); + + if (roomEl.length > 0) { + roomEl.addClass("unread"); + } else { + console.log(data); + var recentEl = components.get('chat/recent'); + templates.parse('partials/chat_recent_room', { + rooms: { "roomId": data.roomId, "lastUser": data.message.fromUser, "usernames": data.message.fromUser.username, "unread": true } + }, function(html) { + translator.translate(html, function(translated) { + recentEl.prepend(translated); + }); + }); + } + } } }); From b5d798077f9ba2148a05a8591fec97706bbf436f Mon Sep 17 00:00:00 2001 From: pichalite Date: Fri, 15 Apr 2016 10:57:58 -0700 Subject: [PATCH 0052/1109] remove log :fail: --- public/src/client/chats.js | 1 - 1 file changed, 1 deletion(-) diff --git a/public/src/client/chats.js b/public/src/client/chats.js index 3ed356e876..af4f764c7c 100644 --- a/public/src/client/chats.js +++ b/public/src/client/chats.js @@ -373,7 +373,6 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll', if (roomEl.length > 0) { roomEl.addClass("unread"); } else { - console.log(data); var recentEl = components.get('chat/recent'); templates.parse('partials/chat_recent_room', { rooms: { "roomId": data.roomId, "lastUser": data.message.fromUser, "usernames": data.message.fromUser.username, "unread": true } From 53e96270012fe3ea0a6cb605ffdfcb0b94ce25f2 Mon Sep 17 00:00:00 2001 From: Aziz Khoury Date: Fri, 15 Apr 2016 15:55:55 -0400 Subject: [PATCH 0053/1109] unify request as a store key for both http and websockets calls --- src/middleware/cls.js | 11 ++++------- src/socket.io/index.js | 7 +++++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/middleware/cls.js b/src/middleware/cls.js index ce3d79b922..ce795eae6a 100644 --- a/src/middleware/cls.js +++ b/src/middleware/cls.js @@ -1,4 +1,6 @@ var path = require('path'); +var sockets = require('path'); +var websockets = require('../socket.io'); var continuationLocalStorage = require('continuation-local-storage'); var APP_NAMESPACE = require(path.join(__dirname, '../../package.json')).name; var namespace = continuationLocalStorage.createNamespace(APP_NAMESPACE); @@ -7,18 +9,14 @@ var cls = {}; cls.http = function (req, res, next) { namespace.run(function() { - namespace.set('http', {req: req, res: res}); + namespace.set('request', req); next(); }); }; cls.socket = function (socket, payload, event, next) { namespace.run(function() { - namespace.set('ws', { - socket: socket, - payload: payload, - // if it's a null event, then we grab it from the payload - event: event || ((payload || {}).data || [])[0]}); + namespace.set('request', websockets.reqFromSocket(socket, payload, event)); next(); }); }; @@ -33,7 +31,6 @@ cls.set = function (key, value) { cls.setItem = cls.set; cls.getItem = cls.set; -cls.getNamespace = cls.storage; cls.namespace = namespace; cls.continuationLocalStorage = continuationLocalStorage; diff --git a/src/socket.io/index.js b/src/socket.io/index.js index de504ab523..76fda883a6 100644 --- a/src/socket.io/index.js +++ b/src/socket.io/index.js @@ -248,7 +248,7 @@ Sockets.getOnlineAnonCount = function () { return room ? room.length : 0; }; -Sockets.reqFromSocket = function(socket) { +Sockets.reqFromSocket = function(socket, payload, event) { var headers = socket.request.headers; var host = headers.host; var referer = headers.referer || ''; @@ -256,11 +256,14 @@ Sockets.reqFromSocket = function(socket) { return { ip: headers['x-forwarded-for'] || socket.ip, host: host, + uid: socket.uid, protocol: socket.request.connection.encrypted ? 'https' : 'http', secure: !!socket.request.connection.encrypted, url: referer, + body: {event: event || ((payload || {}).data || [])[0], payload: payload}, path: referer.substr(referer.indexOf(host) + host.length), - headers: headers + headers: headers, + _socket: socket }; }; From 4f3a962f7fe3636094c4b5062ca6236e3448453f Mon Sep 17 00:00:00 2001 From: Aziz Khoury Date: Fri, 15 Apr 2016 16:42:22 -0400 Subject: [PATCH 0054/1109] what did i do? --- src/socket.io/index.js | 344 ++++++++++++++++++++--------------------- 1 file changed, 164 insertions(+), 180 deletions(-) diff --git a/src/socket.io/index.js b/src/socket.io/index.js index 4092b576bf..809f21ea11 100644 --- a/src/socket.io/index.js +++ b/src/socket.io/index.js @@ -8,227 +8,211 @@ var cookieParser = require('cookie-parser')(nconf.get('secret')); var winston = require('winston'); var db = require('../database'); -var user = require('../user'); var logger = require('../logger'); var ratelimit = require('../middleware/ratelimit'); -var cls = require('../middleware/cls'); + +var Sockets = {}; +var Namespaces = {}; var io; -(function(Sockets) { - var Namespaces = {}; +Sockets.init = function(server) { + requireModules(); - Sockets.init = function(server) { - requireModules(); + io = new SocketIO({ + path: nconf.get('relative_path') + '/socket.io' + }); - io = new SocketIO({ - path: nconf.get('relative_path') + '/socket.io' - }); + addRedisAdapter(io); - addRedisAdapter(io); + io.use(socketioWildcard); + io.use(authorize); - io.use(socketioWildcard); - io.use(authorize); + io.on('connection', onConnection); - io.on('connection', onConnection); + io.listen(server, { + transports: nconf.get('socket.io:transports') + }); - io.on('disconnect', function(data) { - onDisconnect(io, data); - }); + Sockets.server = io; +}; - io.listen(server, { - transports: nconf.get('socket.io:transports') - }); +function onConnection(socket) { + socket.ip = socket.request.headers['x-forwarded-for'] || socket.request.connection.remoteAddress; - Sockets.server = io; - }; + logger.io_one(socket, socket.uid); - function onConnection(socket) { - socket.ip = socket.request.headers['x-forwarded-for'] || socket.request.connection.remoteAddress; + onConnect(socket); - logger.io_one(socket, socket.uid); + socket.on('*', function(payload) { + onMessage(socket, payload); + }); +} - cls.socket(socket, null, 'connection', function () { - onConnect(socket); - }); +function onConnect(socket) { + if (socket.uid) { + socket.join('uid_' + socket.uid); + socket.join('online_users'); + } else { + socket.join('online_guests'); + } +} - socket.on('*', function(payload) { - cls.socket(socket, payload, null, function() { - onMessage(socket, payload); - }); - }); + +function onMessage(socket, payload) { + if (!payload.data.length) { + return winston.warn('[socket.io] Empty payload'); } - function onConnect(socket) { - if (socket.uid) { - socket.join('uid_' + socket.uid); - socket.join('online_users'); + var eventName = payload.data[0]; + var params = payload.data[1]; + var callback = typeof payload.data[payload.data.length - 1] === 'function' ? payload.data[payload.data.length - 1] : function() {}; + + if (!eventName) { + return winston.warn('[socket.io] Empty method name'); + } + + var parts = eventName.toString().split('.'); + var namespace = parts[0]; + var methodToCall = parts.reduce(function(prev, cur) { + if (prev !== null && prev[cur]) { + return prev[cur]; } else { - socket.join('online_guests'); + return null; } + }, Namespaces); + + if(!methodToCall) { + if (process.env.NODE_ENV === 'development') { + winston.warn('[socket.io] Unrecognized message: ' + eventName); + } + return; } - function onDisconnect(socket) { - cls.socket(socket, null, 'disconnect', function() {}); + socket.previousEvents = socket.previousEvents || []; + socket.previousEvents.push(eventName); + if (socket.previousEvents.length > 20) { + socket.previousEvents.shift(); } + if (!eventName.startsWith('admin.') && ratelimit.isFlooding(socket)) { + winston.warn('[socket.io] Too many emits! Disconnecting uid : ' + socket.uid + '. Events : ' + socket.previousEvents); + return socket.disconnect(); + } - function onMessage(socket, payload) { - if (!payload.data.length) { - return winston.warn('[socket.io] Empty payload'); - } - - var eventName = payload.data[0]; - var params = payload.data[1]; - var callback = typeof payload.data[payload.data.length - 1] === 'function' ? payload.data[payload.data.length - 1] : function() {}; - - if (!eventName) { - return winston.warn('[socket.io] Empty method name'); - } - - var parts = eventName.toString().split('.'); - var namespace = parts[0]; - var methodToCall = parts.reduce(function(prev, cur) { - if (prev !== null && prev[cur]) { - return prev[cur]; + async.waterfall([ + function (next) { + validateSession(socket, next); + }, + function (next) { + if (Namespaces[namespace].before) { + Namespaces[namespace].before(socket, eventName, params, next); } else { - return null; + next(); } - }, Namespaces); + }, + function (next) { + methodToCall(socket, params, next); + } + ], function(err, result) { + callback(err ? {message: err.message} : null, result); + }); +} - if(!methodToCall) { - if (process.env.NODE_ENV === 'development') { - winston.warn('[socket.io] Unrecognized message: ' + eventName); - } - return; +function requireModules() { + var modules = ['admin', 'categories', 'groups', 'meta', 'modules', + 'notifications', 'plugins', 'posts', 'topics', 'user', 'blacklist' + ]; + + modules.forEach(function(module) { + Namespaces[module] = require('./' + module); + }); +} + +function validateSession(socket, callback) { + var req = socket.request; + if (!req.signedCookies || !req.signedCookies['express.sid']) { + return callback(new Error('[[error:invalid-session]]')); + } + db.sessionStore.get(req.signedCookies['express.sid'], function(err, sessionData) { + if (err || !sessionData) { + return callback(err || new Error('[[error:invalid-session]]')); } - socket.previousEvents = socket.previousEvents || []; - socket.previousEvents.push(eventName); - if (socket.previousEvents.length > 20) { - socket.previousEvents.shift(); - } + callback(); + }); +} - if (!eventName.startsWith('admin.') && ratelimit.isFlooding(socket)) { - winston.warn('[socket.io] Too many emits! Disconnecting uid : ' + socket.uid + '. Events : ' + socket.previousEvents); - return socket.disconnect(); - } +function authorize(socket, callback) { + var request = socket.request; - async.waterfall([ - function (next) { - validateSession(socket, next); - }, - function (next) { - if (Namespaces[namespace].before) { - Namespaces[namespace].before(socket, eventName, params, next); - } else { - next(); + if (!request) { + return callback(new Error('[[error:not-authorized]]')); + } + + async.waterfall([ + function(next) { + cookieParser(request, {}, next); + }, + function(next) { + db.sessionStore.get(request.signedCookies['express.sid'], function(err, sessionData) { + if (err) { + return next(err); } - }, - function (next) { - methodToCall(socket, params, next); - } - ], function(err, result) { - callback(err ? {message: err.message} : null, result); - }); - } - - function requireModules() { - var modules = ['admin', 'categories', 'groups', 'meta', 'modules', - 'notifications', 'plugins', 'posts', 'topics', 'user', 'blacklist' - ]; - - modules.forEach(function(module) { - Namespaces[module] = require('./' + module); - }); - } - - function validateSession(socket, callback) { - var req = socket.request; - if (!req.signedCookies || !req.signedCookies['express.sid']) { - return callback(new Error('[[error:invalid-session]]')); + if (sessionData && sessionData.passport && sessionData.passport.user) { + request.session = sessionData; + socket.uid = parseInt(sessionData.passport.user, 10); + } else { + socket.uid = 0; + } + next(); + }); } - db.sessionStore.get(req.signedCookies['express.sid'], function(err, sessionData) { - if (err || !sessionData) { - return callback(err || new Error('[[error:invalid-session]]')); - } + ], callback); +} - callback(); - }); +function addRedisAdapter(io) { + if (nconf.get('redis')) { + var redisAdapter = require('socket.io-redis'); + var redis = require('../database/redis'); + var pub = redis.connect({return_buffers: true}); + var sub = redis.connect({return_buffers: true}); + + io.adapter(redisAdapter({pubClient: pub, subClient: sub})); + } else if (nconf.get('isCluster') === 'true') { + winston.warn('[socket.io] Clustering detected, you are advised to configure Redis as a websocket store.'); + } +} + +Sockets.in = function(room) { + return io.in(room); +}; + +Sockets.getUserSocketCount = function(uid) { + if (!io) { + return 0; } - function authorize(socket, callback) { - var request = socket.request; + var room = io.sockets.adapter.rooms['uid_' + uid]; + return room ? room.length : 0; +}; - if (!request) { - return callback(new Error('[[error:not-authorized]]')); - } - async.waterfall([ - function(next) { - cookieParser(request, {}, next); - }, - function(next) { - db.sessionStore.get(request.signedCookies['express.sid'], function(err, sessionData) { - if (err) { - return next(err); - } - if (sessionData && sessionData.passport && sessionData.passport.user) { - request.session = sessionData; - socket.uid = parseInt(sessionData.passport.user, 10); - } else { - socket.uid = 0; - } - next(); - }); - } - ], callback); - } +Sockets.reqFromSocket = function(socket) { + var headers = socket.request.headers; + var host = headers.host; + var referer = headers.referer || ''; - function addRedisAdapter(io) { - if (nconf.get('redis')) { - var redisAdapter = require('socket.io-redis'); - var redis = require('../database/redis'); - var pub = redis.connect({return_buffers: true}); - var sub = redis.connect({return_buffers: true}); - - io.adapter(redisAdapter({pubClient: pub, subClient: sub})); - } else if (nconf.get('isCluster') === 'true') { - winston.warn('[socket.io] Clustering detected, you are advised to configure Redis as a websocket store.'); - } - } - - Sockets.in = function(room) { - return io.in(room); - }; - - Sockets.getUserSocketCount = function(uid) { - if (!io) { - return 0; - } - - var room = io.sockets.adapter.rooms['uid_' + uid]; - return room ? room.length : 0; + return { + ip: headers['x-forwarded-for'] || socket.ip, + host: host, + protocol: socket.request.connection.encrypted ? 'https' : 'http', + secure: !!socket.request.connection.encrypted, + url: referer, + path: referer.substr(referer.indexOf(host) + host.length), + headers: headers }; +}; - Sockets.reqFromSocket = function(socket, payload, event) { - var headers = socket.request.headers; - var host = headers.host; - var referer = headers.referer || ''; - - return { - ip: headers['x-forwarded-for'] || socket.ip, - host: host, - uid: socket.uid, - protocol: socket.request.connection.encrypted ? 'https' : 'http', - secure: !!socket.request.connection.encrypted, - url: referer, - body: {event: event || ((payload || {}).data || [])[0], payload: payload}, - path: referer.substr(referer.indexOf(host) + host.length), - headers: headers, - _socket: socket - }; - }; - -})(exports); \ No newline at end of file +module.exports = Sockets; \ No newline at end of file From 807e3a9d7e28e92249713653db32cb34b5850b09 Mon Sep 17 00:00:00 2001 From: Aziz Khoury Date: Fri, 15 Apr 2016 16:45:04 -0400 Subject: [PATCH 0055/1109] adding cls back in socketio index --- src/socket.io/index.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/socket.io/index.js b/src/socket.io/index.js index 809f21ea11..419b083478 100644 --- a/src/socket.io/index.js +++ b/src/socket.io/index.js @@ -10,6 +10,7 @@ var winston = require('winston'); var db = require('../database'); var logger = require('../logger'); var ratelimit = require('../middleware/ratelimit'); +var cls = require('../middleware/cls'); var Sockets = {}; var Namespaces = {}; @@ -29,6 +30,7 @@ Sockets.init = function(server) { io.use(authorize); io.on('connection', onConnection); + io.on('disconnect', onDisconnect); io.listen(server, { transports: nconf.get('socket.io:transports') @@ -42,10 +44,14 @@ function onConnection(socket) { logger.io_one(socket, socket.uid); - onConnect(socket); + cls.socket(socket, null, 'connection', function() { + onConnect(socket); + }); socket.on('*', function(payload) { - onMessage(socket, payload); + cls.socket(socket, payload, null, function() { + onMessage(socket, payload); + }); }); } @@ -58,6 +64,10 @@ function onConnect(socket) { } } +function onDisconnect(socket) { + cls.socket(socket, null, 'disconnect', function() {}); +} + function onMessage(socket, payload) { if (!payload.data.length) { From c07e29bad6b1f7b568ad9c87cf4d90e4dfc71f8b Mon Sep 17 00:00:00 2001 From: Aziz Khoury Date: Fri, 15 Apr 2016 16:47:55 -0400 Subject: [PATCH 0056/1109] fix circular dependency -- involves indentations fix --- src/socket.io/index.js | 406 ++++++++++++++++++++--------------------- 1 file changed, 203 insertions(+), 203 deletions(-) diff --git a/src/socket.io/index.js b/src/socket.io/index.js index 419b083478..e417f6d250 100644 --- a/src/socket.io/index.js +++ b/src/socket.io/index.js @@ -12,217 +12,217 @@ var logger = require('../logger'); var ratelimit = require('../middleware/ratelimit'); var cls = require('../middleware/cls'); -var Sockets = {}; -var Namespaces = {}; +(function(Sockets) { + var Namespaces = {}; + var io; -var io; + Sockets.init = function (server) { + requireModules(); -Sockets.init = function(server) { - requireModules(); - - io = new SocketIO({ - path: nconf.get('relative_path') + '/socket.io' - }); - - addRedisAdapter(io); - - io.use(socketioWildcard); - io.use(authorize); - - io.on('connection', onConnection); - io.on('disconnect', onDisconnect); - - io.listen(server, { - transports: nconf.get('socket.io:transports') - }); - - Sockets.server = io; -}; - -function onConnection(socket) { - socket.ip = socket.request.headers['x-forwarded-for'] || socket.request.connection.remoteAddress; - - logger.io_one(socket, socket.uid); - - cls.socket(socket, null, 'connection', function() { - onConnect(socket); - }); - - socket.on('*', function(payload) { - cls.socket(socket, payload, null, function() { - onMessage(socket, payload); + io = new SocketIO({ + path: nconf.get('relative_path') + '/socket.io' }); - }); -} -function onConnect(socket) { - if (socket.uid) { - socket.join('uid_' + socket.uid); - socket.join('online_users'); - } else { - socket.join('online_guests'); - } -} + addRedisAdapter(io); -function onDisconnect(socket) { - cls.socket(socket, null, 'disconnect', function() {}); -} + io.use(socketioWildcard); + io.use(authorize); + io.on('connection', onConnection); + io.on('disconnect', onDisconnect); -function onMessage(socket, payload) { - if (!payload.data.length) { - return winston.warn('[socket.io] Empty payload'); - } + io.listen(server, { + transports: nconf.get('socket.io:transports') + }); - var eventName = payload.data[0]; - var params = payload.data[1]; - var callback = typeof payload.data[payload.data.length - 1] === 'function' ? payload.data[payload.data.length - 1] : function() {}; - - if (!eventName) { - return winston.warn('[socket.io] Empty method name'); - } - - var parts = eventName.toString().split('.'); - var namespace = parts[0]; - var methodToCall = parts.reduce(function(prev, cur) { - if (prev !== null && prev[cur]) { - return prev[cur]; - } else { - return null; - } - }, Namespaces); - - if(!methodToCall) { - if (process.env.NODE_ENV === 'development') { - winston.warn('[socket.io] Unrecognized message: ' + eventName); - } - return; - } - - socket.previousEvents = socket.previousEvents || []; - socket.previousEvents.push(eventName); - if (socket.previousEvents.length > 20) { - socket.previousEvents.shift(); - } - - if (!eventName.startsWith('admin.') && ratelimit.isFlooding(socket)) { - winston.warn('[socket.io] Too many emits! Disconnecting uid : ' + socket.uid + '. Events : ' + socket.previousEvents); - return socket.disconnect(); - } - - async.waterfall([ - function (next) { - validateSession(socket, next); - }, - function (next) { - if (Namespaces[namespace].before) { - Namespaces[namespace].before(socket, eventName, params, next); - } else { - next(); - } - }, - function (next) { - methodToCall(socket, params, next); - } - ], function(err, result) { - callback(err ? {message: err.message} : null, result); - }); -} - -function requireModules() { - var modules = ['admin', 'categories', 'groups', 'meta', 'modules', - 'notifications', 'plugins', 'posts', 'topics', 'user', 'blacklist' - ]; - - modules.forEach(function(module) { - Namespaces[module] = require('./' + module); - }); -} - -function validateSession(socket, callback) { - var req = socket.request; - if (!req.signedCookies || !req.signedCookies['express.sid']) { - return callback(new Error('[[error:invalid-session]]')); - } - db.sessionStore.get(req.signedCookies['express.sid'], function(err, sessionData) { - if (err || !sessionData) { - return callback(err || new Error('[[error:invalid-session]]')); - } - - callback(); - }); -} - -function authorize(socket, callback) { - var request = socket.request; - - if (!request) { - return callback(new Error('[[error:not-authorized]]')); - } - - async.waterfall([ - function(next) { - cookieParser(request, {}, next); - }, - function(next) { - db.sessionStore.get(request.signedCookies['express.sid'], function(err, sessionData) { - if (err) { - return next(err); - } - if (sessionData && sessionData.passport && sessionData.passport.user) { - request.session = sessionData; - socket.uid = parseInt(sessionData.passport.user, 10); - } else { - socket.uid = 0; - } - next(); - }); - } - ], callback); -} - -function addRedisAdapter(io) { - if (nconf.get('redis')) { - var redisAdapter = require('socket.io-redis'); - var redis = require('../database/redis'); - var pub = redis.connect({return_buffers: true}); - var sub = redis.connect({return_buffers: true}); - - io.adapter(redisAdapter({pubClient: pub, subClient: sub})); - } else if (nconf.get('isCluster') === 'true') { - winston.warn('[socket.io] Clustering detected, you are advised to configure Redis as a websocket store.'); - } -} - -Sockets.in = function(room) { - return io.in(room); -}; - -Sockets.getUserSocketCount = function(uid) { - if (!io) { - return 0; - } - - var room = io.sockets.adapter.rooms['uid_' + uid]; - return room ? room.length : 0; -}; - - -Sockets.reqFromSocket = function(socket) { - var headers = socket.request.headers; - var host = headers.host; - var referer = headers.referer || ''; - - return { - ip: headers['x-forwarded-for'] || socket.ip, - host: host, - protocol: socket.request.connection.encrypted ? 'https' : 'http', - secure: !!socket.request.connection.encrypted, - url: referer, - path: referer.substr(referer.indexOf(host) + host.length), - headers: headers + Sockets.server = io; }; -}; + + function onConnection(socket) { + socket.ip = socket.request.headers['x-forwarded-for'] || socket.request.connection.remoteAddress; + + logger.io_one(socket, socket.uid); + + cls.socket(socket, null, 'connection', function () { + onConnect(socket); + }); + + socket.on('*', function (payload) { + cls.socket(socket, payload, null, function () { + onMessage(socket, payload); + }); + }); + } + + function onConnect(socket) { + if (socket.uid) { + socket.join('uid_' + socket.uid); + socket.join('online_users'); + } else { + socket.join('online_guests'); + } + } + + function onDisconnect(socket) { + cls.socket(socket, null, 'disconnect', function () { + }); + } -module.exports = Sockets; \ No newline at end of file + function onMessage(socket, payload) { + if (!payload.data.length) { + return winston.warn('[socket.io] Empty payload'); + } + + var eventName = payload.data[0]; + var params = payload.data[1]; + var callback = typeof payload.data[payload.data.length - 1] === 'function' ? payload.data[payload.data.length - 1] : function () { + }; + + if (!eventName) { + return winston.warn('[socket.io] Empty method name'); + } + + var parts = eventName.toString().split('.'); + var namespace = parts[0]; + var methodToCall = parts.reduce(function (prev, cur) { + if (prev !== null && prev[cur]) { + return prev[cur]; + } else { + return null; + } + }, Namespaces); + + if (!methodToCall) { + if (process.env.NODE_ENV === 'development') { + winston.warn('[socket.io] Unrecognized message: ' + eventName); + } + return; + } + + socket.previousEvents = socket.previousEvents || []; + socket.previousEvents.push(eventName); + if (socket.previousEvents.length > 20) { + socket.previousEvents.shift(); + } + + if (!eventName.startsWith('admin.') && ratelimit.isFlooding(socket)) { + winston.warn('[socket.io] Too many emits! Disconnecting uid : ' + socket.uid + '. Events : ' + socket.previousEvents); + return socket.disconnect(); + } + + async.waterfall([ + function (next) { + validateSession(socket, next); + }, + function (next) { + if (Namespaces[namespace].before) { + Namespaces[namespace].before(socket, eventName, params, next); + } else { + next(); + } + }, + function (next) { + methodToCall(socket, params, next); + } + ], function (err, result) { + callback(err ? {message: err.message} : null, result); + }); + } + + function requireModules() { + var modules = ['admin', 'categories', 'groups', 'meta', 'modules', + 'notifications', 'plugins', 'posts', 'topics', 'user', 'blacklist' + ]; + + modules.forEach(function (module) { + Namespaces[module] = require('./' + module); + }); + } + + function validateSession(socket, callback) { + var req = socket.request; + if (!req.signedCookies || !req.signedCookies['express.sid']) { + return callback(new Error('[[error:invalid-session]]')); + } + db.sessionStore.get(req.signedCookies['express.sid'], function (err, sessionData) { + if (err || !sessionData) { + return callback(err || new Error('[[error:invalid-session]]')); + } + + callback(); + }); + } + + function authorize(socket, callback) { + var request = socket.request; + + if (!request) { + return callback(new Error('[[error:not-authorized]]')); + } + + async.waterfall([ + function (next) { + cookieParser(request, {}, next); + }, + function (next) { + db.sessionStore.get(request.signedCookies['express.sid'], function (err, sessionData) { + if (err) { + return next(err); + } + if (sessionData && sessionData.passport && sessionData.passport.user) { + request.session = sessionData; + socket.uid = parseInt(sessionData.passport.user, 10); + } else { + socket.uid = 0; + } + next(); + }); + } + ], callback); + } + + function addRedisAdapter(io) { + if (nconf.get('redis')) { + var redisAdapter = require('socket.io-redis'); + var redis = require('../database/redis'); + var pub = redis.connect({return_buffers: true}); + var sub = redis.connect({return_buffers: true}); + + io.adapter(redisAdapter({pubClient: pub, subClient: sub})); + } else if (nconf.get('isCluster') === 'true') { + winston.warn('[socket.io] Clustering detected, you are advised to configure Redis as a websocket store.'); + } + } + + Sockets.in = function (room) { + return io.in(room); + }; + + Sockets.getUserSocketCount = function (uid) { + if (!io) { + return 0; + } + + var room = io.sockets.adapter.rooms['uid_' + uid]; + return room ? room.length : 0; + }; + + + Sockets.reqFromSocket = function (socket) { + var headers = socket.request.headers; + var host = headers.host; + var referer = headers.referer || ''; + + return { + ip: headers['x-forwarded-for'] || socket.ip, + host: host, + protocol: socket.request.connection.encrypted ? 'https' : 'http', + secure: !!socket.request.connection.encrypted, + url: referer, + path: referer.substr(referer.indexOf(host) + host.length), + headers: headers + }; + }; + +})(exports); \ No newline at end of file From 02e53fd4428f3861cbe422ba9955e045cb1fbc78 Mon Sep 17 00:00:00 2001 From: Aziz Khoury Date: Fri, 15 Apr 2016 16:59:25 -0400 Subject: [PATCH 0057/1109] update deprecation message --- src/plugins/hooks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/hooks.js b/src/plugins/hooks.js index 04691bce71..c7d72f7d3e 100644 --- a/src/plugins/hooks.js +++ b/src/plugins/hooks.js @@ -65,7 +65,7 @@ module.exports = function(Plugins) { if (Plugins.deprecatedHooksParams[_hook]) { winston.warn('[plugins/' + id + '] Hook `' + _hook + '` parameters: `' + Plugins.deprecatedHooksParams[_hook] + '`, are being deprecated, ' + 'all plugins should now use the `middleware/cls` module instead of hook\'s arguments to get a reference to the `req`, `res` and/or `socket` object(s) (from which you can get the current `uid` if you need to.) ' - + '- for more info, visit https://docs.nodebb.org/en/latest/plugins/create.html#getting-a-reference-to-req-res-socket-and-uid-within-any-plugin-hook') + + '- for more info, visit https://docs.nodebb.org/en/latest/plugins/create.html#getting-a-reference-to-each-request-from-within-any-plugin-hook'); delete Plugins.deprecatedHooksParams[_hook]; } } From 8920c952817a0c53c0e86cee631a1b27008f3748 Mon Sep 17 00:00:00 2001 From: Aziz Khoury Date: Fri, 15 Apr 2016 17:07:24 -0400 Subject: [PATCH 0058/1109] reqFromSocket now support payload and event and uid --- src/socket.io/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/socket.io/index.js b/src/socket.io/index.js index e417f6d250..5706c0b62c 100644 --- a/src/socket.io/index.js +++ b/src/socket.io/index.js @@ -209,12 +209,15 @@ var cls = require('../middleware/cls'); }; - Sockets.reqFromSocket = function (socket) { + Sockets.reqFromSocket = function (socket, payload, event) { var headers = socket.request.headers; var host = headers.host; var referer = headers.referer || ''; + var data = ((payload || {}).data || []); return { + uid: socket.uid, + body: {event: event || data[0], params: data[1], payload: payload}, ip: headers['x-forwarded-for'] || socket.ip, host: host, protocol: socket.request.connection.encrypted ? 'https' : 'http', From aac30cb5ec5aedc7f8d0edad82f9b8172cd6757c Mon Sep 17 00:00:00 2001 From: Aziz Khoury Date: Fri, 15 Apr 2016 17:17:54 -0400 Subject: [PATCH 0059/1109] hmm .. --- src/socket.io/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/socket.io/index.js b/src/socket.io/index.js index 5706c0b62c..42647fb9a9 100644 --- a/src/socket.io/index.js +++ b/src/socket.io/index.js @@ -217,7 +217,9 @@ var cls = require('../middleware/cls'); return { uid: socket.uid, - body: {event: event || data[0], params: data[1], payload: payload}, + params: data[1], + method: event, + body: payload, ip: headers['x-forwarded-for'] || socket.ip, host: host, protocol: socket.request.connection.encrypted ? 'https' : 'http', From 3dc63438debb9cf37e6cb22c1711cb1f1c23b2e2 Mon Sep 17 00:00:00 2001 From: Aziz Khoury Date: Fri, 15 Apr 2016 17:21:26 -0400 Subject: [PATCH 0060/1109] hmm-2 ... --- src/socket.io/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/socket.io/index.js b/src/socket.io/index.js index 42647fb9a9..fc97f7cc87 100644 --- a/src/socket.io/index.js +++ b/src/socket.io/index.js @@ -218,7 +218,7 @@ var cls = require('../middleware/cls'); return { uid: socket.uid, params: data[1], - method: event, + method: event || data[0], body: payload, ip: headers['x-forwarded-for'] || socket.ip, host: host, From a3e829e974203e2866d8c051b0feadf762694904 Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Sat, 16 Apr 2016 09:02:26 -0400 Subject: [PATCH 0061/1109] Latest translations and fallbacks --- public/language/de/user.json | 8 ++++---- public/language/es/topic.json | 8 ++++---- public/language/es/uploads.json | 8 ++++---- public/language/es/user.json | 14 +++++++------- public/language/es/users.json | 2 +- public/language/tr/user.json | 2 +- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/public/language/de/user.json b/public/language/de/user.json index 428add8a6e..6dec6a1863 100644 --- a/public/language/de/user.json +++ b/public/language/de/user.json @@ -92,12 +92,12 @@ "open_links_in_new_tab": "Ausgehende Links in neuem Tab öffnen", "enable_topic_searching": "Suchen innerhalb von Themen aktivieren", "topic_search_help": "Wenn aktiviert, ersetzt die im-Thema-Suche die Standardsuche des Browsers. Dadurch kannst du im ganzen Thema suchen, nicht nur im sichtbaren Abschnitt.", - "delay_image_loading": "Delay Image Loading", - "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", + "delay_image_loading": "Bilder nachladen", + "image_load_delay_help": "Wenn aktiviert, werden Bilder in Themen erst dann geladen, wenn sie in den sichtbaren Bereich gescrollt werden", "scroll_to_my_post": "Zeige eigene Antwort nach dem Erstellen im Thema an", - "follow_topics_you_reply_to": "Themen folgen, in denen auf dich geantwortet wird", + "follow_topics_you_reply_to": "Themen folgen, auf die du antwortest", "follow_topics_you_create": "Themen folgen, die du erstellst", - "grouptitle": "Wähle den anzuzeigenden Gruppen Titel aus", + "grouptitle": "Wähle den anzuzeigenden Gruppentitel aus", "no-group-title": "Kein Gruppentitel", "select-skin": "Einen Skin auswählen", "select-homepage": "Startseite", diff --git a/public/language/es/topic.json b/public/language/es/topic.json index 1f13a9e8e9..bf5c804c0b 100644 --- a/public/language/es/topic.json +++ b/public/language/es/topic.json @@ -35,7 +35,7 @@ "login_to_subscribe": "Por favor, conéctate para subscribirte a este tema.", "markAsUnreadForAll.success": "Publicación marcada como no leída para todos.", "mark_unread": "Marcar como no leído", - "mark_unread.success": "Topic marked as unread.", + "mark_unread.success": "Tema marcado como no leído.", "watch": "Seguir", "unwatch": "Dejar de seguir", "watch.title": "Serás notificado cuando haya nuevas respuestas en este tema", @@ -65,9 +65,9 @@ "disabled_categories_note": "Las categorías deshabilitadas están en gris", "confirm_move": "Mover", "confirm_fork": "Dividir", - "favourite": "Bookmark", - "favourites": "Bookmarks", - "favourites.has_no_favourites": "You haven't bookmarked any posts yet.", + "favourite": "Marcador", + "favourites": "Marcadores", + "favourites.has_no_favourites": "No has marcado ningún tema aún.", "loading_more_posts": "Cargando más publicaciones", "move_topic": "Mover tema", "move_topics": "Mover temas", diff --git a/public/language/es/uploads.json b/public/language/es/uploads.json index 1622cb5693..9dac954194 100644 --- a/public/language/es/uploads.json +++ b/public/language/es/uploads.json @@ -1,6 +1,6 @@ { - "uploading-file": "Uploading the file...", - "select-file-to-upload": "Select a file to upload!", - "upload-success": "File uploaded successfully!", - "maximum-file-size": "Maximum %1 kb" + "uploading-file": "Subiendo el archivo...", + "select-file-to-upload": "¡Selecciona un archivo para subir!", + "upload-success": "¡Archivo subido correctamente!", + "maximum-file-size": "Máximo %1 kb" } \ No newline at end of file diff --git a/public/language/es/user.json b/public/language/es/user.json index 78fa65e455..e9be55c953 100644 --- a/public/language/es/user.json +++ b/public/language/es/user.json @@ -22,7 +22,7 @@ "profile": "Perfil", "profile_views": "Visitas", "reputation": "Reputación", - "favourites": "Bookmarks", + "favourites": "Marcadores", "watched": "Suscritos", "followers": "Seguidores", "following": "Siguiendo", @@ -39,7 +39,7 @@ "change_username": "Cambiar nombre de usuario", "change_email": "Cambiar email", "edit": "Editar", - "edit-profile": "Edit Profile", + "edit-profile": "Editar Perfil", "default_picture": "Icono por defecto", "uploaded_picture": "Imagen subida", "upload_new_picture": "Subir nueva imagen", @@ -56,11 +56,11 @@ "password": "Contraseña", "username_taken_workaround": "El nombre de usuario que has solicitada ya está siendo usado, por tanto lo hemos alterado ligeramente. Ahora eres conocido como %1.", "password_same_as_username": "Tu Constraseña es igual al nombre de Usuario, por favor seleccione otra Constraseña.", - "password_same_as_email": "Your password is the same as your email, please select another password.", + "password_same_as_email": "Tu contraseña es igual que tu dirección de correo, por favor elige otra contraseña.", "upload_picture": "Subir foto", "upload_a_picture": "Subir una foto", "remove_uploaded_picture": "Borrar Imagen subida", - "upload_cover_picture": "Upload cover picture", + "upload_cover_picture": "Subir imagen de portada", "settings": "Opciones", "show_email": "Mostrar mi correo electrónico", "show_fullname": "Mostrar mi nombre completo", @@ -92,9 +92,9 @@ "open_links_in_new_tab": "Abrir los enlaces externos en una nueva pestaña", "enable_topic_searching": "Activar la búsqueda \"in-topic\"", "topic_search_help": "Si está activada, la búsqueda 'in-topic' sustituirá el comportamiento por defecto del navegador y le permitirá buscar en el tema al completo, en vez de hacer una búsqueda únicamente sobre el contenido mostrado en pantalla", - "delay_image_loading": "Delay Image Loading", - "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", - "scroll_to_my_post": "After posting a reply, show the new post", + "delay_image_loading": "Retrasar la carga de imágenes", + "image_load_delay_help": "Si se habilita, las imágenes no cargarán hasta que se vean en pantalla", + "scroll_to_my_post": "Luego de enviar una respuesta, mostrar el nuevo mensaje", "follow_topics_you_reply_to": "Seguir los temas en los que respondes", "follow_topics_you_create": "Seguir publicaciones que creas", "grouptitle": "Selecciona el título del grupo que deseas visualizar", diff --git a/public/language/es/users.json b/public/language/es/users.json index cf8bdaefff..61bac3bc05 100644 --- a/public/language/es/users.json +++ b/public/language/es/users.json @@ -16,5 +16,5 @@ "unread_topics": "Temas no leídos", "categories": "Categorías ", "tags": "Etiquetas", - "no-users-found": "No users found!" + "no-users-found": "¡No se encontraron usuarios!" } \ No newline at end of file diff --git a/public/language/tr/user.json b/public/language/tr/user.json index 346c3d775e..d5608146e5 100644 --- a/public/language/tr/user.json +++ b/public/language/tr/user.json @@ -92,7 +92,7 @@ "open_links_in_new_tab": "Dışarı giden bağlantıları yeni sekmede aç", "enable_topic_searching": "Konu içi aramayı aktive et", "topic_search_help": "Aktive edilirse, konu içi arama tarayıcının normal arama davranışını değiştirerek tüm konuyu aramanızı sağlar", - "delay_image_loading": "Delay Image Loading", + "delay_image_loading": "Gecikmeli Görsel Yükleme", "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", "scroll_to_my_post": "Cevap yazdıktan sonra yeni gönderiyi göster", "follow_topics_you_reply_to": "Cevap verdiğim konuları takip et", From 3e2f36fc29ec8e67f09ad83162b3bd16d97e2bc1 Mon Sep 17 00:00:00 2001 From: "Mr.Lee" Date: Sat, 16 Apr 2016 23:34:57 +0800 Subject: [PATCH 0062/1109] Make the description more clear. The same description in mongo.js and install.js are ambiguous. --- src/database/mongo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/database/mongo.js b/src/database/mongo.js index 0e7e8e2d2a..83a9258857 100644 --- a/src/database/mongo.js +++ b/src/database/mongo.js @@ -37,7 +37,7 @@ }, { name: "mongo:database", - description: "Which database to use", + description: "MongoDB database name", 'default': nconf.get('mongo:database') || 0 } ]; From f18099b435c5e69874bba7fd8f093b886a8f5d0a Mon Sep 17 00:00:00 2001 From: Ben Lubar Date: Sat, 16 Apr 2016 22:45:20 -0500 Subject: [PATCH 0063/1109] actually don't delay image loading when "delay image loading" is unchecked --- public/src/client/topic/posts.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/public/src/client/topic/posts.js b/public/src/client/topic/posts.js index 996dcbc6b9..9ad98eae97 100644 --- a/public/src/client/topic/posts.js +++ b/public/src/client/topic/posts.js @@ -239,11 +239,13 @@ define('forum/topic/posts', [ Posts.unloadImages = function(posts) { var images = posts.find('[component="post/content"] img:not(.not-responsive)'); - images.each(function() { - $(this).attr('data-src', $(this).attr('src')); - $(this).attr('data-state', 'unloaded'); - $(this).attr('src', 'about:blank'); - }); + if (config.delayImageLoading) { + images.each(function() { + $(this).attr('data-src', $(this).attr('src')); + }).attr('data-state', 'unloaded').attr('src', 'about:blank'); + } else { + images.attr('data-state', 'loaded'); + } }; Posts.loadImages = function(threshold) { @@ -263,7 +265,7 @@ define('forum/topic/posts', [ var images = components.get('post/content').find('img[data-state="unloaded"]'), visible = images.filter(function() { - return config.delayImageLoading ? utils.isElementInViewport(this) : true; + return utils.isElementInViewport(this); }), scrollTop = $(window).scrollTop(), adjusting = false, From b7335c7a6149777f41eee38925ee77f730d984bb Mon Sep 17 00:00:00 2001 From: Danijel Date: Sun, 17 Apr 2016 15:38:43 +0200 Subject: [PATCH 0064/1109] remove HTTP(S) schema for external bootstrap CSS file. remove HTTP(S) schema from external bootstrap CSS file to avoid mixed content error. --- public/src/client/account/settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/client/account/settings.js b/public/src/client/account/settings.js index 04312f2823..c594abd72a 100644 --- a/public/src/client/account/settings.js +++ b/public/src/client/account/settings.js @@ -64,7 +64,7 @@ define('forum/account/settings', ['forum/account/header', 'components', 'csrf'], $('#bootswatchSkin').on('change', function() { var css = $('#bootswatchCSS'), - val = $(this).val() === 'default' ? config['theme:src'] : 'http://maxcdn.bootstrapcdn.com/bootswatch/latest/' + $(this).val() + '/bootstrap.min.css'; + val = $(this).val() === 'default' ? config['theme:src'] : '//maxcdn.bootstrapcdn.com/bootswatch/latest/' + $(this).val() + '/bootstrap.min.css'; css.attr('href', val); }); From 4bb5dad05d72adf2e1964f9991a7a87496240ee7 Mon Sep 17 00:00:00 2001 From: pichalite Date: Mon, 18 Apr 2016 06:58:20 +0000 Subject: [PATCH 0065/1109] move ACP user reg type --- src/views/admin/settings/user.tpl | 38 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/src/views/admin/settings/user.tpl b/src/views/admin/settings/user.tpl index 55c54149c6..0edc062271 100644 --- a/src/views/admin/settings/user.tpl +++ b/src/views/admin/settings/user.tpl @@ -32,26 +32,6 @@ - -
    - - -
    - -
    - - -

    - 0 for no restriction. Admins get infinite invitations
    - Only applicable for "Invite Only" -

    -
    @@ -139,6 +119,24 @@
    User Registration
    +
    + + +
    +
    + + +

    + 0 for no restriction. Admins get infinite invitations
    + Only applicable for "Invite Only" +

    +
    From ec33a57f7773b60d8913c4ebe33306c2a52164fa Mon Sep 17 00:00:00 2001 From: barisusakli Date: Mon, 18 Apr 2016 15:44:07 +0300 Subject: [PATCH 0066/1109] closes #3128 --- public/language/en_GB/unread.json | 5 +- src/controllers/unread.js | 21 ++++- src/topics/unread.js | 125 ++++++++++++++++++------------ 3 files changed, 98 insertions(+), 53 deletions(-) diff --git a/public/language/en_GB/unread.json b/public/language/en_GB/unread.json index 0af9a2cdf6..4a449a53f5 100644 --- a/public/language/en_GB/unread.json +++ b/public/language/en_GB/unread.json @@ -6,5 +6,8 @@ "selected": "Selected", "all": "All", "all_categories": "All categories", - "topics_marked_as_read.success": "Topics marked as read!" + "topics_marked_as_read.success": "Topics marked as read!", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/src/controllers/unread.js b/src/controllers/unread.js index e7aacb2465..d3655fd050 100644 --- a/src/controllers/unread.js +++ b/src/controllers/unread.js @@ -5,14 +5,14 @@ var async = require('async'); var meta = require('../meta'); var categories = require('../categories'); var privileges = require('../privileges'); -var user = require('../user') +var user = require('../user'); var topics = require('../topics'); var helpers = require('./helpers'); var plugins = require('../plugins'); var unreadController = {}; -var validFilter = {'': true, 'new': true}; +var validFilter = {'': true, 'new': true, 'watched': true}; unreadController.get = function(req, res, next) { var stop = (parseInt(meta.config.topicsPerList, 10) || 20) - 1; @@ -57,6 +57,23 @@ unreadController.get = function(req, res, next) { results.unreadTopics.breadcrumbs = helpers.buildBreadcrumbs([{text: '[[unread:title]]'}]); results.unreadTopics.title = '[[pages:unread]]'; + results.unreadTopics.filters = [{ + name: '[[unread:all-topics]]', + url: 'unread', + selected: filter === '' + }, { + name: '[[unread:new-topics]]', + url: 'unread/new', + selected: filter === 'new' + }, { + name: '[[unread:watched-topics]]', + url: 'unread/watched', + selected: filter === 'watched' + }]; + + results.unreadTopics.selectedFilter = results.unreadTopics.filters.filter(function(filter) { + return filter && filter.selected; + })[0]; plugins.fireHook('filter:unread.build', {req: req, res: res, templateData: results.unreadTopics}, next); } diff --git a/src/topics/unread.js b/src/topics/unread.js index 63941cd01a..ac2e6d63a3 100644 --- a/src/topics/unread.js +++ b/src/topics/unread.js @@ -31,7 +31,6 @@ module.exports = function(Topics) { filter = ''; } - var unreadTopics = { showSelect: true, nextStart : 0, @@ -77,57 +76,71 @@ module.exports = function(Topics) { var cutoff = Topics.unreadCutoff(); - async.parallel({ - ignoredCids: function(next) { - user.getIgnoredCategories(uid, next); + var ignoredCids; + + async.waterfall([ + function (next) { + async.parallel({ + ignoredCids: function(next) { + if (filter === 'watched') { + return next(null, []); + } + user.getIgnoredCategories(uid, next); + }, + recentTids: function(next) { + db.getSortedSetRevRangeByScoreWithScores('topics:recent', 0, -1, '+inf', cutoff, next); + }, + userScores: function(next) { + db.getSortedSetRevRangeByScoreWithScores('uid:' + uid + ':tids_read', 0, -1, '+inf', cutoff, next); + }, + tids_unread: function(next) { + db.getSortedSetRevRangeWithScores('uid:' + uid + ':tids_unread', 0, -1, next); + } + }, next); }, - recentTids: function(next) { - db.getSortedSetRevRangeByScoreWithScores('topics:recent', 0, -1, '+inf', cutoff, next); - }, - userScores: function(next) { - db.getSortedSetRevRangeByScoreWithScores('uid:' + uid + ':tids_read', 0, -1, '+inf', cutoff, next); - }, - tids_unread: function(next) { - db.getSortedSetRevRangeWithScores('uid:' + uid + ':tids_unread', 0, -1, next); - } - }, function(err, results) { - if (err) { - return callback(err); - } - - if (results.recentTids && !results.recentTids.length && !results.tids_unread.length) { - return callback(null, []); - } - - var userRead = {}; - results.userScores.forEach(function(userItem) { - userRead[userItem.value] = userItem.score; - }); - - results.recentTids = results.recentTids.concat(results.tids_unread); - results.recentTids.sort(function(a, b) { - return b.score - a.score; - }); - - var tids = results.recentTids.filter(function(recentTopic) { - switch (filter) { - default: - return !userRead[recentTopic.value] || recentTopic.score > userRead[recentTopic.value]; - case 'new': - return !userRead[recentTopic.value]; + function (results, next) { + if (results.recentTids && !results.recentTids.length && !results.tids_unread.length) { + return callback(null, []); } - }).map(function(topic) { - return topic.value; - }).filter(function(tid, index, array) { - return array.indexOf(tid) === index; - }); - tids = tids.slice(0, 100); + ignoredCids = results.ignoredCids; - filterTopics(uid, tids, cid, results.ignoredCids, function(err, tids) { - if (err) { - return callback(err); + var userRead = {}; + results.userScores.forEach(function(userItem) { + userRead[userItem.value] = userItem.score; + }); + + results.recentTids = results.recentTids.concat(results.tids_unread); + results.recentTids.sort(function(a, b) { + return b.score - a.score; + }); + + var tids = results.recentTids.filter(function(recentTopic) { + switch (filter) { + case 'new': + return !userRead[recentTopic.value]; + default: + return !userRead[recentTopic.value] || recentTopic.score > userRead[recentTopic.value]; + } + }).map(function(topic) { + return topic.value; + }).filter(function(tid, index, array) { + return array.indexOf(tid) === index; + }); + + if (filter === 'watched') { + filterWatchedTids(uid, tids, next); + } else { + next(null, tids); } + }, + function (tids, next) { + + tids = tids.slice(0, 100); + + filterTopics(uid, tids, cid, ignoredCids, next); + }, + function (tids, next) { if (stop === -1) { tids = tids.slice(start); @@ -135,11 +148,23 @@ module.exports = function(Topics) { tids = tids.slice(start, stop + 1); } - callback(null, tids); - }); - }); + next(null, tids); + } + ], callback); }; + function filterWatchedTids(uid, tids, callback) { + db.sortedSetScores('uid:' + uid + ':followed_tids', tids, function(err, scores) { + if (err) { + return callback(err); + } + tids = tids.filter(function(tid, index) { + return tid && !!scores[index]; + }); + callback(null, tids); + }); + } + function filterTopics(uid, tids, cid, ignoredCids, callback) { if (!Array.isArray(ignoredCids) || !tids.length) { return callback(null, tids); From ba6f687880ee7afe000cca52e93394c8cc6b6bf5 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Mon, 18 Apr 2016 15:47:06 +0300 Subject: [PATCH 0067/1109] up themes --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 48b35953b5..8872941618 100644 --- a/package.json +++ b/package.json @@ -56,8 +56,8 @@ "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", "nodebb-theme-lavender": "3.0.9", - "nodebb-theme-persona": "4.0.120", - "nodebb-theme-vanilla": "5.0.64", + "nodebb-theme-persona": "4.0.121", + "nodebb-theme-vanilla": "5.0.65", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", "nodemailer-sendmail-transport": "1.0.0", From accd9b6e2e7f706f1dcb7673b700b1d330d26756 Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Mon, 18 Apr 2016 09:02:24 -0400 Subject: [PATCH 0068/1109] Latest translations and fallbacks --- public/language/ko/user.json | 4 ++-- public/language/sr/email.json | 6 +++--- public/language/sr/error.json | 16 ++++++++-------- public/language/sr/modules.json | 2 +- public/language/tr/user.json | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/public/language/ko/user.json b/public/language/ko/user.json index c5dc94de20..24c008a10d 100644 --- a/public/language/ko/user.json +++ b/public/language/ko/user.json @@ -92,8 +92,8 @@ "open_links_in_new_tab": "외부 링크를 새로운 탭을 사용하여 열람", "enable_topic_searching": "주제 내 검색 허용", "topic_search_help": "활성화 된후 브라우저의 기본 페이지 검색 기능을 연관 주제 검색 기능으로 대신하고 화면에 보여지는 것 뿐만 아니라 주제와 연관된 모든것을 검색합니다.", - "delay_image_loading": "Delay Image Loading", - "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", + "delay_image_loading": "이미지 로딩 지연", + "image_load_delay_help": "활성화 되면 이미지 위치로 스크롤을 움직이기 전까지 이미지가 로드 되지 않습니다.", "scroll_to_my_post": "답글 게시 후 새 포스트 보여주기", "follow_topics_you_reply_to": "답글 단 게시물을 팔로우 합니다.", "follow_topics_you_create": "생성한 주제를 팔로우 합니다.", diff --git a/public/language/sr/email.json b/public/language/sr/email.json index a9ef2f8954..3b47422111 100644 --- a/public/language/sr/email.json +++ b/public/language/sr/email.json @@ -21,9 +21,9 @@ "digest.cta": "Кликните овде да посетите %1", "digest.unsub.info": "Овај резиме је послат вама због претплате.", "digest.no_topics": "Није било активних тема у последњих %1", - "digest.day": "day", - "digest.week": "week", - "digest.month": "month", + "digest.day": "Дан", + "digest.week": "Недеља", + "digest.month": "Месец", "notif.chat.subject": "Примљена је нова порука ћаскања од %1", "notif.chat.cta": "Кликните овде да наставите са разговором", "notif.chat.unsub.info": "Ова нотификација је послата вама због претплате коју имате.", diff --git a/public/language/sr/error.json b/public/language/sr/error.json index 25e4d1b130..369e8f7308 100644 --- a/public/language/sr/error.json +++ b/public/language/sr/error.json @@ -14,18 +14,18 @@ "invalid-password": "Неисправна лозинка", "invalid-username-or-password": "Молимо наведите и корисничко име и лозинку", "invalid-search-term": "Неисправан упит за претрагу", - "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", + "invalid-pagination-value": "Неважећа вредност при обележавању страна, мора бити најмање %1 и највише %2 ", "username-taken": "Корисничко име је заузето", "email-taken": "Адреса е-поште је заусета", "email-not-confirmed": "Ваша адреса е-поште жоуш увек није оверена, кликните овде да би сте то учинили.", "email-not-confirmed-chat": "Није вам дозвољено да ћаскате док не оверите вашу е-пошту, клкните овде да то учините.", - "no-email-to-confirm": "This forum requires email confirmation, please click here to enter an email", - "email-confirm-failed": "We could not confirm your email, please try again later.", - "confirm-email-already-sent": "Confirmation email already sent, please wait %1 minute(s) to send another one.", - "username-too-short": "Username too short", - "username-too-long": "Username too long", - "password-too-long": "Password too long", - "user-banned": "User banned", + "no-email-to-confirm": "Форум захтева потврду е-поште, кликните овде да бисте отворили е-пошту", + "email-confirm-failed": "Потврда е-поште није успела, молимо вас да покушате касније.", + "confirm-email-already-sent": "Конфирмациони имејл је већ послат, молимо вас да сачекате %1 минут(а) да бисте послали други.", + "username-too-short": "Корисничко име је прекратко", + "username-too-long": "Корисничко име је предуго", + "password-too-long": "Шифра је предугачка.", + "user-banned": "Члан банован", "user-too-new": "Sorry, you are required to wait %1 second(s) before making your first post", "blacklisted-ip": "Sorry, your IP address has been banned from this community. If you feel this is in error, please contact an administrator.", "no-category": "Категорија не постоји", diff --git a/public/language/sr/modules.json b/public/language/sr/modules.json index 412f9fd207..c4f4c3314a 100644 --- a/public/language/sr/modules.json +++ b/public/language/sr/modules.json @@ -6,7 +6,7 @@ "chat.user_typing": "%1 куца ...", "chat.user_has_messaged_you": "%1 вам посла поруку.", "chat.see_all": "Погледајте сва ћаскања", - "chat.mark_all_read": "Mark all chats read", + "chat.mark_all_read": "Означи све разговоре као прочитане", "chat.no-messages": "Изаберите примаоца да бисте видели историју ћаскања", "chat.no-users-in-room": "Нема корисника у овој соби", "chat.recent-chats": "Недавна ћаскања", diff --git a/public/language/tr/user.json b/public/language/tr/user.json index d5608146e5..18ff6f5d91 100644 --- a/public/language/tr/user.json +++ b/public/language/tr/user.json @@ -93,7 +93,7 @@ "enable_topic_searching": "Konu içi aramayı aktive et", "topic_search_help": "Aktive edilirse, konu içi arama tarayıcının normal arama davranışını değiştirerek tüm konuyu aramanızı sağlar", "delay_image_loading": "Gecikmeli Görsel Yükleme", - "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", + "image_load_delay_help": "Aktif hale getirmeniz halinde başlıktaki görseller, sayfa kaydırıldıkca yüklenecek", "scroll_to_my_post": "Cevap yazdıktan sonra yeni gönderiyi göster", "follow_topics_you_reply_to": "Cevap verdiğim konuları takip et", "follow_topics_you_create": "Kendi konularımı takip et", From ff9b2bad497fe28fbb79f2b11f5f11fc03bf6ec3 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Mon, 18 Apr 2016 16:06:59 +0300 Subject: [PATCH 0069/1109] closes #4512 --- public/src/client/topic.js | 4 ++-- src/controllers/topics.js | 1 + src/views/admin/settings/post.tpl | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/public/src/client/topic.js b/public/src/client/topic.js index ff0a255261..fd6fd7dbfa 100644 --- a/public/src/client/topic.js +++ b/public/src/client/topic.js @@ -143,7 +143,7 @@ define('forum/topic', [ if (components.get('post/anchor', postIndex).length) { return navigator.scrollToPostIndex(postIndex, true); } - } else if (bookmark && (!config.usePagination || (config.usePagination && ajaxify.data.pagination.currentPage === 1)) && ajaxify.data.postcount > 5) { + } else if (bookmark && (!config.usePagination || (config.usePagination && ajaxify.data.pagination.currentPage === 1)) && ajaxify.data.postcount > ajaxify.data.bookmarkThreshold) { navigator.update(0); app.alert({ alert_id: 'bookmark', @@ -280,7 +280,7 @@ define('forum/topic', [ var bookmarkKey = 'topic:' + ajaxify.data.tid + ':bookmark'; var currentBookmark = ajaxify.data.bookmark || localStorage.getItem(bookmarkKey); - if (ajaxify.data.postcount > 5 && (!currentBookmark || parseInt(index, 10) > parseInt(currentBookmark, 10))) { + if (ajaxify.data.postcount > ajaxify.data.bookmarkThreshold && (!currentBookmark || parseInt(index, 10) > parseInt(currentBookmark, 10))) { if (app.user.uid) { socket.emit('topics.bookmark', { 'tid': ajaxify.data.tid, diff --git a/src/controllers/topics.js b/src/controllers/topics.js index c3c2847778..c62ad30545 100644 --- a/src/controllers/topics.js +++ b/src/controllers/topics.js @@ -261,6 +261,7 @@ topicsController.get = function(req, res, callback) { data['reputation:disabled'] = parseInt(meta.config['reputation:disabled'], 10) === 1; data['downvote:disabled'] = parseInt(meta.config['downvote:disabled'], 10) === 1; data['feeds:disableRSS'] = parseInt(meta.config['feeds:disableRSS'], 10) === 1; + data.bookmarkThreshold = parseInt(meta.config.bookmarkThreshold, 10) || 5; data.scrollToMyPost = settings.scrollToMyPost; data.rssFeedUrl = nconf.get('relative_path') + '/topic/' + data.tid + '.rss'; data.pagination = pagination.create(currentPage, pageCount); diff --git a/src/views/admin/settings/post.tpl b/src/views/admin/settings/post.tpl index 590f0e18cd..e37f51a40c 100644 --- a/src/views/admin/settings/post.tpl +++ b/src/views/admin/settings/post.tpl @@ -100,6 +100,10 @@
    +
    + + +
    From d24b15a584a2cd6f076f65f602b03e28f10d01e2 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Mon, 18 Apr 2016 10:06:32 -0400 Subject: [PATCH 0070/1109] closes #4523 --- src/meta/css.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/meta/css.js b/src/meta/css.js index 264267d7c6..0250ae5b26 100644 --- a/src/meta/css.js +++ b/src/meta/css.js @@ -5,7 +5,6 @@ var winston = require('winston'), fs = require('fs'), path = require('path'), less = require('less'), - crypto = require('crypto'), async = require('async'), autoprefixer = require('autoprefixer'), postcss = require('postcss'), @@ -43,8 +42,7 @@ module.exports = function(Meta) { path.join(__dirname, '../../public/vendor/fontawesome/less'), path.join(__dirname, '../../public/vendor/bootstrap/less') ], - source = '@import "font-awesome";', - acpSource = '@import "font-awesome";'; + source = '@import "font-awesome";'; plugins.lessFiles = filterMissingFiles(plugins.lessFiles); plugins.cssFiles = filterMissingFiles(plugins.cssFiles); @@ -66,6 +64,8 @@ module.exports = function(Meta) { return callback(err); } + var acpSource = source; + source += '\n@import (inline) "..' + path.sep + '..' + path.sep + 'public/vendor/jquery/css/smoothness/jquery-ui-1.10.4.custom.min.css";'; source += '\n@import (inline) "..' + path.sep + '..' + path.sep + 'public/vendor/jquery/bootstrap-tagsinput/bootstrap-tagsinput.css";'; source += '\n@import (inline) "..' + path.sep + 'public/vendor/colorpicker/colorpicker.css";'; From 6e617dd69a14198f44738631780a33661038606d Mon Sep 17 00:00:00 2001 From: psychobunny Date: Mon, 18 Apr 2016 10:59:55 -0400 Subject: [PATCH 0071/1109] closes #4520 --- Gruntfile.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index a6aca2083a..b9422b7661 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -7,15 +7,16 @@ var fork = require('child_process').fork, module.exports = function(grunt) { + var args = []; + if (!grunt.option('verbose')) { + args.push('--log-level=info'); + } + function update(action, filepath, target) { - var args = [], + var updateArgs = args, fromFile = '', compiling = '', time = Date.now(); - - if (!grunt.option('verbose')) { - args.push('--log-level=info'); - } if (target === 'lessUpdated_Client') { fromFile = ['js', 'tpl', 'acpLess']; @@ -37,11 +38,11 @@ module.exports = function(grunt) { return incomplete.indexOf(ext) === -1; }); - args.push('--from-file=' + fromFile.join(',')); + updateArgs.push('--from-file=' + fromFile.join(',')); incomplete.push(compiling); worker.kill(); - worker = fork('app.js', args, { env: env }); + worker = fork('app.js', updateArgs, { env: env }); worker.on('message', function() { if (incomplete.length) { @@ -101,6 +102,6 @@ module.exports = function(grunt) { env.NODE_ENV = 'development'; - worker = fork('app.js', [], { env: env }); + worker = fork('app.js', args, { env: env }); grunt.event.on('watch', update); }; \ No newline at end of file From 5f5d8e6b562e298ba5622567f5b27141f73006cd Mon Sep 17 00:00:00 2001 From: psychobunny Date: Mon, 18 Apr 2016 11:22:38 -0400 Subject: [PATCH 0072/1109] ah, woops --- Gruntfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index b9422b7661..eb3cdc7417 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -13,7 +13,7 @@ module.exports = function(grunt) { } function update(action, filepath, target) { - var updateArgs = args, + var updateArgs = args.slice(), fromFile = '', compiling = '', time = Date.now(); From dd3c00d9e27d5d74c71e110a1bca81c2147a03d0 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 18 Apr 2016 14:56:41 -0400 Subject: [PATCH 0073/1109] updated theme versions --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 8872941618..f925c9b50b 100644 --- a/package.json +++ b/package.json @@ -56,8 +56,8 @@ "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", "nodebb-theme-lavender": "3.0.9", - "nodebb-theme-persona": "4.0.121", - "nodebb-theme-vanilla": "5.0.65", + "nodebb-theme-persona": "4.0.122", + "nodebb-theme-vanilla": "5.0.66", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", "nodemailer-sendmail-transport": "1.0.0", @@ -115,4 +115,4 @@ "url": "https://github.com/barisusakli" } ] -} \ No newline at end of file +} From d0f08b4dd40bfb5fe05cf9e4d7ab4319b51d56a0 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 18 Apr 2016 16:04:09 -0400 Subject: [PATCH 0074/1109] added prompt to passport input for Google SSO --- src/routes/authentication.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/authentication.js b/src/routes/authentication.js index 8e1824cad6..62e2c66224 100644 --- a/src/routes/authentication.js +++ b/src/routes/authentication.js @@ -52,7 +52,8 @@ loginStrategies.forEach(function(strategy) { if (strategy.url) { router.get(strategy.url, passport.authenticate(strategy.name, { - scope: strategy.scope + scope: strategy.scope, + prompt: strategy.prompt || undefined })); } From 19d708b689f0a8e0fc5439817ed833132d6c560e Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Tue, 19 Apr 2016 09:02:30 -0400 Subject: [PATCH 0075/1109] Latest translations and fallbacks --- public/language/ar/email.json | 1 + public/language/ar/error.json | 1 + public/language/ar/topic.json | 2 +- public/language/ar/user.json | 2 +- public/language/bg/email.json | 1 + public/language/bg/error.json | 1 + public/language/bg/topic.json | 2 +- public/language/bg/user.json | 2 +- public/language/bn/email.json | 1 + public/language/bn/error.json | 1 + public/language/bn/topic.json | 2 +- public/language/bn/user.json | 2 +- public/language/cs/email.json | 1 + public/language/cs/error.json | 1 + public/language/cs/topic.json | 2 +- public/language/cs/user.json | 2 +- public/language/da/email.json | 1 + public/language/da/error.json | 1 + public/language/da/topic.json | 2 +- public/language/da/user.json | 2 +- public/language/de/email.json | 1 + public/language/de/error.json | 1 + public/language/de/topic.json | 2 +- public/language/de/user.json | 2 +- public/language/el/email.json | 1 + public/language/el/error.json | 1 + public/language/el/topic.json | 2 +- public/language/el/user.json | 2 +- public/language/en@pirate/email.json | 1 + public/language/en@pirate/error.json | 1 + public/language/en@pirate/topic.json | 2 +- public/language/en@pirate/user.json | 2 +- public/language/en_US/email.json | 1 + public/language/en_US/error.json | 1 + public/language/en_US/user.json | 2 +- public/language/es/email.json | 1 + public/language/es/error.json | 1 + public/language/es/topic.json | 2 +- public/language/es/user.json | 2 +- public/language/et/email.json | 1 + public/language/et/error.json | 1 + public/language/et/topic.json | 2 +- public/language/et/user.json | 2 +- public/language/fa_IR/email.json | 1 + public/language/fa_IR/error.json | 1 + public/language/fa_IR/topic.json | 2 +- public/language/fa_IR/user.json | 2 +- public/language/fi/email.json | 1 + public/language/fi/error.json | 1 + public/language/fi/topic.json | 2 +- public/language/fi/user.json | 2 +- public/language/fr/email.json | 1 + public/language/fr/error.json | 1 + public/language/fr/topic.json | 2 +- public/language/fr/user.json | 2 +- public/language/gl/email.json | 1 + public/language/gl/error.json | 1 + public/language/gl/topic.json | 2 +- public/language/gl/user.json | 2 +- public/language/he/email.json | 1 + public/language/he/error.json | 1 + public/language/he/topic.json | 2 +- public/language/he/user.json | 2 +- public/language/hu/email.json | 1 + public/language/hu/error.json | 1 + public/language/hu/topic.json | 2 +- public/language/hu/user.json | 2 +- public/language/id/email.json | 1 + public/language/id/error.json | 1 + public/language/id/topic.json | 2 +- public/language/id/user.json | 2 +- public/language/it/email.json | 1 + public/language/it/error.json | 1 + public/language/it/topic.json | 2 +- public/language/it/user.json | 2 +- public/language/ja/email.json | 1 + public/language/ja/error.json | 1 + public/language/ja/topic.json | 2 +- public/language/ja/user.json | 2 +- public/language/ko/email.json | 1 + public/language/ko/error.json | 1 + public/language/ko/topic.json | 2 +- public/language/ko/user.json | 2 +- public/language/lt/email.json | 1 + public/language/lt/error.json | 1 + public/language/lt/topic.json | 2 +- public/language/lt/user.json | 2 +- public/language/ms/email.json | 1 + public/language/ms/error.json | 1 + public/language/ms/topic.json | 2 +- public/language/ms/user.json | 2 +- public/language/nb/email.json | 1 + public/language/nb/error.json | 1 + public/language/nb/topic.json | 2 +- public/language/nb/user.json | 2 +- public/language/nl/email.json | 1 + public/language/nl/error.json | 1 + public/language/nl/groups.json | 2 +- public/language/nl/topic.json | 2 +- public/language/nl/uploads.json | 8 ++++---- public/language/nl/user.json | 6 +++--- public/language/pl/email.json | 1 + public/language/pl/error.json | 1 + public/language/pl/topic.json | 2 +- public/language/pl/user.json | 2 +- public/language/pt_BR/email.json | 1 + public/language/pt_BR/error.json | 1 + public/language/pt_BR/topic.json | 2 +- public/language/pt_BR/user.json | 6 +++--- public/language/ro/email.json | 1 + public/language/ro/error.json | 1 + public/language/ro/topic.json | 2 +- public/language/ro/user.json | 2 +- public/language/ru/email.json | 1 + public/language/ru/error.json | 1 + public/language/ru/topic.json | 2 +- public/language/ru/user.json | 2 +- public/language/rw/email.json | 1 + public/language/rw/error.json | 1 + public/language/rw/topic.json | 2 +- public/language/rw/user.json | 2 +- public/language/sc/email.json | 1 + public/language/sc/error.json | 1 + public/language/sc/topic.json | 2 +- public/language/sc/user.json | 2 +- public/language/sk/email.json | 1 + public/language/sk/error.json | 1 + public/language/sk/topic.json | 2 +- public/language/sk/user.json | 2 +- public/language/sl/email.json | 1 + public/language/sl/error.json | 1 + public/language/sl/topic.json | 2 +- public/language/sl/user.json | 2 +- public/language/sr/email.json | 1 + public/language/sr/error.json | 1 + public/language/sr/topic.json | 2 +- public/language/sr/user.json | 2 +- public/language/sv/email.json | 1 + public/language/sv/error.json | 3 ++- public/language/sv/topic.json | 2 +- public/language/sv/user.json | 2 +- public/language/th/email.json | 1 + public/language/th/error.json | 1 + public/language/th/topic.json | 2 +- public/language/th/user.json | 2 +- public/language/tr/email.json | 1 + public/language/tr/error.json | 1 + public/language/tr/topic.json | 2 +- public/language/tr/user.json | 2 +- public/language/vi/email.json | 1 + public/language/vi/error.json | 1 + public/language/vi/topic.json | 2 +- public/language/vi/user.json | 2 +- public/language/zh_CN/email.json | 1 + public/language/zh_CN/error.json | 1 + public/language/zh_CN/topic.json | 2 +- public/language/zh_CN/user.json | 2 +- public/language/zh_TW/email.json | 1 + public/language/zh_TW/error.json | 1 + public/language/zh_TW/topic.json | 2 +- public/language/zh_TW/user.json | 2 +- 161 files changed, 169 insertions(+), 89 deletions(-) diff --git a/public/language/ar/email.json b/public/language/ar/email.json index 0799f8892e..6e2a809e4b 100644 --- a/public/language/ar/email.json +++ b/public/language/ar/email.json @@ -24,6 +24,7 @@ "digest.day": "day", "digest.week": "week", "digest.month": "month", + "digest.subject": "Digest for %1", "notif.chat.subject": "هناك محادثة جديدة من %1", "notif.chat.cta": "انقر هنا لمتابعة المحادثة", "notif.chat.unsub.info": "تم إرسال هذا الإشعار بوجودة محادثة جديدة وفقا لخيارات تسجيلك.", diff --git a/public/language/ar/error.json b/public/language/ar/error.json index 635f404c8c..505831c652 100644 --- a/public/language/ar/error.json +++ b/public/language/ar/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "You are not allowed to edit this message", "cant-remove-last-user": "You can't remove the last user", "cant-delete-chat-message": "You are not allowed to delete this message", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "نظام السمعة معطل", "downvoting-disabled": "التصويتات السلبية معطلة", "not-enough-reputation-to-downvote": "ليس لديك سمعة تكفي لإضافة صوت سلبي لهذا الموضوع", diff --git a/public/language/ar/topic.json b/public/language/ar/topic.json index 1e66ad91eb..81cf19d677 100644 --- a/public/language/ar/topic.json +++ b/public/language/ar/topic.json @@ -26,7 +26,7 @@ "tools": "أدوات", "flag": "تبليغ", "locked": "مقفل", - "bookmark_instructions": "Click here to return to the last unread post in this thread.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "إشعار بمشاركة مخلة.", "flag_success": "تم الإشعار بهذه المشاركة على أنها مخلة", "deleted_message": "هذه المشاركة محذوفة. فقط من لهم صلاحية الإشراف على ا لمشاركات يمكنهم معاينتها.", diff --git a/public/language/ar/user.json b/public/language/ar/user.json index 47d51308ac..15740e1f14 100644 --- a/public/language/ar/user.json +++ b/public/language/ar/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "متابعة المواضيع التي تقوم بالرد فيها", "follow_topics_you_create": "متابعة المواضيع التي تنشئها", - "grouptitle": "حدد عنوان المجموعة الذي تريد عرضه", + "grouptitle": "Group Title", "no-group-title": "لا يوجد عنوان للمجموعة", "select-skin": "Select a Skin", "select-homepage": "Select a Homepage", diff --git a/public/language/bg/email.json b/public/language/bg/email.json index 12ebb52350..480dd09fff 100644 --- a/public/language/bg/email.json +++ b/public/language/bg/email.json @@ -24,6 +24,7 @@ "digest.day": "ден", "digest.week": "месец", "digest.month": "година", + "digest.subject": "Резюме за %1", "notif.chat.subject": "Получено е ново съобщение от %1", "notif.chat.cta": "Натиснете тук, за да продължите разговора", "notif.chat.unsub.info": "Това известие за разговор беше изпратено до Вас поради настройките Ви за абонаментите.", diff --git a/public/language/bg/error.json b/public/language/bg/error.json index 0eaeb842d2..5a1e1a5e75 100644 --- a/public/language/bg/error.json +++ b/public/language/bg/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "Нямате право да редактирате това съобщение", "cant-remove-last-user": "Не можете да премахнете последния потребител", "cant-delete-chat-message": "Нямате право да изтриете това съобщение", + "already-voting-for-this-post": "Вече сте дали глас за тази публикация.", "reputation-system-disabled": "Системата за репутация е изключена.", "downvoting-disabled": "Отрицателното гласуване е изключено", "not-enough-reputation-to-downvote": "Нямате достатъчно репутация, за да гласувате отрицателно за тази публикация", diff --git a/public/language/bg/topic.json b/public/language/bg/topic.json index dbe44a1541..53a0f49d56 100644 --- a/public/language/bg/topic.json +++ b/public/language/bg/topic.json @@ -26,7 +26,7 @@ "tools": "Инструменти", "flag": "Докладване", "locked": "Заключена", - "bookmark_instructions": "Натиснете тук, за да се върнете на последната непрочетена публикация в тази тема.", + "bookmark_instructions": "Щракнете тук, за да се върнете към последно прочетената публикация в тази тема.", "flag_title": "Докладване на тази публикация до модератор", "flag_success": "Тази публикация е била докладвана до модератор.", "deleted_message": "Тази тема е била изтрита. Само потребители с права за управление на темите могат да я видят.", diff --git a/public/language/bg/user.json b/public/language/bg/user.json index e0b18bff83..89d096cb42 100644 --- a/public/language/bg/user.json +++ b/public/language/bg/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "След публикуване на отговор, да се показва новата публикация", "follow_topics_you_reply_to": "Следване на темите, на които отговаряте", "follow_topics_you_create": "Следване на темите, които създавате", - "grouptitle": "Изберете заглавието на групата, което искате да се показва", + "grouptitle": "Заглавие на групата", "no-group-title": "Няма заглавие на група", "select-skin": "Изберете облик", "select-homepage": "Изберете начална страница", diff --git a/public/language/bn/email.json b/public/language/bn/email.json index a2411a99a7..525460a206 100644 --- a/public/language/bn/email.json +++ b/public/language/bn/email.json @@ -24,6 +24,7 @@ "digest.day": "day", "digest.week": "week", "digest.month": "month", + "digest.subject": "Digest for %1", "notif.chat.subject": "%1 এর থেকে নতুন মেসেজ এসেছে।", "notif.chat.cta": "কথপোকথন চালিয়ে যেতে এখানে ক্লিক করুন", "notif.chat.unsub.info": "আপনার সাবস্ক্রীপশন সেটিংসের কারনে আপনার এই নোটিফিকেশন পাঠানো হয়েছে", diff --git a/public/language/bn/error.json b/public/language/bn/error.json index 7f363517cc..b95faf8f70 100644 --- a/public/language/bn/error.json +++ b/public/language/bn/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "You are not allowed to edit this message", "cant-remove-last-user": "You can't remove the last user", "cant-delete-chat-message": "You are not allowed to delete this message", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "সম্মাননা ব্যাবস্থা নিস্ক্রীয় রাখা হয়েছে", "downvoting-disabled": "ঋণাত্মক ভোট নিস্ক্রীয় রাখা হয়েছে।", "not-enough-reputation-to-downvote": "আপনার এই পোস্ট downvote করার জন্য পর্যাপ্ত সম্মাননা নেই", diff --git a/public/language/bn/topic.json b/public/language/bn/topic.json index 9fea972e71..053cff1d7e 100644 --- a/public/language/bn/topic.json +++ b/public/language/bn/topic.json @@ -26,7 +26,7 @@ "tools": "টুলস", "flag": "ফ্ল্যাগ", "locked": "বন্ধ", - "bookmark_instructions": "Click here to return to the last unread post in this thread.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "মডারেশনের জন্য এই পোস্টটি ফ্ল্যাগ করুন", "flag_success": "এই পোস্টটি মডারেশনের জন্য ফ্ল্যাগ করা হয়েছে।", "deleted_message": "এই টপিকটি মুছে ফেলা হয়েছে। শুধুমাত্র টপিক ব্যবস্থাপনার ক্ষমতাপ্রাপ্ত সদস্যগণ এটি দেখতে পারবেন।", diff --git a/public/language/bn/user.json b/public/language/bn/user.json index 1f954b1a31..ffdda322d6 100644 --- a/public/language/bn/user.json +++ b/public/language/bn/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", - "grouptitle": "Select the group title you would like to display", + "grouptitle": "Group Title", "no-group-title": "No group title", "select-skin": "Select a Skin", "select-homepage": "Select a Homepage", diff --git a/public/language/cs/email.json b/public/language/cs/email.json index bcb35b58ae..b31b6dea73 100644 --- a/public/language/cs/email.json +++ b/public/language/cs/email.json @@ -24,6 +24,7 @@ "digest.day": "day", "digest.week": "week", "digest.month": "month", + "digest.subject": "Digest for %1", "notif.chat.subject": "Nová zpráva z chatu od %1", "notif.chat.cta": "Chcete-li pokračovat v konverzaci, klikněte zde.", "notif.chat.unsub.info": "Toto oznámení z chatu vám bylo zasláno, protože jste si to nastavili ve vašich odběrech.", diff --git a/public/language/cs/error.json b/public/language/cs/error.json index dfec525151..7dae341dc3 100644 --- a/public/language/cs/error.json +++ b/public/language/cs/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "You are not allowed to edit this message", "cant-remove-last-user": "You can't remove the last user", "cant-delete-chat-message": "You are not allowed to delete this message", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "Systém reputací je zakázán.", "downvoting-disabled": "Downvoting is disabled", "not-enough-reputation-to-downvote": "You do not have enough reputation to downvote this post", diff --git a/public/language/cs/topic.json b/public/language/cs/topic.json index 3bced7f182..8bdef36acc 100644 --- a/public/language/cs/topic.json +++ b/public/language/cs/topic.json @@ -26,7 +26,7 @@ "tools": "Nástroje", "flag": "Flag", "locked": "Locked", - "bookmark_instructions": "Click here to return to the last unread post in this thread.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "Flag this post for moderation", "flag_success": "This post has been flagged for moderation.", "deleted_message": "This topic has been deleted. Only users with topic management privileges can see it.", diff --git a/public/language/cs/user.json b/public/language/cs/user.json index ab3bf570d0..e380634dfc 100644 --- a/public/language/cs/user.json +++ b/public/language/cs/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", - "grouptitle": "Select the group title you would like to display", + "grouptitle": "Group Title", "no-group-title": "No group title", "select-skin": "Select a Skin", "select-homepage": "Select a Homepage", diff --git a/public/language/da/email.json b/public/language/da/email.json index 0ed8b77a53..d5591d698d 100644 --- a/public/language/da/email.json +++ b/public/language/da/email.json @@ -24,6 +24,7 @@ "digest.day": "dag", "digest.week": "uge", "digest.month": "måned", + "digest.subject": "Digest for %1", "notif.chat.subject": "Ny chat besked modtaget fra %1", "notif.chat.cta": "Klik her for at forsætte med samtalen", "notif.chat.unsub.info": "Denne chat notifikation blev sendt til dig pga. indstillingerne i dit abonnement.", diff --git a/public/language/da/error.json b/public/language/da/error.json index 148f312c98..70ac398753 100644 --- a/public/language/da/error.json +++ b/public/language/da/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "Du har ikke tilladelse til at redigere denne besked", "cant-remove-last-user": "Du kan ikke fjerne den sidste bruger", "cant-delete-chat-message": "Du har ikke tilladelse til at slette denne besked", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "Vurderingssystem er slået fra.", "downvoting-disabled": "Nedvurdering er slået fra", "not-enough-reputation-to-downvote": "Du har ikke nok omdømme til at nedstemme dette indlæg", diff --git a/public/language/da/topic.json b/public/language/da/topic.json index 888384ced3..67ab4e6174 100644 --- a/public/language/da/topic.json +++ b/public/language/da/topic.json @@ -26,7 +26,7 @@ "tools": "Værktøjer", "flag": "Marker", "locked": "Låst", - "bookmark_instructions": "Klik her for at returnere til det seneste ulæste indlæg i denne tråd.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "Meld dette indlæg til moderation", "flag_success": "Dette indlæg er blevet meldt til moderation.", "deleted_message": "Denne tråd er blevet slettet. Kun brugere med emne behandlings privilegier kan se den.", diff --git a/public/language/da/user.json b/public/language/da/user.json index a2f250767e..9637ad7afa 100644 --- a/public/language/da/user.json +++ b/public/language/da/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Følg emner du har skrevet indlæg i", "follow_topics_you_create": "Følg emner du opretter", - "grouptitle": "Vælg gruppe titlen du gerne vil fremvise", + "grouptitle": "Group Title", "no-group-title": "Ingen gruppe titel", "select-skin": "Vælg et skin", "select-homepage": "Vælg en hjemmeside", diff --git a/public/language/de/email.json b/public/language/de/email.json index 459cb40156..7ba24003a7 100644 --- a/public/language/de/email.json +++ b/public/language/de/email.json @@ -24,6 +24,7 @@ "digest.day": "des letzten Tages", "digest.week": "der letzten Woche", "digest.month": "des letzen Monats", + "digest.subject": "Übersicht für %1", "notif.chat.subject": "Neue Chatnachricht von %1 erhalten", "notif.chat.cta": "Klicke hier, um die Unterhaltung fortzusetzen", "notif.chat.unsub.info": "Diese Chat-Benachrichtigung wurde dir aufgrund deiner Abonnement-Einstellungen gesendet.", diff --git a/public/language/de/error.json b/public/language/de/error.json index 40615e0e2e..52009800ba 100644 --- a/public/language/de/error.json +++ b/public/language/de/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "Du darfst diese Nachricht nicht ändern", "cant-remove-last-user": "Du kannst den letzten Benutzer nicht entfernen", "cant-delete-chat-message": "Du darfst diese Nachricht nicht löschen", + "already-voting-for-this-post": "Du hast diesen Beitrag bereits bewertet.", "reputation-system-disabled": "Das Reputationssystem ist deaktiviert.", "downvoting-disabled": "Downvotes sind deaktiviert.", "not-enough-reputation-to-downvote": "Dein Ansehen ist zu niedrig, um diesen Beitrag negativ zu bewerten.", diff --git a/public/language/de/topic.json b/public/language/de/topic.json index 2b34c42911..2269c91ae5 100644 --- a/public/language/de/topic.json +++ b/public/language/de/topic.json @@ -26,7 +26,7 @@ "tools": "Werkzeuge", "flag": "Markieren", "locked": "Gesperrt", - "bookmark_instructions": "Klicke hier um zum letzten ungelesenen Beitrag in diesem Thema zu springen.", + "bookmark_instructions": "Klicke hier, um zum letzten gelesenen Beitrag des Themas zurückzukehren.", "flag_title": "Diesen Beitrag zur Moderation markieren", "flag_success": "Dieser Beitrag wurde erfolgreich für die Moderation markiert.", "deleted_message": "Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.", diff --git a/public/language/de/user.json b/public/language/de/user.json index 6dec6a1863..fd456b65d9 100644 --- a/public/language/de/user.json +++ b/public/language/de/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "Zeige eigene Antwort nach dem Erstellen im Thema an", "follow_topics_you_reply_to": "Themen folgen, auf die du antwortest", "follow_topics_you_create": "Themen folgen, die du erstellst", - "grouptitle": "Wähle den anzuzeigenden Gruppentitel aus", + "grouptitle": "Gruppentitel", "no-group-title": "Kein Gruppentitel", "select-skin": "Einen Skin auswählen", "select-homepage": "Startseite", diff --git a/public/language/el/email.json b/public/language/el/email.json index 936eabdd43..3f5adb3021 100644 --- a/public/language/el/email.json +++ b/public/language/el/email.json @@ -24,6 +24,7 @@ "digest.day": "day", "digest.week": "week", "digest.month": "month", + "digest.subject": "Digest for %1", "notif.chat.subject": "Νέο μήνυμα συνομιλίας από τον/την %1", "notif.chat.cta": "Κάνε κλικ εδώ για να πας στην συνομιλία", "notif.chat.unsub.info": "Αυτή η ειδοποίηση για συνομιλία σου στάλθηκε λόγω των ρυθμίσεών σου. ", diff --git a/public/language/el/error.json b/public/language/el/error.json index 388ec06c89..030e5497f1 100644 --- a/public/language/el/error.json +++ b/public/language/el/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "You are not allowed to edit this message", "cant-remove-last-user": "You can't remove the last user", "cant-delete-chat-message": "You are not allowed to delete this message", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "Το σύστημα φήμης έχει απενεργοποιηθεί.", "downvoting-disabled": "Η καταψήφιση έχει απενεργοποιηθεί", "not-enough-reputation-to-downvote": "Δεν έχεις αρκετή φήμη για να καταψηφίσεις αυτή την δημοσίευση", diff --git a/public/language/el/topic.json b/public/language/el/topic.json index a2f1d0fcd7..67ac6e5ef7 100644 --- a/public/language/el/topic.json +++ b/public/language/el/topic.json @@ -26,7 +26,7 @@ "tools": "Εργαλεία", "flag": "Σημαία", "locked": "Κλειδωμένο", - "bookmark_instructions": "Click here to return to the last unread post in this thread.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "Επισήμανση αυτής της δημοσίευσης για συντονισμό", "flag_success": "Αυτή η δημοσίευση έχει επισημανθεί για συντονισμό.", "deleted_message": "Το θέμα αυτό έχει διαγραφεί. Μόνο οι χρήστες με δικαιώματα διαχειριστή θεμάτων μπορούν να το δουν.", diff --git a/public/language/el/user.json b/public/language/el/user.json index 9497dbac3c..e9d00b4522 100644 --- a/public/language/el/user.json +++ b/public/language/el/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", - "grouptitle": "Select the group title you would like to display", + "grouptitle": "Group Title", "no-group-title": "No group title", "select-skin": "Select a Skin", "select-homepage": "Select a Homepage", diff --git a/public/language/en@pirate/email.json b/public/language/en@pirate/email.json index 1b8d512945..691e6309a2 100644 --- a/public/language/en@pirate/email.json +++ b/public/language/en@pirate/email.json @@ -24,6 +24,7 @@ "digest.day": "day", "digest.week": "week", "digest.month": "month", + "digest.subject": "Digest for %1", "notif.chat.subject": "New chat message received from %1", "notif.chat.cta": "Click here to continue the conversation", "notif.chat.unsub.info": "This chat notification was sent to you due to your subscription settings.", diff --git a/public/language/en@pirate/error.json b/public/language/en@pirate/error.json index 0709e823b6..56a5530e02 100644 --- a/public/language/en@pirate/error.json +++ b/public/language/en@pirate/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "You are not allowed to edit this message", "cant-remove-last-user": "You can't remove the last user", "cant-delete-chat-message": "You are not allowed to delete this message", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "Reputation system is disabled.", "downvoting-disabled": "Downvoting is disabled", "not-enough-reputation-to-downvote": "You do not have enough reputation to downvote this post", diff --git a/public/language/en@pirate/topic.json b/public/language/en@pirate/topic.json index c7ce76e07b..bdf6d77f91 100644 --- a/public/language/en@pirate/topic.json +++ b/public/language/en@pirate/topic.json @@ -26,7 +26,7 @@ "tools": "Tools", "flag": "Flag", "locked": "Locked", - "bookmark_instructions": "Click here to return to the last unread post in this thread.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "Flag this post for moderation", "flag_success": "This post has been flagged for moderation.", "deleted_message": "This topic has been deleted. Only users with topic management privileges can see it.", diff --git a/public/language/en@pirate/user.json b/public/language/en@pirate/user.json index 4224d972cc..fc3e408a13 100644 --- a/public/language/en@pirate/user.json +++ b/public/language/en@pirate/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", - "grouptitle": "Select the group title you would like to display", + "grouptitle": "Group Title", "no-group-title": "No group title", "select-skin": "Select a Skin", "select-homepage": "Select a Homepage", diff --git a/public/language/en_US/email.json b/public/language/en_US/email.json index 1b8d512945..691e6309a2 100644 --- a/public/language/en_US/email.json +++ b/public/language/en_US/email.json @@ -24,6 +24,7 @@ "digest.day": "day", "digest.week": "week", "digest.month": "month", + "digest.subject": "Digest for %1", "notif.chat.subject": "New chat message received from %1", "notif.chat.cta": "Click here to continue the conversation", "notif.chat.unsub.info": "This chat notification was sent to you due to your subscription settings.", diff --git a/public/language/en_US/error.json b/public/language/en_US/error.json index 0709e823b6..56a5530e02 100644 --- a/public/language/en_US/error.json +++ b/public/language/en_US/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "You are not allowed to edit this message", "cant-remove-last-user": "You can't remove the last user", "cant-delete-chat-message": "You are not allowed to delete this message", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "Reputation system is disabled.", "downvoting-disabled": "Downvoting is disabled", "not-enough-reputation-to-downvote": "You do not have enough reputation to downvote this post", diff --git a/public/language/en_US/user.json b/public/language/en_US/user.json index 34ca82ae52..c1ac375d20 100644 --- a/public/language/en_US/user.json +++ b/public/language/en_US/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", - "grouptitle": "Select the group title you would like to display", + "grouptitle": "Group Title", "no-group-title": "No group title", "select-skin": "Select a Skin", "select-homepage": "Select a Homepage", diff --git a/public/language/es/email.json b/public/language/es/email.json index 04c27bd68f..dd8e64791d 100644 --- a/public/language/es/email.json +++ b/public/language/es/email.json @@ -24,6 +24,7 @@ "digest.day": "día", "digest.week": "semana", "digest.month": "mes", + "digest.subject": "Digest for %1", "notif.chat.subject": "Nuevo mensaje de chat recibido de %1", "notif.chat.cta": "Haz click aquí para continuar la conversación", "notif.chat.unsub.info": "Esta notificación de chat se te envió debido a tus ajustes de suscripción.", diff --git a/public/language/es/error.json b/public/language/es/error.json index 630475a16f..9178e18ff1 100644 --- a/public/language/es/error.json +++ b/public/language/es/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "No tienes permiso para editar este mensaje", "cant-remove-last-user": "No puedes eliminar el último usuario", "cant-delete-chat-message": "No tienes permiso para eliminar este mensaje", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "El sistema de reputación está deshabilitado.", "downvoting-disabled": "La votación negativa está deshabilitada.", "not-enough-reputation-to-downvote": "No tienes suficiente reputación para votar negativo este post", diff --git a/public/language/es/topic.json b/public/language/es/topic.json index bf5c804c0b..272a8180a0 100644 --- a/public/language/es/topic.json +++ b/public/language/es/topic.json @@ -26,7 +26,7 @@ "tools": "Herramientas", "flag": "Reportar", "locked": "Cerrado", - "bookmark_instructions": "Clic aquí para regresar al último aporte sin leer en este hilo.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "Reportar este mensaje", "flag_success": "Este mensaje ha sido reportado para moderación.", "deleted_message": "Este tema ha sido borrado. Solo los usuarios que tengan privilegios de administración de temas pueden verlo.", diff --git a/public/language/es/user.json b/public/language/es/user.json index e9be55c953..ebd854ddfa 100644 --- a/public/language/es/user.json +++ b/public/language/es/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "Luego de enviar una respuesta, mostrar el nuevo mensaje", "follow_topics_you_reply_to": "Seguir los temas en los que respondes", "follow_topics_you_create": "Seguir publicaciones que creas", - "grouptitle": "Selecciona el título del grupo que deseas visualizar", + "grouptitle": "Group Title", "no-group-title": "Sin título de grupo", "select-skin": "Seleccionar una plantilla", "select-homepage": "Seleccione una Página de inicio", diff --git a/public/language/et/email.json b/public/language/et/email.json index a1d3d4371b..e87b35e247 100644 --- a/public/language/et/email.json +++ b/public/language/et/email.json @@ -24,6 +24,7 @@ "digest.day": "päev", "digest.week": "nädal", "digest.month": "kuu", + "digest.subject": "Digest for %1", "notif.chat.subject": "Sulle on saabunud uus sõnum kasutajalt %1", "notif.chat.cta": "Vajuta siia, et jätkata vestlusega", "notif.chat.unsub.info": "See chat teavitus on saadetud teile tellimuse seadistuse tõttu.", diff --git a/public/language/et/error.json b/public/language/et/error.json index 013db49d04..05682e9068 100644 --- a/public/language/et/error.json +++ b/public/language/et/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "Sul ei ole lubatud antud sõnumit muuta", "cant-remove-last-user": "Sa ei saa viimast kasutajat eemaldada", "cant-delete-chat-message": "Sul ei ole lubatud antud sõnumit kustutada", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "Reputatsiooni süsteem ei ole aktiveeritud", "downvoting-disabled": "Negatiivsete häälte andmine ei ole võimaldatud", "not-enough-reputation-to-downvote": "Sul ei ole piisavalt reputatsiooni, et anda negatiivset hinnangut sellele postitusele.", diff --git a/public/language/et/topic.json b/public/language/et/topic.json index d6aba7fb7a..e8fd5f3249 100644 --- a/public/language/et/topic.json +++ b/public/language/et/topic.json @@ -26,7 +26,7 @@ "tools": "Tööriistad", "flag": "Märgista", "locked": "Lukustatud", - "bookmark_instructions": "Kliki siia, et naasta viimasele lugemata postitusele selles teemas.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "Märgista see postitus modereerimiseks", "flag_success": "See postitus on nüüd märgistatud modereerimiseks.", "deleted_message": "See teema on kustutatud. Ainult kasutajad kellel on piisavalt õigusi saavad seda näha.", diff --git a/public/language/et/user.json b/public/language/et/user.json index 3eb200314a..ee556ae4e1 100644 --- a/public/language/et/user.json +++ b/public/language/et/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Järgi teemasid, millele olete vastanud.", "follow_topics_you_create": "Järgi teemasi, mis on teie loodud.", - "grouptitle": "Vali grupile tiitel mida kuvada soovid", + "grouptitle": "Group Title", "no-group-title": "Grupi tiitel puudub", "select-skin": "Vali välimus", "select-homepage": "Vali avaleht", diff --git a/public/language/fa_IR/email.json b/public/language/fa_IR/email.json index 1ec13b4a26..05b628ed9f 100644 --- a/public/language/fa_IR/email.json +++ b/public/language/fa_IR/email.json @@ -24,6 +24,7 @@ "digest.day": "روز", "digest.week": "هفته", "digest.month": "ماه", + "digest.subject": "Digest for %1", "notif.chat.subject": "پیام چتی جدیدی از %1 دریافت شد", "notif.chat.cta": "برای ادامه‌ی چت اینجا کلیک کنید", "notif.chat.unsub.info": "این اطلاعیه ی چتیی که برای شما فرستاده شده به علت تنظیمات اشترک شماست.", diff --git a/public/language/fa_IR/error.json b/public/language/fa_IR/error.json index c6651bc9d8..44dc7935e0 100644 --- a/public/language/fa_IR/error.json +++ b/public/language/fa_IR/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "شما اجازه ی ویرایش این پیام را ندارید", "cant-remove-last-user": "You can't remove the last user", "cant-delete-chat-message": "You are not allowed to delete this message", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "سیستم اعتبار غیر فعال شده است", "downvoting-disabled": "رأی منفی غیر فعال شده است", "not-enough-reputation-to-downvote": "شما اعتبار کافی برای دادن رأی منفی به این پست را ندارید.", diff --git a/public/language/fa_IR/topic.json b/public/language/fa_IR/topic.json index f3265b1ca9..335bef6af9 100644 --- a/public/language/fa_IR/topic.json +++ b/public/language/fa_IR/topic.json @@ -26,7 +26,7 @@ "tools": "ابزارها", "flag": "پرچم", "locked": "قفل شده است", - "bookmark_instructions": "برای بازگشت به آخرین پست خوانده نشده در این دسته اینجا کلیک کنید", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "پرچم‌گذاری این موضوع برای بررسی ناظران", "flag_success": "این موضوع برای بررسی ناظران پرچم گذاشته شد.", "deleted_message": "این موضوع پاک شده است. تنها کاربرانِ با حق مدیریت موضوع می‌توانند آن را ببینند.", diff --git a/public/language/fa_IR/user.json b/public/language/fa_IR/user.json index 30ce8a55a9..4b4fcbaf74 100644 --- a/public/language/fa_IR/user.json +++ b/public/language/fa_IR/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "تاپیک هایی که پاسخ داده ای را دنبال کن", "follow_topics_you_create": "موضوع هایی که ایجاد کرده ای را دنبال کن", - "grouptitle": "عنوان گروهی که میخواهید نشان داده شود را انتخاب کنید.", + "grouptitle": "Group Title", "no-group-title": "عنوان گروهی نیست", "select-skin": "Select a Skin", "select-homepage": "Select a Homepage", diff --git a/public/language/fi/email.json b/public/language/fi/email.json index 92002dae56..105dc065a1 100644 --- a/public/language/fi/email.json +++ b/public/language/fi/email.json @@ -24,6 +24,7 @@ "digest.day": "päivä", "digest.week": "viikko", "digest.month": "kuukausi", + "digest.subject": "Digest for %1", "notif.chat.subject": "Uusi chatviesti henkilöltä %1", "notif.chat.cta": "Click here to continue the conversation", "notif.chat.unsub.info": "This chat notification was sent to you due to your subscription settings.", diff --git a/public/language/fi/error.json b/public/language/fi/error.json index dbb4fd10c2..701277e694 100644 --- a/public/language/fi/error.json +++ b/public/language/fi/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "You are not allowed to edit this message", "cant-remove-last-user": "You can't remove the last user", "cant-delete-chat-message": "You are not allowed to delete this message", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "Reputation system is disabled.", "downvoting-disabled": "Downvoting is disabled", "not-enough-reputation-to-downvote": "You do not have enough reputation to downvote this post", diff --git a/public/language/fi/topic.json b/public/language/fi/topic.json index 37b9b98e80..ce37bb1954 100644 --- a/public/language/fi/topic.json +++ b/public/language/fi/topic.json @@ -26,7 +26,7 @@ "tools": "Työkalut", "flag": "Ilmianna", "locked": "Lukittu", - "bookmark_instructions": "Click here to return to the last unread post in this thread.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "Ilmianna tämä viesti moderaattoreille", "flag_success": "Tämä viesti ilmiannettiin moderaattoreille.", "deleted_message": "Tämä aihe on poistettu. Vain käyttäjät, joilla on aiheen hallintaoikeudet, voivat nähdä sen.", diff --git a/public/language/fi/user.json b/public/language/fi/user.json index 76d5f5bdfb..8e08f3dc54 100644 --- a/public/language/fi/user.json +++ b/public/language/fi/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", - "grouptitle": "Select the group title you would like to display", + "grouptitle": "Group Title", "no-group-title": "No group title", "select-skin": "Select a Skin", "select-homepage": "Select a Homepage", diff --git a/public/language/fr/email.json b/public/language/fr/email.json index 5de03234d8..e02ecaa136 100644 --- a/public/language/fr/email.json +++ b/public/language/fr/email.json @@ -24,6 +24,7 @@ "digest.day": "jour", "digest.week": "semaine", "digest.month": "mois", + "digest.subject": "Digest for %1", "notif.chat.subject": "Nouveau message de chat reçu de %1", "notif.chat.cta": "Cliquez ici pour continuer la conversation", "notif.chat.unsub.info": "Cette notification de chat a été envoyé en raison de vos paramètres d'abonnement.", diff --git a/public/language/fr/error.json b/public/language/fr/error.json index d80c43277e..866613b168 100644 --- a/public/language/fr/error.json +++ b/public/language/fr/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "Vous n'avez pas l'autorisation de modifier ce message", "cant-remove-last-user": "Vous ne pouvez pas supprimer le dernier utilisateur", "cant-delete-chat-message": "Vous n'avez pas l'autorisation de supprimer ce message", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "Le système de réputation est désactivé", "downvoting-disabled": "Les votes négatifs ne sont pas autorisés", "not-enough-reputation-to-downvote": "Vous n'avez pas une réputation assez élevée pour noter négativement ce message", diff --git a/public/language/fr/topic.json b/public/language/fr/topic.json index 8a71ff511a..f21bf835b1 100644 --- a/public/language/fr/topic.json +++ b/public/language/fr/topic.json @@ -26,7 +26,7 @@ "tools": "Outils", "flag": "Signaler", "locked": "Verrouillé", - "bookmark_instructions": "Cliquez ici pour retourner au dernier message non lu dans ce fil de discussion.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "Signaler ce message à la modération", "flag_success": "Ce message a bien été signalé aux modérateurs.", "deleted_message": "Ce sujet a été supprimé. Seuls les utilisateurs avec les droits d'administration peuvent le voir.", diff --git a/public/language/fr/user.json b/public/language/fr/user.json index 1d2a509176..fc2ae79dca 100644 --- a/public/language/fr/user.json +++ b/public/language/fr/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "Après avoir répondu, montrer le nouveau message", "follow_topics_you_reply_to": "Suivre les sujets auxquels vous répondez", "follow_topics_you_create": "Suivre les sujets que vous créez", - "grouptitle": "Sélectionnez le titre de groupe que vous souhaitez afficher", + "grouptitle": "Group Title", "no-group-title": "Aucun titre de groupe", "select-skin": "Sélectionner un thème", "select-homepage": "Sélectionner une page d'accueil", diff --git a/public/language/gl/email.json b/public/language/gl/email.json index 340dd326e1..6f0be26023 100644 --- a/public/language/gl/email.json +++ b/public/language/gl/email.json @@ -24,6 +24,7 @@ "digest.day": "día", "digest.week": "semana", "digest.month": "mes", + "digest.subject": "Digest for %1", "notif.chat.subject": "Nova charla recibida de %1", "notif.chat.cta": "Pica aquí para continuar a conversación", "notif.chat.unsub.info": "Esta notificación de charla foiche enviada polas túas opcións de subscrición.", diff --git a/public/language/gl/error.json b/public/language/gl/error.json index 5a5619eaf0..862bdbcda3 100644 --- a/public/language/gl/error.json +++ b/public/language/gl/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "Non tes permitido editar esta mensaxe.", "cant-remove-last-user": "Non podes quitar o último usuario", "cant-delete-chat-message": "Non tes permitido borrar esta mensaxe.", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "O sistema de reputación está deshabilitado", "downvoting-disabled": "Os votos negativos están deshabilitados", "not-enough-reputation-to-downvote": "Non tes reputación dabonda para esta acción", diff --git a/public/language/gl/topic.json b/public/language/gl/topic.json index e892d34146..0e92d43b08 100644 --- a/public/language/gl/topic.json +++ b/public/language/gl/topic.json @@ -26,7 +26,7 @@ "tools": "Ferramentas", "flag": "Reportar", "locked": "Pechado", - "bookmark_instructions": "Clic aquí para ir á última publicación sen ler neste tema. ", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "Reportar esta mensaxe", "flag_success": "Esta mensaxe foi reportada para moderación.", "deleted_message": "Este tema foi borrado. Só os usuarios con privilexios administrativos poden velo.", diff --git a/public/language/gl/user.json b/public/language/gl/user.json index 83c36e77ee..ce8498bb1a 100644 --- a/public/language/gl/user.json +++ b/public/language/gl/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Segui-los temas nos que respostas", "follow_topics_you_create": "Segui-los temas que ti fas", - "grouptitle": "Escolle o título de grupo que che gustaría amosar", + "grouptitle": "Group Title", "no-group-title": "Sen titulo de grupo", "select-skin": "Seleccionar apariencia", "select-homepage": "Escolla unha páxina de inicio", diff --git a/public/language/he/email.json b/public/language/he/email.json index 9ca8de27a9..48ff8f4a50 100644 --- a/public/language/he/email.json +++ b/public/language/he/email.json @@ -24,6 +24,7 @@ "digest.day": "יום", "digest.week": "שבוע", "digest.month": "חודש", + "digest.subject": "Digest for %1", "notif.chat.subject": "הודעת צ'אט חדשה התקבלה מ%1", "notif.chat.cta": "לחץ כאן כדי להמשיך את השיחה", "notif.chat.unsub.info": "התראה הצ'אט הזו נשלחה אליך על-פי הגדרות החשבון שלך.", diff --git a/public/language/he/error.json b/public/language/he/error.json index 33972d8246..3386b8a054 100644 --- a/public/language/he/error.json +++ b/public/language/he/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "אתה לא רשאי לערוך הודעה זו", "cant-remove-last-user": "אינך יכול למחוק את המשתמש האחרון", "cant-delete-chat-message": "אתה לא רשאי למחוק הודעה זו", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "מערכת המוניטין לא פעילה.", "downvoting-disabled": "היכולת להצביע נגד לא פעילה", "not-enough-reputation-to-downvote": "אין לך מספיק מוניטין כדי להוריד את הדירוג של פוסט זה", diff --git a/public/language/he/topic.json b/public/language/he/topic.json index 49ca0e5bba..49191ba202 100644 --- a/public/language/he/topic.json +++ b/public/language/he/topic.json @@ -26,7 +26,7 @@ "tools": "כלים", "flag": "דווח", "locked": "נעול", - "bookmark_instructions": "לחץ כאן כדי לחזור לפוסט האחרון שלא קראת באשכול זה", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "דווח על פוסט זה למנהל", "flag_success": "התקבל דיווח על פוסט זה.", "deleted_message": "נושא זה נמחק. רק משתמשים עם ההרשאות המתאימות יכולים לצפות בו.", diff --git a/public/language/he/user.json b/public/language/he/user.json index ccd8366612..df7d72d110 100644 --- a/public/language/he/user.json +++ b/public/language/he/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "עקוב אחרת נושאים שהגבת בהם", "follow_topics_you_create": "עקוב אחר נושאים שיצרת", - "grouptitle": "בחר את כותרת הקבוצה שברצונך להציג", + "grouptitle": "Group Title", "no-group-title": "ללא כותרת לקבוצה", "select-skin": "בחר מראה", "select-homepage": "בחר דף בית", diff --git a/public/language/hu/email.json b/public/language/hu/email.json index 729de1a530..15a689ac13 100644 --- a/public/language/hu/email.json +++ b/public/language/hu/email.json @@ -24,6 +24,7 @@ "digest.day": "day", "digest.week": "week", "digest.month": "month", + "digest.subject": "Digest for %1", "notif.chat.subject": "Új chat üzenet érkezett a következőtől: %1", "notif.chat.cta": "Kattints ide a beszélgetés folytatásához", "notif.chat.unsub.info": "Ez a chat-értesítés a feliratkozási beállításaid miatt lett kiküldve.", diff --git a/public/language/hu/error.json b/public/language/hu/error.json index e0744b39ca..db1c8cd322 100644 --- a/public/language/hu/error.json +++ b/public/language/hu/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "You are not allowed to edit this message", "cant-remove-last-user": "You can't remove the last user", "cant-delete-chat-message": "You are not allowed to delete this message", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "Hírnév funkció kikapcsolva.", "downvoting-disabled": "Leszavazás funkció kikapcsolva", "not-enough-reputation-to-downvote": "Nem rendelkezel elég Hírnév ponttal, hogy leszavazhasd ezt a hozzászólást", diff --git a/public/language/hu/topic.json b/public/language/hu/topic.json index 189f065bde..be4895f558 100644 --- a/public/language/hu/topic.json +++ b/public/language/hu/topic.json @@ -26,7 +26,7 @@ "tools": "Eszközök", "flag": "Jelentés", "locked": "Locked", - "bookmark_instructions": "Click here to return to the last unread post in this thread.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "A hozzászólás jelentése a moderátoroknál", "flag_success": "This post has been flagged for moderation.", "deleted_message": "This topic has been deleted. Only users with topic management privileges can see it.", diff --git a/public/language/hu/user.json b/public/language/hu/user.json index edb8f7cd77..26c4316754 100644 --- a/public/language/hu/user.json +++ b/public/language/hu/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", - "grouptitle": "Select the group title you would like to display", + "grouptitle": "Group Title", "no-group-title": "No group title", "select-skin": "Select a Skin", "select-homepage": "Select a Homepage", diff --git a/public/language/id/email.json b/public/language/id/email.json index 4b3a591c23..4f778999a4 100644 --- a/public/language/id/email.json +++ b/public/language/id/email.json @@ -24,6 +24,7 @@ "digest.day": "day", "digest.week": "week", "digest.month": "month", + "digest.subject": "Digest for %1", "notif.chat.subject": "Pesan yang baru diterima dari %1", "notif.chat.cta": "Klik di sini untuk melanjutkan percakapan", "notif.chat.unsub.info": "Sesuai pengaturan langganan anda, notifikasi obrolan ini dikirmkan kepada anda", diff --git a/public/language/id/error.json b/public/language/id/error.json index de932ffac2..d3cc609cfe 100644 --- a/public/language/id/error.json +++ b/public/language/id/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "You are not allowed to edit this message", "cant-remove-last-user": "You can't remove the last user", "cant-delete-chat-message": "You are not allowed to delete this message", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "Sistem reputasi ditiadakan.", "downvoting-disabled": "Downvoting ditiadakan", "not-enough-reputation-to-downvote": "Tidak cukup reputation untuk downvote post ini", diff --git a/public/language/id/topic.json b/public/language/id/topic.json index 6ba52cacce..07a4b79bcd 100644 --- a/public/language/id/topic.json +++ b/public/language/id/topic.json @@ -26,7 +26,7 @@ "tools": "Perangkat", "flag": "Tandai", "locked": "Terkunci", - "bookmark_instructions": "Click here to return to the last unread post in this thread.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "Tandai posting ini untuk moderasi", "flag_success": "Posting ini telah ditandai untuk moderasi", "deleted_message": "Topik ini telah dihapus. Hanya pengguna dengan hak manajemen topik yang dapat melihatnya.", diff --git a/public/language/id/user.json b/public/language/id/user.json index 2ebb304cd0..d486152450 100644 --- a/public/language/id/user.json +++ b/public/language/id/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", - "grouptitle": "Select the group title you would like to display", + "grouptitle": "Group Title", "no-group-title": "No group title", "select-skin": "Select a Skin", "select-homepage": "Select a Homepage", diff --git a/public/language/it/email.json b/public/language/it/email.json index 6dc40a7a16..347f0d6f1d 100644 --- a/public/language/it/email.json +++ b/public/language/it/email.json @@ -24,6 +24,7 @@ "digest.day": "day", "digest.week": "week", "digest.month": "month", + "digest.subject": "Digest for %1", "notif.chat.subject": "Nuovo messaggio in chat da %1", "notif.chat.cta": "Clicca qui per continuare la conversazione", "notif.chat.unsub.info": "Questa notifica di chat ti è stata inviata perché l'hai scelta nelle impostazioni.", diff --git a/public/language/it/error.json b/public/language/it/error.json index 25358c4310..23135607f1 100644 --- a/public/language/it/error.json +++ b/public/language/it/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "You are not allowed to edit this message", "cant-remove-last-user": "You can't remove the last user", "cant-delete-chat-message": "You are not allowed to delete this message", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "Il sistema di reputazione è disabilitato.", "downvoting-disabled": "Il Downvoting è disabilitato", "not-enough-reputation-to-downvote": "Non hai i privilegi per votare negativamente questo post", diff --git a/public/language/it/topic.json b/public/language/it/topic.json index 8bbcf4c4c2..11809f9697 100644 --- a/public/language/it/topic.json +++ b/public/language/it/topic.json @@ -26,7 +26,7 @@ "tools": "Strumenti", "flag": "Segnala", "locked": "Bloccato", - "bookmark_instructions": "Clicca qui per tornare all'ultimo post non letto in questo thread", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "Segnala questo post per la moderazione", "flag_success": "Questo post è stato contrassegnato per la moderazione.", "deleted_message": "Questa discussione è stata cancellata. Solo gli utenti con diritti di gestione possono vederla.", diff --git a/public/language/it/user.json b/public/language/it/user.json index 80b3cc665b..3bde55d516 100644 --- a/public/language/it/user.json +++ b/public/language/it/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Segui le discussioni a cui hai risposto", "follow_topics_you_create": "Segui le discussioni che hai iniziato", - "grouptitle": "Seleziona il titolo del gruppo che vorresti vedere", + "grouptitle": "Group Title", "no-group-title": "Nessun titolo al gruppo", "select-skin": "Seleziona uno Skin", "select-homepage": "Select a Homepage", diff --git a/public/language/ja/email.json b/public/language/ja/email.json index 86af5f6131..5cfeeb34f1 100644 --- a/public/language/ja/email.json +++ b/public/language/ja/email.json @@ -24,6 +24,7 @@ "digest.day": "日", "digest.week": "週", "digest.month": "月", + "digest.subject": "Digest for %1", "notif.chat.subject": "%1さんからの新しいチャットメッセージがあります。", "notif.chat.cta": "クリックして会話を続ける", "notif.chat.unsub.info": "このチャットの通知はあなたの購読設定により送られました。", diff --git a/public/language/ja/error.json b/public/language/ja/error.json index 7deddf6c53..a6147ee989 100644 --- a/public/language/ja/error.json +++ b/public/language/ja/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "You are not allowed to edit this message", "cant-remove-last-user": "You can't remove the last user", "cant-delete-chat-message": "You are not allowed to delete this message", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "Reputation system is disabled.", "downvoting-disabled": "Downvoting is disabled", "not-enough-reputation-to-downvote": "You do not have enough reputation to downvote this post", diff --git a/public/language/ja/topic.json b/public/language/ja/topic.json index f24579e205..3bb4bfe0a7 100644 --- a/public/language/ja/topic.json +++ b/public/language/ja/topic.json @@ -26,7 +26,7 @@ "tools": "ツール", "flag": "フラグ", "locked": "ロック", - "bookmark_instructions": "ここを押して、最後の未読の投稿戻ります", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "リポートする", "flag_success": "このポストをリポートしました。", "deleted_message": "このトピックが削除されました。トピック管理権を持っているユーザーにしか読めません。", diff --git a/public/language/ja/user.json b/public/language/ja/user.json index 2d7dd3a23d..2d539862dd 100644 --- a/public/language/ja/user.json +++ b/public/language/ja/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "返信したトピックをフォローします", "follow_topics_you_create": "投稿したトピックをフォローします", - "grouptitle": "好きなグループ名を選んで下さい", + "grouptitle": "Group Title", "no-group-title": "グループ名がありません", "select-skin": "スキンを選んで下さい", "select-homepage": "ホームページを選んで下さい", diff --git a/public/language/ko/email.json b/public/language/ko/email.json index ff07b4a927..10eec4722d 100644 --- a/public/language/ko/email.json +++ b/public/language/ko/email.json @@ -24,6 +24,7 @@ "digest.day": "일", "digest.week": "주", "digest.month": "월", + "digest.subject": "Digest for %1", "notif.chat.subject": "%1님이 대화 메시지를 보냈습니다.", "notif.chat.cta": "대화를 계속하려면 여기를 클릭하세요.", "notif.chat.unsub.info": "이 대화 알림은 사용자의 구독 설정에 따라 전송되었습니다.", diff --git a/public/language/ko/error.json b/public/language/ko/error.json index edb0a3a88d..748cc05084 100644 --- a/public/language/ko/error.json +++ b/public/language/ko/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "편집 할 수 있는 권한이 없습니다.", "cant-remove-last-user": "마지막 사용자를 삭제할 수 없습니다.", "cant-delete-chat-message": "메세지를 지울 권한이 없습니다.", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "인지도 기능이 비활성 상태입니다.", "downvoting-disabled": "비추천 기능이 비활성 상태입니다.", "not-enough-reputation-to-downvote": "인지도가 낮아 이 게시물에 반대할 수 없습니다.", diff --git a/public/language/ko/topic.json b/public/language/ko/topic.json index 056ccb5a8f..cfa5504880 100644 --- a/public/language/ko/topic.json +++ b/public/language/ko/topic.json @@ -26,7 +26,7 @@ "tools": "도구", "flag": "신고", "locked": "잠김", - "bookmark_instructions": "여기를 누르면 마지막으로 읽지 않은 포스트로 이동합니다.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "이 게시물을 신고", "flag_success": "이 게시물은 신고되었습니다.", "deleted_message": "이 주제는 삭제되었습니다. 주제 관리 권한이 있는 사용자만 볼 수 있습니다.", diff --git a/public/language/ko/user.json b/public/language/ko/user.json index 24c008a10d..20cbf236a9 100644 --- a/public/language/ko/user.json +++ b/public/language/ko/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "답글 게시 후 새 포스트 보여주기", "follow_topics_you_reply_to": "답글 단 게시물을 팔로우 합니다.", "follow_topics_you_create": "생성한 주제를 팔로우 합니다.", - "grouptitle": "표시할 그룹 이름을 선택하세요.", + "grouptitle": "Group Title", "no-group-title": "그룹 이름이 없습니다.", "select-skin": "스킨 선택", "select-homepage": "홈페이지 선택", diff --git a/public/language/lt/email.json b/public/language/lt/email.json index cd68d27182..f183b346f2 100644 --- a/public/language/lt/email.json +++ b/public/language/lt/email.json @@ -24,6 +24,7 @@ "digest.day": "day", "digest.week": "week", "digest.month": "month", + "digest.subject": "Digest for %1", "notif.chat.subject": "Nauja pokalbio žinutė gauta iš %1", "notif.chat.cta": "Pokalbio pratęsimui spauskite čia", "notif.chat.unsub.info": "Šios žinutės perpėjimas buvo išsiųstas į tavo prenumeratos nustatymus", diff --git a/public/language/lt/error.json b/public/language/lt/error.json index e23088894e..fa04fa5803 100644 --- a/public/language/lt/error.json +++ b/public/language/lt/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "You are not allowed to edit this message", "cant-remove-last-user": "You can't remove the last user", "cant-delete-chat-message": "You are not allowed to delete this message", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "Reputacijos sistema išjungta.", "downvoting-disabled": "Downvoting yra išjungtas", "not-enough-reputation-to-downvote": "Jūs neturite pakankamai reputacijos balsuoti prieš šį pranešimą", diff --git a/public/language/lt/topic.json b/public/language/lt/topic.json index a12bdd4c4e..d6094a6e83 100644 --- a/public/language/lt/topic.json +++ b/public/language/lt/topic.json @@ -26,7 +26,7 @@ "tools": "Įrankiai", "flag": "Pažymėti", "locked": "Užrakinta", - "bookmark_instructions": "Click here to return to the last unread post in this thread.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "Pažymėti ši pranešimą moderatoriams", "flag_success": "Šis pranešimas buvo pažymėtas moderatorių patikrinimui.", "deleted_message": "Ši tema buvo ištrinta. Tik Vartotojai su temos redagavimo privilegijomis gali matyti ja", diff --git a/public/language/lt/user.json b/public/language/lt/user.json index 518ff463a5..ee3e009c10 100644 --- a/public/language/lt/user.json +++ b/public/language/lt/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Sekti tas temas kur atrašai tu", "follow_topics_you_create": "Sekti tas temas kurias sukuri tu", - "grouptitle": "Pasirinkite grupės pavadinimą kurį norėtumėte kad atvaizduotu", + "grouptitle": "Group Title", "no-group-title": "Nėra grupės pavadinimo", "select-skin": "Select a Skin", "select-homepage": "Select a Homepage", diff --git a/public/language/ms/email.json b/public/language/ms/email.json index 01dc9523e3..eb5affbabd 100644 --- a/public/language/ms/email.json +++ b/public/language/ms/email.json @@ -24,6 +24,7 @@ "digest.day": "day", "digest.week": "week", "digest.month": "month", + "digest.subject": "Digest for %1", "notif.chat.subject": "Pesanan baru diterima dari %1", "notif.chat.cta": "Klik sini untuk meneruskan perbualan", "notif.chat.unsub.info": "Pemberitahuan sembang ini dihantar berdasarkan tetapan langganan anda.", diff --git a/public/language/ms/error.json b/public/language/ms/error.json index 7840393a92..8466ee6bbe 100644 --- a/public/language/ms/error.json +++ b/public/language/ms/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "Anda tidak dibenarkan menyunting mesej ini", "cant-remove-last-user": "Anda tidak boleh membuang pengguna akhir", "cant-delete-chat-message": "Anda tidak dibenarkan memadamkan mesej ini", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "Sistem reputasi dilumpuhkan.", "downvoting-disabled": "Undi turun dilumpuhkan", "not-enough-reputation-to-downvote": "Anda tidak mempunyai reputasi mencukupi untuk mengundi turun kiriman ini", diff --git a/public/language/ms/topic.json b/public/language/ms/topic.json index 8c12c5a409..c568eb5fc0 100644 --- a/public/language/ms/topic.json +++ b/public/language/ms/topic.json @@ -26,7 +26,7 @@ "tools": "Perkakas", "flag": "Tanda", "locked": "Kunci", - "bookmark_instructions": "Klik disini untuk kembali ke kiriman terakhir yang anda telah baca di thread ini.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "Tanda kiriman ini untuk diselia", "flag_success": "Kiriman ini telah ditandakan untuk diselia", "deleted_message": "Topik ini telah dipadam. Hanya pengguna dengan kuasa pengurusan boleh melihatnya.", diff --git a/public/language/ms/user.json b/public/language/ms/user.json index 03f3c77145..15483532a3 100644 --- a/public/language/ms/user.json +++ b/public/language/ms/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Ikut topik yang anda balas", "follow_topics_you_create": "Ikut topik yang anda buat", - "grouptitle": "Pilih nama kumpulan yang anda ingin tunjukkan", + "grouptitle": "Group Title", "no-group-title": "Tiada nama kumpulan", "select-skin": "Pilih skin", "select-homepage": "Pilih Laman Utama", diff --git a/public/language/nb/email.json b/public/language/nb/email.json index 4e542e97a7..6377d85fbf 100644 --- a/public/language/nb/email.json +++ b/public/language/nb/email.json @@ -24,6 +24,7 @@ "digest.day": "day", "digest.week": "week", "digest.month": "month", + "digest.subject": "Digest for %1", "notif.chat.subject": "Ny samtalemelding mottatt fra %1", "notif.chat.cta": "Klikk her for å fortsette samtalen", "notif.chat.unsub.info": "Denne samtale-varselen ble sendt til deg basert på dine innstillinger for abonnering.", diff --git a/public/language/nb/error.json b/public/language/nb/error.json index 773e406837..ab24f7cf2b 100644 --- a/public/language/nb/error.json +++ b/public/language/nb/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "You are not allowed to edit this message", "cant-remove-last-user": "You can't remove the last user", "cant-delete-chat-message": "You are not allowed to delete this message", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "Ryktesystemet er deaktivert.", "downvoting-disabled": "Nedstemming er deaktivert", "not-enough-reputation-to-downvote": "Du har ikke nok rykte til å nedstemme det innlegget", diff --git a/public/language/nb/topic.json b/public/language/nb/topic.json index 3e37dc2ba7..c5171e064f 100644 --- a/public/language/nb/topic.json +++ b/public/language/nb/topic.json @@ -26,7 +26,7 @@ "tools": "Verktøy", "flag": "Rapporter", "locked": "Låst", - "bookmark_instructions": "Klikk her for å returnere til siste uleste emne i denne tråden.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "Rapporter dette innlegget for granskning", "flag_success": "Dette innlegget har blitt rapportert.", "deleted_message": "Dette emnet har blitt slettet. Bare brukere med emnehåndterings-privilegier kan se den.", diff --git a/public/language/nb/user.json b/public/language/nb/user.json index df31e220f3..f55c24b20c 100644 --- a/public/language/nb/user.json +++ b/public/language/nb/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Følg emner du besvarer", "follow_topics_you_create": "Følg emner du oppretter", - "grouptitle": "Velg gruppetittelen du vil vise", + "grouptitle": "Group Title", "no-group-title": "Ingen gruppetittel", "select-skin": "Velg et skin", "select-homepage": "Select a Homepage", diff --git a/public/language/nl/email.json b/public/language/nl/email.json index 829ad4fcdc..c010b77769 100644 --- a/public/language/nl/email.json +++ b/public/language/nl/email.json @@ -24,6 +24,7 @@ "digest.day": "dag", "digest.week": "week", "digest.month": "maand", + "digest.subject": "Samenvatting voor %1", "notif.chat.subject": "Nieuw chatbericht van %1", "notif.chat.cta": "Klik hier om het gesprek te hervatten", "notif.chat.unsub.info": "Deze notificatie is verzonden vanwege de gebruikersinstellingen voor abonnementen.", diff --git a/public/language/nl/error.json b/public/language/nl/error.json index 9b6c912a23..6b042d72e0 100644 --- a/public/language/nl/error.json +++ b/public/language/nl/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "Het is niet toegestaan om dit bericht aan te passen", "cant-remove-last-user": "Je kan de laatste gebruiker niet verwijderen", "cant-delete-chat-message": "Het is niet toegestaan om dit bericht te verwijderen", + "already-voting-for-this-post": "Je hebt al gestemd voor deze post.", "reputation-system-disabled": "Reputatie systeem is uitgeschakeld.", "downvoting-disabled": "Negatief stemmen is uitgeschakeld", "not-enough-reputation-to-downvote": "Je hebt onvoldoende reputatie om een negatieve stem uit te mogen brengen", diff --git a/public/language/nl/groups.json b/public/language/nl/groups.json index 2bf421bd5b..e146a2d29c 100644 --- a/public/language/nl/groups.json +++ b/public/language/nl/groups.json @@ -41,7 +41,7 @@ "details.hidden": "Niet getoond", "details.hidden_help": "Indien geactiveerd zal deze groep niet getoond worden in de groepslijst en zullen gebruikers handmatig uitgenodigd moeten worden.", "details.delete_group": "Groep verwijderen", - "details.private_system_help": "Private groups is disabled at system level, this option does not do anything", + "details.private_system_help": "Private groepen zijn op systeemniveau uitgeschakeld, deze optie doet niets.", "event.updated": "Groepsdetails zijn bijgewerkt", "event.deleted": "De groep \"%1\" is verwijderd", "membership.accept-invitation": "Uitnodiging accepteren", diff --git a/public/language/nl/topic.json b/public/language/nl/topic.json index 5bff87a78c..99eb3edb16 100644 --- a/public/language/nl/topic.json +++ b/public/language/nl/topic.json @@ -26,7 +26,7 @@ "tools": "Extra", "flag": "Markeren", "locked": "Gesloten", - "bookmark_instructions": "Klik hier om naar het nieuwste ongelezen bericht te gaan.", + "bookmark_instructions": "Klik hier om terug te keren naar de laatst gelezen post in deze thread.", "flag_title": "Bericht aan beheerders melden", "flag_success": "Dit bericht is gerapporteerd aan de beheerder.", "deleted_message": "Dit onderwerp is verwijderd. Alleen gebruikers met beheerrechten op onderwerpniveau kunnen dit inzien.", diff --git a/public/language/nl/uploads.json b/public/language/nl/uploads.json index 1622cb5693..490bf49529 100644 --- a/public/language/nl/uploads.json +++ b/public/language/nl/uploads.json @@ -1,6 +1,6 @@ { - "uploading-file": "Uploading the file...", - "select-file-to-upload": "Select a file to upload!", - "upload-success": "File uploaded successfully!", - "maximum-file-size": "Maximum %1 kb" + "uploading-file": "Bestond word geüpload...", + "select-file-to-upload": "Selecteer een bestand om te uploaden!", + "upload-success": "Bestand succesvol geüpload!", + "maximum-file-size": "Maximaal %1 kb" } \ No newline at end of file diff --git a/public/language/nl/user.json b/public/language/nl/user.json index 0cac89a08b..e2a0399640 100644 --- a/public/language/nl/user.json +++ b/public/language/nl/user.json @@ -92,12 +92,12 @@ "open_links_in_new_tab": "Open uitgaande links naar een externe site in een nieuw tabblad", "enable_topic_searching": "Inschakelen mogelijkheid op onderwerp te kunnen zoeken", "topic_search_help": "Wanneer ingeschakeld zal de standaard zoekfunctie, met een aangepaste methode voor onderwerpen, overschreven worden", - "delay_image_loading": "Delay Image Loading", - "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", + "delay_image_loading": "Afbeeldingen Laden Uitstellen", + "image_load_delay_help": "Indien ingeschakeld zullen afbeeldingen in topics niet laden totdat ze in het scherm scrollen", "scroll_to_my_post": "Toon het nieuwe bericht na het plaatsen van een antwoord", "follow_topics_you_reply_to": "Volg de onderwerpen waarop ik gereageerd heb", "follow_topics_you_create": "Volg de onderwerpen waarvan ik de oorspronkelijke auteur ben", - "grouptitle": "Selecteer de groepstitel voor weergave", + "grouptitle": "Groepstitel", "no-group-title": "Geen groepstitel", "select-skin": "Selecteer een skin", "select-homepage": "Selecteer een startpagina", diff --git a/public/language/pl/email.json b/public/language/pl/email.json index c33233781e..d48e458ece 100644 --- a/public/language/pl/email.json +++ b/public/language/pl/email.json @@ -24,6 +24,7 @@ "digest.day": "day", "digest.week": "week", "digest.month": "month", + "digest.subject": "Digest for %1", "notif.chat.subject": "Nowa wiadomość czatu od %1", "notif.chat.cta": "Kliknij tutaj, by kontynuować konwersację", "notif.chat.unsub.info": "To powiadomienie o czacie zostało Ci wysłane zgodnie z ustawieniami Twojego konta.", diff --git a/public/language/pl/error.json b/public/language/pl/error.json index 196a9e6c77..cf4959c461 100644 --- a/public/language/pl/error.json +++ b/public/language/pl/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "You are not allowed to edit this message", "cant-remove-last-user": "You can't remove the last user", "cant-delete-chat-message": "You are not allowed to delete this message", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "System reputacji jest wyłączony.", "downvoting-disabled": "Negatywna ocena postów jest wyłączona", "not-enough-reputation-to-downvote": "Masz za mało reputacji, aby negatywnie ocenić ten post", diff --git a/public/language/pl/topic.json b/public/language/pl/topic.json index 974a61dd94..4b77e033e6 100644 --- a/public/language/pl/topic.json +++ b/public/language/pl/topic.json @@ -26,7 +26,7 @@ "tools": "Narzędzia", "flag": "Zgłoś", "locked": "Zablokowany", - "bookmark_instructions": "Kliknij tutaj, aby powrócic do ostatniego nieprzeczytanego postu w tym wątku.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "Zgłoś post do moderacji", "flag_success": "Ten post został oznaczony do moderacji.", "deleted_message": "Ten temat został skasowany. Tylko użytkownicy z uprawnieniami do zarządzania mogą go zobaczyć.", diff --git a/public/language/pl/user.json b/public/language/pl/user.json index e3ced448d7..a8fb571c64 100644 --- a/public/language/pl/user.json +++ b/public/language/pl/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Śledź tematy, na które odpowiadasz", "follow_topics_you_create": "Śledź tematy, które tworzysz", - "grouptitle": "Wybierz tytuł grupy, który chcesz wyświetlać", + "grouptitle": "Group Title", "no-group-title": "Brak tytułu grupy", "select-skin": "Wybierz Skórkę", "select-homepage": "Select a Homepage", diff --git a/public/language/pt_BR/email.json b/public/language/pt_BR/email.json index c773f3236b..64ef3928a9 100644 --- a/public/language/pt_BR/email.json +++ b/public/language/pt_BR/email.json @@ -24,6 +24,7 @@ "digest.day": "dia", "digest.week": "semana", "digest.month": "mês", + "digest.subject": "Resumo de %1", "notif.chat.subject": "Nova mensagem de chat recebida de %1", "notif.chat.cta": "Clique aqui para continuar a conversa", "notif.chat.unsub.info": "Esta notificação de chat foi enviada a você devido às suas configurações de assinatura.", diff --git a/public/language/pt_BR/error.json b/public/language/pt_BR/error.json index e681f5664f..8e91a585e8 100644 --- a/public/language/pt_BR/error.json +++ b/public/language/pt_BR/error.json @@ -85,6 +85,7 @@ "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", + "already-voting-for-this-post": "Você já votou neste post.", "reputation-system-disabled": "O sistema de reputação está desabilitado.", "downvoting-disabled": "Negativação está desabilitada", "not-enough-reputation-to-downvote": "Você não possui reputação suficiente para negativar este post", diff --git a/public/language/pt_BR/topic.json b/public/language/pt_BR/topic.json index 5f2d6257c1..cc4e420d83 100644 --- a/public/language/pt_BR/topic.json +++ b/public/language/pt_BR/topic.json @@ -26,7 +26,7 @@ "tools": "Ferramentas", "flag": "Sinalizar", "locked": "Trancado", - "bookmark_instructions": "Clique aqui para retornar ao último post não lido nesta thread.", + "bookmark_instructions": "Clique aqui para retornar ao último post lido neste tópico.", "flag_title": "Sinalizar este post para moderação", "flag_success": "Este post foi sinalizado para ser moderado.", "deleted_message": "Este tópico foi deletado. Apenas usuários com privilégios de moderação de tópico podem vê-lo.", diff --git a/public/language/pt_BR/user.json b/public/language/pt_BR/user.json index 34a77ea5cb..dd9a312176 100644 --- a/public/language/pt_BR/user.json +++ b/public/language/pt_BR/user.json @@ -92,12 +92,12 @@ "open_links_in_new_tab": "Abrir links externos em nova aba", "enable_topic_searching": "Habilitar Pesquisa dentro de Tópico", "topic_search_help": "Se habilitado, a pesquisa dentro do tópico irá substituir a pesquisa padrão do seu navegador. Assim, você poderá pesquisar pelo tópico inteiro, e não apenas pelo o que está sendo exibido na tela.", - "delay_image_loading": "Delay Image Loading", - "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", + "delay_image_loading": "Aguardar para Carregar Imagens", + "image_load_delay_help": "Se habilitado, imagens em tópicos não serão carregadas até que eles sejam rolados à visão", "scroll_to_my_post": "Após postar uma réplica, mostre o novo post", "follow_topics_you_reply_to": "Seguir tópicos que você responde", "follow_topics_you_create": "Seguir tópicos que você cria", - "grouptitle": "Escolha o título do grupo que você deseja exibir", + "grouptitle": "Título do Grupo", "no-group-title": "Sem título de grupo", "select-skin": "Escolha uma Skin", "select-homepage": "Selecione uma página inicial", diff --git a/public/language/ro/email.json b/public/language/ro/email.json index 5b802555de..b1a1f41d2f 100644 --- a/public/language/ro/email.json +++ b/public/language/ro/email.json @@ -24,6 +24,7 @@ "digest.day": "day", "digest.week": "week", "digest.month": "month", + "digest.subject": "Digest for %1", "notif.chat.subject": "Ai primit un mesaj de la %1", "notif.chat.cta": "Apasă aici pentru a continua conversația", "notif.chat.unsub.info": "This chat notification was sent to you due to your subscription settings.", diff --git a/public/language/ro/error.json b/public/language/ro/error.json index 56750a42a0..ba8d12b53d 100644 --- a/public/language/ro/error.json +++ b/public/language/ro/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "You are not allowed to edit this message", "cant-remove-last-user": "You can't remove the last user", "cant-delete-chat-message": "You are not allowed to delete this message", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "Sistemul de reputație este dezactivat.", "downvoting-disabled": "Votarea negativă este dezactivată", "not-enough-reputation-to-downvote": "Nu ai destulă reputație pentru a vota negativ acest post.", diff --git a/public/language/ro/topic.json b/public/language/ro/topic.json index 5503fa8c3d..e67e9d7cbf 100644 --- a/public/language/ro/topic.json +++ b/public/language/ro/topic.json @@ -26,7 +26,7 @@ "tools": "Unelte", "flag": "Semnalizează", "locked": "Închis", - "bookmark_instructions": "Click here to return to the last unread post in this thread.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "Semnalizează acest mesaj pentru moderare", "flag_success": "Acest mesaj a fost semnalizat pentru moderare.", "deleted_message": "Acest subiect a fost șters. Doar utilizatorii cu privilegii pentru moderarea subiectelor îl poate vedea.", diff --git a/public/language/ro/user.json b/public/language/ro/user.json index f11f19dee6..2a65e98896 100644 --- a/public/language/ro/user.json +++ b/public/language/ro/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", - "grouptitle": "Select the group title you would like to display", + "grouptitle": "Group Title", "no-group-title": "No group title", "select-skin": "Select a Skin", "select-homepage": "Select a Homepage", diff --git a/public/language/ru/email.json b/public/language/ru/email.json index a4b378b897..ac5902b0dd 100644 --- a/public/language/ru/email.json +++ b/public/language/ru/email.json @@ -24,6 +24,7 @@ "digest.day": "день", "digest.week": "неделя", "digest.month": "месяц", + "digest.subject": "Digest for %1", "notif.chat.subject": "Новое сообщение от %1", "notif.chat.cta": "Нажмите для продолжения диалога", "notif.chat.unsub.info": "Вы получили это уведомление в соответствии с настройками подписок.", diff --git a/public/language/ru/error.json b/public/language/ru/error.json index efaab28fa9..5877e5be07 100644 --- a/public/language/ru/error.json +++ b/public/language/ru/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "У вас нет доступа для редактирования этого сообщения", "cant-remove-last-user": "Вы не можете убрать последнего пользователя", "cant-delete-chat-message": "У вас нет доступа на удаление этого сообщения", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "Система репутации отключена.", "downvoting-disabled": "Понижение оценки отключено", "not-enough-reputation-to-downvote": "У Вас недостаточно репутации для понижения оценки сообщения", diff --git a/public/language/ru/topic.json b/public/language/ru/topic.json index 00ca832430..3cd2ddbdb7 100644 --- a/public/language/ru/topic.json +++ b/public/language/ru/topic.json @@ -26,7 +26,7 @@ "tools": "Опции", "flag": "Отметить", "locked": "Закрыт", - "bookmark_instructions": "Нажмите здесь чтобы вернуться к последнему непрочитанному сообщению в теме.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "Отметить сообщение для модерирования", "flag_success": "Это сообщение было помечено для модерации", "deleted_message": "Эта тема была удалена. Только пользователи с правами управления темами могут ее видеть.", diff --git a/public/language/ru/user.json b/public/language/ru/user.json index d9211b80af..934d3a04da 100644 --- a/public/language/ru/user.json +++ b/public/language/ru/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Следить за темами в которых вы отвечаете", "follow_topics_you_create": "Следить за темами которые вы создаёте", - "grouptitle": "Выберите бейдж группы для отображения", + "grouptitle": "Group Title", "no-group-title": "Не показывать бейдж", "select-skin": "Выбрать скин", "select-homepage": "Укажите главную страницу", diff --git a/public/language/rw/email.json b/public/language/rw/email.json index 626f11dec4..d26954b90b 100644 --- a/public/language/rw/email.json +++ b/public/language/rw/email.json @@ -24,6 +24,7 @@ "digest.day": "umunsi", "digest.week": "icyumweru", "digest.month": "ukwezi", + "digest.subject": "Digest for %1", "notif.chat.subject": "Ubutumwa bwo mu gikari bwaturutse kuri %1", "notif.chat.cta": "Kanda hano kugirango ukomeze", "notif.chat.unsub.info": "Iri tangazo rijyanye n'ubutumwa bwo mu gikari waryohererejwe kubera ko wabihisemo mu byo uzajya umenyeshwa", diff --git a/public/language/rw/error.json b/public/language/rw/error.json index a86168d3ef..3dfb30b539 100644 --- a/public/language/rw/error.json +++ b/public/language/rw/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "You are not allowed to edit this message", "cant-remove-last-user": "You can't remove the last user", "cant-delete-chat-message": "You are not allowed to delete this message", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "Ibijyanye n'itangwa ry'amanota ntibyemerewe. ", "downvoting-disabled": "Kwambura amanota ntibyemerewe", "not-enough-reputation-to-downvote": "Ntabwo ufite amanota ahagije ngo ube wakwemererwa kugira uwo wambura amanota", diff --git a/public/language/rw/topic.json b/public/language/rw/topic.json index b3ba723ec7..1ad35cdaf0 100644 --- a/public/language/rw/topic.json +++ b/public/language/rw/topic.json @@ -26,7 +26,7 @@ "tools": "Ibikoresho", "flag": "Tambikana", "locked": "Birafungiranye", - "bookmark_instructions": "Kanda hano kugirango usubire ahari ibitarasomwe biheruka muri iki kiganiro.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "Bimenyeshe ubuyobozi", "flag_success": "Bimaze kumenyeshwa ubuyobozi ngo bikurikiranwe. ", "deleted_message": "Iki kiganiro cyamaze gukurwaho. Abantu babifitiye uburenganzira ni bo bonyine bashobora kukibona. ", diff --git a/public/language/rw/user.json b/public/language/rw/user.json index 1e612bb2cf..21e3a05a66 100644 --- a/public/language/rw/user.json +++ b/public/language/rw/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "Nyuma yo gushyiraho igisubizo, hagaragare icyashyizweho gishya", "follow_topics_you_reply_to": "Kurikira ibiganiro ushyiraho ibisubizo", "follow_topics_you_create": "Kurikira ibiganiro uba watangije", - "grouptitle": "Hitamo umutwe w'itsinda ushaka ko uzajya ugaragara", + "grouptitle": "Group Title", "no-group-title": "Nta mutwe w'itsinda", "select-skin": "Hitamo Uruhu", "select-homepage": "Hitamo Paji y'Imbere", diff --git a/public/language/sc/email.json b/public/language/sc/email.json index 1b8d512945..691e6309a2 100644 --- a/public/language/sc/email.json +++ b/public/language/sc/email.json @@ -24,6 +24,7 @@ "digest.day": "day", "digest.week": "week", "digest.month": "month", + "digest.subject": "Digest for %1", "notif.chat.subject": "New chat message received from %1", "notif.chat.cta": "Click here to continue the conversation", "notif.chat.unsub.info": "This chat notification was sent to you due to your subscription settings.", diff --git a/public/language/sc/error.json b/public/language/sc/error.json index 0709e823b6..56a5530e02 100644 --- a/public/language/sc/error.json +++ b/public/language/sc/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "You are not allowed to edit this message", "cant-remove-last-user": "You can't remove the last user", "cant-delete-chat-message": "You are not allowed to delete this message", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "Reputation system is disabled.", "downvoting-disabled": "Downvoting is disabled", "not-enough-reputation-to-downvote": "You do not have enough reputation to downvote this post", diff --git a/public/language/sc/topic.json b/public/language/sc/topic.json index 1f58d8582d..074062ecb6 100644 --- a/public/language/sc/topic.json +++ b/public/language/sc/topic.json @@ -26,7 +26,7 @@ "tools": "Ainas", "flag": "Signala", "locked": "Locked", - "bookmark_instructions": "Click here to return to the last unread post in this thread.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "Signala custu arresonu pro sa moderatzione", "flag_success": "This post has been flagged for moderation.", "deleted_message": "This topic has been deleted. Only users with topic management privileges can see it.", diff --git a/public/language/sc/user.json b/public/language/sc/user.json index 9c01aa6133..07d989d612 100644 --- a/public/language/sc/user.json +++ b/public/language/sc/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", - "grouptitle": "Select the group title you would like to display", + "grouptitle": "Group Title", "no-group-title": "No group title", "select-skin": "Select a Skin", "select-homepage": "Select a Homepage", diff --git a/public/language/sk/email.json b/public/language/sk/email.json index 5fb7201bf4..8ad65fe965 100644 --- a/public/language/sk/email.json +++ b/public/language/sk/email.json @@ -24,6 +24,7 @@ "digest.day": "day", "digest.week": "week", "digest.month": "month", + "digest.subject": "Digest for %1", "notif.chat.subject": "Máte novú správu od %1", "notif.chat.cta": "Kliknite sem pre pokračovanie v konverzácii", "notif.chat.unsub.info": "Toto upozornenie o správach ste prijali na základe Vašich nastavení účtu.", diff --git a/public/language/sk/error.json b/public/language/sk/error.json index 4d99825f9e..a8b3ba06a7 100644 --- a/public/language/sk/error.json +++ b/public/language/sk/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "You are not allowed to edit this message", "cant-remove-last-user": "You can't remove the last user", "cant-delete-chat-message": "You are not allowed to delete this message", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "Reputation system is disabled.", "downvoting-disabled": "Downvoting is disabled", "not-enough-reputation-to-downvote": "You do not have enough reputation to downvote this post", diff --git a/public/language/sk/topic.json b/public/language/sk/topic.json index 39f4ca03d8..df1ecdd198 100644 --- a/public/language/sk/topic.json +++ b/public/language/sk/topic.json @@ -26,7 +26,7 @@ "tools": "Nástroje", "flag": "Označiť", "locked": "Locked", - "bookmark_instructions": "Click here to return to the last unread post in this thread.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "Označiť príspevok pre moderáciu", "flag_success": "Tento príspevok bol označený na úpravu. ", "deleted_message": "This topic has been deleted. Only users with topic management privileges can see it.", diff --git a/public/language/sk/user.json b/public/language/sk/user.json index ea4a0963ab..25684b7a8a 100644 --- a/public/language/sk/user.json +++ b/public/language/sk/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", - "grouptitle": "Select the group title you would like to display", + "grouptitle": "Group Title", "no-group-title": "No group title", "select-skin": "Select a Skin", "select-homepage": "Select a Homepage", diff --git a/public/language/sl/email.json b/public/language/sl/email.json index 5007647a0f..b214e979b6 100644 --- a/public/language/sl/email.json +++ b/public/language/sl/email.json @@ -24,6 +24,7 @@ "digest.day": "day", "digest.week": "week", "digest.month": "month", + "digest.subject": "Digest for %1", "notif.chat.subject": "Novo sporočilo prejeto na %1", "notif.chat.cta": "Kliknite tu za nadaljevanje pogovora", "notif.chat.unsub.info": "Obvestilu o pogovoru je bilo poslano zaradi vaših nastavitev obvestil.", diff --git a/public/language/sl/error.json b/public/language/sl/error.json index a0453bc488..d9df817190 100644 --- a/public/language/sl/error.json +++ b/public/language/sl/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "You are not allowed to edit this message", "cant-remove-last-user": "You can't remove the last user", "cant-delete-chat-message": "You are not allowed to delete this message", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "Možnost ugleda je onemogočena.", "downvoting-disabled": "Negativno glasovanje je onemogočeno", "not-enough-reputation-to-downvote": "Nimate dovolj ugleda za negativno glasovanje", diff --git a/public/language/sl/topic.json b/public/language/sl/topic.json index 503f7ee250..705f9564ec 100644 --- a/public/language/sl/topic.json +++ b/public/language/sl/topic.json @@ -26,7 +26,7 @@ "tools": "Orodja", "flag": "Prijavi", "locked": "Zaklenjeno", - "bookmark_instructions": "Click here to return to the last unread post in this thread.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "Prijavi to objavo v pregled administratorju", "flag_success": "Ta objava je bila prijavljena v pregled administratorju.", "deleted_message": "Ta tema je bila izbrisana. Le uporabniki s pravicami teme jo lahko vidijo.", diff --git a/public/language/sl/user.json b/public/language/sl/user.json index 9267903016..6552ed4f56 100644 --- a/public/language/sl/user.json +++ b/public/language/sl/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Spremljaj teme v katerih si sodeloval", "follow_topics_you_create": "Spremljaj teme, ki si jih ustvaril/a", - "grouptitle": "Izberi ime skupine za prikaz", + "grouptitle": "Group Title", "no-group-title": "Skupina nima imena", "select-skin": "Izberi obliko", "select-homepage": "Select a Homepage", diff --git a/public/language/sr/email.json b/public/language/sr/email.json index 3b47422111..885e6d2cbd 100644 --- a/public/language/sr/email.json +++ b/public/language/sr/email.json @@ -24,6 +24,7 @@ "digest.day": "Дан", "digest.week": "Недеља", "digest.month": "Месец", + "digest.subject": "Digest for %1", "notif.chat.subject": "Примљена је нова порука ћаскања од %1", "notif.chat.cta": "Кликните овде да наставите са разговором", "notif.chat.unsub.info": "Ова нотификација је послата вама због претплате коју имате.", diff --git a/public/language/sr/error.json b/public/language/sr/error.json index 369e8f7308..5c66e812ac 100644 --- a/public/language/sr/error.json +++ b/public/language/sr/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "You are not allowed to edit this message", "cant-remove-last-user": "You can't remove the last user", "cant-delete-chat-message": "You are not allowed to delete this message", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "Reputation system is disabled.", "downvoting-disabled": "Downvoting is disabled", "not-enough-reputation-to-downvote": "You do not have enough reputation to downvote this post", diff --git a/public/language/sr/topic.json b/public/language/sr/topic.json index 37e042c18f..a5ae516c6f 100644 --- a/public/language/sr/topic.json +++ b/public/language/sr/topic.json @@ -26,7 +26,7 @@ "tools": "Алатке", "flag": "Означи", "locked": "Закључан", - "bookmark_instructions": "Click here to return to the last unread post in this thread.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "Flag this post for moderation", "flag_success": "This post has been flagged for moderation.", "deleted_message": "This topic has been deleted. Only users with topic management privileges can see it.", diff --git a/public/language/sr/user.json b/public/language/sr/user.json index efe4780b07..3c77214598 100644 --- a/public/language/sr/user.json +++ b/public/language/sr/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", - "grouptitle": "Select the group title you would like to display", + "grouptitle": "Group Title", "no-group-title": "No group title", "select-skin": "Select a Skin", "select-homepage": "Select a Homepage", diff --git a/public/language/sv/email.json b/public/language/sv/email.json index 7d10363d97..5cf3bec72b 100644 --- a/public/language/sv/email.json +++ b/public/language/sv/email.json @@ -24,6 +24,7 @@ "digest.day": "day", "digest.week": "week", "digest.month": "month", + "digest.subject": "Digest for %1", "notif.chat.subject": "Nytt chatt-meddelande från %1", "notif.chat.cta": "Klicka här för att fortsätta konversationen", "notif.chat.unsub.info": "Denna chatt-notifikation skickades till dig på grund av dina inställningar för prenumerationer.", diff --git a/public/language/sv/error.json b/public/language/sv/error.json index efb83e5014..cdc57388fd 100644 --- a/public/language/sv/error.json +++ b/public/language/sv/error.json @@ -24,7 +24,7 @@ "confirm-email-already-sent": "Bekräftningsbrev redan skickat, var god vänta %1 minut(er) innan du skickar ett nytt.", "username-too-short": "Användarnamnet är för kort", "username-too-long": "Användarnamnet är för långt", - "password-too-long": "Password too long", + "password-too-long": "Lösenordet är för långt", "user-banned": "Användare bannlyst", "user-too-new": "När du är ny medlem måste du vänta %1 sekund(er) innan du gör ditt första inlägg", "blacklisted-ip": "Sorry, your IP address has been banned from this community. If you feel this is in error, please contact an administrator.", @@ -85,6 +85,7 @@ "cant-edit-chat-message": "You are not allowed to edit this message", "cant-remove-last-user": "You can't remove the last user", "cant-delete-chat-message": "You are not allowed to delete this message", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "Ryktessystemet är inaktiverat.", "downvoting-disabled": "Nedröstning är inaktiverat", "not-enough-reputation-to-downvote": "Du har inte tillräckligt förtroende för att rösta ner det här meddelandet", diff --git a/public/language/sv/topic.json b/public/language/sv/topic.json index 4fa03da4ee..f1188f7ad6 100644 --- a/public/language/sv/topic.json +++ b/public/language/sv/topic.json @@ -26,7 +26,7 @@ "tools": "Verktyg", "flag": "Rapportera", "locked": "Låst", - "bookmark_instructions": "Klicka här för att återvända till det sista olästa inlägget i den här tråden.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "Rapportera detta inlägg för granskning", "flag_success": "Det här inlägget har flaggats för moderering.", "deleted_message": "Det här ämnet har raderats. Endast användare med ämneshanterings-privilegier kan se det.", diff --git a/public/language/sv/user.json b/public/language/sv/user.json index 98a9d303d7..a592658839 100644 --- a/public/language/sv/user.json +++ b/public/language/sv/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Följ ämnen som du svarat på", "follow_topics_you_create": "Följ ämnen du skapat", - "grouptitle": "Välj tittel för gruppen så som du vill att den ska visas", + "grouptitle": "Group Title", "no-group-title": "Ingen titel på gruppen", "select-skin": "Välj ett Skin", "select-homepage": "Select a Homepage", diff --git a/public/language/th/email.json b/public/language/th/email.json index 50a596b128..6881135565 100644 --- a/public/language/th/email.json +++ b/public/language/th/email.json @@ -24,6 +24,7 @@ "digest.day": "day", "digest.week": "week", "digest.month": "month", + "digest.subject": "Digest for %1", "notif.chat.subject": "New chat message received from %1", "notif.chat.cta": "กดตรงนี้เพื่อกลับไปยังบทสนทนา", "notif.chat.unsub.info": "This chat notification was sent to you due to your subscription settings.", diff --git a/public/language/th/error.json b/public/language/th/error.json index 5fa5730b94..44cef957ae 100644 --- a/public/language/th/error.json +++ b/public/language/th/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "You are not allowed to edit this message", "cant-remove-last-user": "You can't remove the last user", "cant-delete-chat-message": "You are not allowed to delete this message", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "Reputation system is disabled.", "downvoting-disabled": "Downvoting is disabled", "not-enough-reputation-to-downvote": "You do not have enough reputation to downvote this post", diff --git a/public/language/th/topic.json b/public/language/th/topic.json index 19cecadf9d..7ad792070d 100644 --- a/public/language/th/topic.json +++ b/public/language/th/topic.json @@ -26,7 +26,7 @@ "tools": "เครื่องมือ", "flag": "ปักธง", "locked": "Locked", - "bookmark_instructions": "Click here to return to the last unread post in this thread.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "ปักธงโพสต์นี้เพื่อดำเนินการ", "flag_success": "This post has been flagged for moderation.", "deleted_message": "Topic นี้ถูกลบไปแล้ว เฉพาะผู้ใช้งานที่มีสิทธิ์ในการจัดการ Topic เท่านั้นที่จะมีสิทธิ์ในการเข้าชม", diff --git a/public/language/th/user.json b/public/language/th/user.json index e7be1d4c47..aeeafa7e74 100644 --- a/public/language/th/user.json +++ b/public/language/th/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", - "grouptitle": "Select the group title you would like to display", + "grouptitle": "Group Title", "no-group-title": "No group title", "select-skin": "Select a Skin", "select-homepage": "Select a Homepage", diff --git a/public/language/tr/email.json b/public/language/tr/email.json index 7dabee41c7..999da17999 100644 --- a/public/language/tr/email.json +++ b/public/language/tr/email.json @@ -24,6 +24,7 @@ "digest.day": "gün", "digest.week": "hafta", "digest.month": "ay", + "digest.subject": "Digest for %1", "notif.chat.subject": "Okunmamış bazı iletileriniz var", "notif.chat.cta": "Sohbete devam etmek için buraya tıklayın", "notif.chat.unsub.info": "Bu bildirim şectiğiniz ayarlar yüzünden gönderildi.", diff --git a/public/language/tr/error.json b/public/language/tr/error.json index bb03c66177..a46062e561 100644 --- a/public/language/tr/error.json +++ b/public/language/tr/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "Bu mesajı düzenlemek için izin verilmez", "cant-remove-last-user": "Son kullanıcıyı silemezsiniz", "cant-delete-chat-message": "Bu mesajı silmek için izin verilmez", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "Saygınlık sistemi kapatılmış.", "downvoting-disabled": "Aşagı oylama kapatılmış", "not-enough-reputation-to-downvote": "Bu iletiyi aşagı oylamak için yeterince saygınlığınız yok.", diff --git a/public/language/tr/topic.json b/public/language/tr/topic.json index e12c92f005..552b2cdff0 100644 --- a/public/language/tr/topic.json +++ b/public/language/tr/topic.json @@ -26,7 +26,7 @@ "tools": "Araçlar", "flag": "Bayrak", "locked": "Kilitli", - "bookmark_instructions": "Bu başlıkta okuduğun en son iletiye gitmek için buraya tıklayınız", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "Bu iletiyi moderatöre haber et", "flag_success": "Bu ileti yöneticilere bildirildi.", "deleted_message": "Bu başlık silindi. Sadece başlık düzenleme yetkisi olan kullanıcılar görebilir.", diff --git a/public/language/tr/user.json b/public/language/tr/user.json index 18ff6f5d91..e6e6fd7b9f 100644 --- a/public/language/tr/user.json +++ b/public/language/tr/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "Cevap yazdıktan sonra yeni gönderiyi göster", "follow_topics_you_reply_to": "Cevap verdiğim konuları takip et", "follow_topics_you_create": "Kendi konularımı takip et", - "grouptitle": "Göstermek istediğiniz gurup başlığını seçin", + "grouptitle": "Group Title", "no-group-title": "Grup başlığı yok", "select-skin": "Bir deri şeçin", "select-homepage": "Bir anasayfa seçin", diff --git a/public/language/vi/email.json b/public/language/vi/email.json index de77b60125..1d14524ac1 100644 --- a/public/language/vi/email.json +++ b/public/language/vi/email.json @@ -24,6 +24,7 @@ "digest.day": "ngày", "digest.week": "tuần", "digest.month": "tháng", + "digest.subject": "Digest for %1", "notif.chat.subject": "Bạn có tin nhắn mới từ %1", "notif.chat.cta": "Nhấn vào đây để tiếp tục cuộc hội thoại", "notif.chat.unsub.info": "Thông báo tin nhắn này được gửi tới dựa theo cài đặt theo dõi của bạn.", diff --git a/public/language/vi/error.json b/public/language/vi/error.json index fd5b2a903e..b6c0c79455 100644 --- a/public/language/vi/error.json +++ b/public/language/vi/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "Bạn không được phép chỉnh sửa tin nhắn này", "cant-remove-last-user": "Bạn không thể xoá thành viên cuối cùng", "cant-delete-chat-message": "Bạn không được phép xoá tin nhắn này", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "Hệ thống tín nhiệm đã bị vô hiệu hóa.", "downvoting-disabled": "Downvote đã bị tắt", "not-enough-reputation-to-downvote": "Bạn không có đủ phiếu tín nhiệm để downvote bài này", diff --git a/public/language/vi/topic.json b/public/language/vi/topic.json index 683acae9fa..c4dc23759f 100644 --- a/public/language/vi/topic.json +++ b/public/language/vi/topic.json @@ -26,7 +26,7 @@ "tools": "Công cụ", "flag": "Gắn cờ", "locked": "Khóa", - "bookmark_instructions": "Nhấn vào đây để trở lại bài viết cuối cùng mà bạn chưa đọc trong chủ đề này.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "Flag bài viết này để chỉnh sửa", "flag_success": "Chủ đề này đã được flag để chỉnh sửa", "deleted_message": "Chủ đề này đã bị xóa. Chỉ ban quản trị mới xem được.", diff --git a/public/language/vi/user.json b/public/language/vi/user.json index aa0753ffd3..64932fabe6 100644 --- a/public/language/vi/user.json +++ b/public/language/vi/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Theo dõi chủ đề bạn trả lời", "follow_topics_you_create": "Theo dõi chủ đề bạn tạo", - "grouptitle": "Chọn tên nhóm mà bạn muốn hiển thị", + "grouptitle": "Group Title", "no-group-title": "Không có tên nhóm", "select-skin": "Chọn một giao diện", "select-homepage": "Chọn Trang chủ", diff --git a/public/language/zh_CN/email.json b/public/language/zh_CN/email.json index 4d4534bf72..66650a0b02 100644 --- a/public/language/zh_CN/email.json +++ b/public/language/zh_CN/email.json @@ -24,6 +24,7 @@ "digest.day": "天", "digest.week": "周", "digest.month": "月", + "digest.subject": "%1 的摘要", "notif.chat.subject": "收到来自 %1 的新聊天消息", "notif.chat.cta": "点击这里继续会话", "notif.chat.unsub.info": "根据您的订阅设置,为您发送此聊天提醒。", diff --git a/public/language/zh_CN/error.json b/public/language/zh_CN/error.json index 4e8ec6a25f..af0a03bc4a 100644 --- a/public/language/zh_CN/error.json +++ b/public/language/zh_CN/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "您不能编辑这条信息", "cant-remove-last-user": "您不能移除这个用户", "cant-delete-chat-message": "您不允许删除这条消息", + "already-voting-for-this-post": "您已为此帖回复投过票了。", "reputation-system-disabled": "威望系统已禁用。", "downvoting-disabled": "扣分功能已禁用", "not-enough-reputation-to-downvote": "您的威望不足以给此帖扣分", diff --git a/public/language/zh_CN/topic.json b/public/language/zh_CN/topic.json index c123366bb0..f23e8e1417 100644 --- a/public/language/zh_CN/topic.json +++ b/public/language/zh_CN/topic.json @@ -26,7 +26,7 @@ "tools": "工具", "flag": "举报", "locked": "已锁定", - "bookmark_instructions": "点击这里返回最新的未读回帖。", + "bookmark_instructions": "点击阅读本主题帖中的最新回复", "flag_title": "举报此帖", "flag_success": "已举报此回帖。", "deleted_message": "此主题已被删除。只有拥有主题管理权限的用户可以查看。", diff --git a/public/language/zh_CN/user.json b/public/language/zh_CN/user.json index 9e30afc3f6..a7620b2522 100644 --- a/public/language/zh_CN/user.json +++ b/public/language/zh_CN/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "在提交回复之后显示新帖子", "follow_topics_you_reply_to": "关注您回复的主题", "follow_topics_you_create": "关注您创建的主题", - "grouptitle": "选择展示的小组称号", + "grouptitle": "小组标题", "no-group-title": "不展示小组称号", "select-skin": "选择皮肤", "select-homepage": "选择首页", diff --git a/public/language/zh_TW/email.json b/public/language/zh_TW/email.json index 2eeb7a8e13..8361ff52d0 100644 --- a/public/language/zh_TW/email.json +++ b/public/language/zh_TW/email.json @@ -24,6 +24,7 @@ "digest.day": "day", "digest.week": "week", "digest.month": "month", + "digest.subject": "Digest for %1", "notif.chat.subject": "收到來自$1的聊天消息", "notif.chat.cta": "點擊此處繼續對話", "notif.chat.unsub.info": "本聊天通知按您的訂閱設置發送給您。", diff --git a/public/language/zh_TW/error.json b/public/language/zh_TW/error.json index 0db5a671c2..5deae59892 100644 --- a/public/language/zh_TW/error.json +++ b/public/language/zh_TW/error.json @@ -85,6 +85,7 @@ "cant-edit-chat-message": "You are not allowed to edit this message", "cant-remove-last-user": "You can't remove the last user", "cant-delete-chat-message": "You are not allowed to delete this message", + "already-voting-for-this-post": "You have already voted for this post.", "reputation-system-disabled": "信譽系統已停用。", "downvoting-disabled": "Downvoting已停用", "not-enough-reputation-to-downvote": "你沒有足夠的信譽downvote這個帖子", diff --git a/public/language/zh_TW/topic.json b/public/language/zh_TW/topic.json index 62f48e9523..4b344c6a31 100644 --- a/public/language/zh_TW/topic.json +++ b/public/language/zh_TW/topic.json @@ -26,7 +26,7 @@ "tools": "工具", "flag": "檢舉", "locked": "已鎖定", - "bookmark_instructions": "Click here to return to the last unread post in this thread.", + "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "檢舉這篇文章, 交給仲裁者來審閱.", "flag_success": "這文章已經被檢舉要求仲裁.", "deleted_message": "此主題已被刪除。只有具有主題管理權限的用戶才能看到它。", diff --git a/public/language/zh_TW/user.json b/public/language/zh_TW/user.json index a848ac6990..1228565dff 100644 --- a/public/language/zh_TW/user.json +++ b/public/language/zh_TW/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", - "grouptitle": "Select the group title you would like to display", + "grouptitle": "Group Title", "no-group-title": "無此群組標題", "select-skin": "Select a Skin", "select-homepage": "Select a Homepage", From 902f47488805eb98b3b7e125eea9be404450cd1f Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 19 Apr 2016 09:35:14 -0400 Subject: [PATCH 0076/1109] fixed japanese language code --- public/language/ja/language.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/language/ja/language.json b/public/language/ja/language.json index e210a4285a..ecd635ee30 100644 --- a/public/language/ja/language.json +++ b/public/language/ja/language.json @@ -1,5 +1,5 @@ { "name": "日本語", - "code": "ja_JP", + "code": "ja", "dir": "ltr" } \ No newline at end of file From d83a1987eb65517e2a6cc65f3811c5bd6711ccd6 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Tue, 19 Apr 2016 12:03:30 -0400 Subject: [PATCH 0077/1109] fix routing of rjs modules --- src/meta/js.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/meta/js.js b/src/meta/js.js index 63c265a9cf..2669aed4d4 100644 --- a/src/meta/js.js +++ b/src/meta/js.js @@ -95,7 +95,7 @@ module.exports = function(Meta) { async.series([ function(next) { async.each(Meta.js.scripts.modules, function(localPath, next) { - app.get(path.join('/src/modules/', path.basename(localPath)), function(req, res) { + app.get('/src/modules/' + path.basename(localPath), function(req, res) { return res.sendFile(path.join(__dirname, '../../', localPath), { maxAge: app.enabled('cache') ? 5184000000 : 0 }); From ff88186d410c4af5a8c069d22c3d01747868fc90 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 19 Apr 2016 20:04:32 +0300 Subject: [PATCH 0078/1109] closes #4537 --- src/posts/delete.js | 3 ++ src/topics/delete.js | 15 +++++----- src/topics/fork.js | 6 ++-- src/topics/posts.js | 71 ++++++++++++++++++++++++++------------------ src/topics/user.js | 25 +++------------- src/upgrade.js | 56 +++++++++++++++++++++++++++++++++- 6 files changed, 115 insertions(+), 61 deletions(-) diff --git a/src/posts/delete.js b/src/posts/delete.js index a77c153cb2..40b6554b6f 100644 --- a/src/posts/delete.js +++ b/src/posts/delete.js @@ -181,6 +181,9 @@ module.exports = function(Posts) { function(next) { db.sortedSetIncrBy('cid:' + topicData.cid + ':tids:posts', -1, postData.tid, next); }, + function(next) { + db.sortedSetIncrBy('tid:' + postData.tid + ':posters', -1, postData.uid, next); + }, function(next) { user.incrementUserPostCountBy(postData.uid, -1, next); } diff --git a/src/topics/delete.js b/src/topics/delete.js index 97d617d878..f979d3083a 100644 --- a/src/topics/delete.js +++ b/src/topics/delete.js @@ -1,12 +1,12 @@ 'use strict'; -var async = require('async'), - db = require('../database'), +var async = require('async'); +var db = require('../database'); - user = require('../user'), - posts = require('../posts'), - plugins = require('../plugins'), - batch = require('../batch'); +var user = require('../user'); +var posts = require('../posts'); +var plugins = require('../plugins'); +var batch = require('../batch'); module.exports = function(Topics) { @@ -115,7 +115,8 @@ module.exports = function(Topics) { 'tid:' + tid + ':followers', 'tid:' + tid + ':posts', 'tid:' + tid + ':posts:votes', - 'tid:' + tid + ':bookmarks' + 'tid:' + tid + ':bookmarks', + 'tid:' + tid + ':posters' ], next); }, function(next) { diff --git a/src/topics/fork.js b/src/topics/fork.js index 948cb3207e..80143e4d46 100644 --- a/src/topics/fork.js +++ b/src/topics/fork.js @@ -87,7 +87,7 @@ module.exports = function(Topics) { if (!exists) { return next(new Error('[[error:no-topic]]')); } - posts.getPostFields(pid, ['tid', 'timestamp', 'votes'], next); + posts.getPostFields(pid, ['tid', 'uid', 'timestamp', 'votes'], next); }, function(post, next) { if (!post || !post.tid) { @@ -101,7 +101,7 @@ module.exports = function(Topics) { postData = post; postData.pid = pid; - Topics.removePostFromTopic(postData.tid, pid, next); + Topics.removePostFromTopic(postData.tid, postData, next); }, function(next) { async.parallel([ @@ -118,7 +118,7 @@ module.exports = function(Topics) { posts.setPostField(pid, 'tid', tid, next); }, function(next) { - Topics.addPostToTopic(tid, pid, postData.timestamp, postData.votes, next); + Topics.addPostToTopic(tid, postData, next); } ], next); }, diff --git a/src/topics/posts.js b/src/topics/posts.js index 445eab4637..671c65b4c5 100644 --- a/src/topics/posts.js +++ b/src/topics/posts.js @@ -22,7 +22,7 @@ module.exports = function(Topics) { Topics.updateTimestamp(postData.tid, postData.timestamp, next); }, function(next) { - Topics.addPostToTopic(postData.tid, postData.pid, postData.timestamp, 0, next); + Topics.addPostToTopic(postData.tid, postData, next); } ], callback); }; @@ -264,38 +264,51 @@ module.exports = function(Topics) { ); }; - Topics.addPostToTopic = function(tid, pid, timestamp, votes, callback) { - Topics.getTopicField(tid, 'mainPid', function(err, mainPid) { - if (err) { - return callback(err); + Topics.addPostToTopic = function(tid, postData, callback) { + async.waterfall([ + function (next) { + Topics.getTopicField(tid, 'mainPid', next); + }, + function (mainPid, next) { + if (!parseInt(mainPid, 10)) { + Topics.setTopicField(tid, 'mainPid', postData.pid, next); + } else { + async.parallel([ + function(next) { + db.sortedSetAdd('tid:' + tid + ':posts', postData.timestamp, postData.pid, next); + }, + function(next) { + db.sortedSetAdd('tid:' + tid + ':posts:votes', postData.votes, postData.pid, next); + } + ], function(err) { + next(err); + }); + } + }, + function (next) { + db.sortedSetIncrBy('tid:' + tid + ':posters', 1, postData.uid, next); + }, + function (count, next) { + Topics.updateTeaser(tid, next); } - if (!parseInt(mainPid, 10)) { - Topics.setTopicField(tid, 'mainPid', pid, callback); - } else { - async.parallel([ - function(next) { - db.sortedSetAdd('tid:' + tid + ':posts', timestamp, pid, next); - }, - function(next) { - db.sortedSetAdd('tid:' + tid + ':posts:votes', votes, pid, next); - } - ], function(err) { - if (err) { - return callback(err); - } - Topics.updateTeaser(tid, callback); - }); - } - }); + ], callback); }; - Topics.removePostFromTopic = function(tid, pid, callback) { - db.sortedSetsRemove(['tid:' + tid + ':posts', 'tid:' + tid + ':posts:votes'], pid, function(err) { - if (err) { - return callback(err); + Topics.removePostFromTopic = function(tid, postData, callback) { + async.waterfall([ + function (next) { + db.sortedSetsRemove([ + 'tid:' + tid + ':posts', + 'tid:' + tid + ':posts:votes' + ], postData.pid, next); + }, + function (next) { + db.sortedSetIncrBy('tid:' + tid + ':posters', -1, postData.uid, next); + }, + function (count, next) { + Topics.updateTeaser(tid, next); } - Topics.updateTeaser(tid, callback); - }); + ], callback); }; Topics.getPids = function(tid, callback) { diff --git a/src/topics/user.js b/src/topics/user.js index 4db380efdf..09cb4a7e87 100644 --- a/src/topics/user.js +++ b/src/topics/user.js @@ -2,10 +2,9 @@ 'use strict'; -var async = require('async'), - db = require('../database'), - posts = require('../posts'); - +var async = require('async'); +var db = require('../database'); +var posts = require('../posts'); module.exports = function(Topics) { @@ -20,22 +19,6 @@ module.exports = function(Topics) { }; Topics.getUids = function(tid, callback) { - async.waterfall([ - function(next) { - Topics.getPids(tid, next); - }, - function(pids, next) { - posts.getPostsFields(pids, ['uid'], next); - }, - function(postData, next) { - var uids = postData.map(function(post) { - return post && post.uid; - }).filter(function(uid, index, array) { - return uid && array.indexOf(uid) === index; - }); - - next(null, uids); - } - ], callback); + db.getSortedSetRevRangeByScore('tid:' + tid + ':posters', 0, -1, '+inf', 1, callback); }; }; \ No newline at end of file diff --git a/src/upgrade.js b/src/upgrade.js index 68f830ef3c..77974839e6 100644 --- a/src/upgrade.js +++ b/src/upgrade.js @@ -10,7 +10,7 @@ var db = require('./database'), schemaDate, thisSchemaDate, // IMPORTANT: REMEMBER TO UPDATE VALUE OF latestSchema - latestSchema = Date.UTC(2016, 3, 14); + latestSchema = Date.UTC(2016, 3, 18); Upgrade.check = function(callback) { db.get('schemaDate', function(err, value) { @@ -476,6 +476,60 @@ Upgrade.upgrade = function(callback) { winston.info('[2016/04/14] Group title from settings to user profile skipped!'); next(); } + }, + function(next) { + thisSchemaDate = Date.UTC(2016, 3, 18); + + if (schemaDate < thisSchemaDate) { + updatesMade = true; + winston.info('[2016/04/19] Users post count per tid'); + + var batch = require('./batch'); + var topics = require('./topics'); + var count = 0; + batch.processSortedSet('topics:tid', function(tids, next) { + winston.info('upgraded ' + count + ' topics'); + + async.each(tids, function(tid, next) { + db.delete('tid:' + tid + ':posters', function(err) { + if (err) { + return next(err); + } + topics.getPids(tid, function(err, pids) { + if (err) { + return next(err); + } + + if (!pids.length) { + return next(); + } + + async.eachSeries(pids, function(pid, next) { + db.getObjectField('post:' + pid, 'uid', function(err, uid) { + if (err) { + return next(err); + } + if (!parseInt(uid, 10)) { + return next(); + } + db.sortedSetIncrBy('tid:' + tid + ':posters', 1, uid, next); + }); + }, next); + }); + }); + }, next); + }, {}, function(err) { + if (err) { + return next(err); + } + + winston.info('[2016/04/19] Users post count per tid done'); + Upgrade.update(thisSchemaDate, next); + }); + } else { + winston.info('[2016/04/19] Users post count per tid skipped!'); + next(); + } } // Add new schema updates here // IMPORTANT: REMEMBER TO UPDATE VALUE OF latestSchema IN LINE 24!!! From 4aabac5288757eafe6af5dae6bebaaac91a74e75 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 19 Apr 2016 21:03:00 -0400 Subject: [PATCH 0079/1109] Fixes #4548 --- src/controllers/authentication.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/authentication.js b/src/controllers/authentication.js index 8db2c9e580..04a9e1408c 100644 --- a/src/controllers/authentication.js +++ b/src/controllers/authentication.js @@ -33,7 +33,7 @@ authenticationController.register = function(req, res, next) { async.waterfall([ function(next) { - if (registrationType === 'invite-only') { + if (registrationType === 'invite-only' || registrationType === 'admin-invite-only') { user.verifyInvitation(userData, next); } else { next(); @@ -59,7 +59,7 @@ authenticationController.register = function(req, res, next) { plugins.fireHook('filter:register.check', {req: req, res: res, userData: userData}, next); }, function(data, next) { - if (registrationType === 'normal' || registrationType === 'invite-only') { + if (registrationType === 'normal' || registrationType === 'invite-only' || registrationType === 'admin-invite-only') { registerAndLoginUser(req, res, userData, next); } else if (registrationType === 'admin-approval') { addToApprovalQueue(req, userData, next); From dca9218ee94bd94c88594ec69beaef188e15624e Mon Sep 17 00:00:00 2001 From: Raphael Beer Date: Wed, 20 Apr 2016 04:58:48 +0200 Subject: [PATCH 0080/1109] Add .selected to currently set icon in modal --- public/src/modules/iconSelect.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/src/modules/iconSelect.js b/public/src/modules/iconSelect.js index 53a5780b5a..d5e8507aea 100644 --- a/public/src/modules/iconSelect.js +++ b/public/src/modules/iconSelect.js @@ -60,8 +60,12 @@ define('iconSelect', function() { // Focus on the input box searchEl.focus(); + if (selected) { + modalEl.find('.icon-container .' + selected).addClass('selected'); + } + modalEl.find('.icon-container').on('click', 'i', function() { - searchEl.val($(this).attr('class').replace('fa fa-', '')); + searchEl.val($(this).attr('class').replace('fa fa-', '').replace('selected', '')); modalEl.find('.icon-container i').removeClass('selected'); $(this).addClass('selected'); }); From ff2ca0f7861f53cef7890d74c17d24bd1a29564b Mon Sep 17 00:00:00 2001 From: Raphael Beer Date: Wed, 20 Apr 2016 07:31:00 +0200 Subject: [PATCH 0081/1109] Add changeSelection to iconSelect --- public/src/modules/iconSelect.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/public/src/modules/iconSelect.js b/public/src/modules/iconSelect.js index d5e8507aea..d9ab54e67d 100644 --- a/public/src/modules/iconSelect.js +++ b/public/src/modules/iconSelect.js @@ -57,6 +57,19 @@ define('iconSelect', function() { icons = modalEl.find('.fa-icons i'), submitEl = modalEl.find('button.btn-primary'); + function changeSelection(newSelection) { + $('.icon-container i.selected').removeClass('selected'); + if (newSelection) { + newSelection.addClass('selected'); + } else if (searchEl.val().length === 0) { + if (selected) { + $('.icon-container .' + selected).addClass('selected'); + } + } else { + $('.icon-container i:visible').first().addClass('selected'); + } + } + // Focus on the input box searchEl.focus(); @@ -66,8 +79,7 @@ define('iconSelect', function() { modalEl.find('.icon-container').on('click', 'i', function() { searchEl.val($(this).attr('class').replace('fa fa-', '').replace('selected', '')); - modalEl.find('.icon-container i').removeClass('selected'); - $(this).addClass('selected'); + changeSelection($(this)); }); searchEl.on('keyup', function(e) { @@ -79,9 +91,8 @@ define('iconSelect', function() { $(el).hide(); } }); + changeSelection(); } else { - // Pick first match - $('.icon-container i:visible').first().addClass('selected'); submitEl.click(); } }); From aaef2d4362f60123ce93422a4a09c031e280504d Mon Sep 17 00:00:00 2001 From: Raphael Beer Date: Wed, 20 Apr 2016 09:34:20 +0200 Subject: [PATCH 0082/1109] Use modal Element as traversing root --- public/src/modules/iconSelect.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/src/modules/iconSelect.js b/public/src/modules/iconSelect.js index d9ab54e67d..252f8778d9 100644 --- a/public/src/modules/iconSelect.js +++ b/public/src/modules/iconSelect.js @@ -58,15 +58,15 @@ define('iconSelect', function() { submitEl = modalEl.find('button.btn-primary'); function changeSelection(newSelection) { - $('.icon-container i.selected').removeClass('selected'); + modalEl.find('i.selected').removeClass('selected'); if (newSelection) { newSelection.addClass('selected'); } else if (searchEl.val().length === 0) { if (selected) { - $('.icon-container .' + selected).addClass('selected'); + modalEl.find('.' + selected).addClass('selected'); } } else { - $('.icon-container i:visible').first().addClass('selected'); + modalEl.find('i:visible').first().addClass('selected'); } } @@ -74,7 +74,7 @@ define('iconSelect', function() { searchEl.focus(); if (selected) { - modalEl.find('.icon-container .' + selected).addClass('selected'); + modalEl.find('.' + selected).addClass('selected'); } modalEl.find('.icon-container').on('click', 'i', function() { From c9b2011a11ed1b7f3d69affc2badc2469aab0b0b Mon Sep 17 00:00:00 2001 From: Raphael Beer Date: Wed, 20 Apr 2016 10:59:09 +0200 Subject: [PATCH 0083/1109] Set input#fa-filter value to name of selected icon - Set selected icon before modal is visible. - Select input#fa-filter content to allow immediate typing/searching. --- public/src/modules/iconSelect.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/public/src/modules/iconSelect.js b/public/src/modules/iconSelect.js index 252f8778d9..0f8cf6d182 100644 --- a/public/src/modules/iconSelect.js +++ b/public/src/modules/iconSelect.js @@ -20,6 +20,7 @@ define('iconSelect', function() { var picker = bootbox.dialog({ onEscape: true, backdrop: true, + show: false, message: html, title: 'Select an Icon', buttons: { @@ -51,6 +52,16 @@ define('iconSelect', function() { } }); + picker.on('show.bs.modal', function() { + var modalEl = $(this), + searchEl = modalEl.find('input'); + + if (selected) { + modalEl.find('.' + selected).addClass('selected'); + searchEl.val(selected.replace('fa-', '')); + } + }).modal('show'); + picker.on('shown.bs.modal', function() { var modalEl = $(this), searchEl = modalEl.find('input'), @@ -71,11 +82,7 @@ define('iconSelect', function() { } // Focus on the input box - searchEl.focus(); - - if (selected) { - modalEl.find('.' + selected).addClass('selected'); - } + searchEl.selectRange(0, searchEl.val().length); modalEl.find('.icon-container').on('click', 'i', function() { searchEl.val($(this).attr('class').replace('fa fa-', '').replace('selected', '')); From ee2c178f2a5e474fe850636f77befc47b11cb49e Mon Sep 17 00:00:00 2001 From: Raphael Beer Date: Wed, 20 Apr 2016 11:46:02 +0200 Subject: [PATCH 0084/1109] Don't add .undefined if selection is empty --- public/src/modules/iconSelect.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/public/src/modules/iconSelect.js b/public/src/modules/iconSelect.js index 0f8cf6d182..b1f8a30112 100644 --- a/public/src/modules/iconSelect.js +++ b/public/src/modules/iconSelect.js @@ -42,9 +42,11 @@ define('iconSelect', function() { var iconClass = $('.bootbox .selected').attr('class'); var categoryIconClass = $('
    ').addClass(iconClass).removeClass('fa').removeClass('selected').attr('class'); - el.attr('class', 'fa ' + (doubleSize ? 'fa-2x ' : '') + categoryIconClass); - el.val(categoryIconClass); - el.attr('value', categoryIconClass); + if (categoryIconClass) { + el.attr('class', 'fa ' + (doubleSize ? 'fa-2x ' : '') + categoryIconClass); + el.val(categoryIconClass); + el.attr('value', categoryIconClass); + } onModified(el); } From fce5780d0fe523ba569eb7d69101aa28efd64043 Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Wed, 20 Apr 2016 09:03:04 -0400 Subject: [PATCH 0085/1109] Latest translations and fallbacks --- public/language/fr/email.json | 2 +- public/language/fr/error.json | 2 +- public/language/fr/topic.json | 2 +- public/language/fr/user.json | 6 +++--- public/language/tr/user.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/public/language/fr/email.json b/public/language/fr/email.json index e02ecaa136..329b338d11 100644 --- a/public/language/fr/email.json +++ b/public/language/fr/email.json @@ -24,7 +24,7 @@ "digest.day": "jour", "digest.week": "semaine", "digest.month": "mois", - "digest.subject": "Digest for %1", + "digest.subject": "Compte-rendu pour %1", "notif.chat.subject": "Nouveau message de chat reçu de %1", "notif.chat.cta": "Cliquez ici pour continuer la conversation", "notif.chat.unsub.info": "Cette notification de chat a été envoyé en raison de vos paramètres d'abonnement.", diff --git a/public/language/fr/error.json b/public/language/fr/error.json index 866613b168..6dddeafd53 100644 --- a/public/language/fr/error.json +++ b/public/language/fr/error.json @@ -85,7 +85,7 @@ "cant-edit-chat-message": "Vous n'avez pas l'autorisation de modifier ce message", "cant-remove-last-user": "Vous ne pouvez pas supprimer le dernier utilisateur", "cant-delete-chat-message": "Vous n'avez pas l'autorisation de supprimer ce message", - "already-voting-for-this-post": "You have already voted for this post.", + "already-voting-for-this-post": "Vous avez déjà voté pour ce message.", "reputation-system-disabled": "Le système de réputation est désactivé", "downvoting-disabled": "Les votes négatifs ne sont pas autorisés", "not-enough-reputation-to-downvote": "Vous n'avez pas une réputation assez élevée pour noter négativement ce message", diff --git a/public/language/fr/topic.json b/public/language/fr/topic.json index f21bf835b1..fa172c1cfd 100644 --- a/public/language/fr/topic.json +++ b/public/language/fr/topic.json @@ -26,7 +26,7 @@ "tools": "Outils", "flag": "Signaler", "locked": "Verrouillé", - "bookmark_instructions": "Click here to return to the last read post in this thread.", + "bookmark_instructions": "Cliquez ici pour retourner au dernier message lu de ce fil.", "flag_title": "Signaler ce message à la modération", "flag_success": "Ce message a bien été signalé aux modérateurs.", "deleted_message": "Ce sujet a été supprimé. Seuls les utilisateurs avec les droits d'administration peuvent le voir.", diff --git a/public/language/fr/user.json b/public/language/fr/user.json index fc2ae79dca..77af69be58 100644 --- a/public/language/fr/user.json +++ b/public/language/fr/user.json @@ -92,12 +92,12 @@ "open_links_in_new_tab": "Ouvrir les liens externes dans un nouvel onglet", "enable_topic_searching": "Activer la recherche dans les sujets", "topic_search_help": "Une fois activé, la recherche dans les sujets va remplacer la recherche de page du navigateur et vous permettra de rechercher dans l'intégralité d'un sujet au lieu des seuls posts affichés à l'écran.", - "delay_image_loading": "Delay Image Loading", - "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", + "delay_image_loading": "Délayer le chargement des images", + "image_load_delay_help": "Lorsque cette option est activée, les images des sujets ne seront pas chargées avant qu'elles soient visibles dans la fenêtre.", "scroll_to_my_post": "Après avoir répondu, montrer le nouveau message", "follow_topics_you_reply_to": "Suivre les sujets auxquels vous répondez", "follow_topics_you_create": "Suivre les sujets que vous créez", - "grouptitle": "Group Title", + "grouptitle": "Nom du groupe", "no-group-title": "Aucun titre de groupe", "select-skin": "Sélectionner un thème", "select-homepage": "Sélectionner une page d'accueil", diff --git a/public/language/tr/user.json b/public/language/tr/user.json index e6e6fd7b9f..2ead1751df 100644 --- a/public/language/tr/user.json +++ b/public/language/tr/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "Cevap yazdıktan sonra yeni gönderiyi göster", "follow_topics_you_reply_to": "Cevap verdiğim konuları takip et", "follow_topics_you_create": "Kendi konularımı takip et", - "grouptitle": "Group Title", + "grouptitle": "Grup Başlığı", "no-group-title": "Grup başlığı yok", "select-skin": "Bir deri şeçin", "select-homepage": "Bir anasayfa seçin", From 33255d73dd682066554eff3096c46cb6bef39513 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 20 Apr 2016 10:53:47 -0400 Subject: [PATCH 0086/1109] fix #4546 --- public/language/en_GB/error.json | 1 + src/emailer.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/public/language/en_GB/error.json b/public/language/en_GB/error.json index 65e2c584df..a77cf6cb06 100644 --- a/public/language/en_GB/error.json +++ b/public/language/en_GB/error.json @@ -27,6 +27,7 @@ "no-email-to-confirm": "This forum requires email confirmation, please click here to enter an email", "email-confirm-failed": "We could not confirm your email, please try again later.", "confirm-email-already-sent": "Confirmation email already sent, please wait %1 minute(s) to send another one.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Username too short", "username-too-long": "Username too long", diff --git a/src/emailer.js b/src/emailer.js index 34b5250908..e297985572 100644 --- a/src/emailer.js +++ b/src/emailer.js @@ -113,7 +113,11 @@ var fallbackTransport; } } ], function (err) { - callback(err); + if (err && err.code === 'ENOENT') { + callback(new Error('[[error:sendmail-not-found]]')); + } else { + callback(err); + } }); }; From a7415a8db0c7bd883f6c45159bf0515d69eec777 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 20 Apr 2016 20:50:05 +0300 Subject: [PATCH 0087/1109] added missing count increment --- src/upgrade.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/upgrade.js b/src/upgrade.js index 77974839e6..36f5c14b39 100644 --- a/src/upgrade.js +++ b/src/upgrade.js @@ -489,7 +489,7 @@ Upgrade.upgrade = function(callback) { var count = 0; batch.processSortedSet('topics:tid', function(tids, next) { winston.info('upgraded ' + count + ' topics'); - + count += tids.length; async.each(tids, function(tid, next) { db.delete('tid:' + tid + ':posters', function(err) { if (err) { From 5858d914bf3c1af961976a9c080ed32086d02a3e Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 20 Apr 2016 13:58:25 -0400 Subject: [PATCH 0088/1109] closes #4550 --- public/src/client/topic/posts.js | 21 ++++++++++---- src/controllers/uploads.js | 26 +++++++++++++++++- src/image.js | 41 +++++++++++++++++++--------- src/views/admin/settings/uploads.tpl | 13 ++++++++- 4 files changed, 80 insertions(+), 21 deletions(-) diff --git a/public/src/client/topic/posts.js b/public/src/client/topic/posts.js index 996dcbc6b9..841d0532ee 100644 --- a/public/src/client/topic/posts.js +++ b/public/src/client/topic/posts.js @@ -230,7 +230,6 @@ define('forum/topic/posts', [ utils.addCommasToNumbers(posts.find('.formatted-number')); utils.makeNumbersHumanReadable(posts.find('.human-readable-number')); posts.find('.timeago').timeago(); - Posts.wrapImagesInLinks(posts); addBlockquoteEllipses(posts.find('[component="post/content"] > blockquote > blockquote')); hidePostToolsForDeletedPosts(posts); @@ -265,6 +264,9 @@ define('forum/topic/posts', [ visible = images.filter(function() { return config.delayImageLoading ? utils.isElementInViewport(this) : true; }), + posts = $.unique(visible.map(function() { + return $(this).parents('[component="post"]').get(0); + })), scrollTop = $(window).scrollTop(), adjusting = false, adjustQueue = [], @@ -286,6 +288,9 @@ define('forum/topic/posts', [ adjustQueue.pop()(); } else { adjusting = false; + + Posts.wrapImagesInLinks(posts); + posts.length = 0; } }, oldHeight, newHeight; @@ -304,9 +309,6 @@ define('forum/topic/posts', [ }); image.attr('src', image.attr('data-src')); - if (image.parent().attr('href') === 'about:blank') { - image.parent().attr('href', image.attr('data-src')); - } image.removeAttr('data-src'); }); }, 250); @@ -314,9 +316,16 @@ define('forum/topic/posts', [ Posts.wrapImagesInLinks = function(posts) { posts.find('[component="post/content"] img:not(.emoji)').each(function() { - var $this = $(this); + var $this = $(this), + src = $this.attr('src'), + suffixRegex = /-resized(\.[\w]+)$/; + + if (utils.isRelativeUrl(src) && suffixRegex.test(src)) { + src = src.replace(suffixRegex, '$1'); + } + if (!$this.parent().is('a')) { - $this.wrap(''); + $this.wrap(''); } }); }; diff --git a/src/controllers/uploads.js b/src/controllers/uploads.js index 59253c5666..5a6d814658 100644 --- a/src/controllers/uploads.js +++ b/src/controllers/uploads.js @@ -14,7 +14,7 @@ var image = require('../image'); var uploadsController = {}; -uploadsController.upload = function(req, res, filesIterator, next) { +uploadsController.upload = function(req, res, filesIterator) { var files = req.files.files; if (!req.user && meta.config.allowGuestUploads !== '1') { @@ -63,6 +63,30 @@ uploadsController.uploadPost = function(req, res, next) { return next(new Error('[[error:uploads-are-disabled]]')); } uploadFile(req.uid, uploadedFile, next); + }, + function(fileObj, next) { + if (!isImage || parseInt(meta.config.maximumImageWidth, 10) === 0) { + // Not an image, or resizing disabled. No need to resize. + return next(null, fileObj); + } + + var fullPath = path.join(nconf.get('base_dir'), nconf.get('upload_path'), '..', fileObj.url), + parsedPath = path.parse(fullPath); + + image.resizeImage({ + path: fullPath, + target: path.join(parsedPath.dir, parsedPath.name + '-resized' + parsedPath.ext), + extension: parsedPath.ext, + width: parseInt(meta.config.maximumImageWidth, 10) || 760 + }, function(err) { + // Return the resized version to the composer/postData + var parsedUrl = path.parse(fileObj.url); + delete parsedUrl.base; + parsedUrl.name = parsedUrl.name + '-resized'; + fileObj.url = path.format(parsedUrl); + + next(err, fileObj); + }); } ], next); }, next); diff --git a/src/image.js b/src/image.js index f4b85acd4d..fccdc0f5ad 100644 --- a/src/image.js +++ b/src/image.js @@ -11,6 +11,7 @@ image.resizeImage = function(data, callback) { if (plugins.hasListeners('filter:image.resize')) { plugins.fireHook('filter:image.resize', { path: data.path, + target: data.target, extension: data.extension, width: data.width, height: data.height @@ -26,28 +27,42 @@ image.resizeImage = function(data, callback) { var w = image.bitmap.width, h = image.bitmap.height, origRatio = w/h, - desiredRatio = data.width/data.height, + desiredRatio = data.width && data.height ? data.width/data.height : origRatio, x = 0, y = 0, crop; - if (desiredRatio > origRatio) { - desiredRatio = 1/desiredRatio; - } - if (origRatio >= 1) { - y = 0; // height is the smaller dimension here - x = Math.floor((w/2) - (h * desiredRatio / 2)); - crop = async.apply(image.crop.bind(image), x, y, h * desiredRatio, h); + if (origRatio !== desiredRatio) { + if (desiredRatio > origRatio) { + desiredRatio = 1/desiredRatio; + } + if (origRatio >= 1) { + y = 0; // height is the smaller dimension here + x = Math.floor((w/2) - (h * desiredRatio / 2)); + crop = async.apply(image.crop.bind(image), x, y, h * desiredRatio, h); + } else { + x = 0; // width is the smaller dimension here + y = Math.floor(h/2 - (w * desiredRatio / 2)); + crop = async.apply(image.crop.bind(image), x, y, w, w * desiredRatio); + } } else { - x = 0; // width is the smaller dimension here - y = Math.floor(h/2 - (w * desiredRatio / 2)); - crop = async.apply(image.crop.bind(image), x, y, w, w * desiredRatio); + // Simple resize given either width, height, or both + crop = async.apply(setImmediate); } async.waterfall([ crop, - function(image, next) { - image.resize(data.width, data.height, next); + function(_image, next) { + if (typeof _image === 'function' && !next) { + next = _image; + _image = image; + } + + if ((data.width && data.height) || (w > data.width) || (h > data.height)) { + _image.resize(data.width || Jimp.AUTO, data.height || Jimp.AUTO, next); + } else { + next(null, image); + } }, function(image, next) { image.write(data.target || data.path, next); diff --git a/src/views/admin/settings/uploads.tpl b/src/views/admin/settings/uploads.tpl index 4881f8dcd7..4358dee47e 100644 --- a/src/views/admin/settings/uploads.tpl +++ b/src/views/admin/settings/uploads.tpl @@ -28,8 +28,19 @@
    - + + +

    + (in pixels, default: 760 pixels, set to 0 to disable) +

    +
    + +
    + +

    + (in kilobytes, default: 2048 KiB) +

    From 4f913d3f19d79591d64c7327cef3b5e118a233b9 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 20 Apr 2016 14:15:38 -0400 Subject: [PATCH 0089/1109] fixed issue with missing base in path.format --- src/controllers/uploads.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/uploads.js b/src/controllers/uploads.js index 5a6d814658..605bee07cf 100644 --- a/src/controllers/uploads.js +++ b/src/controllers/uploads.js @@ -81,7 +81,7 @@ uploadsController.uploadPost = function(req, res, next) { }, function(err) { // Return the resized version to the composer/postData var parsedUrl = path.parse(fileObj.url); - delete parsedUrl.base; + parsedUrl.base = parsedUrl.name + '-resized' + parsedUrl.ext; parsedUrl.name = parsedUrl.name + '-resized'; fileObj.url = path.format(parsedUrl); From a0d989a11220532af216290a1085109f78fa520d Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 20 Apr 2016 15:04:53 -0400 Subject: [PATCH 0090/1109] fixes #4551 --- src/controllers/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/index.js b/src/controllers/index.js index d0cc1fe83e..830a45ef99 100644 --- a/src/controllers/index.js +++ b/src/controllers/index.js @@ -30,7 +30,7 @@ var Controllers = { Controllers.home = function(req, res, next) { - var route = meta.config.homePageRoute || meta.config.homePageCustom || 'categories'; + var route = meta.config.homePageRoute || meta.config.homePageCustom.replace(/^\/+/, '') || 'categories'; user.getSettings(req.uid, function(err, settings) { if (err) { From 66dd790938a994e4a0937ef3e31e65fe631cb11d Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 20 Apr 2016 16:12:55 -0400 Subject: [PATCH 0091/1109] did I fix it @rbeer? :shipit: --- src/controllers/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/index.js b/src/controllers/index.js index 830a45ef99..a1e9c63dae 100644 --- a/src/controllers/index.js +++ b/src/controllers/index.js @@ -30,7 +30,7 @@ var Controllers = { Controllers.home = function(req, res, next) { - var route = meta.config.homePageRoute || meta.config.homePageCustom.replace(/^\/+/, '') || 'categories'; + var route = meta.config.homePageRoute || (meta.config.homePageCustom || '').replace(/^\/+/, '') || 'categories'; user.getSettings(req.uid, function(err, settings) { if (err) { From f7fef16168133f857e40078fd9f3dcbb0e9d96f5 Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Thu, 21 Apr 2016 09:02:32 -0400 Subject: [PATCH 0092/1109] Latest translations and fallbacks --- public/language/ar/unread.json | 5 ++++- public/language/bg/unread.json | 5 ++++- public/language/bn/unread.json | 5 ++++- public/language/cs/unread.json | 5 ++++- public/language/da/unread.json | 5 ++++- public/language/de/unread.json | 5 ++++- public/language/el/unread.json | 5 ++++- public/language/en@pirate/unread.json | 5 ++++- public/language/en_US/unread.json | 5 ++++- public/language/es/email.json | 2 +- public/language/es/error.json | 2 +- public/language/es/topic.json | 2 +- public/language/es/unread.json | 5 ++++- public/language/es/user.json | 2 +- public/language/et/unread.json | 5 ++++- public/language/fa_IR/unread.json | 5 ++++- public/language/fi/unread.json | 5 ++++- public/language/fr/unread.json | 5 ++++- public/language/gl/unread.json | 5 ++++- public/language/he/unread.json | 5 ++++- public/language/hu/unread.json | 5 ++++- public/language/id/unread.json | 5 ++++- public/language/it/unread.json | 5 ++++- public/language/ja/unread.json | 5 ++++- public/language/ko/email.json | 2 +- public/language/ko/error.json | 2 +- public/language/ko/topic.json | 2 +- public/language/ko/unread.json | 5 ++++- public/language/ko/user.json | 2 +- public/language/lt/unread.json | 5 ++++- public/language/ms/unread.json | 5 ++++- public/language/nb/unread.json | 5 ++++- public/language/nl/unread.json | 5 ++++- public/language/nl/uploads.json | 2 +- public/language/nl/user.json | 2 +- public/language/pl/unread.json | 5 ++++- public/language/pt_BR/unread.json | 5 ++++- public/language/ro/unread.json | 5 ++++- public/language/ru/unread.json | 5 ++++- public/language/rw/unread.json | 5 ++++- public/language/sc/unread.json | 5 ++++- public/language/sk/unread.json | 5 ++++- public/language/sl/unread.json | 5 ++++- public/language/sr/unread.json | 5 ++++- public/language/sv/unread.json | 5 ++++- public/language/th/unread.json | 5 ++++- public/language/tr/unread.json | 5 ++++- public/language/vi/unread.json | 5 ++++- public/language/zh_CN/unread.json | 5 ++++- public/language/zh_TW/unread.json | 5 ++++- 50 files changed, 170 insertions(+), 50 deletions(-) diff --git a/public/language/ar/unread.json b/public/language/ar/unread.json index 992ffa6f5c..eb87ecb3d3 100644 --- a/public/language/ar/unread.json +++ b/public/language/ar/unread.json @@ -6,5 +6,8 @@ "selected": "المحددة", "all": "الكل", "all_categories": "كل الفئات", - "topics_marked_as_read.success": "تم تحديد المواضيع على أنها مقروءة!" + "topics_marked_as_read.success": "تم تحديد المواضيع على أنها مقروءة!", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/bg/unread.json b/public/language/bg/unread.json index b80ddf87ef..7dc16f9cd3 100644 --- a/public/language/bg/unread.json +++ b/public/language/bg/unread.json @@ -6,5 +6,8 @@ "selected": "Избраните", "all": "Всички", "all_categories": "Всички категории", - "topics_marked_as_read.success": "Темите бяха отбелязани като прочетени!" + "topics_marked_as_read.success": "Темите бяха отбелязани като прочетени!", + "all-topics": "Всички теми", + "new-topics": "Нови теми", + "watched-topics": "Наблюдавани теми" } \ No newline at end of file diff --git a/public/language/bn/unread.json b/public/language/bn/unread.json index d7e42fb61b..578e246f3b 100644 --- a/public/language/bn/unread.json +++ b/public/language/bn/unread.json @@ -6,5 +6,8 @@ "selected": "নির্বাচিত", "all": "সবগুলো", "all_categories": "All categories", - "topics_marked_as_read.success": "পঠিত হিসেবে চিহ্নিত টপিকসমূহ" + "topics_marked_as_read.success": "পঠিত হিসেবে চিহ্নিত টপিকসমূহ", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/cs/unread.json b/public/language/cs/unread.json index 1ded2636c9..1a12bc4fbe 100644 --- a/public/language/cs/unread.json +++ b/public/language/cs/unread.json @@ -6,5 +6,8 @@ "selected": "Vybrané", "all": "Vše", "all_categories": "All categories", - "topics_marked_as_read.success": "Téma bylo označeno jako přečtené!" + "topics_marked_as_read.success": "Téma bylo označeno jako přečtené!", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/da/unread.json b/public/language/da/unread.json index e44b6e42fd..dbb45d6024 100644 --- a/public/language/da/unread.json +++ b/public/language/da/unread.json @@ -6,5 +6,8 @@ "selected": "Valgte", "all": "Alle", "all_categories": "Alle kategorier", - "topics_marked_as_read.success": "Emner markeret som læst!" + "topics_marked_as_read.success": "Emner markeret som læst!", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/de/unread.json b/public/language/de/unread.json index b9796b7c41..48681d7b8a 100644 --- a/public/language/de/unread.json +++ b/public/language/de/unread.json @@ -6,5 +6,8 @@ "selected": "Ausgewählte", "all": "Alle", "all_categories": "Alle Kategorien", - "topics_marked_as_read.success": "Themen als gelesen markiert!" + "topics_marked_as_read.success": "Themen als gelesen markiert!", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/el/unread.json b/public/language/el/unread.json index 98aea93e27..803596873f 100644 --- a/public/language/el/unread.json +++ b/public/language/el/unread.json @@ -6,5 +6,8 @@ "selected": "Επιλεγμένα", "all": "Όλα", "all_categories": "All categories", - "topics_marked_as_read.success": "Τα θέματα σημειώθηκαν ως αναγνωσμένα!" + "topics_marked_as_read.success": "Τα θέματα σημειώθηκαν ως αναγνωσμένα!", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/en@pirate/unread.json b/public/language/en@pirate/unread.json index 994ee938f1..37133f87ef 100644 --- a/public/language/en@pirate/unread.json +++ b/public/language/en@pirate/unread.json @@ -6,5 +6,8 @@ "selected": "Selected", "all": "All", "all_categories": "All categories", - "topics_marked_as_read.success": "Topics marked as read!" + "topics_marked_as_read.success": "Topics marked as read!", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/en_US/unread.json b/public/language/en_US/unread.json index d723f6e8c9..c3050ba93e 100644 --- a/public/language/en_US/unread.json +++ b/public/language/en_US/unread.json @@ -6,5 +6,8 @@ "selected": "Selected", "all": "All", "all_categories": "All categories", - "topics_marked_as_read.success": "Topics marked as read!" + "topics_marked_as_read.success": "Topics marked as read!", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/es/email.json b/public/language/es/email.json index dd8e64791d..ddc0a47556 100644 --- a/public/language/es/email.json +++ b/public/language/es/email.json @@ -24,7 +24,7 @@ "digest.day": "día", "digest.week": "semana", "digest.month": "mes", - "digest.subject": "Digest for %1", + "digest.subject": "Resumen de 1%", "notif.chat.subject": "Nuevo mensaje de chat recibido de %1", "notif.chat.cta": "Haz click aquí para continuar la conversación", "notif.chat.unsub.info": "Esta notificación de chat se te envió debido a tus ajustes de suscripción.", diff --git a/public/language/es/error.json b/public/language/es/error.json index 9178e18ff1..527c0cbfd2 100644 --- a/public/language/es/error.json +++ b/public/language/es/error.json @@ -85,7 +85,7 @@ "cant-edit-chat-message": "No tienes permiso para editar este mensaje", "cant-remove-last-user": "No puedes eliminar el último usuario", "cant-delete-chat-message": "No tienes permiso para eliminar este mensaje", - "already-voting-for-this-post": "You have already voted for this post.", + "already-voting-for-this-post": "Ya has votado a este mensaje.", "reputation-system-disabled": "El sistema de reputación está deshabilitado.", "downvoting-disabled": "La votación negativa está deshabilitada.", "not-enough-reputation-to-downvote": "No tienes suficiente reputación para votar negativo este post", diff --git a/public/language/es/topic.json b/public/language/es/topic.json index 272a8180a0..36075da5d9 100644 --- a/public/language/es/topic.json +++ b/public/language/es/topic.json @@ -26,7 +26,7 @@ "tools": "Herramientas", "flag": "Reportar", "locked": "Cerrado", - "bookmark_instructions": "Click here to return to the last read post in this thread.", + "bookmark_instructions": "Haz click aquí para volver a tu último mensaje leído en este tema", "flag_title": "Reportar este mensaje", "flag_success": "Este mensaje ha sido reportado para moderación.", "deleted_message": "Este tema ha sido borrado. Solo los usuarios que tengan privilegios de administración de temas pueden verlo.", diff --git a/public/language/es/unread.json b/public/language/es/unread.json index d77a5f7979..a451185530 100644 --- a/public/language/es/unread.json +++ b/public/language/es/unread.json @@ -6,5 +6,8 @@ "selected": "Seleccionados", "all": "Todos", "all_categories": "Todos los foros", - "topics_marked_as_read.success": "¡Temas marcados como leídos!" + "topics_marked_as_read.success": "¡Temas marcados como leídos!", + "all-topics": "Todos los Temas", + "new-topics": "Temas Nuevos", + "watched-topics": "Temas Suscritos" } \ No newline at end of file diff --git a/public/language/es/user.json b/public/language/es/user.json index ebd854ddfa..6f7f75385b 100644 --- a/public/language/es/user.json +++ b/public/language/es/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "Luego de enviar una respuesta, mostrar el nuevo mensaje", "follow_topics_you_reply_to": "Seguir los temas en los que respondes", "follow_topics_you_create": "Seguir publicaciones que creas", - "grouptitle": "Group Title", + "grouptitle": "Título del Grupo", "no-group-title": "Sin título de grupo", "select-skin": "Seleccionar una plantilla", "select-homepage": "Seleccione una Página de inicio", diff --git a/public/language/et/unread.json b/public/language/et/unread.json index 140ff1dd62..832d169fd4 100644 --- a/public/language/et/unread.json +++ b/public/language/et/unread.json @@ -6,5 +6,8 @@ "selected": "Valitud", "all": "Kõik", "all_categories": "Kõik kategooriad", - "topics_marked_as_read.success": "Teemad märgitud loetuks!" + "topics_marked_as_read.success": "Teemad märgitud loetuks!", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/fa_IR/unread.json b/public/language/fa_IR/unread.json index c5a17f9649..2109d00211 100644 --- a/public/language/fa_IR/unread.json +++ b/public/language/fa_IR/unread.json @@ -6,5 +6,8 @@ "selected": "برگزیده", "all": "همه", "all_categories": "تمام دسته ها", - "topics_marked_as_read.success": "همه موضوع ها خوانده شدند" + "topics_marked_as_read.success": "همه موضوع ها خوانده شدند", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/fi/unread.json b/public/language/fi/unread.json index 5588fce2c3..e7296b4cf8 100644 --- a/public/language/fi/unread.json +++ b/public/language/fi/unread.json @@ -6,5 +6,8 @@ "selected": "Valitut", "all": "Kaikki", "all_categories": "All categories", - "topics_marked_as_read.success": "Aihe merkitty luetuksi!" + "topics_marked_as_read.success": "Aihe merkitty luetuksi!", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/fr/unread.json b/public/language/fr/unread.json index 9432bf9d36..50f2318404 100644 --- a/public/language/fr/unread.json +++ b/public/language/fr/unread.json @@ -6,5 +6,8 @@ "selected": "Sélectionnés", "all": "Tous", "all_categories": "Toutes Catégories", - "topics_marked_as_read.success": "Sujets marqués comme lus !" + "topics_marked_as_read.success": "Sujets marqués comme lus !", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/gl/unread.json b/public/language/gl/unread.json index 11f79dc4ca..5581208821 100644 --- a/public/language/gl/unread.json +++ b/public/language/gl/unread.json @@ -6,5 +6,8 @@ "selected": "Seleccionado", "all": "Todos", "all_categories": "Tódalas categorías", - "topics_marked_as_read.success": "Temas marcados como lidos" + "topics_marked_as_read.success": "Temas marcados como lidos", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/he/unread.json b/public/language/he/unread.json index 587071777b..51923d7147 100644 --- a/public/language/he/unread.json +++ b/public/language/he/unread.json @@ -6,5 +6,8 @@ "selected": "נבחר", "all": "הכל", "all_categories": "כל הקטגוריות", - "topics_marked_as_read.success": "נושאים שמסומנים כנקרא!" + "topics_marked_as_read.success": "נושאים שמסומנים כנקרא!", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/hu/unread.json b/public/language/hu/unread.json index 8bf28e0be6..dd411974f5 100644 --- a/public/language/hu/unread.json +++ b/public/language/hu/unread.json @@ -6,5 +6,8 @@ "selected": "Kiválasztva", "all": "Összes", "all_categories": "All categories", - "topics_marked_as_read.success": "Témakör olvasottnak jelölve!" + "topics_marked_as_read.success": "Témakör olvasottnak jelölve!", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/id/unread.json b/public/language/id/unread.json index 27ace0a281..f7bc4cf56b 100644 --- a/public/language/id/unread.json +++ b/public/language/id/unread.json @@ -6,5 +6,8 @@ "selected": "Terpilih", "all": "Semua", "all_categories": "Semua Kategori", - "topics_marked_as_read.success": "Topik ditandai sudah dibaca!" + "topics_marked_as_read.success": "Topik ditandai sudah dibaca!", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/it/unread.json b/public/language/it/unread.json index e2e6018a47..94c4a315a3 100644 --- a/public/language/it/unread.json +++ b/public/language/it/unread.json @@ -6,5 +6,8 @@ "selected": "Selezionati", "all": "Tutti", "all_categories": "Tutte le categorie", - "topics_marked_as_read.success": "Discussione marcata come letta!" + "topics_marked_as_read.success": "Discussione marcata come letta!", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/ja/unread.json b/public/language/ja/unread.json index 66a8e02906..54446f4116 100644 --- a/public/language/ja/unread.json +++ b/public/language/ja/unread.json @@ -6,5 +6,8 @@ "selected": "選択済み", "all": "全て", "all_categories": "全てのカテゴリ", - "topics_marked_as_read.success": "すべてのスレッドを既読にしました。" + "topics_marked_as_read.success": "すべてのスレッドを既読にしました。", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/ko/email.json b/public/language/ko/email.json index 10eec4722d..07a668917b 100644 --- a/public/language/ko/email.json +++ b/public/language/ko/email.json @@ -24,7 +24,7 @@ "digest.day": "일", "digest.week": "주", "digest.month": "월", - "digest.subject": "Digest for %1", + "digest.subject": "%1님을 위한 다이제스트", "notif.chat.subject": "%1님이 대화 메시지를 보냈습니다.", "notif.chat.cta": "대화를 계속하려면 여기를 클릭하세요.", "notif.chat.unsub.info": "이 대화 알림은 사용자의 구독 설정에 따라 전송되었습니다.", diff --git a/public/language/ko/error.json b/public/language/ko/error.json index 748cc05084..01e81ea804 100644 --- a/public/language/ko/error.json +++ b/public/language/ko/error.json @@ -85,7 +85,7 @@ "cant-edit-chat-message": "편집 할 수 있는 권한이 없습니다.", "cant-remove-last-user": "마지막 사용자를 삭제할 수 없습니다.", "cant-delete-chat-message": "메세지를 지울 권한이 없습니다.", - "already-voting-for-this-post": "You have already voted for this post.", + "already-voting-for-this-post": "이미 이 게시글에 투표하셨습니다.", "reputation-system-disabled": "인지도 기능이 비활성 상태입니다.", "downvoting-disabled": "비추천 기능이 비활성 상태입니다.", "not-enough-reputation-to-downvote": "인지도가 낮아 이 게시물에 반대할 수 없습니다.", diff --git a/public/language/ko/topic.json b/public/language/ko/topic.json index cfa5504880..daea5fa614 100644 --- a/public/language/ko/topic.json +++ b/public/language/ko/topic.json @@ -26,7 +26,7 @@ "tools": "도구", "flag": "신고", "locked": "잠김", - "bookmark_instructions": "Click here to return to the last read post in this thread.", + "bookmark_instructions": "이 스레드에서 읽은 마지막 게시글로 이동하시려면 여기를 클릭하세요.", "flag_title": "이 게시물을 신고", "flag_success": "이 게시물은 신고되었습니다.", "deleted_message": "이 주제는 삭제되었습니다. 주제 관리 권한이 있는 사용자만 볼 수 있습니다.", diff --git a/public/language/ko/unread.json b/public/language/ko/unread.json index 56f631af80..527a990c08 100644 --- a/public/language/ko/unread.json +++ b/public/language/ko/unread.json @@ -6,5 +6,8 @@ "selected": "선택된 주제", "all": "전체", "all_categories": "모든 카테고리", - "topics_marked_as_read.success": "성공적으로 읽음으로 표시했습니다." + "topics_marked_as_read.success": "성공적으로 읽음으로 표시했습니다.", + "all-topics": "모든 주제", + "new-topics": "새 주제", + "watched-topics": "읽은 주제" } \ No newline at end of file diff --git a/public/language/ko/user.json b/public/language/ko/user.json index 20cbf236a9..c26b383d2e 100644 --- a/public/language/ko/user.json +++ b/public/language/ko/user.json @@ -97,7 +97,7 @@ "scroll_to_my_post": "답글 게시 후 새 포스트 보여주기", "follow_topics_you_reply_to": "답글 단 게시물을 팔로우 합니다.", "follow_topics_you_create": "생성한 주제를 팔로우 합니다.", - "grouptitle": "Group Title", + "grouptitle": "그룹 주제", "no-group-title": "그룹 이름이 없습니다.", "select-skin": "스킨 선택", "select-homepage": "홈페이지 선택", diff --git a/public/language/lt/unread.json b/public/language/lt/unread.json index 37c42dc40d..88b8b1464f 100644 --- a/public/language/lt/unread.json +++ b/public/language/lt/unread.json @@ -6,5 +6,8 @@ "selected": "Pasirinkti", "all": "Visi", "all_categories": "Visos kategorijos", - "topics_marked_as_read.success": "Temos pažymėtos kaip perskaitytos." + "topics_marked_as_read.success": "Temos pažymėtos kaip perskaitytos.", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/ms/unread.json b/public/language/ms/unread.json index 6e23443905..3e132e6f2c 100644 --- a/public/language/ms/unread.json +++ b/public/language/ms/unread.json @@ -6,5 +6,8 @@ "selected": "Dipilih", "all": "Semua", "all_categories": "Semua Kategori", - "topics_marked_as_read.success": "Topik ditandakan sebagai sudah dibaca" + "topics_marked_as_read.success": "Topik ditandakan sebagai sudah dibaca", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/nb/unread.json b/public/language/nb/unread.json index f36bd28af3..c22af54291 100644 --- a/public/language/nb/unread.json +++ b/public/language/nb/unread.json @@ -6,5 +6,8 @@ "selected": "Valgte", "all": "Alle", "all_categories": "Alle kategorier", - "topics_marked_as_read.success": "Emner merket som lest!" + "topics_marked_as_read.success": "Emner merket som lest!", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/nl/unread.json b/public/language/nl/unread.json index 4a5fc11558..d5bed309e4 100644 --- a/public/language/nl/unread.json +++ b/public/language/nl/unread.json @@ -6,5 +6,8 @@ "selected": "Geselecteerd", "all": "Alles", "all_categories": "Alle categorieën", - "topics_marked_as_read.success": "Onderwerp gemarkeerd als gelezen!" + "topics_marked_as_read.success": "Onderwerp gemarkeerd als gelezen!", + "all-topics": "Alle onderwerpen", + "new-topics": "Nieuwe onderwerpen", + "watched-topics": "Bekeken onderwerpen" } \ No newline at end of file diff --git a/public/language/nl/uploads.json b/public/language/nl/uploads.json index 490bf49529..c59223164d 100644 --- a/public/language/nl/uploads.json +++ b/public/language/nl/uploads.json @@ -1,5 +1,5 @@ { - "uploading-file": "Bestond word geüpload...", + "uploading-file": "Bestand word geüpload...", "select-file-to-upload": "Selecteer een bestand om te uploaden!", "upload-success": "Bestand succesvol geüpload!", "maximum-file-size": "Maximaal %1 kb" diff --git a/public/language/nl/user.json b/public/language/nl/user.json index e2a0399640..3fd6525ef2 100644 --- a/public/language/nl/user.json +++ b/public/language/nl/user.json @@ -93,7 +93,7 @@ "enable_topic_searching": "Inschakelen mogelijkheid op onderwerp te kunnen zoeken", "topic_search_help": "Wanneer ingeschakeld zal de standaard zoekfunctie, met een aangepaste methode voor onderwerpen, overschreven worden", "delay_image_loading": "Afbeeldingen Laden Uitstellen", - "image_load_delay_help": "Indien ingeschakeld zullen afbeeldingen in topics niet laden totdat ze in het scherm scrollen", + "image_load_delay_help": "Indien ingeschakeld zullen afbeeldingen in topics niet laden totdat ze het scherm inscrollen", "scroll_to_my_post": "Toon het nieuwe bericht na het plaatsen van een antwoord", "follow_topics_you_reply_to": "Volg de onderwerpen waarop ik gereageerd heb", "follow_topics_you_create": "Volg de onderwerpen waarvan ik de oorspronkelijke auteur ben", diff --git a/public/language/pl/unread.json b/public/language/pl/unread.json index dbee60d817..521a5148b8 100644 --- a/public/language/pl/unread.json +++ b/public/language/pl/unread.json @@ -6,5 +6,8 @@ "selected": "Wybrane", "all": "Wszystkie", "all_categories": "Wszystkie kategorie", - "topics_marked_as_read.success": "Tematy zostały oznaczone jako przeczytane!" + "topics_marked_as_read.success": "Tematy zostały oznaczone jako przeczytane!", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/pt_BR/unread.json b/public/language/pt_BR/unread.json index bba5086d93..2ee62fbb68 100644 --- a/public/language/pt_BR/unread.json +++ b/public/language/pt_BR/unread.json @@ -6,5 +6,8 @@ "selected": "Selecionado", "all": "Todos", "all_categories": "Todas as categorias", - "topics_marked_as_read.success": "Tópicos marcados como lidos!" + "topics_marked_as_read.success": "Tópicos marcados como lidos!", + "all-topics": "Todos os Tópicos", + "new-topics": "Novos Tópicos", + "watched-topics": "Topicos Acompanhados" } \ No newline at end of file diff --git a/public/language/ro/unread.json b/public/language/ro/unread.json index 5cff8c6546..c82e736759 100644 --- a/public/language/ro/unread.json +++ b/public/language/ro/unread.json @@ -6,5 +6,8 @@ "selected": "Selectate", "all": "Toate", "all_categories": "All categories", - "topics_marked_as_read.success": "Subiectele au fost marcate ca citite!" + "topics_marked_as_read.success": "Subiectele au fost marcate ca citite!", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/ru/unread.json b/public/language/ru/unread.json index 7d51d6abbf..1317a92a45 100644 --- a/public/language/ru/unread.json +++ b/public/language/ru/unread.json @@ -6,5 +6,8 @@ "selected": "Выбранное", "all": "Все", "all_categories": "Все категории", - "topics_marked_as_read.success": "Темы помечены как прочитанные!" + "topics_marked_as_read.success": "Темы помечены как прочитанные!", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/rw/unread.json b/public/language/rw/unread.json index 075fdc7792..07c6e6c04c 100644 --- a/public/language/rw/unread.json +++ b/public/language/rw/unread.json @@ -6,5 +6,8 @@ "selected": "Ibyatoranyijwe", "all": "Byose", "all_categories": "Ibyiciro Byose", - "topics_marked_as_read.success": "Ibiganiro byamaze kugaragazwa nk'ibyasomwe!" + "topics_marked_as_read.success": "Ibiganiro byamaze kugaragazwa nk'ibyasomwe!", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/sc/unread.json b/public/language/sc/unread.json index 692bb12f14..3039d0fa6e 100644 --- a/public/language/sc/unread.json +++ b/public/language/sc/unread.json @@ -6,5 +6,8 @@ "selected": "Selected", "all": "All", "all_categories": "All categories", - "topics_marked_as_read.success": "Topics marked as read!" + "topics_marked_as_read.success": "Topics marked as read!", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/sk/unread.json b/public/language/sk/unread.json index cd254ebd4a..eed25e3c74 100644 --- a/public/language/sk/unread.json +++ b/public/language/sk/unread.json @@ -6,5 +6,8 @@ "selected": "Vybrané", "all": "Všetko", "all_categories": "All categories", - "topics_marked_as_read.success": "Témy označiť ako prečítané!" + "topics_marked_as_read.success": "Témy označiť ako prečítané!", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/sl/unread.json b/public/language/sl/unread.json index 73f87fdfe1..d63d75cb61 100644 --- a/public/language/sl/unread.json +++ b/public/language/sl/unread.json @@ -6,5 +6,8 @@ "selected": "Izbrano", "all": "Vse", "all_categories": "Vse kategorije", - "topics_marked_as_read.success": "Teme označene kot prebrane!" + "topics_marked_as_read.success": "Teme označene kot prebrane!", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/sr/unread.json b/public/language/sr/unread.json index 3fe33d78e0..a811fd23d4 100644 --- a/public/language/sr/unread.json +++ b/public/language/sr/unread.json @@ -6,5 +6,8 @@ "selected": "Изабране", "all": "Све", "all_categories": "Све категорије", - "topics_marked_as_read.success": "Теме означене као прочитане!" + "topics_marked_as_read.success": "Теме означене као прочитане!", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/sv/unread.json b/public/language/sv/unread.json index 0ed0a80ae7..7b99714700 100644 --- a/public/language/sv/unread.json +++ b/public/language/sv/unread.json @@ -6,5 +6,8 @@ "selected": "Vald", "all": "Alla", "all_categories": "Alla kategorier", - "topics_marked_as_read.success": "Ämnet markerat som läst." + "topics_marked_as_read.success": "Ämnet markerat som läst.", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/th/unread.json b/public/language/th/unread.json index 6928cb1366..00f800a723 100644 --- a/public/language/th/unread.json +++ b/public/language/th/unread.json @@ -6,5 +6,8 @@ "selected": "เลือก", "all": "ทั้งหมด", "all_categories": "All categories", - "topics_marked_as_read.success": "Topic ถูกทำเครื่องหมายว่าอ่านแล้วเรียบร้อย" + "topics_marked_as_read.success": "Topic ถูกทำเครื่องหมายว่าอ่านแล้วเรียบร้อย", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/tr/unread.json b/public/language/tr/unread.json index 49b8995dc5..22f62ff287 100644 --- a/public/language/tr/unread.json +++ b/public/language/tr/unread.json @@ -6,5 +6,8 @@ "selected": "Seçili", "all": "Hepsi", "all_categories": "Tüm kategoriler", - "topics_marked_as_read.success": "Başlıklar okundu olarak işaretlendi!" + "topics_marked_as_read.success": "Başlıklar okundu olarak işaretlendi!", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/vi/unread.json b/public/language/vi/unread.json index 14233ae900..134a7e3dd0 100644 --- a/public/language/vi/unread.json +++ b/public/language/vi/unread.json @@ -6,5 +6,8 @@ "selected": "Đã chọn", "all": "Tất cả", "all_categories": "Tất cả chuyên mục", - "topics_marked_as_read.success": "Chủ đề được đánh dấu đã đọc" + "topics_marked_as_read.success": "Chủ đề được đánh dấu đã đọc", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/zh_CN/unread.json b/public/language/zh_CN/unread.json index 58ab5b0389..efe8f0c9bc 100644 --- a/public/language/zh_CN/unread.json +++ b/public/language/zh_CN/unread.json @@ -6,5 +6,8 @@ "selected": "已选", "all": "全部", "all_categories": "全部分类", - "topics_marked_as_read.success": "主题被标为已读!" + "topics_marked_as_read.success": "主题被标为已读!", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/zh_TW/unread.json b/public/language/zh_TW/unread.json index b8e2086168..cf5b8d662c 100644 --- a/public/language/zh_TW/unread.json +++ b/public/language/zh_TW/unread.json @@ -6,5 +6,8 @@ "selected": "已選擇", "all": "全部", "all_categories": "All categories", - "topics_marked_as_read.success": "標記主題成已讀!" + "topics_marked_as_read.success": "標記主題成已讀!", + "all-topics": "All Topics", + "new-topics": "New Topics", + "watched-topics": "Watched Topics" } \ No newline at end of file From b2b99ce9f964de928598718493e04db1fd1a71d5 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 21 Apr 2016 10:31:57 -0400 Subject: [PATCH 0093/1109] added new core component for topic teaser /cc @rbeer --- package.json | 4 ++-- public/src/modules/components.js | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f925c9b50b..45ba59322e 100644 --- a/package.json +++ b/package.json @@ -56,8 +56,8 @@ "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", "nodebb-theme-lavender": "3.0.9", - "nodebb-theme-persona": "4.0.122", - "nodebb-theme-vanilla": "5.0.66", + "nodebb-theme-persona": "4.0.123", + "nodebb-theme-vanilla": "5.0.67", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", "nodemailer-sendmail-transport": "1.0.0", diff --git a/public/src/modules/components.js b/public/src/modules/components.js index f4de069e01..29d1ba64a9 100644 --- a/public/src/modules/components.js +++ b/public/src/modules/components.js @@ -3,6 +3,13 @@ define('components', function() { var components = {}; components.core = { + 'topic/teaser': function(tid) { + if (tid) { + return $('[component="category/topic"][data-tid="' + tid + '"] [component="topic/teaser"]'); + } else { + return $('[component="topic/teaser"]'); + } + }, 'post': function(name, value) { return $('[component="post"][data-' + name + '="' + value + '"]'); }, From 2aa89b9c70fb0160210bb3fd8c9339bbd9304252 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 21 Apr 2016 11:40:40 -0400 Subject: [PATCH 0094/1109] fixes #4555 --- src/controllers/helpers.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/controllers/helpers.js b/src/controllers/helpers.js index 058a1849b1..a558d665dd 100644 --- a/src/controllers/helpers.js +++ b/src/controllers/helpers.js @@ -71,6 +71,13 @@ helpers.buildCategoryBreadcrumbs = function(cid, callback) { return callback(err); } + if (!meta.config.homePageRoute && meta.config.homePageCustom) { + breadcrumbs.unshift({ + text: '[[global:header.categories]]', + url: nconf.get('relative_path') + '/categories' + }); + } + breadcrumbs.unshift({ text: '[[global:home]]', url: nconf.get('relative_path') + '/' From 41d8d07e35500f1c31c13185ba2746c6b229e2cf Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 21 Apr 2016 12:12:42 -0400 Subject: [PATCH 0095/1109] upped persona --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 45ba59322e..fcd80dd971 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", "nodebb-theme-lavender": "3.0.9", - "nodebb-theme-persona": "4.0.123", + "nodebb-theme-persona": "4.0.124", "nodebb-theme-vanilla": "5.0.67", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", From f5009b1a1191298aa8f30e40069c4fa66696b322 Mon Sep 17 00:00:00 2001 From: Ben Lubar Date: Thu, 21 Apr 2016 14:09:10 -0500 Subject: [PATCH 0096/1109] add a hook for plugins like nodebb-plugin-imagemagick that don't want to replace the entire upload system --- src/file.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/file.js b/src/file.js index 1c1cab7781..001e1324cb 100644 --- a/src/file.js +++ b/src/file.js @@ -50,6 +50,13 @@ file.base64ToLocal = function(imageData, uploadPath, callback) { }; file.isFileTypeAllowed = function(path, callback) { + var plugins = require('./plugins'); + if (plugins.hasListeners('filter:file.isFileTypeAllowed')) { + return plugins.fireHook('filter:file.isFileTypeAllowed', path, function(err) { + callback(err); + }); + } + // Attempt to read the file, if it passes, file type is allowed jimp.read(path, function(err) { callback(err); @@ -95,4 +102,4 @@ file.existsSync = function(path) { return !!exists; }; -module.exports = file; \ No newline at end of file +module.exports = file; From ea6d2c35f7e425102186cd370a8d7893d1f88807 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 21 Apr 2016 15:30:03 -0400 Subject: [PATCH 0097/1109] Fixed bug in settingsv1 If the saved value was an empty string, then textareas (and more importantly, select boxes) would not be properly populated with the saved value. --- public/src/admin/settings.js | 4 ++-- src/controllers/index.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/public/src/admin/settings.js b/public/src/admin/settings.js index c4b880f761..acfa654556 100644 --- a/public/src/admin/settings.js +++ b/public/src/admin/settings.js @@ -53,11 +53,11 @@ define('admin/settings', ['uploader', 'sounds'], function(uploader, sounds) { } } } else if (field.is('textarea')) { - if (app.config[key]) { + if (app.config.hasOwnProperty(key)) { field.val(app.config[key]); } } else if (field.is('select')) { - if (app.config[key]) { + if (app.config.hasOwnProperty(key)) { field.val(app.config[key]); } } diff --git a/src/controllers/index.js b/src/controllers/index.js index a1e9c63dae..d5d26ec34e 100644 --- a/src/controllers/index.js +++ b/src/controllers/index.js @@ -31,6 +31,7 @@ var Controllers = { Controllers.home = function(req, res, next) { var route = meta.config.homePageRoute || (meta.config.homePageCustom || '').replace(/^\/+/, '') || 'categories'; + console.log(route, meta.config); user.getSettings(req.uid, function(err, settings) { if (err) { From 22cf0966e6f8ecaba501f5d2bfe2e84ac48d67c2 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 21 Apr 2016 15:52:15 -0400 Subject: [PATCH 0098/1109] removed console log --- src/controllers/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/controllers/index.js b/src/controllers/index.js index d5d26ec34e..a1e9c63dae 100644 --- a/src/controllers/index.js +++ b/src/controllers/index.js @@ -31,7 +31,6 @@ var Controllers = { Controllers.home = function(req, res, next) { var route = meta.config.homePageRoute || (meta.config.homePageCustom || '').replace(/^\/+/, '') || 'categories'; - console.log(route, meta.config); user.getSettings(req.uid, function(err, settings) { if (err) { From 9d6532fe7ba133ef9fe4c9fb8b80ed5b98c3d0d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 21 Apr 2016 22:59:42 +0300 Subject: [PATCH 0099/1109] moved to ajaxify.start --- public/src/ajaxify.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js index e31786294b..53f979224a 100644 --- a/public/src/ajaxify.js +++ b/public/src/ajaxify.js @@ -71,12 +71,6 @@ $(document).ready(function() { return onAjaxError(err, url, callback, quiet); } - if (window.history && window.history.pushState) { - window.history[!quiet ? 'pushState' : 'replaceState']({ - url: url - }, url, RELATIVE_PATH + '/' + url); - } - retry = true; app.template = data.template.name; @@ -111,6 +105,11 @@ $(document).ready(function() { } ajaxify.currentPage = url.split(/[?#]/)[0]; + if (window.history && window.history.pushState) { + window.history[!quiet ? 'pushState' : 'replaceState']({ + url: url + }, url, RELATIVE_PATH + '/' + url); + } return url; }; From c790373dfcd09310a98e257d388031cfd593f23d Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 22 Apr 2016 19:48:41 +0300 Subject: [PATCH 0100/1109] closes #4558 --- public/src/client/account/settings.js | 5 ++- src/controllers/accounts/settings.js | 64 +++++++++++++-------------- 2 files changed, 34 insertions(+), 35 deletions(-) diff --git a/public/src/client/account/settings.js b/public/src/client/account/settings.js index c594abd72a..763b41b504 100644 --- a/public/src/client/account/settings.js +++ b/public/src/client/account/settings.js @@ -78,11 +78,12 @@ define('forum/account/settings', ['forum/account/header', 'components', 'csrf'], }; function toggleCustomRoute() { - $('[data-property="homePageCustom"]').val(''); + if ($('[data-property="homePageRoute"]').val() === 'custom') { $('#homePageCustom').show(); - }else{ + } else { $('#homePageCustom').hide(); + $('[data-property="homePageCustom"]').val(''); } } diff --git a/src/controllers/accounts/settings.js b/src/controllers/accounts/settings.js index b5b020c118..ba7cc4dcaf 100644 --- a/src/controllers/accounts/settings.js +++ b/src/controllers/accounts/settings.js @@ -96,8 +96,18 @@ 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; + } + }); + + userData.homePageRoutes.push({ + route: 'custom', + name: 'Custom', + selected: isCustom }); userData.bootswatchSkinOptions.forEach(function(skin) { @@ -142,40 +152,28 @@ function getHomePageRoutes(callback) { name: 'Category: ' + category.name }; }); - next(null, categoryData); + + categoryData = categoryData || []; + + plugins.fireHook('filter:homepage.get', {routes: [ + { + route: 'categories', + name: 'Categories' + }, + { + route: 'recent', + name: 'Recent' + }, + { + route: 'popular', + name: 'Popular' + } + ].concat(categoryData)}, next); + }, + function (data, next) { + next(null, data.routes); } - ], function(err, categoryData) { - if (err) { - return callback(err); - } - categoryData = categoryData || []; - - plugins.fireHook('filter:homepage.get', {routes: [ - { - route: 'categories', - name: 'Categories' - }, - { - route: 'recent', - name: 'Recent' - }, - { - route: 'popular', - name: 'Popular' - } - ].concat(categoryData)}, function(err, data) { - if (err) { - return callback(err); - } - - data.routes.push({ - route: 'custom', - name: 'Custom' - }); - - callback(null, data.routes); - }); - }); + ], callback); } From ae607b47be74be6f915fac810a5d70c4315e681a Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 22 Apr 2016 19:52:08 +0300 Subject: [PATCH 0101/1109] up themes --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index fcd80dd971..9bf8e0a04d 100644 --- a/package.json +++ b/package.json @@ -56,8 +56,8 @@ "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", "nodebb-theme-lavender": "3.0.9", - "nodebb-theme-persona": "4.0.124", - "nodebb-theme-vanilla": "5.0.67", + "nodebb-theme-persona": "4.0.125", + "nodebb-theme-vanilla": "5.0.68", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", "nodemailer-sendmail-transport": "1.0.0", From 43a3a81cf735eeff5a7f5068462efd755fb2b4d3 Mon Sep 17 00:00:00 2001 From: pichalite Date: Fri, 22 Apr 2016 18:01:39 +0000 Subject: [PATCH 0102/1109] add missing ACP defaults for new install --- install/data/defaults.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install/data/defaults.json b/install/data/defaults.json index 5041ff83ea..f43c34914c 100644 --- a/install/data/defaults.json +++ b/install/data/defaults.json @@ -9,6 +9,8 @@ "maximumPostLength": 32767, "minimumTagsPerTopic": 0, "maximumTagsPerTopic": 5, + "minimumTagLength": 3, + "maximumTagLength": 15, "allowGuestSearching": 0, "allowTopicsThumbnail": 0, "registrationType": "normal", @@ -30,5 +32,7 @@ "requireEmailConfirmation": 0, "allowProfileImageUploads": 1, "teaserPost": "last", - "allowPrivateGroups": 1 + "allowPrivateGroups": 1, + "unreadCutoff": 2, + "bookmarkthreshold": 5 } \ No newline at end of file From 8947ac74a45a87c2cd56a8baa3cd83cc016d0e07 Mon Sep 17 00:00:00 2001 From: pichalite Date: Fri, 22 Apr 2016 11:31:15 -0700 Subject: [PATCH 0103/1109] bookmarkThreshold --- install/data/defaults.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/data/defaults.json b/install/data/defaults.json index f43c34914c..45f426fb04 100644 --- a/install/data/defaults.json +++ b/install/data/defaults.json @@ -34,5 +34,5 @@ "teaserPost": "last", "allowPrivateGroups": 1, "unreadCutoff": 2, - "bookmarkthreshold": 5 -} \ No newline at end of file + "bookmarkThreshold": 5 +} From 8ea12197ae99ab1d4931589f808804acc79053fe Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Sat, 23 Apr 2016 09:02:27 -0400 Subject: [PATCH 0104/1109] Latest translations and fallbacks --- public/language/ar/modules.json | 2 +- public/language/ar/pages.json | 6 +++--- public/language/ar/unread.json | 6 +++--- public/language/ar/uploads.json | 4 ++-- public/language/ar/user.json | 10 +++++----- public/language/fr/unread.json | 6 +++--- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/public/language/ar/modules.json b/public/language/ar/modules.json index 1c23da87ad..a92c2d6953 100644 --- a/public/language/ar/modules.json +++ b/public/language/ar/modules.json @@ -17,7 +17,7 @@ "chat.seven_days": "7 أيام", "chat.thirty_days": "30 يومًا", "chat.three_months": "3 أشهر", - "chat.delete_message_confirm": "Are you sure you wish to delete this message?", + "chat.delete_message_confirm": "هل أنت متأكد من أنك تريد حذف هذه الرسالة؟", "chat.roomname": "Chat Room %1", "chat.add-users-to-room": "Add users to room", "composer.compose": "اكتب", diff --git a/public/language/ar/pages.json b/public/language/ar/pages.json index 74170e7af3..1f993db93d 100644 --- a/public/language/ar/pages.json +++ b/public/language/ar/pages.json @@ -16,9 +16,9 @@ "notifications": "التنبيهات", "tags": "الكلمات الدلالية", "tag": "Topics tagged under \"%1\"", - "register": "Register an account", + "register": "تسجيل حساب", "login": "Login to your account", - "reset": "Reset your account password", + "reset": "إعادة تعيين كلمة مرور حسابك", "categories": "الفئات", "groups": "المجموعات", "group": "%1 group", @@ -39,7 +39,7 @@ "account/upvoted": "Posts upvoted by %1", "account/downvoted": "Posts downvoted by %1", "account/best": "Best posts made by %1", - "confirm": "Email Confirmed", + "confirm": "تم التحقق من عنوان البريد الإلكتروني", "maintenance.text": "جاري صيانة %1. المرجو العودة لاحقًا.", "maintenance.messageIntro": "بالإضافة إلى ذلك، قام مدبر النظام بترك هذه الرسالة:", "throttled.text": "%1 is currently unavailable due to excessive load. Please come back another time." diff --git a/public/language/ar/unread.json b/public/language/ar/unread.json index eb87ecb3d3..2d139f5e75 100644 --- a/public/language/ar/unread.json +++ b/public/language/ar/unread.json @@ -7,7 +7,7 @@ "all": "الكل", "all_categories": "كل الفئات", "topics_marked_as_read.success": "تم تحديد المواضيع على أنها مقروءة!", - "all-topics": "All Topics", - "new-topics": "New Topics", - "watched-topics": "Watched Topics" + "all-topics": "كل المواضيع", + "new-topics": "مواضيع جديدة", + "watched-topics": "المواضيع المتابعة" } \ No newline at end of file diff --git a/public/language/ar/uploads.json b/public/language/ar/uploads.json index 1622cb5693..2126d3ec03 100644 --- a/public/language/ar/uploads.json +++ b/public/language/ar/uploads.json @@ -1,6 +1,6 @@ { - "uploading-file": "Uploading the file...", + "uploading-file": "جاري رفع الملف...", "select-file-to-upload": "Select a file to upload!", - "upload-success": "File uploaded successfully!", + "upload-success": "تم رفع الملف بنجاح!", "maximum-file-size": "Maximum %1 kb" } \ No newline at end of file diff --git a/public/language/ar/user.json b/public/language/ar/user.json index 15740e1f14..aa2745674c 100644 --- a/public/language/ar/user.json +++ b/public/language/ar/user.json @@ -36,10 +36,10 @@ "more": "المزيد", "profile_update_success": "تم تحديث الملف الشخصي بنجاح", "change_picture": "تغيير الصورة", - "change_username": "Change Username", - "change_email": "Change Email", + "change_username": "تغيير اسم المستخدم", + "change_email": "تغيير البريد اﻹلكتروني", "edit": "تعديل", - "edit-profile": "Edit Profile", + "edit-profile": "تعديل الملف الشخصي", "default_picture": "Default Icon", "uploaded_picture": "الصورة المرفوعة", "upload_new_picture": "رفع صورة جديدة", @@ -97,11 +97,11 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "متابعة المواضيع التي تقوم بالرد فيها", "follow_topics_you_create": "متابعة المواضيع التي تنشئها", - "grouptitle": "Group Title", + "grouptitle": "عنوان المجموعة", "no-group-title": "لا يوجد عنوان للمجموعة", "select-skin": "Select a Skin", "select-homepage": "Select a Homepage", - "homepage": "Homepage", + "homepage": "الصفحة الرئيسية", "homepage_description": "Select a page to use as the forum homepage or 'None' to use the default homepage.", "custom_route": "Custom Homepage Route", "custom_route_help": "Enter a route name here, without any preceding slash (e.g. \"recent\", or \"popular\")", diff --git a/public/language/fr/unread.json b/public/language/fr/unread.json index 50f2318404..c0849c4be8 100644 --- a/public/language/fr/unread.json +++ b/public/language/fr/unread.json @@ -7,7 +7,7 @@ "all": "Tous", "all_categories": "Toutes Catégories", "topics_marked_as_read.success": "Sujets marqués comme lus !", - "all-topics": "All Topics", - "new-topics": "New Topics", - "watched-topics": "Watched Topics" + "all-topics": "Tous les sujets", + "new-topics": "Nouveau sujet", + "watched-topics": "Sujets surveillés" } \ No newline at end of file From c1e361377938149d0d10b55b618aa20f40cb4904 Mon Sep 17 00:00:00 2001 From: Ole R Date: Sat, 23 Apr 2016 15:23:36 +0200 Subject: [PATCH 0105/1109] Update jquery.textcomplete to 1.3.4 --- .../textcomplete/jquery.textcomplete.js | 45 ++++++++++++++----- 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/public/vendor/jquery/textcomplete/jquery.textcomplete.js b/public/vendor/jquery/textcomplete/jquery.textcomplete.js index ad1d508450..e42ac31bbf 100644 --- a/public/vendor/jquery/textcomplete/jquery.textcomplete.js +++ b/public/vendor/jquery/textcomplete/jquery.textcomplete.js @@ -17,7 +17,7 @@ * Repository: https://github.com/yuku-t/jquery-textcomplete * License: MIT (https://github.com/yuku-t/jquery-textcomplete/blob/master/LICENSE) * Author: Yuku Takahashi - * Version: 1.3.1 + * Version: 1.3.4 */ if (typeof jQuery === 'undefined') { @@ -796,8 +796,14 @@ if (typeof jQuery === 'undefined') { // (which makes our elements wrap onto the next line and corrupt the next item), if we're close to the right // edge, move left. We don't know how far to move left, so just keep nudging a bit. var tolerance = 30; // pixels. Make wider than vertical scrollbar because we might not be able to use that space. - while (this.$el.offset().left + this.$el.width() > $window.width() - tolerance) { - this.$el.offset({left: this.$el.offset().left - tolerance}); + var lastOffset = this.$el.offset().left, offset; + var width = this.$el.width(); + var maxLeft = $window.width() - tolerance; + while (lastOffset + width > maxLeft) { + this.$el.offset({left: lastOffset - tolerance}); + offset = this.$el.offset().left; + if (offset >= lastOffset) { break; } + lastOffset = offset; } }, @@ -1056,9 +1062,28 @@ if (typeof jQuery === 'undefined') { _getCaretRelativePosition: function () { var p = $.fn.textcomplete.getCaretCoordinates(this.el, this.el.selectionStart); return { - top: p.top + parseInt(this.$el.css('line-height'), 10) - this.$el.scrollTop(), + top: p.top + this._calculateLineHeight() - this.$el.scrollTop(), left: p.left - this.$el.scrollLeft() }; + }, + + _calculateLineHeight: function () { + var lineHeight = parseInt(this.$el.css('line-height'), 10); + if (isNaN(lineHeight)) { + // http://stackoverflow.com/a/4515470/1297336 + var parentNode = this.el.parentNode; + var temp = document.createElement(this.el.nodeName); + var style = this.el.style; + temp.setAttribute( + 'style', + 'margin:0px;padding:0px;font-family:' + style.fontFamily + ';font-size:' + style.fontSize + ); + temp.innerHTML = 'test'; + parentNode.appendChild(temp); + lineHeight = temp.clientHeight; + parentNode.removeChild(temp); + } + return lineHeight; } }); @@ -1248,7 +1273,7 @@ if (typeof jQuery === 'undefined') { // // https://github.com/component/textarea-caret-position -(function () { +(function ($) { // The properties that we copy into a mirrored div. // Note that some browsers, such as Firefox, @@ -1369,13 +1394,9 @@ function getCaretCoordinates(element, position, options) { return coordinates; } -if (typeof module != 'undefined' && typeof module.exports != 'undefined') { - module.exports = getCaretCoordinates; -} else if(isBrowser){ - window.$.fn.textcomplete.getCaretCoordinates = getCaretCoordinates; -} +$.fn.textcomplete.getCaretCoordinates = getCaretCoordinates; -}()); +}(jQuery)); return jQuery; -})); \ No newline at end of file +})); From a306405ebda8a902ca43271b2d6ab34fed8beba6 Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Sun, 24 Apr 2016 09:03:01 -0400 Subject: [PATCH 0106/1109] Latest translations and fallbacks --- public/language/es/topic.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/language/es/topic.json b/public/language/es/topic.json index 36075da5d9..c9e5849f41 100644 --- a/public/language/es/topic.json +++ b/public/language/es/topic.json @@ -34,15 +34,15 @@ "not_following_topic.message": "No recibiras notificaciones de este tema.", "login_to_subscribe": "Por favor, conéctate para subscribirte a este tema.", "markAsUnreadForAll.success": "Publicación marcada como no leída para todos.", - "mark_unread": "Marcar como no leído", + "mark_unread": "Marcar no leído", "mark_unread.success": "Tema marcado como no leído.", "watch": "Seguir", "unwatch": "Dejar de seguir", "watch.title": "Serás notificado cuando haya nuevas respuestas en este tema", "unwatch.title": "Dejar de seguir este tema", "share_this_post": "Compartir este post", - "thread_tools.title": "Herramientas del tema", - "thread_tools.markAsUnreadForAll": "Marcar como no leído", + "thread_tools.title": "Herramientas", + "thread_tools.markAsUnreadForAll": "Marcar no leído", "thread_tools.pin": "Adherir tema", "thread_tools.unpin": "Despegar tema", "thread_tools.lock": "Cerrar tema", @@ -96,7 +96,7 @@ "more_users": "%1 usuario(s) más", "more_guests": "%1 invitado(s) más", "users_and_others": "%1 y otros %2", - "sort_by": "Ordenar por", + "sort_by": "Ordenar", "oldest_to_newest": "Más antiguo a más nuevo", "newest_to_oldest": "Más nuevo a más antiguo", "most_votes": "Mayor número de votos", From b4a15cdbc923d175fcc1dc5631ef5b2d7fc27e67 Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Mon, 25 Apr 2016 09:02:29 -0400 Subject: [PATCH 0107/1109] Latest translations and fallbacks --- public/language/it/email.json | 6 +++--- public/language/it/error.json | 2 +- public/language/tr/email.json | 2 +- public/language/tr/unread.json | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/public/language/it/email.json b/public/language/it/email.json index 347f0d6f1d..ef28eac56e 100644 --- a/public/language/it/email.json +++ b/public/language/it/email.json @@ -21,9 +21,9 @@ "digest.cta": "Clicca qui per visitare %1", "digest.unsub.info": "Questo sommario ti è stato inviato perché lo hai sottoscritto nelle tue impostazioni.", "digest.no_topics": "Non ci sono state discussioni attive nell'ultimo %1", - "digest.day": "day", - "digest.week": "week", - "digest.month": "month", + "digest.day": "giorno", + "digest.week": "settimana", + "digest.month": "mese", "digest.subject": "Digest for %1", "notif.chat.subject": "Nuovo messaggio in chat da %1", "notif.chat.cta": "Clicca qui per continuare la conversazione", diff --git a/public/language/it/error.json b/public/language/it/error.json index 23135607f1..ec1f8d0e9b 100644 --- a/public/language/it/error.json +++ b/public/language/it/error.json @@ -24,7 +24,7 @@ "confirm-email-already-sent": "Email di conferma già inviata, per favore attendere %1 minuti per richiederne un'altra.", "username-too-short": "Nome utente troppo corto", "username-too-long": "Nome utente troppo lungo", - "password-too-long": "Password too long", + "password-too-long": "Password troppo lunga", "user-banned": "Utente bannato", "user-too-new": "Devi attendere %1 secondi prima di creare il tuo primo post", "blacklisted-ip": "Sorry, your IP address has been banned from this community. If you feel this is in error, please contact an administrator.", diff --git a/public/language/tr/email.json b/public/language/tr/email.json index 999da17999..4353efd42a 100644 --- a/public/language/tr/email.json +++ b/public/language/tr/email.json @@ -24,7 +24,7 @@ "digest.day": "gün", "digest.week": "hafta", "digest.month": "ay", - "digest.subject": "Digest for %1", + "digest.subject": "%1 için özet", "notif.chat.subject": "Okunmamış bazı iletileriniz var", "notif.chat.cta": "Sohbete devam etmek için buraya tıklayın", "notif.chat.unsub.info": "Bu bildirim şectiğiniz ayarlar yüzünden gönderildi.", diff --git a/public/language/tr/unread.json b/public/language/tr/unread.json index 22f62ff287..4ef01109e7 100644 --- a/public/language/tr/unread.json +++ b/public/language/tr/unread.json @@ -7,7 +7,7 @@ "all": "Hepsi", "all_categories": "Tüm kategoriler", "topics_marked_as_read.success": "Başlıklar okundu olarak işaretlendi!", - "all-topics": "All Topics", - "new-topics": "New Topics", - "watched-topics": "Watched Topics" + "all-topics": "Tüm Başlıklar", + "new-topics": "Yeni Başlıklar", + "watched-topics": "İzlenen Başlıklar" } \ No newline at end of file From eb28e178a7dcca08d26f69ddc624d3bba080c81c Mon Sep 17 00:00:00 2001 From: barisusakli Date: Mon, 25 Apr 2016 19:06:07 +0300 Subject: [PATCH 0108/1109] closes #4567 --- src/categories/create.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/categories/create.js b/src/categories/create.js index 7f1f3955f7..f6338f8ef2 100644 --- a/src/categories/create.js +++ b/src/categories/create.js @@ -97,11 +97,11 @@ module.exports = function(Categories) { destination = results.destination; var tasks = []; - if (parseInt(results.source.parentCid, 10)) { + if (utils.isNumber(results.source.parentCid)) { tasks.push(async.apply(db.sortedSetAdd, 'cid:' + results.source.parentCid + ':children', results.source.order, toCid)); } - if (destination && parseInt(destination.parentCid, 10)) { + if (destination && utils.isNumber(destination.parentCid)) { tasks.push(async.apply(db.sortedSetRemove, 'cid:' + destination.parentCid + ':children', toCid)); } From c8bbbda22f8d2d65a1616550b6db21ae30ab56aa Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 25 Apr 2016 12:20:29 -0400 Subject: [PATCH 0109/1109] added logic to catch bad installs In cases where the nodebb executable is run before `npm i`, NodeBB will now emit a friendly message instead of a scary one. --- nodebb | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/nodebb b/nodebb index fb8d0a6911..53ae28db22 100755 --- a/nodebb +++ b/nodebb @@ -1,14 +1,25 @@ #!/usr/bin/env node -var colors = require('colors'), - cproc = require('child_process'), - argv = require('minimist')(process.argv.slice(2)), - fs = require('fs'), - path = require('path'), - request = require('request'), - semver = require('semver'), - prompt = require('prompt'), - async = require('async'); +try { + var colors = require('colors'), + cproc = require('child_process'), + argv = require('minimist')(process.argv.slice(2)), + fs = require('fs'), + path = require('path'), + request = require('request'), + semver = require('semver'), + prompt = require('prompt'), + async = require('async'); +} catch (e) { + if (e.code === 'MODULE_NOT_FOUND') { + process.stdout.write('NodeBB could not be started because it\'s dependencies have not been installed.\n'); + process.stdout.write('Please ensure that you have executed "npm install --production" prior to running NodeBB.\n\n'); + process.stdout.write('For more information, please see: https://docs.nodebb.org/en/latest/installing/os.html\n\n'); + process.stdout.write('Could not start: ' + e.code + '\n'); + + process.exit(1); + } +} var getRunningPid = function(callback) { fs.readFile(__dirname + '/pidfile', { From eb04dba96cab6eb9f146c01085f5a76651395370 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Mon, 25 Apr 2016 19:28:28 +0300 Subject: [PATCH 0110/1109] closes #4568 --- public/src/admin/manage/categories.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/src/admin/manage/categories.js b/public/src/admin/manage/categories.js index b4a5f19601..4683d20e60 100644 --- a/public/src/admin/manage/categories.js +++ b/public/src/admin/manage/categories.js @@ -167,6 +167,10 @@ define('admin/manage/categories', ['vendor/jquery/serializeObject/jquery.ba-seri }); }); + if (!categories.length) { + continueRender(); + } + function continueRender() { templates.parse('admin/partials/categories/category-rows', { cid: parentId, From 65dfe2bf1b3bb0fa6f996d63a5eea6313ae475c6 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Mon, 25 Apr 2016 19:45:50 +0300 Subject: [PATCH 0111/1109] closes #4564 --- public/less/generics.less | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/less/generics.less b/public/less/generics.less index fee1157662..16528024f7 100644 --- a/public/less/generics.less +++ b/public/less/generics.less @@ -17,7 +17,9 @@ .category-list { padding: 0; - + height: 500px; + overflow-y: auto; + overflow-x: hidden; li { .inline-block; .pointer; From 1cbbb23043381f103b510eea0dbc8f59d13ddbd4 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Mon, 25 Apr 2016 21:46:22 +0300 Subject: [PATCH 0112/1109] fix css --- public/less/generics.less | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/public/less/generics.less b/public/less/generics.less index 16528024f7..265007af55 100644 --- a/public/less/generics.less +++ b/public/less/generics.less @@ -15,11 +15,15 @@ .define-if-not-set(); -.category-list { - padding: 0; +#move_thread_modal .category-list { height: 500px; overflow-y: auto; overflow-x: hidden; +} + +.category-list { + padding: 0; + li { .inline-block; .pointer; From a12a14901507aecd2ee6f75625000898353c2a69 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Mon, 25 Apr 2016 21:53:56 +0300 Subject: [PATCH 0113/1109] fix validator warning --- src/controllers/index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/controllers/index.js b/src/controllers/index.js index a1e9c63dae..598587a434 100644 --- a/src/controllers/index.js +++ b/src/controllers/index.js @@ -308,12 +308,12 @@ Controllers.manifest = function(req, res) { }; Controllers.outgoing = function(req, res, next) { - var url = req.query.url, - data = { - url: validator.escape(url), - title: meta.config.title, - breadcrumbs: helpers.buildBreadcrumbs([{text: '[[notifications:outgoing_link]]'}]) - }; + var url = req.query.url; + var data = { + url: validator.escape(String(url)), + title: meta.config.title, + breadcrumbs: helpers.buildBreadcrumbs([{text: '[[notifications:outgoing_link]]'}]) + }; if (url) { res.render('outgoing', data); From 483127c7bed0b0a2b2ce91071bdbe4b56afded19 Mon Sep 17 00:00:00 2001 From: Ole R Date: Tue, 26 Apr 2016 21:39:31 +0200 Subject: [PATCH 0114/1109] Update emoji-one (#4570) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9bf8e0a04d..653982bb19 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "nconf": "~0.8.2", "nodebb-plugin-composer-default": "3.0.22", "nodebb-plugin-dbsearch": "1.0.1", - "nodebb-plugin-emoji-one": "1.1.0", + "nodebb-plugin-emoji-one": "1.1.2", "nodebb-plugin-emoji-extended": "1.1.0", "nodebb-plugin-markdown": "5.0.1", "nodebb-plugin-mentions": "1.0.21", From ae927ce3568b3945f8e70c82ebac8d66bab8c5e8 Mon Sep 17 00:00:00 2001 From: Ole R Date: Tue, 26 Apr 2016 22:23:07 +0200 Subject: [PATCH 0115/1109] Update emoji-one (#4571) `rm -rf src/database/redis*` --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 653982bb19..db71fc3ef9 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "nconf": "~0.8.2", "nodebb-plugin-composer-default": "3.0.22", "nodebb-plugin-dbsearch": "1.0.1", - "nodebb-plugin-emoji-one": "1.1.2", + "nodebb-plugin-emoji-one": "1.1.3", "nodebb-plugin-emoji-extended": "1.1.0", "nodebb-plugin-markdown": "5.0.1", "nodebb-plugin-mentions": "1.0.21", From a50091414360bdde6ede19a307cc475302236d25 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 26 Apr 2016 16:59:27 -0400 Subject: [PATCH 0116/1109] Updated 404 for image handling If an image or asset specified in static file handler is not found (ENOENT), then the 404 handler is now invoked (as opposed to prior, where a handled exception was thrown). Also, when requesting images inline that do not exist, NodeBB will now send back "404 Not Found" instead of the entire 404 page. If you access the broken link directly, you'll see the 404 page. --- src/routes/index.js | 6 ++---- src/routes/plugins.js | 11 ++++++++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/routes/index.js b/src/routes/index.js index 395557ef4b..999528aadf 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -174,10 +174,8 @@ function handle404(app, middleware) { res.type('text/javascript').status(200).send(''); } else if (isLanguage.test(req.url)) { res.status(200).json({}); - } else if (req.path.startsWith(relativePath + '/uploads')) { - res.status(404).send(''); - } else if (req.path === '/favicon.ico') { - res.status(404).send(''); + } else if (req.path.startsWith(relativePath + '/uploads') || req.get('accept').indexOf('text/html') === -1 || req.path === '/favicon.ico') { + res.sendStatus(404); } else if (req.accepts('html')) { if (process.env.NODE_ENV === 'development') { winston.warn('Route requested but not found: ' + req.url); diff --git a/src/routes/plugins.js b/src/routes/plugins.js index 0123433db9..18c928e3af 100644 --- a/src/routes/plugins.js +++ b/src/routes/plugins.js @@ -26,6 +26,15 @@ module.exports = function(app, middleware, controllers) { return next(); } - res.sendFile(matches[0]); + res.sendFile(matches[0], {}, function(err) { + if (err) { + if (err.code === 'ENOENT') { + // File doesn't exist, this isn't an error, to send to 404 handler + return next(); + } else { + return next(err); + } + } + }); }); }; \ No newline at end of file From 821d7235419eab88cc46b6bb9adf52c8993bff99 Mon Sep 17 00:00:00 2001 From: pichalite Date: Tue, 26 Apr 2016 23:22:19 +0000 Subject: [PATCH 0117/1109] fix image upload in post --- src/controllers/uploads.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/controllers/uploads.js b/src/controllers/uploads.js index 605bee07cf..26ed248fb5 100644 --- a/src/controllers/uploads.js +++ b/src/controllers/uploads.js @@ -6,6 +6,7 @@ var async = require('async'); var nconf = require('nconf'); var validator = require('validator'); var winston = require('winston'); +var mime = require('mime'); var meta = require('../meta'); var file = require('../file'); @@ -171,7 +172,12 @@ function uploadFile(uid, uploadedFile, callback) { } function saveFileToLocal(uploadedFile, callback) { - var filename = uploadedFile.name || 'upload'; + var extension = ''; + if(!path.extname(uploadedFile.name)) { + extension = '.' + mime.extension(uploadedFile.type); + } + + var filename = (uploadedFile.name || 'upload') + extension; filename = Date.now() + '-' + validator.escape(filename).substr(0, 255); file.saveFileToLocal(filename, 'files', uploadedFile.path, function(err, upload) { From 553a69c780225d9ced71d1ce5007e31f8f7227b3 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 27 Apr 2016 09:03:34 +0300 Subject: [PATCH 0118/1109] revert img stripping --- src/topics/teaser.js | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/topics/teaser.js b/src/topics/teaser.js index 5d730de74d..b841219a25 100644 --- a/src/topics/teaser.js +++ b/src/topics/teaser.js @@ -2,16 +2,14 @@ 'use strict'; -var async = require('async'), - S = require('string'), - - meta = require('../meta'), - db = require('../database'), - user = require('../user'), - posts = require('../posts'), - plugins = require('../plugins'), - utils = require('../../public/src/utils'); +var async = require('async'); +var S = require('string'); +var meta = require('../meta'); +var user = require('../user'); +var posts = require('../posts'); +var plugins = require('../plugins'); +var utils = require('../../public/src/utils'); module.exports = function(Topics) { @@ -74,7 +72,7 @@ module.exports = function(Topics) { tidToPost[topic.tid].index = meta.config.teaserPost === 'first' ? 1 : counts[index]; if (tidToPost[topic.tid].content) { var s = S(tidToPost[topic.tid].content); - tidToPost[topic.tid].content = s.stripTags.apply(s, utils.stripTags.concat(['img'])).s; + tidToPost[topic.tid].content = s.stripTags.apply(s, utils.stripTags).s; } } return tidToPost[topic.tid]; From 3648d531faaae0f50c178a787b0bfeb45db15506 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 27 Apr 2016 11:01:27 +0300 Subject: [PATCH 0119/1109] closes #4545 --- public/src/admin/manage/users.js | 20 ++++++++++++++++++++ src/controllers/admin/users.js | 6 ++++++ src/views/admin/manage/users.tpl | 11 +++++++++-- src/views/admin/settings/user.tpl | 7 +++++++ 4 files changed, 42 insertions(+), 2 deletions(-) diff --git a/public/src/admin/manage/users.js b/public/src/admin/manage/users.js index 09c9e3a01e..63b2d0fdd2 100644 --- a/public/src/admin/manage/users.js +++ b/public/src/admin/manage/users.js @@ -268,7 +268,27 @@ define('admin/manage/users', ['admin/modules/selectable'], function(selectable) handleUserCreate(); + handleInvite(); + }; + function handleInvite() { + $('[component="user/invite"]').on('click', function() { + bootbox.prompt('Email: ', function(email) { + if (!email) { + return; + } + + socket.emit('user.invite', email, function(err) { + if (err) { + return app.alertError(err.message); + } + app.alertSuccess('An invitation email has been sent to ' + email); + }); + }); + }); + } + + return Users; }); diff --git a/src/controllers/admin/users.js b/src/controllers/admin/users.js index 7e5bd530d6..1b833c2709 100644 --- a/src/controllers/admin/users.js +++ b/src/controllers/admin/users.js @@ -166,6 +166,12 @@ function render(req, res, data) { data.search_display = 'hidden'; data.pagination = pagination.create(data.page, data.pageCount, req.query); data.requireEmailConfirmation = parseInt(meta.config.requireEmailConfirmation, 10) === 1; + + var registrationType = meta.config.registrationType; + + data.inviteOnly = registrationType === 'invite-only' || registrationType === 'admin-invite-only'; + data.adminInviteOnly = registrationType === 'admin-invite-only'; + res.render('admin/manage/users', data); } diff --git a/src/views/admin/manage/users.tpl b/src/views/admin/manage/users.tpl index cfdc7bb72c..644bde38f6 100644 --- a/src/views/admin/manage/users.tpl +++ b/src/views/admin/manage/users.tpl @@ -139,8 +139,15 @@
    diff --git a/src/views/admin/settings/user.tpl b/src/views/admin/settings/user.tpl index 0edc062271..33972e267c 100644 --- a/src/views/admin/settings/user.tpl +++ b/src/views/admin/settings/user.tpl @@ -128,6 +128,13 @@ +

    + Normal - Users can register from the /register page.
    + Admin Approval - User registrations are placed in an approval queue for administrators.
    + Invite Only - Users can invite others from the users page.
    + Admin Invite Only - Only administrators can invite others from users and admin/manage/users pages.
    + No registration - No user registration.
    +

    From 18e68346e713fce2efb49aff0b18bd2bbf0be332 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 27 Apr 2016 11:13:08 +0300 Subject: [PATCH 0120/1109] closes #4507 --- src/controllers/authentication.js | 2 ++ src/user/auth.js | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/controllers/authentication.js b/src/controllers/authentication.js index 04a9e1408c..560965f8ec 100644 --- a/src/controllers/authentication.js +++ b/src/controllers/authentication.js @@ -306,6 +306,8 @@ authenticationController.logout = function(req, res, next) { } req.logout(); + user.setUserField(uid, 'lastonline', Date.now() - 300000); + // action:user.loggedOut deprecated in > v0.9.3 plugins.fireHook('action:user.loggedOut', {req: req, res: res, uid: uid}); plugins.fireHook('static:user.loggedOut', {req: req, res: res, uid: uid}, function() { diff --git a/src/user/auth.js b/src/user/auth.js index 99bdfb8c94..f2fa917962 100644 --- a/src/user/auth.js +++ b/src/user/auth.js @@ -1,10 +1,10 @@ 'use strict'; -var async = require('async'), - winston = require('winston'), - db = require('../database'), - meta = require('../meta'), - events = require('../events'); +var async = require('async'); +var winston = require('winston'); +var db = require('../database'); +var meta = require('../meta'); +var events = require('../events'); module.exports = function(User) { User.auth = {}; From c266fe998391ea130a34d36696d3891b73718019 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 27 Apr 2016 13:08:32 +0300 Subject: [PATCH 0121/1109] closes #4540 --- src/notifications.js | 74 +++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 36 deletions(-) diff --git a/src/notifications.js b/src/notifications.js index 94cb5313b8..ebf2d20585 100644 --- a/src/notifications.js +++ b/src/notifications.js @@ -1,17 +1,17 @@ 'use strict'; -var async = require('async'), - winston = require('winston'), - cron = require('cron').CronJob, - nconf = require('nconf'), - S = require('string'), - _ = require('underscore'), +var async = require('async'); +var winston = require('winston'); +var cron = require('cron').CronJob; +var nconf = require('nconf'); +var S = require('string'); +var _ = require('underscore'); - db = require('./database'), - User = require('./user'), - groups = require('./groups'), - meta = require('./meta'), - plugins = require('./plugins'); +var db = require('./database'); +var User = require('./user'); +var groups = require('./groups'); +var meta = require('./meta'); +var plugins = require('./plugins'); (function(Notifications) { @@ -197,44 +197,46 @@ var async = require('async'), }; function pushToUids(uids, notification, callback) { + var oneWeekAgo = Date.now() - 604800000; var unreadKeys = []; var readKeys = []; - uids.forEach(function(uid) { - unreadKeys.push('uid:' + uid + ':notifications:unread'); - readKeys.push('uid:' + uid + ':notifications:read'); - }); + async.waterfall([ + function (next) { + plugins.fireHook('filter:notification.push', {notification: notification, uids: uids}, next); + }, + function (data, next) { + uids = data.uids; + notification = data.notification; + + uids.forEach(function(uid) { + unreadKeys.push('uid:' + uid + ':notifications:unread'); + readKeys.push('uid:' + uid + ':notifications:read'); + }); - var oneWeekAgo = Date.now() - 604800000; - async.series([ - function(next) { db.sortedSetsAdd(unreadKeys, notification.datetime, notification.nid, next); }, - function(next) { + function (next) { db.sortedSetsRemove(readKeys, notification.nid, next); }, - function(next) { + function (next) { db.sortedSetsRemoveRangeByScore(unreadKeys, '-inf', oneWeekAgo, next); }, - function(next) { + function (next) { db.sortedSetsRemoveRangeByScore(readKeys, '-inf', oneWeekAgo, next); - } - ], function(err) { - if (err) { - return callback(err); - } + }, + function (next) { + var websockets = require('./socket.io'); + if (websockets.server) { + uids.forEach(function(uid) { + websockets.in('uid_' + uid).emit('event:new_notification', notification); + }); + } - plugins.fireHook('action:notification.pushed', {notification: notification, uids: uids}); - - var websockets = require('./socket.io'); - if (websockets.server) { - uids.forEach(function(uid) { - websockets.in('uid_' + uid).emit('event:new_notification', notification); - }); + plugins.fireHook('action:notification.pushed', {notification: notification, uids: uids}); + next(); } - - callback(); - }); + ], callback); } Notifications.pushGroup = function(notification, groupName, callback) { From becd716d77d99258478a1b748667688de2c7ec43 Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Wed, 27 Apr 2016 09:02:32 -0400 Subject: [PATCH 0122/1109] Latest translations and fallbacks --- public/language/ar/category.json | 4 ++-- public/language/ar/email.json | 8 ++++---- public/language/zh_CN/unread.json | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/public/language/ar/category.json b/public/language/ar/category.json index 192d1f02c8..77dc9decd9 100644 --- a/public/language/ar/category.json +++ b/public/language/ar/category.json @@ -5,12 +5,12 @@ "guest-login-post": "يجب عليك تسجيل الدخول للرد", "no_topics": "لا توجد مواضيع في هذه الفئةلم لا تحاول إنشاء موضوع؟
    ", "browsing": "تصفح", - "no_replies": "لا توجد ردود.", + "no_replies": "لم يرد أحد", "no_new_posts": "لا يوجد مشاركات جديدة.", "share_this_category": "انشر هذه الفئة", "watch": "متابعة", "ignore": "تجاهل", "watch.message": "أنت اﻷن متابع لتحديثات هذه الفئة", "ignore.message": "أنت اﻷن تتجاهل تحديثات هذه الفئة", - "watched-categories": "Watched categories" + "watched-categories": "الفئات المراقبه" } \ No newline at end of file diff --git a/public/language/ar/email.json b/public/language/ar/email.json index 6e2a809e4b..67171b01a6 100644 --- a/public/language/ar/email.json +++ b/public/language/ar/email.json @@ -21,10 +21,10 @@ "digest.cta": "انقر هنا لمشاهدة %1", "digest.unsub.info": "تم إرسال هذا الإشعار بآخر المستجدات وفقا لخيارات تسجيلكم.", "digest.no_topics": "ليس هناك مواضيع نشيطة في %1 الماضي", - "digest.day": "day", - "digest.week": "week", - "digest.month": "month", - "digest.subject": "Digest for %1", + "digest.day": "يوم", + "digest.week": "أسبوع", + "digest.month": "شهر", + "digest.subject": "إستهلاك ل", "notif.chat.subject": "هناك محادثة جديدة من %1", "notif.chat.cta": "انقر هنا لمتابعة المحادثة", "notif.chat.unsub.info": "تم إرسال هذا الإشعار بوجودة محادثة جديدة وفقا لخيارات تسجيلك.", diff --git a/public/language/zh_CN/unread.json b/public/language/zh_CN/unread.json index efe8f0c9bc..bd4d52074b 100644 --- a/public/language/zh_CN/unread.json +++ b/public/language/zh_CN/unread.json @@ -7,7 +7,7 @@ "all": "全部", "all_categories": "全部分类", "topics_marked_as_read.success": "主题被标为已读!", - "all-topics": "All Topics", - "new-topics": "New Topics", - "watched-topics": "Watched Topics" + "all-topics": "全部主题", + "new-topics": "新建主题", + "watched-topics": "看过的主题" } \ No newline at end of file From f154853b3917e5a476b675362605196d62f03991 Mon Sep 17 00:00:00 2001 From: pichalite Date: Wed, 27 Apr 2016 14:46:03 +0000 Subject: [PATCH 0123/1109] add extension after filename trim --- src/controllers/uploads.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/controllers/uploads.js b/src/controllers/uploads.js index 26ed248fb5..5a8873239b 100644 --- a/src/controllers/uploads.js +++ b/src/controllers/uploads.js @@ -172,14 +172,14 @@ function uploadFile(uid, uploadedFile, callback) { } function saveFileToLocal(uploadedFile, callback) { - var extension = ''; - if(!path.extname(uploadedFile.name)) { + var extension = path.extname(uploadedFile.name); + if(!extension) { extension = '.' + mime.extension(uploadedFile.type); } - var filename = (uploadedFile.name || 'upload') + extension; + var filename = uploadedFile.name || 'upload'; - filename = Date.now() + '-' + validator.escape(filename).substr(0, 255); + filename = Date.now() + '-' + validator.escape(filename.replace(extension, '')).substr(0, 255) + extension; file.saveFileToLocal(filename, 'files', uploadedFile.path, function(err, upload) { if (err) { return callback(err); From cd2c2da42056cd81002cd60c34ec819b8bc8a0f1 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 27 Apr 2016 17:54:54 +0300 Subject: [PATCH 0124/1109] closes #4575 --- package.json | 4 ++-- src/views/partials/requirejs-config.tpl | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index db71fc3ef9..4c1e5e41b8 100644 --- a/package.json +++ b/package.json @@ -46,11 +46,11 @@ "morgan": "^1.3.2", "mousetrap": "^1.5.3", "nconf": "~0.8.2", - "nodebb-plugin-composer-default": "3.0.22", + "nodebb-plugin-composer-default": "3.0.23", "nodebb-plugin-dbsearch": "1.0.1", "nodebb-plugin-emoji-one": "1.1.3", "nodebb-plugin-emoji-extended": "1.1.0", - "nodebb-plugin-markdown": "5.0.1", + "nodebb-plugin-markdown": "5.1.1", "nodebb-plugin-mentions": "1.0.21", "nodebb-plugin-soundpack-default": "0.1.6", "nodebb-plugin-spam-be-gone": "0.4.6", diff --git a/src/views/partials/requirejs-config.tpl b/src/views/partials/requirejs-config.tpl index 2d7332afd9..addb5cfcaa 100644 --- a/src/views/partials/requirejs-config.tpl +++ b/src/views/partials/requirejs-config.tpl @@ -6,7 +6,8 @@ paths: { 'forum': '../client', 'admin': '../admin', - 'vendor': '../../vendor' + 'vendor': '../../vendor', + 'plugins': '../../plugins' } }); \ No newline at end of file From f61d0cb45722dde004af85258e3e1dba7b46635f Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 27 Apr 2016 19:06:56 +0300 Subject: [PATCH 0125/1109] https://github.com/NodeBB/nodebb-plugin-composer-default/issues/24 --- public/src/app.js | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/public/src/app.js b/public/src/app.js index 791aabd628..a4acd0468b 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -455,26 +455,9 @@ app.cacheBuster = null; }; app.newTopic = function (cid) { - cid = cid || ajaxify.data.cid; - if (cid) { - $(window).trigger('action:composer.topic.new', { - cid: cid - }); - } else { - socket.emit('categories.getCategoriesByPrivilege', 'topics:create', function(err, categories) { - if (err) { - return app.alertError(err.message); - } - categories = categories.filter(function(category) { - return !category.link && !parseInt(category.parentCid, 10); - }); - if (categories.length) { - $(window).trigger('action:composer.topic.new', { - cid: categories[0].cid - }); - } - }); - } + $(window).trigger('action:composer.topic.new', { + cid: cid || ajaxify.data.cid || 0 + }); }; app.loadJQueryUI = function(callback) { @@ -546,5 +529,5 @@ app.cacheBuster = null; linkEl.href = config.relative_path + '/js-enabled.css'; document.head.appendChild(linkEl); - } + }; }()); From aac72a0c7ff392774adee616d58aeb137b3fe0ea Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 27 Apr 2016 19:11:15 +0300 Subject: [PATCH 0126/1109] up composer --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4c1e5e41b8..46dcb0a811 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "morgan": "^1.3.2", "mousetrap": "^1.5.3", "nconf": "~0.8.2", - "nodebb-plugin-composer-default": "3.0.23", + "nodebb-plugin-composer-default": "3.0.24", "nodebb-plugin-dbsearch": "1.0.1", "nodebb-plugin-emoji-one": "1.1.3", "nodebb-plugin-emoji-extended": "1.1.0", From 1d607cbed798bc335d58c2dbbf9889c9e555ae2c Mon Sep 17 00:00:00 2001 From: psychobunny Date: Wed, 27 Apr 2016 12:11:44 -0400 Subject: [PATCH 0127/1109] closes #4574 --- src/rewards/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rewards/index.js b/src/rewards/index.js index 1b46b190d9..c811ce933c 100644 --- a/src/rewards/index.js +++ b/src/rewards/index.js @@ -90,7 +90,7 @@ function filterCompletedRewards(uid, rewards, callback) { return true; } - return (userRewards[reward.id] > reward.claimable) ? false : true; + return (userRewards[reward.id] >= reward.claimable) ? false : true; }); callback(false, rewards); From 1d7a5f58e2b4ff14aed4118cf59a25d8ef6d710d Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 27 Apr 2016 14:14:22 -0400 Subject: [PATCH 0128/1109] fixes #4576 --- src/meta/js.js | 35 ++++++++++++++++++++--------------- src/plugins/load.js | 17 +++++++++++++---- 2 files changed, 33 insertions(+), 19 deletions(-) diff --git a/src/meta/js.js b/src/meta/js.js index 2669aed4d4..6f591cc9fd 100644 --- a/src/meta/js.js +++ b/src/meta/js.js @@ -79,31 +79,36 @@ module.exports = function(Meta) { ], // modules listed below are routed through express (/src/modules) so they can be defined anonymously - modules: [ - './node_modules/chart.js/Chart.js', - './node_modules/mousetrap/mousetrap.js', + modules: { + "Chart.js": './node_modules/chart.js/Chart.js', + "mousetrap.js": './node_modules/mousetrap/mousetrap.js', - 'public/vendor/buzz/buzz.js' - ] + "buzz.js": 'public/vendor/buzz/buzz.js' + } } }; Meta.js.bridgeModules = function(app, callback) { // Add routes for AMD-type modules to serve those files - var numBridged = 0; + var numBridged = 0, + addRoute = function(relPath) { + app.get('/src/modules/' + relPath, function(req, res) { + return res.sendFile(path.join(__dirname, '../../', Meta.js.scripts.modules[relPath]), { + maxAge: app.enabled('cache') ? 5184000000 : 0 + }); + }); + }; async.series([ function(next) { - async.each(Meta.js.scripts.modules, function(localPath, next) { - app.get('/src/modules/' + path.basename(localPath), function(req, res) { - return res.sendFile(path.join(__dirname, '../../', localPath), { - maxAge: app.enabled('cache') ? 5184000000 : 0 - }); - }); + for(var relPath in Meta.js.scripts.modules) { + if (Meta.js.scripts.modules.hasOwnProperty(relPath)) { + addRoute(relPath); + ++numBridged; + } + } - ++numBridged; - next(); - }, next); + next(); } ], function(err) { if (err) { diff --git a/src/plugins/load.js b/src/plugins/load.js index 676008a85c..554df14030 100644 --- a/src/plugins/load.js +++ b/src/plugins/load.js @@ -176,10 +176,19 @@ module.exports = function(Plugins) { winston.verbose('[plugins] Found ' + pluginData.modules.length + ' AMD-style module(s) for plugin ' + pluginData.id); } - meta.js.scripts.modules = meta.js.scripts.modules.concat(pluginData.modules.map(function(file) { - return path.join('./node_modules/', pluginData.id, file); - })); - } + var modules = {}, + strip = pluginData.hasOwnProperty('modulesStrip') ? parseInt(pluginData.modulesStrip, 10) : 0; + + pluginData.modules.forEach(function(file) { + if (strip) { + modules[file.replace(new RegExp('\.?(\/[^\/]+){' + strip + '}\/'), '')] = path.join('./node_modules/', pluginData.id, file); + } else { + modules[path.basename(file)] = path.join('./node_modules/', pluginData.id, file); + } + }); + + meta.js.scripts.modules = _.extend(meta.js.scripts.modules, modules); + } /* one could conceivably add an else..if here for plugins to pass modules in as an Object */ callback(); }; From 2c8378948232d634624a18904911b7e863d52a24 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 27 Apr 2016 14:28:57 -0400 Subject: [PATCH 0129/1109] Allowing object to be passed as module list fixes #4576 again --- src/plugins/load.js | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/plugins/load.js b/src/plugins/load.js index 554df14030..48bbdb0390 100644 --- a/src/plugins/load.js +++ b/src/plugins/load.js @@ -171,13 +171,18 @@ module.exports = function(Plugins) { }; function mapClientModules(pluginData, callback) { + if (!pluginData.hasOwnProperty('modules')) { + return callback(); + } + + var modules = {}; + if (Array.isArray(pluginData.modules)) { if (global.env === 'development') { winston.verbose('[plugins] Found ' + pluginData.modules.length + ' AMD-style module(s) for plugin ' + pluginData.id); } - var modules = {}, - strip = pluginData.hasOwnProperty('modulesStrip') ? parseInt(pluginData.modulesStrip, 10) : 0; + var strip = pluginData.hasOwnProperty('modulesStrip') ? parseInt(pluginData.modulesStrip, 10) : 0; pluginData.modules.forEach(function(file) { if (strip) { @@ -188,7 +193,19 @@ module.exports = function(Plugins) { }); meta.js.scripts.modules = _.extend(meta.js.scripts.modules, modules); - } /* one could conceivably add an else..if here for plugins to pass modules in as an Object */ + } else { + var keys = Object.keys(pluginData.modules); + + if (global.env === 'development') { + winston.verbose('[plugins] Found ' + keys.length + ' AMD-style module(s) for plugin ' + pluginData.id); + } + + for (var name in pluginData.modules) { + modules[name] = path.join('./node_modules/', pluginData.id, pluginData.modules[name]); + } + + meta.js.scripts.modules = _.extend(meta.js.scripts.modules, modules); + } callback(); }; From ee2bd0ce0079bc1ae1f7da71bbd1f2aec6ca8a81 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 27 Apr 2016 21:35:43 +0300 Subject: [PATCH 0130/1109] up composer/markdown --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 46dcb0a811..bf7af3b769 100644 --- a/package.json +++ b/package.json @@ -46,11 +46,11 @@ "morgan": "^1.3.2", "mousetrap": "^1.5.3", "nconf": "~0.8.2", - "nodebb-plugin-composer-default": "3.0.24", + "nodebb-plugin-composer-default": "3.0.25", "nodebb-plugin-dbsearch": "1.0.1", "nodebb-plugin-emoji-one": "1.1.3", "nodebb-plugin-emoji-extended": "1.1.0", - "nodebb-plugin-markdown": "5.1.1", + "nodebb-plugin-markdown": "5.1.2", "nodebb-plugin-mentions": "1.0.21", "nodebb-plugin-soundpack-default": "0.1.6", "nodebb-plugin-spam-be-gone": "0.4.6", From 37bd63ab755d37ba8a74ec9d484b18f552940ab2 Mon Sep 17 00:00:00 2001 From: Ben Lubar Date: Wed, 27 Apr 2016 13:52:14 -0500 Subject: [PATCH 0131/1109] wrap images in links even if the images aren't unloaded. handle resized images with no file extension (as seen on wtdwtf) (#4561) --- public/src/client/topic/posts.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/src/client/topic/posts.js b/public/src/client/topic/posts.js index 630b91bc72..605994c9e6 100644 --- a/public/src/client/topic/posts.js +++ b/public/src/client/topic/posts.js @@ -244,6 +244,7 @@ define('forum/topic/posts', [ }).attr('data-state', 'unloaded').attr('src', 'about:blank'); } else { images.attr('data-state', 'loaded'); + Posts.wrapImagesInLinks(posts); } }; @@ -320,7 +321,7 @@ define('forum/topic/posts', [ posts.find('[component="post/content"] img:not(.emoji)').each(function() { var $this = $(this), src = $this.attr('src'), - suffixRegex = /-resized(\.[\w]+)$/; + suffixRegex = /-resized(\.[\w]+)?$/; if (utils.isRelativeUrl(src) && suffixRegex.test(src)) { src = src.replace(suffixRegex, '$1'); From 414a26fe42989b8994c24b545949b39e0d26fbdf Mon Sep 17 00:00:00 2001 From: wktang Date: Wed, 27 Apr 2016 11:52:36 -0700 Subject: [PATCH 0132/1109] Default mongodb db name should be "nodebb" instead of 0 (unlike redis). (#4573) --- src/database/mongo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/database/mongo.js b/src/database/mongo.js index 83a9258857..7dd854e4cf 100644 --- a/src/database/mongo.js +++ b/src/database/mongo.js @@ -38,7 +38,7 @@ { name: "mongo:database", description: "MongoDB database name", - 'default': nconf.get('mongo:database') || 0 + 'default': nconf.get('mongo:database') || 'nodebb' } ]; @@ -74,7 +74,7 @@ nconf.set('mongo:port', 27017); } if (!nconf.get('mongo:database')) { - nconf.set('mongo:database', '0'); + nconf.set('mongo:database', 'nodebb'); } var hosts = nconf.get('mongo:host').split(','); From 7104d18e5942f1c3bc05de89957cca5e8f032a38 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 27 Apr 2016 21:53:21 +0300 Subject: [PATCH 0133/1109] https://github.com/NodeBB/nodebb-plugin-composer-default/issues/32 --- public/language/en_GB/modules.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/public/language/en_GB/modules.json b/public/language/en_GB/modules.json index a3db35f6e3..25c60f5f46 100644 --- a/public/language/en_GB/modules.json +++ b/public/language/en_GB/modules.json @@ -30,6 +30,14 @@ "composer.submit_and_lock": "Submit and Lock", "composer.toggle_dropdown": "Toggle Dropdown", "composer.uploading": "Uploading %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-image": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "OK", "bootbox.cancel": "Cancel", From d9f4d79a32dc2d661f24b4b8af20df5095052375 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 27 Apr 2016 21:58:36 +0300 Subject: [PATCH 0134/1109] up composer markdown --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index bf7af3b769..3fa5776669 100644 --- a/package.json +++ b/package.json @@ -46,11 +46,11 @@ "morgan": "^1.3.2", "mousetrap": "^1.5.3", "nconf": "~0.8.2", - "nodebb-plugin-composer-default": "3.0.25", + "nodebb-plugin-composer-default": "3.0.26", "nodebb-plugin-dbsearch": "1.0.1", "nodebb-plugin-emoji-one": "1.1.3", "nodebb-plugin-emoji-extended": "1.1.0", - "nodebb-plugin-markdown": "5.1.2", + "nodebb-plugin-markdown": "5.1.3", "nodebb-plugin-mentions": "1.0.21", "nodebb-plugin-soundpack-default": "0.1.6", "nodebb-plugin-spam-be-gone": "0.4.6", From 178b9c3bdd6169257f3e9c7cdeeb731571429834 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 27 Apr 2016 22:02:30 +0300 Subject: [PATCH 0135/1109] fix lang key --- public/language/en_GB/modules.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/language/en_GB/modules.json b/public/language/en_GB/modules.json index 25c60f5f46..6ad92fb217 100644 --- a/public/language/en_GB/modules.json +++ b/public/language/en_GB/modules.json @@ -36,7 +36,7 @@ "composer.formatting.strikethrough": "Strikethrough", "composer.formatting.link": "Link", "composer.formatting.picture": "Picture", - "composer.upload-image": "Upload Image", + "composer.upload-picture": "Upload Image", "composer.upload-file": "Upload File", "bootbox.ok": "OK", From 74a5a70969270e07af6498abb48488182bc0af5a Mon Sep 17 00:00:00 2001 From: Ben Lubar Date: Thu, 21 Apr 2016 15:54:23 -0500 Subject: [PATCH 0136/1109] fix convert-avatars-to-png option not being honored --- src/user/picture.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/user/picture.js b/src/user/picture.js index c9a760f10e..a55eee2975 100644 --- a/src/user/picture.js +++ b/src/user/picture.js @@ -57,11 +57,13 @@ module.exports = function(User) { }, next); }, function(next) { - if (convertToPNG) { - image.normalise(picture.path, extension, next); - } else { - next(); + if (!convertToPNG) { + return next(); } + async.series([ + async.apply(image.normalise, picture.path, extension), + async.apply(fs.rename, picture.path + '.png', picture.path) + ], next); }, function(next) { User.getUserField(updateUid, 'uploadedpicture', next); @@ -225,4 +227,4 @@ module.exports = function(User) { User.removeCoverPicture = function(data, callback) { db.deleteObjectField('user:' + data.uid, 'cover:url', callback); }; -}; \ No newline at end of file +}; From f05b07d2a481f921ff09cfd3f984c1a57d094e04 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 28 Apr 2016 10:29:23 +0300 Subject: [PATCH 0137/1109] update travis --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index ffd3716c2a..c98710aad1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,10 @@ services: - redis-server before_install: - - "sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10" - - "echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list" + - "sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927" + - "echo 'deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse' | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list" - "sudo apt-get update" - - "sudo apt-get install mongodb-org-server" + - "sudo apt-get install -y mongodb-org" - npm i --production - node app --setup="{\"url\":\"http://127.0.0.1:4567/\",\"secret\":\"abcdef\",\"database\":\"mongo\",\"mongo:host\":\"127.0.0.1\",\"mongo:port\":27017,\"mongo:username\":\"\",\"mongo:password\":\"\",\"mongo:database\":0,\"redis:host\":\"127.0.0.1\",\"redis:port\":6379,\"redis:password\":\"\",\"redis:database\":0,\"admin:username\":\"admin\",\"admin:email\":\"test@example.org\",\"admin:password\":\"abcdef\",\"admin:password:confirm\":\"abcdef\"}" --ci="{\"host\":\"127.0.0.1\",\"port\":27017,\"database\":0}" before_script: @@ -19,6 +19,7 @@ addons: packages: - g++-4.8 node_js: + - "4.4" - "4.2" - "4.1" - "4.0" From 8a2f1d0c4928cc65e166a7598b44689fa0dc4d9a Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 28 Apr 2016 10:44:06 +0300 Subject: [PATCH 0138/1109] Revert "update travis" This reverts commit f05b07d2a481f921ff09cfd3f984c1a57d094e04. --- .travis.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index c98710aad1..ffd3716c2a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,10 @@ services: - redis-server before_install: - - "sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927" - - "echo 'deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse' | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list" + - "sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10" + - "echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list" - "sudo apt-get update" - - "sudo apt-get install -y mongodb-org" + - "sudo apt-get install mongodb-org-server" - npm i --production - node app --setup="{\"url\":\"http://127.0.0.1:4567/\",\"secret\":\"abcdef\",\"database\":\"mongo\",\"mongo:host\":\"127.0.0.1\",\"mongo:port\":27017,\"mongo:username\":\"\",\"mongo:password\":\"\",\"mongo:database\":0,\"redis:host\":\"127.0.0.1\",\"redis:port\":6379,\"redis:password\":\"\",\"redis:database\":0,\"admin:username\":\"admin\",\"admin:email\":\"test@example.org\",\"admin:password\":\"abcdef\",\"admin:password:confirm\":\"abcdef\"}" --ci="{\"host\":\"127.0.0.1\",\"port\":27017,\"database\":0}" before_script: @@ -19,7 +19,6 @@ addons: packages: - g++-4.8 node_js: - - "4.4" - "4.2" - "4.1" - "4.0" From 8eaff1492a0d7479ce7b42ca98d708ba0f0bcb12 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 28 Apr 2016 11:52:05 -0400 Subject: [PATCH 0139/1109] Added ACP option to customise recent post Before, could either be OP or last reply. Now, you can choose between OP, last reply, or last post (which includes OP) --- install/data/defaults.json | 2 +- src/categories/recentreplies.js | 9 +-------- src/topics/teaser.js | 25 +++++++++++++++++++++++-- src/views/admin/settings/post.tpl | 3 ++- 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/install/data/defaults.json b/install/data/defaults.json index 45f426fb04..4ddf385e8a 100644 --- a/install/data/defaults.json +++ b/install/data/defaults.json @@ -31,7 +31,7 @@ "profileImageDimension": 128, "requireEmailConfirmation": 0, "allowProfileImageUploads": 1, - "teaserPost": "last", + "teaserPost": "last-reply", "allowPrivateGroups": 1, "unreadCutoff": 2, "bookmarkThreshold": 5 diff --git a/src/categories/recentreplies.js b/src/categories/recentreplies.js index 7d42f053ff..e431a5cd59 100644 --- a/src/categories/recentreplies.js +++ b/src/categories/recentreplies.js @@ -105,14 +105,7 @@ module.exports = function(Categories) { function (next) { topics.getTopicsFields(tids, ['tid', 'mainPid', 'slug', 'title', 'teaserPid', 'cid', 'postcount'], next); }, - function (_topicData, next) { - topicData = _topicData; - topicData.forEach(function(topic) { - topic.teaserPid = topic.teaserPid || topic.mainPid; - }); - - topics.getTeasers(topicData, next); - }, + async.apply(topics.getTeasers, topicData), function (teasers, next) { teasers.forEach(function(teaser, index) { if (teaser) { diff --git a/src/topics/teaser.js b/src/topics/teaser.js index b841219a25..9c752946ee 100644 --- a/src/topics/teaser.js +++ b/src/topics/teaser.js @@ -26,7 +26,24 @@ module.exports = function(Topics) { topics.forEach(function(topic) { counts.push(topic && (parseInt(topic.postcount, 10) || 0)); if (topic) { - teaserPids.push(meta.config.teaserPost === 'first' ? topic.mainPid : topic.teaserPid); + if (topic.teaserPid === 'null') { + delete topic.teaserPid; + } + + switch(meta.config.teaserPost) { + case 'first': + teaserPids.push(topic.mainPid); + break; + + case 'last-post': + teaserPids.push(topic.teaserPid || topic.mainPid); + break; + + case 'last-reply': // intentional fall-through + default: + teaserPids.push(topic.teaserPid); + break; + } } }); @@ -113,7 +130,11 @@ module.exports = function(Topics) { } pid = pid || null; - Topics.setTopicField(tid, 'teaserPid', pid, callback); + if (pid) { + Topics.setTopicField(tid, 'teaserPid', pid, callback); + } else { + Topics.deleteTopicField(tid, 'teaserPid', callback); + } }); }; }; \ No newline at end of file diff --git a/src/views/admin/settings/post.tpl b/src/views/admin/settings/post.tpl index e37f51a40c..0855a34333 100644 --- a/src/views/admin/settings/post.tpl +++ b/src/views/admin/settings/post.tpl @@ -83,7 +83,8 @@
    From de9357970fae0dce51f014e26e43acc6b7f0ba64 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 28 Apr 2016 14:10:10 -0400 Subject: [PATCH 0140/1109] fixes #4578 --- src/categories/recentreplies.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/categories/recentreplies.js b/src/categories/recentreplies.js index e431a5cd59..4d152892d3 100644 --- a/src/categories/recentreplies.js +++ b/src/categories/recentreplies.js @@ -105,7 +105,7 @@ module.exports = function(Categories) { function (next) { topics.getTopicsFields(tids, ['tid', 'mainPid', 'slug', 'title', 'teaserPid', 'cid', 'postcount'], next); }, - async.apply(topics.getTeasers, topicData), + async.apply(topics.getTeasers), function (teasers, next) { teasers.forEach(function(teaser, index) { if (teaser) { From 5f36bfab01d51b16ba9e505fc16dfd5abddd52a7 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 28 Apr 2016 14:18:19 -0400 Subject: [PATCH 0141/1109] re: #4578 --- src/categories/recentreplies.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/categories/recentreplies.js b/src/categories/recentreplies.js index 4d152892d3..9651a49c20 100644 --- a/src/categories/recentreplies.js +++ b/src/categories/recentreplies.js @@ -105,7 +105,10 @@ module.exports = function(Categories) { function (next) { topics.getTopicsFields(tids, ['tid', 'mainPid', 'slug', 'title', 'teaserPid', 'cid', 'postcount'], next); }, - async.apply(topics.getTeasers), + function(_topicData, next) { + topicData = _topicData; + topics.getTeasers(_topicData, next); + }, function (teasers, next) { teasers.forEach(function(teaser, index) { if (teaser) { From 1d5635761163facac81c81f429ee94893c302914 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 28 Apr 2016 21:44:25 +0300 Subject: [PATCH 0142/1109] up composer --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3fa5776669..b2ddeaa09e 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "morgan": "^1.3.2", "mousetrap": "^1.5.3", "nconf": "~0.8.2", - "nodebb-plugin-composer-default": "3.0.26", + "nodebb-plugin-composer-default": "3.0.27", "nodebb-plugin-dbsearch": "1.0.1", "nodebb-plugin-emoji-one": "1.1.3", "nodebb-plugin-emoji-extended": "1.1.0", From 94432ff7960983e01842157c26c8e7e60e02ff7f Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 29 Apr 2016 10:04:22 +0300 Subject: [PATCH 0143/1109] closes #4582 remove leading / --- src/user/settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/user/settings.js b/src/user/settings.js index a1a21dd354..81b42d5c17 100644 --- a/src/user/settings.js +++ b/src/user/settings.js @@ -123,7 +123,7 @@ module.exports = function(User) { topicSearchEnabled: data.topicSearchEnabled, delayImageLoading: data.delayImageLoading, groupTitle: data.groupTitle, - homePageRoute: data.homePageCustom || data.homePageRoute, + homePageRoute: (data.homePageCustom || data.homePageRoute).replace(/^\//, ''), scrollToMyPost: data.scrollToMyPost }; From 2337f5d1490586d5f29880ce8261e155e2f320bf Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 29 Apr 2016 10:11:25 +0300 Subject: [PATCH 0144/1109] up persona --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b2ddeaa09e..7db0146496 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", "nodebb-theme-lavender": "3.0.9", - "nodebb-theme-persona": "4.0.125", + "nodebb-theme-persona": "4.0.126", "nodebb-theme-vanilla": "5.0.68", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", From 1cdd4eaaf532054fede724cf56ea0f6d4076321c Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Fri, 29 Apr 2016 09:02:28 -0400 Subject: [PATCH 0145/1109] Latest translations and fallbacks --- public/language/pl/email.json | 6 ++--- public/language/pl/error.json | 26 +++++++++++----------- public/language/pl/global.json | 18 +++++++-------- public/language/pl/groups.json | 4 ++-- public/language/pl/modules.json | 14 ++++++------ public/language/pl/notifications.json | 28 +++++++++++------------ public/language/pl/pages.json | 8 +++---- public/language/pl/topic.json | 18 +++++++-------- public/language/pl/unread.json | 6 ++--- public/language/pl/uploads.json | 8 +++---- public/language/pl/user.json | 32 +++++++++++++-------------- public/language/pl/users.json | 2 +- 12 files changed, 85 insertions(+), 85 deletions(-) diff --git a/public/language/pl/email.json b/public/language/pl/email.json index d48e458ece..5146cc5cd2 100644 --- a/public/language/pl/email.json +++ b/public/language/pl/email.json @@ -21,9 +21,9 @@ "digest.cta": "Kliknij, by odwiedzić %1", "digest.unsub.info": "To podsumowanie zostało wysłane zgodnie z Twoimi ustawieniami.", "digest.no_topics": "Nie było żadnych aktywnych tematów w ciągu ostatnich %1", - "digest.day": "day", - "digest.week": "week", - "digest.month": "month", + "digest.day": "dzień", + "digest.week": "tydzień", + "digest.month": "miesiąc", "digest.subject": "Digest for %1", "notif.chat.subject": "Nowa wiadomość czatu od %1", "notif.chat.cta": "Kliknij tutaj, by kontynuować konwersację", diff --git a/public/language/pl/error.json b/public/language/pl/error.json index cf4959c461..f36ce1a124 100644 --- a/public/language/pl/error.json +++ b/public/language/pl/error.json @@ -24,10 +24,10 @@ "confirm-email-already-sent": "Email potwierdzający został już wysłany, proszę odczekaj jeszcze %1 minut(y), aby wysłać kolejny.", "username-too-short": "Nazwa użytkownika za krótka", "username-too-long": "Zbyt długa nazwa użytkownika", - "password-too-long": "Password too long", + "password-too-long": "Hasło jest za długie", "user-banned": "Użytkownik zbanowany", "user-too-new": "Przepraszamy, musisz odczekać %1 sekund(y) przed utworzeniem pierwszego posta", - "blacklisted-ip": "Sorry, your IP address has been banned from this community. If you feel this is in error, please contact an administrator.", + "blacklisted-ip": "Twój adres IP został zablokowany na tej społeczności. Jeśli uważasz to za błąd, zgłoś to administratorowi", "no-category": "Kategoria nie istnieje", "no-topic": "Temat nie istnieje", "no-post": "Post nie istnieje", @@ -61,8 +61,8 @@ "group-name-too-short": "Nazwa grupy za krótka", "group-already-exists": "Grupa już istnieje", "group-name-change-not-allowed": "Nie można zmieniać nazwy tej grupy.", - "group-already-member": "Already part of this group", - "group-not-member": "Not a member of this group", + "group-already-member": "Już jesteś członkiem tej grupy", + "group-not-member": "Nie jesteś członkiem tej grupy", "group-needs-owner": "Ta grupa musi mieć przynajmniej jednego właściciela", "group-already-invited": "Ten użytkownik został już zaproszony", "group-already-requested": "Twoje podanie o członkostwo zostało już wysłane", @@ -78,14 +78,14 @@ "about-me-too-long": "Przepraszamy, twoja informacja o sobie nie może być dłuższa niż %1 znaków.", "cant-chat-with-yourself": "Nie możesz rozmawiać sam ze sobą!", "chat-restricted": "Ten użytkownik ograniczył swoje rozmowy. Musi cię śledzić, aby kontakt z nim był możliwy", - "chat-disabled": "Chat system disabled", + "chat-disabled": "System rozmów jest wyłączony", "too-many-messages": "Wysłałeś zbyt wiele wiadomości, prosimy chwilę poczekać.", "invalid-chat-message": "Nieprawidłowa wiadomość", "chat-message-too-long": "Wiadomość jest zbyt długa", - "cant-edit-chat-message": "You are not allowed to edit this message", + "cant-edit-chat-message": "Nie jesteś upoważniony do edycji tej wiadomości", "cant-remove-last-user": "You can't remove the last user", - "cant-delete-chat-message": "You are not allowed to delete this message", - "already-voting-for-this-post": "You have already voted for this post.", + "cant-delete-chat-message": "Nie jesteś upoważniony do usunięcia tej wiadomości", + "already-voting-for-this-post": "Już zagłosowałeś na ten post", "reputation-system-disabled": "System reputacji jest wyłączony.", "downvoting-disabled": "Negatywna ocena postów jest wyłączona", "not-enough-reputation-to-downvote": "Masz za mało reputacji, aby negatywnie ocenić ten post", @@ -96,9 +96,9 @@ "parse-error": "Coś poszło nie tak podczas przetwarzania odpowiedzi serwera", "wrong-login-type-email": "Zaloguj się używając adresu email", "wrong-login-type-username": "Zaloguj się używając nazwy użytkownika", - "invite-maximum-met": "You have invited the maximum amount of people (%1 out of %2).", - "no-session-found": "No login session found!", - "not-in-room": "User not in room", - "no-users-in-room": "No users in this room", - "cant-kick-self": "You can't kick yourself from the group" + "invite-maximum-met": "Zaprosiłeś maksymalną ilość osób (%1 z %2).", + "no-session-found": "Nie znaleziono sesji logowania", + "not-in-room": "Użytkownik nie jest w pokoju", + "no-users-in-room": "Brak użytkowników w pokoju", + "cant-kick-self": "Nie możesz wyrzucić samego siebie z grupy" } \ No newline at end of file diff --git a/public/language/pl/global.json b/public/language/pl/global.json index 2aba9da79d..24825d2e75 100644 --- a/public/language/pl/global.json +++ b/public/language/pl/global.json @@ -49,7 +49,7 @@ "users": "Użytkownicy", "topics": "Tematy", "posts": "Posty", - "best": "Best", + "best": "Najlepsze", "upvoted": "Upvoted", "downvoted": "Downvoted", "views": "wyświetleń", @@ -65,7 +65,7 @@ "posted_in_ago_by": "wysłany w %1 %2 przez %3", "user_posted_ago": "%1 wysłał %2", "guest_posted_ago": "Gość wysłał %1", - "last_edited_by": "last edited by %1", + "last_edited_by": "ostatnio edytowany przez %1", "norecentposts": "Brak ostatnich postów", "norecenttopics": "Brak Ostatnich Tematów", "recentposts": "Ostatnie posty", @@ -81,14 +81,14 @@ "updated.title": "Forum zaktualizowane", "updated.message": "To forum zostało zaktualizowane do najnowszej wersji. Kliknij tutaj by odświeżyć stronę", "privacy": "Prywatność", - "follow": "Obserwuj", + "follow": "Śledź", "unfollow": "Przestań śledzić", "delete_all": "Usuń wszystko", "map": "Mapa", - "sessions": "Login Sessions", - "ip_address": "IP Address", - "enter_page_number": "Enter page number", - "upload_file": "Upload file", - "upload": "Upload", - "allowed-file-types": "Allowed file types are %1" + "sessions": "Sesje logowania", + "ip_address": "Adres IP", + "enter_page_number": "Wpisz numer strony", + "upload_file": "Załaduj plik", + "upload": "Załaduj", + "allowed-file-types": "Dozwolone typy plików %1" } \ No newline at end of file diff --git a/public/language/pl/groups.json b/public/language/pl/groups.json index 845409bb43..8fdb1b3f9b 100644 --- a/public/language/pl/groups.json +++ b/public/language/pl/groups.json @@ -41,7 +41,7 @@ "details.hidden": "Ukryty", "details.hidden_help": "Jeśli aktywowane, ta grupa nie będzie widoczna w wykazie grup, a użytkownicy będą musieli być zapraszani manualnie.", "details.delete_group": "Usuń Grupę", - "details.private_system_help": "Private groups is disabled at system level, this option does not do anything", + "details.private_system_help": "Prywatne grupy zostały zablokowane w systemie, ta opcja nic nie zmienia.", "event.updated": "Dane grupy zostały zaktualizowane", "event.deleted": "Grupa \"%1\" została skasowana", "membership.accept-invitation": "Przyjmij Zaproszenie", @@ -50,5 +50,5 @@ "membership.leave-group": "Opuść Grupę", "membership.reject": "Odrzuć", "new-group.group_name": "Nazwa Grupy:", - "upload-group-cover": "Upload group cover" + "upload-group-cover": "Załaduj zdjęcie tła grupy" } \ No newline at end of file diff --git a/public/language/pl/modules.json b/public/language/pl/modules.json index ea0d3c2c10..4ae07a0b74 100644 --- a/public/language/pl/modules.json +++ b/public/language/pl/modules.json @@ -6,9 +6,9 @@ "chat.user_typing": "%1 pisze...", "chat.user_has_messaged_you": "%1 napisał do Ciebie", "chat.see_all": "Zobacz wszystkie rozmowy", - "chat.mark_all_read": "Mark all chats read", + "chat.mark_all_read": "Oznacz wszystkie rozmowy jako przeczytane", "chat.no-messages": "Wybierz odbiorcę, by wyświetlić historię rozmów.", - "chat.no-users-in-room": "No users in this room", + "chat.no-users-in-room": "Brak użytkowników w tym pokoju", "chat.recent-chats": "Ostatnie rozmowy", "chat.contacts": "Kontakty", "chat.message-history": "Historia wiadomości", @@ -17,7 +17,7 @@ "chat.seven_days": "7 dni", "chat.thirty_days": "30 dni", "chat.three_months": "3 miesiące", - "chat.delete_message_confirm": "Are you sure you wish to delete this message?", + "chat.delete_message_confirm": "Jesteś pewny, że chcesz usunąć tą wiadomość?", "chat.roomname": "Chat Room %1", "chat.add-users-to-room": "Add users to room", "composer.compose": "Twórz", @@ -28,11 +28,11 @@ "composer.discard": "Na pewno chcesz porzucić ten post?", "composer.submit_and_lock": "Prześlij i Zablokuj", "composer.toggle_dropdown": "Przełącz Listę Rozwijaną", - "composer.uploading": "Uploading %1", + "composer.uploading": "Wysyłanie %1", "bootbox.ok": "OK", "bootbox.cancel": "Anuluj", "bootbox.confirm": "Potwierdź", - "cover.dragging_title": "Cover Photo Positioning", - "cover.dragging_message": "Drag the cover photo to the desired position and click \"Save\"", - "cover.saved": "Cover photo image and position saved" + "cover.dragging_title": "Pozycjonowanie tła", + "cover.dragging_message": "Przeciągnij i upuść zdjęcie na żądanym miejscu, po zakończeniu kliknij \"Zapisz\"", + "cover.saved": "Tło zapisane" } \ No newline at end of file diff --git a/public/language/pl/notifications.json b/public/language/pl/notifications.json index 5873b93a47..e049560a7d 100644 --- a/public/language/pl/notifications.json +++ b/public/language/pl/notifications.json @@ -5,7 +5,7 @@ "mark_all_read": "Oznacz wszystkie powiadomienia jako przeczytane", "back_to_home": "Wróć do %1", "outgoing_link": "Łącze wychodzące", - "outgoing_link_message": "You are now leaving %1", + "outgoing_link_message": "Opuszczasz %1", "continue_to": "Kontynuuj do %1", "return_to": "Wróć do %1", "new_notification": "Nowe powiadomienie", @@ -14,23 +14,23 @@ "upvoted_your_post_in": "%1 zagłosował na Twój post w %2", "upvoted_your_post_in_dual": "%1 and %2 have upvoted your post in %3.", "upvoted_your_post_in_multiple": "%1 and %2 others have upvoted your post in %3.", - "moved_your_post": "%1 has moved your post to %2", - "moved_your_topic": "%1 has moved %2", - "favourited_your_post_in": "%1 has bookmarked your post in %2.", - "favourited_your_post_in_dual": "%1 and %2 have bookmarked your post in %3.", - "favourited_your_post_in_multiple": "%1 and %2 others have bookmarked your post in %3.", + "moved_your_post": "%1 przeniósł twoj post do %2", + "moved_your_topic": "%1 przeniósł %2", + "favourited_your_post_in": "%1 dodał do ulubionych twoj post w %2.", + "favourited_your_post_in_dual": "%1 oraz %2 dodali do ulubionych twój post w %3.", + "favourited_your_post_in_multiple": "%1 oraz %2 innych dodali do ulubionych twój post w %3.", "user_flagged_post_in": "%1 oflagował Twój post w %2", - "user_flagged_post_in_dual": "%1 and %2 flagged a post in %3", - "user_flagged_post_in_multiple": "%1 and %2 others flagged a post in %3", + "user_flagged_post_in_dual": "%1 oraz %2 oflagowali post w %3", + "user_flagged_post_in_multiple": "%1 oraz %2 innych oflagowali post w %3", "user_posted_to": "%1 dodał odpowiedź do %2", - "user_posted_to_dual": "%1 and %2 have posted replies to: %3", - "user_posted_to_multiple": "%1 and %2 others have posted replies to: %3", + "user_posted_to_dual": "%1 oraz %2 dodali odpowiedzi do %3", + "user_posted_to_multiple": "%1 oraz %2 innych dodali odpowiedzi do %3", "user_posted_topic": "%1 wysłał nowy temat: %2", - "user_started_following_you": "%1 zaczął Cię śledzić.", - "user_started_following_you_dual": "%1 and %2 started following you.", - "user_started_following_you_multiple": "%1 and %2 others started following you.", + "user_started_following_you": "%1 zaczął obserwować ciebie.", + "user_started_following_you_dual": "%1 oraz %2 obserwuje ciebie.", + "user_started_following_you_multiple": "%1 oraz %2 innych obserwuje ciebie.", "new_register": "%1 wysłał żądanie rejestracji.", - "new_register_multiple": "There are %1 registration requests awaiting review.", + "new_register_multiple": "Są %1 nowe żądania rejestracji.", "email-confirmed": "E-mail potwierdzony", "email-confirmed-message": "Dziękujemy za potwierdzenie maila. Twoje konto zostało aktywowane.", "email-confirm-error-message": "Wystąpił problem przy aktywacji, - kod jest błędny lub przestarzały", diff --git a/public/language/pl/pages.json b/public/language/pl/pages.json index a9def8e4aa..d589d920f5 100644 --- a/public/language/pl/pages.json +++ b/public/language/pl/pages.json @@ -33,14 +33,14 @@ "account/posts": "Posty napisane przez %1", "account/topics": "Tematy stworzone przez %1", "account/groups": "Grupy %1", - "account/favourites": "%1's Bookmarked Posts", + "account/favourites": "%1 - ulubione posty", "account/settings": "Ustawienia Użytkownika", "account/watched": "Tematy obserwowane przez %1", "account/upvoted": "Posts upvoted by %1", "account/downvoted": "Posts downvoted by %1", - "account/best": "Best posts made by %1", - "confirm": "Email Confirmed", + "account/best": "Najlepsze posty od %1", + "confirm": "E-mail potwierdzony", "maintenance.text": "Obecnie trwają prace konserwacyjne nad %1. Proszę wrócić później.", "maintenance.messageIntro": "Dodatkowo, administrator zostawił wiadomość:", - "throttled.text": "%1 is currently unavailable due to excessive load. Please come back another time." + "throttled.text": "%1 jest niedostępny z powodu obciążenia. Proszę wrócić później." } \ No newline at end of file diff --git a/public/language/pl/topic.json b/public/language/pl/topic.json index 4b77e033e6..31184759de 100644 --- a/public/language/pl/topic.json +++ b/public/language/pl/topic.json @@ -34,8 +34,8 @@ "not_following_topic.message": "Nie będziesz już otrzymywał powiadomień z tego tematu.", "login_to_subscribe": "Zaloguj się, aby subskrybować ten temat.", "markAsUnreadForAll.success": "Temat oznaczony jako nieprzeczytany dla wszystkich.", - "mark_unread": "Mark unread", - "mark_unread.success": "Topic marked as unread.", + "mark_unread": "Oznacz jako nieprzeczytany", + "mark_unread.success": "Temat oznaczony jako nieprzeczytany.", "watch": "Obserwuj", "unwatch": "Nie obserwuj", "watch.title": "Otrzymuj powiadomienia o nowych odpowiedziach w tym temacie", @@ -65,9 +65,9 @@ "disabled_categories_note": "Zablokowane kategorie zostały wyszarzone.", "confirm_move": "Przenieś", "confirm_fork": "Skopiuj", - "favourite": "Bookmark", - "favourites": "Bookmarks", - "favourites.has_no_favourites": "You haven't bookmarked any posts yet.", + "favourite": "Ulubione", + "favourites": "Ulubione", + "favourites.has_no_favourites": "Nie masz jeszcze ulubionych postów.", "loading_more_posts": "Załaduj więcej postów", "move_topic": "Przenieś Temat", "move_topics": "Przenieś Tematy", @@ -78,7 +78,7 @@ "fork_topic_instruction": "Zaznacz posty, które chcesz sklonować", "fork_no_pids": "Nie zaznaczyłeś żadnych postów!", "fork_success": "Udało się skopiować temat. Kliknij tutaj, aby do niego przejść.", - "delete_posts_instruction": "Click the posts you want to delete/purge", + "delete_posts_instruction": "Kliknij na posty, które chcesz usunąć", "composer.title_placeholder": "Wpisz tutaj tytuł tematu...", "composer.handle_placeholder": "Nazwa", "composer.discard": "Odrzuć", @@ -101,12 +101,12 @@ "newest_to_oldest": "Najpierw najnowsze", "most_votes": "Najwięcej głosów", "most_posts": "Najwięcej postów", - "stale.title": "Create new topic instead?", + "stale.title": "Stworzyć nowy temat?", "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", - "stale.create": "Create a new topic", + "stale.create": "Stwórz nowy temat", "stale.reply_anyway": "Reply to this topic anyway", "link_back": "Re: [%1](%2)", "spam": "Spam", - "offensive": "Offensive", + "offensive": "Obrażliwy", "custom-flag-reason": "Enter a flagging reason" } \ No newline at end of file diff --git a/public/language/pl/unread.json b/public/language/pl/unread.json index 521a5148b8..872ae755d1 100644 --- a/public/language/pl/unread.json +++ b/public/language/pl/unread.json @@ -7,7 +7,7 @@ "all": "Wszystkie", "all_categories": "Wszystkie kategorie", "topics_marked_as_read.success": "Tematy zostały oznaczone jako przeczytane!", - "all-topics": "All Topics", - "new-topics": "New Topics", - "watched-topics": "Watched Topics" + "all-topics": "Wszystkie tematy", + "new-topics": "Nowe tematy", + "watched-topics": "Obserwowane tematy" } \ No newline at end of file diff --git a/public/language/pl/uploads.json b/public/language/pl/uploads.json index 1622cb5693..f29dc364f2 100644 --- a/public/language/pl/uploads.json +++ b/public/language/pl/uploads.json @@ -1,6 +1,6 @@ { - "uploading-file": "Uploading the file...", - "select-file-to-upload": "Select a file to upload!", - "upload-success": "File uploaded successfully!", - "maximum-file-size": "Maximum %1 kb" + "uploading-file": "Wysyłanie pliku...", + "select-file-to-upload": "Zaznacz plik do wgrania!", + "upload-success": "Pomyślnie załadowano plik!", + "maximum-file-size": "Maksymalna wielkość %1 kb" } \ No newline at end of file diff --git a/public/language/pl/user.json b/public/language/pl/user.json index a8fb571c64..3b95dbcb27 100644 --- a/public/language/pl/user.json +++ b/public/language/pl/user.json @@ -22,25 +22,25 @@ "profile": "Profil", "profile_views": "wyświetleń", "reputation": "reputacji", - "favourites": "Bookmarks", + "favourites": "Ulubione", "watched": "Obserwowane", - "followers": "Obserwujących", - "following": "Obserwowanych", + "followers": "Śledzących", + "following": "Śledzonych", "aboutme": "O mnie", "signature": "Sygnatura", "birthday": "Urodziny", "chat": "Rozmawiaj", - "chat_with": "Chat with %1", + "chat_with": "Rozmawiaj z %1", "follow": "Śledź", "unfollow": "Przestań śledzić", "more": "Więcej", "profile_update_success": "Profil został zaktualizowany pomyślnie!", "change_picture": "Zmień zdjęcie", - "change_username": "Change Username", - "change_email": "Change Email", + "change_username": "Zmień nazwę użytkownika", + "change_email": "Zmień adres e-mail", "edit": "Edytuj", - "edit-profile": "Edit Profile", - "default_picture": "Default Icon", + "edit-profile": "Edytuj profil", + "default_picture": "Domyślna ikona", "uploaded_picture": "Przesłane zdjęcie", "upload_new_picture": "Prześlij nowe zdjęcie", "upload_new_picture_from_url": "Wgraj zdjęcie z adresu URL", @@ -56,11 +56,11 @@ "password": "Hasło", "username_taken_workaround": "Wybrany login jest już zajęty, więc zmieniliśmy go trochę. Proponujemy %1", "password_same_as_username": "Twoje hasło jest takie samo jak nazwa użytkownika, prosimy wybrać inne hasło.", - "password_same_as_email": "Your password is the same as your email, please select another password.", + "password_same_as_email": "Twoje hasło jest takie samo jak adres e-mail, prosimy wybrać inne hasło.", "upload_picture": "Prześlij zdjęcie", "upload_a_picture": "Prześlij zdjęcie", "remove_uploaded_picture": "Usuń Przesłane Zdjęcie", - "upload_cover_picture": "Upload cover picture", + "upload_cover_picture": "Prześlij zdjęcie tła", "settings": "Ustawienia", "show_email": "Wyświetlaj mój adres e-mail", "show_fullname": "Wyświetlaj moją pełną nazwę", @@ -74,8 +74,8 @@ "send_chat_notifications": "Wyślij e-maila, jeśli dostanę nową wiadomość, a nie jestem on-line", "send_post_notifications": "Wyślij email, kiedy w tematach, które subskrybuję pojawią się odpowiedzi", "settings-require-reload": "Niektóre zmiany ustawień wymagają przeładowania. Kliknij tutaj, aby przeładować stronę.", - "has_no_follower": "Ten użytkownik nie ma jeszcze żadnych obserwujących", - "follows_no_one": "Użytkownik jeszcze nikogo nie obsweruje.", + "has_no_follower": "Ten użytkownik nie ma jeszcze żadnych śledzących", + "follows_no_one": "Użytkownik jeszcze nikogo nie śledzi.", "has_no_posts": "Ten użytkownik nic jeszcze nie napisał.", "has_no_topics": "Ten użytkownik nie stworzył jeszcze żadnych tematów.", "has_no_watched_topics": "Ten użytkownik nie obserwuje jeszcze żadnych tematów.", @@ -92,12 +92,12 @@ "open_links_in_new_tab": "Otwieraj linki wychodzące w nowej karcie", "enable_topic_searching": "Odblokuj szukanie w temacie", "topic_search_help": "Jeśli włączone, wyszukiwanie w tematach zastąpi przeglądarkowe przeszukiwanie strony i pozwoli na przeszukanie całego tematu, zamiast ograniczonej zawartości aktualnie wyświetlonej na ekranie", - "delay_image_loading": "Delay Image Loading", - "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", - "scroll_to_my_post": "After posting a reply, show the new post", + "delay_image_loading": "Opóźnienie ładowania zdjęcia", + "image_load_delay_help": "Jeśli włączone, zdjęcia w temacie nie załadują się dopóki nie najedzie się", + "scroll_to_my_post": "Po napisaniu odpowiedzi, wyświetl najnowsze posty", "follow_topics_you_reply_to": "Śledź tematy, na które odpowiadasz", "follow_topics_you_create": "Śledź tematy, które tworzysz", - "grouptitle": "Group Title", + "grouptitle": "Tytuł grupy", "no-group-title": "Brak tytułu grupy", "select-skin": "Wybierz Skórkę", "select-homepage": "Select a Homepage", diff --git a/public/language/pl/users.json b/public/language/pl/users.json index f21c62380a..90e4ecb593 100644 --- a/public/language/pl/users.json +++ b/public/language/pl/users.json @@ -16,5 +16,5 @@ "unread_topics": "Nieprzeczytane Tematy", "categories": "Kategorie", "tags": "Tagi", - "no-users-found": "No users found!" + "no-users-found": "Nie znaleziono pasujących użytkowników!" } \ No newline at end of file From bd8fcb527b75d17886b727bc3aaec19237ed2d89 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 29 Apr 2016 12:54:53 -0400 Subject: [PATCH 0146/1109] closes #4583 --- src/notifications.js | 15 ++++++++++++ src/posts/flags.js | 19 ++++++++-------- src/upgrade.js | 48 ++++++++++++++++++++++++++++++++++++++- src/user/notifications.js | 1 + 4 files changed, 72 insertions(+), 11 deletions(-) diff --git a/src/notifications.js b/src/notifications.js index ebf2d20585..8a6b41d303 100644 --- a/src/notifications.js +++ b/src/notifications.js @@ -81,6 +81,21 @@ var plugins = require('./plugins'); }); }; + Notifications.filterExists = function(nids, callback) { + // Removes nids that have been pruned + db.isSortedSetMembers('notifications', nids, function(err, exists) { + if (err) { + return callbacK(err); + } + + nids = nids.filter(function(notifId, idx) { + return exists[idx]; + }); + + callback(null, nids); + }); + }; + Notifications.findRelated = function(mergeIds, set, callback) { // A related notification is one in a zset that has the same mergeId var _nids; diff --git a/src/posts/flags.js b/src/posts/flags.js index 3adb6541f2..2334032ddd 100644 --- a/src/posts/flags.js +++ b/src/posts/flags.js @@ -67,13 +67,17 @@ module.exports = function(Posts) { } Posts.dismissFlag = function(pid, callback) { + var uid; + async.parallel([ function(next) { - db.getObjectField('post:' + pid, 'uid', function(err, uid) { + db.getObjectField('post:' + pid, 'uid', function(err, _uid) { if (err) { return next(err); } + uid = _uid; + db.sortedSetsRemove([ 'posts:flagged', 'posts:flags:count', @@ -81,15 +85,10 @@ module.exports = function(Posts) { ], pid, next); }); }, - function(next) { - db.deleteObjectField('post:' + pid, 'flags', next); - }, - function(next) { - db.delete('pid:' + pid + ':flag:uids', next); - }, - function(next) { - db.delete('pid:' + pid + ':flag:uid:reason', next); - } + async.apply(db.deleteObjectField, 'post:' + pid, 'flags'), + async.apply(db.delete, 'pid:' + pid + ':flag:uids'), + async.apply(db.delete, 'pid:' + pid + ':flag:uid:reason'), + async.apply(db.sortedSetRemove, 'notifications', 'post_flag:' + pid + ':uid:' + uid) ], function(err) { callback(err); }); diff --git a/src/upgrade.js b/src/upgrade.js index 36f5c14b39..87d2dc7c78 100644 --- a/src/upgrade.js +++ b/src/upgrade.js @@ -10,7 +10,7 @@ var db = require('./database'), schemaDate, thisSchemaDate, // IMPORTANT: REMEMBER TO UPDATE VALUE OF latestSchema - latestSchema = Date.UTC(2016, 3, 18); + latestSchema = Date.UTC(2016, 3, 29); Upgrade.check = function(callback) { db.get('schemaDate', function(err, value) { @@ -530,6 +530,52 @@ Upgrade.upgrade = function(callback) { winston.info('[2016/04/19] Users post count per tid skipped!'); next(); } + }, + function(next) { + thisSchemaDate = Date.UTC(2016, 3, 29); + + if (schemaDate < thisSchemaDate) { + updatesMade = true; + winston.info('[2016/04/29] Dismiss flags from deleted topics'); + + var posts = require('./posts'), + topics = require('./topics'); + + var pids, tids; + + async.waterfall([ + async.apply(db.getSortedSetRange, 'posts:flagged', 0, -1), + function(_pids, next) { + pids = _pids; + posts.getPostsFields(pids, ['tid'], next); + }, + function(_tids, next) { + tids = _tids.map(function(a) { + return a.tid; + }); + + topics.getTopicsFields(tids, ['deleted'], next); + }, + function(state, next) { + var toDismiss = state.map(function(a, idx) { + return parseInt(a.deleted, 10) === 1 ? pids[idx] : null; + }).filter(Boolean); + + winston.info('[2016/04/29] ' + toDismiss.length + ' dismissable flags found'); + async.each(toDismiss, posts.dismissFlag, next); + } + ], function(err) { + if (err) { + return next(err); + } + + winston.info('[2016/04/29] Dismiss flags from deleted topics done'); + Upgrade.update(thisSchemaDate, next); + }); + } else { + winston.info('[2016/04/29] Dismiss flags from deleted topics skipped!'); + next(); + } } // Add new schema updates here // IMPORTANT: REMEMBER TO UPDATE VALUE OF latestSchema IN LINE 24!!! diff --git a/src/user/notifications.js b/src/user/notifications.js index 9ad100db2b..2f766a72de 100644 --- a/src/user/notifications.js +++ b/src/user/notifications.js @@ -211,6 +211,7 @@ var async = require('async'), // Collapse any notifications with identical mergeIds async.waterfall([ async.apply(db.getSortedSetRevRange, 'uid:' + uid + ':notifications:unread', 0, 99), + async.apply(notifications.filterExists), function(nids, next) { var keys = nids.map(function(nid) { return 'notifications:' + nid; From cb1920d45a26768d4f10493c32736996e3adcd97 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 29 Apr 2016 13:34:49 -0400 Subject: [PATCH 0147/1109] properly fixing #4583 --- src/posts/flags.js | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/posts/flags.js b/src/posts/flags.js index 2334032ddd..2590d68811 100644 --- a/src/posts/flags.js +++ b/src/posts/flags.js @@ -85,10 +85,24 @@ module.exports = function(Posts) { ], pid, next); }); }, + function(next) { + async.series([ + function(next) { + db.getSortedSetRange('pid:' + pid + ':flag:uids', 0, -1, function(err, uids) { + 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:uids'), - async.apply(db.delete, 'pid:' + pid + ':flag:uid:reason'), - async.apply(db.sortedSetRemove, 'notifications', 'post_flag:' + pid + ':uid:' + uid) + async.apply(db.delete, 'pid:' + pid + ':flag:uid:reason') ], function(err) { callback(err); }); From 5e5e46e95fd91c6b0b0db0b016b108281833991b Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 29 Apr 2016 20:35:49 +0300 Subject: [PATCH 0148/1109] closes #4499 --- src/categories/recentreplies.js | 17 ++++---- src/groups.js | 4 +- src/posts.js | 16 ++++---- src/posts/category.js | 6 +-- src/posts/summary.js | 23 ++++++----- src/privileges/categories.js | 28 +++++++------ src/privileges/posts.js | 69 +++++++++++++++++++++++++-------- src/privileges/topics.js | 66 +++++++++++++------------------ src/socket.io/posts.js | 4 +- 9 files changed, 131 insertions(+), 102 deletions(-) diff --git a/src/categories/recentreplies.js b/src/categories/recentreplies.js index 9651a49c20..f03f65e256 100644 --- a/src/categories/recentreplies.js +++ b/src/categories/recentreplies.js @@ -1,17 +1,18 @@ 'use strict'; -var async = require('async'), - winston = require('winston'), - validator = require('validator'), - _ = require('underscore'), +var async = require('async'); +var winston = require('winston'); +var validator = require('validator'); +var _ = require('underscore'); - db = require('../database'), - posts = require('../posts'), - topics = require('../topics'), - privileges = require('../privileges'); +var db = require('../database'); +var posts = require('../posts'); +var topics = require('../topics'); +var privileges = require('../privileges'); module.exports = function(Categories) { + Categories.getRecentReplies = function(cid, uid, count, callback) { if (!parseInt(count, 10)) { return callback(null, []); diff --git a/src/groups.js b/src/groups.js index 2df5dc3ce2..e572c30110 100644 --- a/src/groups.js +++ b/src/groups.js @@ -349,7 +349,9 @@ var utils = require('../public/src/utils'); Groups.getLatestMemberPosts = function(groupName, max, uid, callback) { async.waterfall([ - async.apply(Groups.getMembers, groupName, 0, -1), + function(next) { + Groups.getMembers(groupName, 0, -1, next); + }, function(uids, next) { if (!Array.isArray(uids) || !uids.length) { return callback(null, []); diff --git a/src/posts.js b/src/posts.js index a3d19e7a7f..c4703f8ae7 100644 --- a/src/posts.js +++ b/src/posts.js @@ -1,14 +1,14 @@ 'use strict'; -var async = require('async'), - _ = require('underscore'), +var async = require('async'); +var _ = require('underscore'); - db = require('./database'), - utils = require('../public/src/utils'), - user = require('./user'), - topics = require('./topics'), - privileges = require('./privileges'), - plugins = require('./plugins'); +var db = require('./database'); +var utils = require('../public/src/utils'); +var user = require('./user'); +var topics = require('./topics'); +var privileges = require('./privileges'); +var plugins = require('./plugins'); (function(Posts) { diff --git a/src/posts/category.js b/src/posts/category.js index 68ae42474b..2d8fd97cc0 100644 --- a/src/posts/category.js +++ b/src/posts/category.js @@ -1,8 +1,8 @@ 'use strict'; -var async = require('async'), - topics = require('../topics'); +var async = require('async'); +var topics = require('../topics'); module.exports = function(Posts) { @@ -13,7 +13,7 @@ module.exports = function(Posts) { }, function(tid, next) { topics.getTopicField(tid, 'cid', next); - } + } ], callback); }; diff --git a/src/posts/summary.js b/src/posts/summary.js index 3cb5586bc6..60da66ecad 100644 --- a/src/posts/summary.js +++ b/src/posts/summary.js @@ -1,15 +1,15 @@ 'use strict'; -var async = require('async'), - validator = require('validator'), - S = require('string'), +var async = require('async'); +var validator = require('validator'); +var S = require('string'); - db = require('../database'), - user = require('../user'), - plugins = require('../plugins'), - categories = require('../categories'), - utils = require('../../public/src/utils'); +var db = require('../database'); +var user = require('../user'); +var plugins = require('../plugins'); +var categories = require('../categories'); +var utils = require('../../public/src/utils'); module.exports = function(Posts) { @@ -30,9 +30,7 @@ module.exports = function(Posts) { return callback(err); } - posts = posts.filter(function(p) { - return !!p && parseInt(p.deleted, 10) !== 1; - }); + posts = posts.filter(Boolean); var uids = [], topicKeys = []; for(var i=0; i Date: Fri, 29 Apr 2016 20:37:41 +0300 Subject: [PATCH 0149/1109] up persona --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7db0146496..68fffbbf7a 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", "nodebb-theme-lavender": "3.0.9", - "nodebb-theme-persona": "4.0.126", + "nodebb-theme-persona": "4.0.127", "nodebb-theme-vanilla": "5.0.68", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", From 2e2c8b8e778958385f8a1516d1a9ef17b80058c0 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 29 Apr 2016 13:46:07 -0400 Subject: [PATCH 0150/1109] fixes #4584 --- src/middleware/admin.js | 3 ++- src/views/admin/header.tpl | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/middleware/admin.js b/src/middleware/admin.js index ceeabdca99..2ee0f7fd80 100644 --- a/src/middleware/admin.js +++ b/src/middleware/admin.js @@ -112,7 +112,8 @@ middleware.renderHeader = function(req, res, data, next) { scripts: results.scripts, 'cache-buster': meta.config['cache-buster'] ? 'v=' + meta.config['cache-buster'] : '', env: process.env.NODE_ENV ? true : false, - title: (acpPath || 'Dashboard') + ' | NodeBB Admin Control Panel' + title: (acpPath || 'Dashboard') + ' | NodeBB Admin Control Panel', + bodyClass: data.bodyClass }; templateValues.template = {name: res.locals.template}; diff --git a/src/views/admin/header.tpl b/src/views/admin/header.tpl index 476ebda7a6..1160e135bf 100644 --- a/src/views/admin/header.tpl +++ b/src/views/admin/header.tpl @@ -60,6 +60,6 @@ - +
    \ No newline at end of file From 5ff5a01c4f97e0f05d050828a03ddaec629d8157 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 29 Apr 2016 22:33:03 +0300 Subject: [PATCH 0151/1109] check for invalid topic --- src/privileges/posts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/privileges/posts.js b/src/privileges/posts.js index 6096c1f552..6270b6e99e 100644 --- a/src/privileges/posts.js +++ b/src/privileges/posts.js @@ -112,7 +112,7 @@ module.exports = function(privileges) { pids = postData.filter(function(post) { - return cids.indexOf(post.topic.cid) !== -1 && + return post.topic && cids.indexOf(post.topic.cid) !== -1 && ((parseInt(post.topic.deleted, 10) !== 1 && parseInt(post.deleted, 10) !== 1) || results.isAdmin || isModOf[post.cid]); }).map(function(post) { return post.pid; From 25f3a31ff14e93fa523213fbd412448a2af1ee8e Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sat, 30 Apr 2016 10:47:28 +0300 Subject: [PATCH 0152/1109] closes #4587 --- install/data/defaults.json | 3 +- src/controllers/categories.js | 49 ++++++------- src/controllers/category.js | 109 ++++++++++++++--------------- src/controllers/groups.js | 37 +++++----- src/controllers/index.js | 41 +++++------ src/controllers/popular.js | 22 +++--- src/controllers/recent.js | 29 +++----- src/controllers/search.js | 21 +++--- src/controllers/topics.js | 7 +- src/controllers/unread.js | 70 +++++++++---------- src/controllers/users.js | 27 +++----- src/middleware/render.js | 126 ++++++++++++++++++---------------- src/navigation/admin.js | 7 +- src/topics/popular.js | 6 +- 14 files changed, 257 insertions(+), 297 deletions(-) diff --git a/install/data/defaults.json b/install/data/defaults.json index 4ddf385e8a..c471db6b89 100644 --- a/install/data/defaults.json +++ b/install/data/defaults.json @@ -34,5 +34,6 @@ "teaserPost": "last-reply", "allowPrivateGroups": 1, "unreadCutoff": 2, - "bookmarkThreshold": 5 + "bookmarkThreshold": 5, + "topicsPerList": 20 } diff --git a/src/controllers/categories.js b/src/controllers/categories.js index aa882b9b43..7e3e4b0efe 100644 --- a/src/controllers/categories.js +++ b/src/controllers/categories.js @@ -1,14 +1,11 @@ "use strict"; - var async = require('async'); var nconf = require('nconf'); var validator = require('validator'); var categories = require('../categories'); var meta = require('../meta'); -var plugins = require('../plugins'); - var helpers = require('./helpers'); var categoriesController = {}; @@ -51,34 +48,32 @@ categoriesController.list = function(req, res, next) { categories.flattenCategories(allCategories, categoryData); categories.getRecentTopicReplies(allCategories, req.uid, next); - }, - function (next) { - var data = { - title: '[[pages:categories]]', - categories: categoryData - }; - - if (req.path.startsWith('/api/categories') || req.path.startsWith('/categories')) { - data.breadcrumbs = helpers.buildBreadcrumbs([{text: data.title}]); - } - - data.categories.forEach(function(category) { - if (category && Array.isArray(category.posts) && category.posts.length) { - category.teaser = { - url: nconf.get('relative_path') + '/topic/' + category.posts[0].topic.slug + '/' + category.posts[0].index, - timestampISO: category.posts[0].timestampISO, - pid: category.posts[0].pid - }; - } - }); - - plugins.fireHook('filter:categories.build', {req: req, res: res, templateData: data}, next); } - ], function(err, data) { + ], function(err) { if (err) { return next(err); } - res.render('categories', data.templateData); + + var data = { + title: '[[pages:categories]]', + categories: categoryData + }; + + if (req.path.startsWith('/api/categories') || req.path.startsWith('/categories')) { + data.breadcrumbs = helpers.buildBreadcrumbs([{text: data.title}]); + } + + data.categories.forEach(function(category) { + if (category && Array.isArray(category.posts) && category.posts.length) { + category.teaser = { + url: nconf.get('relative_path') + '/topic/' + category.posts[0].topic.slug + '/' + category.posts[0].index, + timestampISO: category.posts[0].timestampISO, + pid: category.posts[0].pid + }; + } + }); + + res.render('categories', data); }); }; diff --git a/src/controllers/category.js b/src/controllers/category.js index f80ad122a7..f2bc7510c6 100644 --- a/src/controllers/category.js +++ b/src/controllers/category.js @@ -9,7 +9,6 @@ var privileges = require('../privileges'); var user = require('../user'); var categories = require('../categories'); var meta = require('../meta'); -var plugins = require('../plugins'); var pagination = require('../pagination'); var helpers = require('./helpers'); var utils = require('../../public/src/utils'); @@ -143,65 +142,63 @@ categoryController.get = function(req, res, callback) { categories.getRecentTopicReplies(allCategories, req.uid, function(err) { next(err, categoryData); }); - }, - function (categoryData, next) { - categoryData.privileges = userPrivileges; - categoryData.showSelect = categoryData.privileges.editable; - - res.locals.metaTags = [ - { - name: 'title', - content: categoryData.name - }, - { - property: 'og:title', - content: categoryData.name - }, - { - name: 'description', - content: categoryData.description - }, - { - property: "og:type", - content: 'website' - } - ]; - - if (categoryData.backgroundImage) { - res.locals.metaTags.push({ - name: 'og:image', - content: categoryData.backgroundImage - }); - } - - res.locals.linkTags = [ - { - rel: 'alternate', - type: 'application/rss+xml', - href: nconf.get('url') + '/category/' + cid + '.rss' - }, - { - rel: 'up', - href: nconf.get('url') - } - ]; - - categoryData['feeds:disableRSS'] = parseInt(meta.config['feeds:disableRSS'], 10) === 1; - categoryData.rssFeedUrl = nconf.get('relative_path') + '/category/' + categoryData.cid + '.rss'; - categoryData.title = categoryData.name; - categoryData.pagination = pagination.create(currentPage, pageCount); - categoryData.pagination.rel.forEach(function(rel) { - rel.href = nconf.get('url') + '/category/' + categoryData.slug + rel.href; - res.locals.linkTags.push(rel); - }); - - plugins.fireHook('filter:category.build', {req: req, res: res, templateData: categoryData}, next); } - ], function (err, data) { + ], function (err, categoryData) { if (err) { return callback(err); } - res.render('category', data.templateData); + + categoryData.privileges = userPrivileges; + categoryData.showSelect = categoryData.privileges.editable; + + res.locals.metaTags = [ + { + name: 'title', + content: categoryData.name + }, + { + property: 'og:title', + content: categoryData.name + }, + { + name: 'description', + content: categoryData.description + }, + { + property: "og:type", + content: 'website' + } + ]; + + if (categoryData.backgroundImage) { + res.locals.metaTags.push({ + name: 'og:image', + content: categoryData.backgroundImage + }); + } + + res.locals.linkTags = [ + { + rel: 'alternate', + type: 'application/rss+xml', + href: nconf.get('url') + '/category/' + cid + '.rss' + }, + { + rel: 'up', + href: nconf.get('url') + } + ]; + + categoryData['feeds:disableRSS'] = parseInt(meta.config['feeds:disableRSS'], 10) === 1; + categoryData.rssFeedUrl = nconf.get('relative_path') + '/category/' + categoryData.cid + '.rss'; + categoryData.title = categoryData.name; + categoryData.pagination = pagination.create(currentPage, pageCount); + categoryData.pagination.rel.forEach(function(rel) { + rel.href = nconf.get('url') + '/category/' + categoryData.slug + rel.href; + res.locals.linkTags.push(rel); + }); + + res.render('category', categoryData); }); }; diff --git a/src/controllers/groups.js b/src/controllers/groups.js index 837ba3b1f6..588a44d56f 100644 --- a/src/controllers/groups.js +++ b/src/controllers/groups.js @@ -1,14 +1,15 @@ "use strict"; -var async = require('async'), - nconf = require('nconf'), - validator = require('validator'), - meta = require('../meta'), - groups = require('../groups'), - user = require('../user'), - helpers = require('./helpers'), - plugins = require('../plugins'), - groupsController = {}; +var async = require('async'); +var nconf = require('nconf'); +var validator = require('validator'); + +var meta = require('../meta'); +var groups = require('../groups'); +var user = require('../user'); +var helpers = require('./helpers'); + +var groupsController = {}; groupsController.list = function(req, res, next) { var sort = req.query.sort || 'alpha'; @@ -83,22 +84,20 @@ groupsController.details = function(req, res, callback) { }, isAdmin: async.apply(user.isAdministrator, req.uid) }, next); - }, - function (results, next) { - if (!results.group) { - return callback(); - } - results.title = '[[pages:group, ' + results.group.displayName + ']]'; - results.breadcrumbs = helpers.buildBreadcrumbs([{text: '[[pages:groups]]', url: '/groups' }, {text: results.group.displayName}]); - results.allowPrivateGroups = parseInt(meta.config.allowPrivateGroups, 10) === 1; - plugins.fireHook('filter:group.build', {req: req, res: res, templateData: results}, next); } ], function(err, results) { if (err) { return callback(err); } - res.render('groups/details', results.templateData); + if (!results.group) { + return callback(); + } + results.title = '[[pages:group, ' + results.group.displayName + ']]'; + results.breadcrumbs = helpers.buildBreadcrumbs([{text: '[[pages:groups]]', url: '/groups' }, {text: results.group.displayName}]); + results.allowPrivateGroups = parseInt(meta.config.allowPrivateGroups, 10) === 1; + + res.render('groups/details', results); }); }; diff --git a/src/controllers/index.js b/src/controllers/index.js index 598587a434..282d6c1f0a 100644 --- a/src/controllers/index.js +++ b/src/controllers/index.js @@ -134,32 +134,29 @@ Controllers.register = function(req, res, next) { }, function(next) { plugins.fireHook('filter:parse.post', {postData: {content: meta.config.termsOfUse || ''}}, next); - }, - function(tos, next) { - var loginStrategies = require('../routes/authentication').getLoginStrategies(); - var data = { - 'register_window:spansize': loginStrategies.length ? 'col-md-6' : 'col-md-12', - 'alternate_logins': !!loginStrategies.length - }; - - data.authentication = loginStrategies; - - data.minimumUsernameLength = parseInt(meta.config.minimumUsernameLength, 10); - data.maximumUsernameLength = parseInt(meta.config.maximumUsernameLength, 10); - data.minimumPasswordLength = parseInt(meta.config.minimumPasswordLength, 10); - data.termsOfUse = tos.postData.content; - data.breadcrumbs = helpers.buildBreadcrumbs([{text: '[[register:register]]'}]); - data.regFormEntry = []; - data.error = req.flash('error')[0]; - data.title = '[[pages:register]]'; - - plugins.fireHook('filter:register.build', {req: req, res: res, templateData: data}, next); } - ], function(err, data) { + ], function(err, termsOfUse) { if (err) { return next(err); } - res.render('register', data.templateData); + var loginStrategies = require('../routes/authentication').getLoginStrategies(); + var data = { + 'register_window:spansize': loginStrategies.length ? 'col-md-6' : 'col-md-12', + 'alternate_logins': !!loginStrategies.length + }; + + data.authentication = loginStrategies; + + data.minimumUsernameLength = parseInt(meta.config.minimumUsernameLength, 10); + data.maximumUsernameLength = parseInt(meta.config.maximumUsernameLength, 10); + data.minimumPasswordLength = parseInt(meta.config.minimumPasswordLength, 10); + data.termsOfUse = termsOfUse.postData.content; + data.breadcrumbs = helpers.buildBreadcrumbs([{text: '[[register:register]]'}]); + data.regFormEntry = []; + data.error = req.flash('error')[0]; + data.title = '[[pages:register]]'; + + res.render('register', data); }); }; diff --git a/src/controllers/popular.js b/src/controllers/popular.js index 813f3527b8..353fd9e33c 100644 --- a/src/controllers/popular.js +++ b/src/controllers/popular.js @@ -1,15 +1,15 @@ 'use strict'; -var nconf = require('nconf'), - topics = require('../topics'), - plugins = require('../plugins'), - meta = require('../meta'), - helpers = require('./helpers'); +var nconf = require('nconf'); +var topics = require('../topics'); +var meta = require('../meta'); +var helpers = require('./helpers'); var popularController = {}; -var anonCache = {}, lastUpdateTime = 0; +var anonCache = {}; +var lastUpdateTime = 0; var terms = { daily: 'day', @@ -48,7 +48,8 @@ popularController.get = function(req, res, next) { topics: topics, 'feeds:disableRSS': parseInt(meta.config['feeds:disableRSS'], 10) === 1, rssFeedUrl: nconf.get('relative_path') + '/popular/' + (req.params.term || 'daily') + '.rss', - title: '[[pages:popular-' + term + ']]' + title: '[[pages:popular-' + term + ']]', + term: term }; if (req.path.startsWith('/api/popular') || req.path.startsWith('/popular')) { @@ -66,12 +67,7 @@ popularController.get = function(req, res, next) { lastUpdateTime = Date.now(); } - plugins.fireHook('filter:popular.build', {req: req, res: res, term: term, templateData: data}, function(err, data) { - if (err) { - return next(err); - } - res.render('popular', data.templateData); - }); + res.render('popular', data); }); }; diff --git a/src/controllers/recent.js b/src/controllers/recent.js index 242d26ac12..6883929be4 100644 --- a/src/controllers/recent.js +++ b/src/controllers/recent.js @@ -2,11 +2,10 @@ 'use strict'; var nconf = require('nconf'); -var async = require('async'); + var topics = require('../topics'); var meta = require('../meta'); var helpers = require('./helpers'); -var plugins = require('../plugins'); var recentController = {}; @@ -14,25 +13,19 @@ recentController.get = function(req, res, next) { var stop = (parseInt(meta.config.topicsPerList, 10) || 20) - 1; - async.waterfall([ - function (next) { - topics.getTopicsFromSet('topics:recent', req.uid, 0, stop, next); - }, - function (data, next) { - data['feeds:disableRSS'] = parseInt(meta.config['feeds:disableRSS'], 10) === 1; - data.rssFeedUrl = nconf.get('relative_path') + '/recent.rss'; - data.title = '[[pages:recent]]'; - if (req.path.startsWith('/api/recent') || req.path.startsWith('/recent')) { - data.breadcrumbs = helpers.buildBreadcrumbs([{text: '[[recent:title]]'}]); - } - - plugins.fireHook('filter:recent.build', {req: req, res: res, templateData: data}, next); - } - ], function(err, data) { + topics.getTopicsFromSet('topics:recent', req.uid, 0, stop, function(err, data) { if (err) { return next(err); } - res.render('recent', data.templateData); + + data['feeds:disableRSS'] = parseInt(meta.config['feeds:disableRSS'], 10) === 1; + data.rssFeedUrl = nconf.get('relative_path') + '/recent.rss'; + data.title = '[[pages:recent]]'; + if (req.path.startsWith('/api/recent') || req.path.startsWith('/recent')) { + data.breadcrumbs = helpers.buildBreadcrumbs([{text: '[[recent:title]]'}]); + } + + res.render('recent', data); }); }; diff --git a/src/controllers/search.js b/src/controllers/search.js index dee14e7c1f..2a7f6b145c 100644 --- a/src/controllers/search.js +++ b/src/controllers/search.js @@ -1,14 +1,14 @@ 'use strict'; -var async = require('async'), +var async = require('async'); - meta = require('../meta'), - plugins = require('../plugins'), - search = require('../search'), - categories = require('../categories'), - pagination = require('../pagination'), - helpers = require('./helpers'); +var meta = require('../meta'); +var plugins = require('../plugins'); +var search = require('../search'); +var categories = require('../categories'); +var pagination = require('../pagination'); +var helpers = require('./helpers'); var searchController = {}; @@ -61,12 +61,7 @@ searchController.search = function(req, res, next) { searchData.breadcrumbs = helpers.buildBreadcrumbs([{text: '[[global:search]]'}]); searchData.expandSearch = !req.params.term; - plugins.fireHook('filter:search.build', {data: data, results: searchData}, function(err, data) { - if (err) { - return next(err); - } - res.render('search', data.results); - }); + res.render('search', searchData); }); }; diff --git a/src/controllers/topics.js b/src/controllers/topics.js index c62ad30545..6b7793f58c 100644 --- a/src/controllers/topics.js +++ b/src/controllers/topics.js @@ -288,12 +288,7 @@ topicsController.get = function(req, res, callback) { }); } - plugins.fireHook('filter:topic.build', {req: req, res: res, templateData: data}, function(err, data) { - if (err) { - return callback(err); - } - res.render('topic', data.templateData); - }); + res.render('topic', data); }); }; diff --git a/src/controllers/unread.js b/src/controllers/unread.js index d3655fd050..1d80774fb0 100644 --- a/src/controllers/unread.js +++ b/src/controllers/unread.js @@ -8,7 +8,6 @@ var privileges = require('../privileges'); var user = require('../user'); var topics = require('../topics'); var helpers = require('./helpers'); -var plugins = require('../plugins'); var unreadController = {}; @@ -42,47 +41,44 @@ unreadController.get = function(req, res, next) { }, function(cids, next) { categories.getCategoriesFields(cids, ['cid', 'name', 'slug', 'icon', 'link', 'color', 'bgColor'], next); - }, - function(categories, next) { - categories = categories.filter(function(category) { - return category && !category.link; - }); - categories.forEach(function(category) { - category.selected = parseInt(category.cid, 10) === parseInt(cid, 10); - if (category.selected) { - results.unreadTopics.selectedCategory = category; - } - }); - results.unreadTopics.categories = categories; - - results.unreadTopics.breadcrumbs = helpers.buildBreadcrumbs([{text: '[[unread:title]]'}]); - results.unreadTopics.title = '[[pages:unread]]'; - results.unreadTopics.filters = [{ - name: '[[unread:all-topics]]', - url: 'unread', - selected: filter === '' - }, { - name: '[[unread:new-topics]]', - url: 'unread/new', - selected: filter === 'new' - }, { - name: '[[unread:watched-topics]]', - url: 'unread/watched', - selected: filter === 'watched' - }]; - - results.unreadTopics.selectedFilter = results.unreadTopics.filters.filter(function(filter) { - return filter && filter.selected; - })[0]; - - plugins.fireHook('filter:unread.build', {req: req, res: res, templateData: results.unreadTopics}, next); } - ], function(err, data) { + ], function(err, categories) { if (err) { return next(err); } - res.render('unread', data.templateData); + categories = categories.filter(function(category) { + return category && !category.link; + }); + categories.forEach(function(category) { + category.selected = parseInt(category.cid, 10) === parseInt(cid, 10); + if (category.selected) { + results.unreadTopics.selectedCategory = category; + } + }); + results.unreadTopics.categories = categories; + + results.unreadTopics.breadcrumbs = helpers.buildBreadcrumbs([{text: '[[unread:title]]'}]); + results.unreadTopics.title = '[[pages:unread]]'; + results.unreadTopics.filters = [{ + name: '[[unread:all-topics]]', + url: 'unread', + selected: filter === '' + }, { + name: '[[unread:new-topics]]', + url: 'unread/new', + selected: filter === 'new' + }, { + name: '[[unread:watched-topics]]', + url: 'unread/watched', + selected: filter === 'watched' + }]; + + results.unreadTopics.selectedFilter = results.unreadTopics.filters.filter(function(filter) { + return filter && filter.selected; + })[0]; + + res.render('unread', results.unreadTopics); }); }; diff --git a/src/controllers/users.js b/src/controllers/users.js index 31ac0bd1cc..476766e7ba 100644 --- a/src/controllers/users.js +++ b/src/controllers/users.js @@ -5,7 +5,6 @@ var user = require('../user'); var meta = require('../meta'); var pagination = require('../pagination'); -var plugins = require('../plugins'); var db = require('../database'); var helpers = require('./helpers'); @@ -165,26 +164,20 @@ usersController.getUsersAndCount = function(set, uid, start, stop, callback) { }; function render(req, res, data, next) { - plugins.fireHook('filter:users.build', {req: req, res: res, templateData: data }, function(err, data) { + var registrationType = meta.config.registrationType; + + data.maximumInvites = meta.config.maximumInvites; + data.inviteOnly = registrationType === 'invite-only' || registrationType === 'admin-invite-only'; + data.adminInviteOnly = registrationType === 'admin-invite-only'; + data['reputation:disabled'] = parseInt(meta.config['reputation:disabled'], 10) === 1; + + user.getInvitesNumber(req.uid, function(err, num) { if (err) { return next(err); } - var registrationType = meta.config.registrationType; - - data.templateData.maximumInvites = meta.config.maximumInvites; - data.templateData.inviteOnly = registrationType === 'invite-only' || registrationType === 'admin-invite-only'; - data.templateData.adminInviteOnly = registrationType === 'admin-invite-only'; - data.templateData['reputation:disabled'] = parseInt(meta.config['reputation:disabled'], 10) === 1; - - user.getInvitesNumber(req.uid, function(err, num) { - if (err) { - return next(err); - } - - data.templateData.invites = num; - res.render('users', data.templateData); - }); + data.invites = num; + res.render('users', data); }); } diff --git a/src/middleware/render.js b/src/middleware/render.js index 79911f71bd..0dd0543600 100644 --- a/src/middleware/render.js +++ b/src/middleware/render.js @@ -1,6 +1,8 @@ 'use strict'; var nconf = require('nconf'); + +var plugins = require('../plugins'); var translator = require('../../public/src/modules/translator'); module.exports = function(middleware) { @@ -9,78 +11,86 @@ module.exports = function(middleware) { // res.render post-processing, modified from here: https://gist.github.com/mrlannigan/5051687 var render = res.render; res.render = function(template, options, fn) { - var self = this, - req = this.req, - defaultFn = function(err, str){ - if (err) { - return next(err); - } + var self = this; + var req = this.req; + var defaultFn = function(err, str) { + if (err) { + return next(err); + } + + self.send(str); + }; - self.send(str); - }; options = options || {}; - if ('function' === typeof options) { fn = options; options = {}; } - options.loggedIn = !!req.uid; - options.relative_path = nconf.get('relative_path'); - options.template = {name: template}; - options.template[template] = true; - options.bodyClass = buildBodyClass(req); - - res.locals.template = template; - options._locals = undefined; - - if (res.locals.isAPI) { - if (req.route && req.route.path === '/api/') { - options.title = '[[pages:home]]'; - } - - return res.json(options); - } - - if ('function' !== typeof fn) { - fn = defaultFn; - } - - var ajaxifyData = JSON.stringify(options); - ajaxifyData = ajaxifyData.replace(/<\//g, '<\\/'); - - render.call(self, template, options, function(err, str) { + plugins.fireHook('filter:' + template + '.build', {req: req, res: res, templateData: options}, function(err, data) { if (err) { - return fn(err); + return next(err); } - str = (res.locals.postHeader ? res.locals.postHeader : '') + str + (res.locals.preFooter ? res.locals.preFooter : ''); + options = data.templateData; - if (res.locals.footer) { - str = str + res.locals.footer; - } else if (res.locals.adminFooter) { - str = str + res.locals.adminFooter; + options.loggedIn = !!req.uid; + options.relative_path = nconf.get('relative_path'); + options.template = {name: template}; + options.template[template] = true; + options.bodyClass = buildBodyClass(req); + + res.locals.template = template; + options._locals = undefined; + + if (res.locals.isAPI) { + if (req.route && req.route.path === '/api/') { + options.title = '[[pages:home]]'; + } + + return res.json(options); } - if (res.locals.renderHeader || res.locals.renderAdminHeader) { - var method = res.locals.renderHeader ? middleware.renderHeader : middleware.admin.renderHeader; - method(req, res, options, function(err, template) { - if (err) { - return fn(err); - } - str = template + str; - var language = res.locals.config ? res.locals.config.userLang || 'en_GB' : 'en_GB'; - language = req.query.lang || language; - translator.translate(str, language, function(translated) { - translated = translator.unescape(translated); - translated = translated + ''; - fn(err, translated); + if ('function' !== typeof fn) { + fn = defaultFn; + } + + var ajaxifyData = JSON.stringify(options); + ajaxifyData = ajaxifyData.replace(/<\//g, '<\\/'); + + render.call(self, template, options, function(err, str) { + if (err) { + return fn(err); + } + + str = (res.locals.postHeader ? res.locals.postHeader : '') + str + (res.locals.preFooter ? res.locals.preFooter : ''); + + if (res.locals.footer) { + str = str + res.locals.footer; + } else if (res.locals.adminFooter) { + str = str + res.locals.adminFooter; + } + + if (res.locals.renderHeader || res.locals.renderAdminHeader) { + var method = res.locals.renderHeader ? middleware.renderHeader : middleware.admin.renderHeader; + method(req, res, options, function(err, template) { + if (err) { + return fn(err); + } + str = template + str; + var language = res.locals.config ? res.locals.config.userLang || 'en_GB' : 'en_GB'; + language = req.query.lang || language; + translator.translate(str, language, function(translated) { + translated = translator.unescape(translated); + translated = translated + ''; + fn(err, translated); + }); }); - }); - } else { - str = str + ''; - fn(err, str); - } + } else { + str = str + ''; + fn(err, str); + } + }); }); }; diff --git a/src/navigation/admin.js b/src/navigation/admin.js index a803b5465b..7db567b90b 100644 --- a/src/navigation/admin.js +++ b/src/navigation/admin.js @@ -62,12 +62,7 @@ function getAvailable(callback) { return item; }); - // DEPRECATION: backwards compatibility for filter:header.build, will be removed soon. - plugins.fireHook('filter:header.build', {navigation: []}, function(err, data) { - core = core.concat(data.navigation); - - plugins.fireHook('filter:navigation.available', core, callback); - }); + plugins.fireHook('filter:navigation.available', core, callback); } module.exports = admin; \ No newline at end of file diff --git a/src/topics/popular.js b/src/topics/popular.js index 88d5a6819a..5ab53ae613 100644 --- a/src/topics/popular.js +++ b/src/topics/popular.js @@ -1,10 +1,8 @@ 'use strict'; -var async = require('async'), - db = require('../database'), - privileges = require('../privileges'); - +var async = require('async'); +var privileges = require('../privileges'); module.exports = function(Topics) { From 2e94cbf19992865b5a89a2fd8d15bbfa0dd904a0 Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Sat, 30 Apr 2016 09:02:25 -0400 Subject: [PATCH 0153/1109] Latest translations and fallbacks --- public/language/tr/error.json | 2 +- public/language/tr/topic.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/language/tr/error.json b/public/language/tr/error.json index a46062e561..fedcf00bba 100644 --- a/public/language/tr/error.json +++ b/public/language/tr/error.json @@ -85,7 +85,7 @@ "cant-edit-chat-message": "Bu mesajı düzenlemek için izin verilmez", "cant-remove-last-user": "Son kullanıcıyı silemezsiniz", "cant-delete-chat-message": "Bu mesajı silmek için izin verilmez", - "already-voting-for-this-post": "You have already voted for this post.", + "already-voting-for-this-post": "Bu gönderi için zaten oy verdin.", "reputation-system-disabled": "Saygınlık sistemi kapatılmış.", "downvoting-disabled": "Aşagı oylama kapatılmış", "not-enough-reputation-to-downvote": "Bu iletiyi aşagı oylamak için yeterince saygınlığınız yok.", diff --git a/public/language/tr/topic.json b/public/language/tr/topic.json index 552b2cdff0..13ccc1cc66 100644 --- a/public/language/tr/topic.json +++ b/public/language/tr/topic.json @@ -26,7 +26,7 @@ "tools": "Araçlar", "flag": "Bayrak", "locked": "Kilitli", - "bookmark_instructions": "Click here to return to the last read post in this thread.", + "bookmark_instructions": "Bu başlıkta en son kaldığın yere dönmek için tıklayın.", "flag_title": "Bu iletiyi moderatöre haber et", "flag_success": "Bu ileti yöneticilere bildirildi.", "deleted_message": "Bu başlık silindi. Sadece başlık düzenleme yetkisi olan kullanıcılar görebilir.", From ce4bebd96066b4cf42f4b1425512cc760290a3d5 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sat, 30 Apr 2016 17:44:57 +0300 Subject: [PATCH 0154/1109] up persona --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 68fffbbf7a..1e7842cbe4 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", "nodebb-theme-lavender": "3.0.9", - "nodebb-theme-persona": "4.0.127", + "nodebb-theme-persona": "4.0.128", "nodebb-theme-vanilla": "5.0.68", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", From 09a03bbe109427db551613fb49fa4978c10dee3d Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sat, 30 Apr 2016 19:47:13 +0300 Subject: [PATCH 0155/1109] fix validator crash --- src/routes/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/index.js b/src/routes/index.js index 999528aadf..1b08d42020 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -218,7 +218,7 @@ function handleErrors(app, middleware) { res.json({path: validator.escape(req.path || ''), error: err.message}); } else { middleware.buildHeader(req, res, function() { - res.render('500', {path: validator.escape(req.path || ''), error: validator.escape(err.message)}); + res.render('500', {path: validator.escape(String(req.path || '')), error: validator.escape(err.message)}); }); } }); From f67f408b2cbe05cb60f9ebc5249c5ef0b1e07311 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sat, 30 Apr 2016 20:43:16 +0300 Subject: [PATCH 0156/1109] some chats refactor --- public/src/client/chats.js | 136 +++++------------------------- public/src/client/chats/recent.js | 57 +++++++++++++ public/src/client/chats/search.js | 87 +++++++++++++++++++ 3 files changed, 163 insertions(+), 117 deletions(-) create mode 100644 public/src/client/chats/recent.js create mode 100644 public/src/client/chats/search.js diff --git a/public/src/client/chats.js b/public/src/client/chats.js index af4f764c7c..82b1c56434 100644 --- a/public/src/client/chats.js +++ b/public/src/client/chats.js @@ -1,8 +1,17 @@ 'use strict'; -/* globals define, config, app, ajaxify, utils, socket, templates, bootbox */ +/* globals define, app, ajaxify, utils, socket, templates, bootbox */ -define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll', 'translator', 'mousetrap'], function(components, S, sounds, infinitescroll, translator, mousetrap) { +define('forum/chats', [ + 'components', + 'string', + 'sounds', + 'forum/infinitescroll', + 'translator', + 'mousetrap', + 'forum/chats/recent', + 'forum/chats/search' +], function(components, S, sounds, infinitescroll, translator, mousetrap, recentChats, search) { var Chats = { initialised: false }; @@ -30,7 +39,7 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll', Chats.initialised = true; - Chats.handleSearch(); + search.init(); if (ajaxify.data.hasOwnProperty('roomId')) { components.get('chat/input').focus(); @@ -79,13 +88,7 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll', Chats.delete(messageId, ajaxify.data.roomId); }); - $('[component="chat/recent"]').on('scroll', function() { - var $this = $(this); - var bottom = ($this[0].scrollHeight - $this.height()) * 0.9; - if ($this.scrollTop() > bottom) { - loadMoreRecentChats(); - } - }); + recentChats.init(); Chats.addSinceHandler(ajaxify.data.roomId, $('.expanded-chat .chat-content'), $('.expanded-chat [data-since]')); Chats.addRenameHandler(ajaxify.data.roomId, $('[component="chat/room/name"]')); @@ -369,7 +372,7 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll', } else { if (ajaxify.currentPage.startsWith("chats")) { var roomEl = $('[data-roomid=' + data.roomId + ']'); - + if (roomEl.length > 0) { roomEl.addClass("unread"); } else { @@ -417,11 +420,11 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll', var messagesList = $('.expanded-chat .chat-content'); if (messagesList.length) { - var margin = $('.expanded-chat ul').outerHeight(true) - $('.expanded-chat ul').height(), - inputHeight = $('.chat-input').outerHeight(true), - fromTop = messagesList.offset().top, - searchHeight = $('.chat-search').height(), - searchListHeight = $('[component="chat/search/list"]').outerHeight(true) - $('[component="chat/search/list"]').height(); + var margin = $('.expanded-chat ul').outerHeight(true) - $('.expanded-chat ul').height(); + var inputHeight = $('.chat-input').outerHeight(true); + var fromTop = messagesList.offset().top; + var searchHeight = $('.chat-search').height(); + var searchListHeight = $('[component="chat/search/list"]').outerHeight(true) - $('[component="chat/search/list"]').height(); messagesList.height($(window).height() - (fromTop + inputHeight + (margin * 4))); components.get('chat/recent').height($('.expanded-chat').height() - (searchHeight + searchListHeight)); @@ -469,7 +472,6 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll', if (err) { return app.alertError(err.message); } - }); } }; @@ -499,105 +501,5 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll', }); }; - function loadMoreRecentChats() { - var recentChats = $('[component="chat/recent"]'); - if (recentChats.attr('loading')) { - return; - } - recentChats.attr('loading', 1); - socket.emit('modules.chats.getRecentChats', { - after: recentChats.attr('data-nextstart') - }, function(err, data) { - if (err) { - return app.alertError(err.message); - } - - if (data && data.rooms.length) { - onRecentChatsLoaded(data, function() { - recentChats.removeAttr('loading'); - recentChats.attr('data-nextstart', data.nextStart); - }); - } else { - recentChats.removeAttr('loading'); - } - }); - } - - function onRecentChatsLoaded(data, callback) { - if (!data.rooms.length) { - return callback(); - } - - app.parseAndTranslate('chats', 'rooms', data, function(html) { - $('[component="chat/recent"]').append(html); - html.find('.timeago').timeago(); - callback(); - }); - } - - Chats.handleSearch = function() { - var timeoutId = 0; - - components.get('chat/search').on('keyup', function() { - if (timeoutId) { - clearTimeout(timeoutId); - timeoutId = 0; - } - - timeoutId = setTimeout(doSearch, 250); - }); - - function doSearch() { - var username = components.get('chat/search').val(); - var chatsListEl = $('[component="chat/search/list"]'); - - if (!username) { - return chatsListEl.empty(); - } - - socket.emit('user.search', { - query: username, - searchBy: 'username' - }, function(err, data) { - if (err) { - return app.alertError(err.message); - } - - chatsListEl.empty(); - - if (data.users.length === 0) { - return chatsListEl.translateHtml('
  • [[users:no-users-found]]
  • '); - } - - data.users.forEach(function(userObj) { - function createUserImage() { - return (userObj.picture ? - '' : - '
    ' + userObj['icon:text'] + '
    ') + - ' ' + userObj.username; - } - - var chatEl = $('
  • ') - .attr('data-uid', userObj.uid) - .appendTo(chatsListEl); - - chatEl.append(createUserImage()); - - chatEl.on('click', function() { - socket.emit('modules.chats.hasPrivateChat', userObj.uid, function(err, roomId) { - if (err) { - return app.alertError(err.message); - } - if (roomId) { - ajaxify.go('chats/' + roomId); - } else { - app.newChat(userObj.uid); - } - }); - }); - }); - }); - } - }; return Chats; }); diff --git a/public/src/client/chats/recent.js b/public/src/client/chats/recent.js new file mode 100644 index 0000000000..6905841269 --- /dev/null +++ b/public/src/client/chats/recent.js @@ -0,0 +1,57 @@ +'use strict'; + +/* globals define, socket, app */ + +define('forum/chats/recent', function() { + + var recent = {}; + + recent.init = function() { + $('[component="chat/recent"]').on('scroll', function() { + var $this = $(this); + var bottom = ($this[0].scrollHeight - $this.height()) * 0.9; + if ($this.scrollTop() > bottom) { + loadMoreRecentChats(); + } + }); + }; + + function loadMoreRecentChats() { + var recentChats = $('[component="chat/recent"]'); + if (recentChats.attr('loading')) { + return; + } + recentChats.attr('loading', 1); + socket.emit('modules.chats.getRecentChats', { + after: recentChats.attr('data-nextstart') + }, function(err, data) { + if (err) { + return app.alertError(err.message); + } + + if (data && data.rooms.length) { + onRecentChatsLoaded(data, function() { + recentChats.removeAttr('loading'); + recentChats.attr('data-nextstart', data.nextStart); + }); + } else { + recentChats.removeAttr('loading'); + } + }); + } + + function onRecentChatsLoaded(data, callback) { + if (!data.rooms.length) { + return callback(); + } + + app.parseAndTranslate('chats', 'rooms', data, function(html) { + $('[component="chat/recent"]').append(html); + html.find('.timeago').timeago(); + callback(); + }); + } + + + return recent; +}); \ No newline at end of file diff --git a/public/src/client/chats/search.js b/public/src/client/chats/search.js new file mode 100644 index 0000000000..3645db282f --- /dev/null +++ b/public/src/client/chats/search.js @@ -0,0 +1,87 @@ +'use strict'; + +/* globals define, socket, app, ajaxify */ + +define('forum/chats/search', ['components'], function(components) { + + var search = {}; + + search.init = function() { + var timeoutId = 0; + + components.get('chat/search').on('keyup', function() { + if (timeoutId) { + clearTimeout(timeoutId); + timeoutId = 0; + } + + timeoutId = setTimeout(doSearch, 250); + }); + }; + + function doSearch() { + var username = components.get('chat/search').val(); + var chatsListEl = $('[component="chat/search/list"]'); + + if (!username) { + return chatsListEl.empty(); + } + + socket.emit('user.search', { + query: username, + searchBy: 'username' + }, function(err, data) { + if (err) { + return app.alertError(err.message); + } + + displayResults(chatsListEl, data); + }); + } + + function displayResults(chatsListEl, data) { + chatsListEl.empty(); + + if (!data.users.length) { + return chatsListEl.translateHtml('
  • [[users:no-users-found]]
  • '); + } + + data.users.forEach(function(userObj) { + var chatEl = displayUser(chatsListEl, userObj); + onUserClick(chatEl, userObj); + }); + } + + function displayUser(chatsListEl, userObj) { + function createUserImage() { + return (userObj.picture ? + '' : + '
    ' + userObj['icon:text'] + '
    ') + + ' ' + userObj.username; + } + + var chatEl = $('
  • ') + .attr('data-uid', userObj.uid) + .appendTo(chatsListEl); + + chatEl.append(createUserImage()); + return chatEl; + } + + function onUserClick(chatEl, userObj) { + chatEl.on('click', function() { + socket.emit('modules.chats.hasPrivateChat', userObj.uid, function(err, roomId) { + if (err) { + return app.alertError(err.message); + } + if (roomId) { + ajaxify.go('chats/' + roomId); + } else { + app.newChat(userObj.uid); + } + }); + }); + } + + return search; +}); \ No newline at end of file From ab702204993c87788c76fb9243cc2692350747cf Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sat, 30 Apr 2016 20:46:16 +0300 Subject: [PATCH 0157/1109] fix indent --- public/src/client/chats.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/client/chats.js b/public/src/client/chats.js index 82b1c56434..7a91ef40df 100644 --- a/public/src/client/chats.js +++ b/public/src/client/chats.js @@ -420,7 +420,7 @@ define('forum/chats', [ var messagesList = $('.expanded-chat .chat-content'); if (messagesList.length) { - var margin = $('.expanded-chat ul').outerHeight(true) - $('.expanded-chat ul').height(); + var margin = $('.expanded-chat ul').outerHeight(true) - $('.expanded-chat ul').height(); var inputHeight = $('.chat-input').outerHeight(true); var fromTop = messagesList.offset().top; var searchHeight = $('.chat-search').height(); From bea2344ad4db140c7b01ae05a27127532d8062ed Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sat, 30 Apr 2016 21:08:47 +0300 Subject: [PATCH 0158/1109] api controllers refactor --- src/controllers/api.js | 58 +++++++++++++++++------------------------- src/socket.io/user.js | 6 ++--- 2 files changed, 26 insertions(+), 38 deletions(-) diff --git a/src/controllers/api.js b/src/controllers/api.js index 8a109aa9df..5da2498989 100644 --- a/src/controllers/api.js +++ b/src/controllers/api.js @@ -172,55 +172,43 @@ apiController.getObjectByType = function(uid, type, id, callback) { }; apiController.getUserByUID = function(req, res, next) { - var uid = req.params.uid ? req.params.uid : 0; - - apiController.getUserDataByUID(req.uid, uid, function(err, data) { - if (err) { - return next(err); - } - res.json(data); - }); + byType('uid', req, res, next); }; apiController.getUserByUsername = function(req, res, next) { - var username = req.params.username ? req.params.username : 0; - - apiController.getUserDataByUsername(req.uid, username, function(err, data) { - if (err) { - return next(err); - } - res.json(data); - }); + byType('username', req, res, next); }; apiController.getUserByEmail = function(req, res, next) { - var email = req.params.email ? req.params.email : 0; + byType('email', req, res, next); +}; - apiController.getUserDataByEmail(req.uid, email, function(err, data) { - if (err) { +function byType(type, req, res, next) { + apiController.getUserDataByField(req.uid, type, req.params[type], function(err, data) { + if (err || !data) { return next(err); } res.json(data); }); -}; +} -apiController.getUserDataByUsername = function(callerUid, username, callback) { +apiController.getUserDataByField = function(callerUid, field, fieldValue, callback) { async.waterfall([ - function(next) { - user.getUidByUsername(username, next); + function (next) { + if (field === 'uid') { + next(null, fieldValue); + } else if (field === 'username') { + user.getUidByUsername(fieldValue, next); + } else if (field === 'email') { + user.getUidByEmail(fieldValue, next); + } else { + next(); + } }, - function(uid, next) { - apiController.getUserDataByUID(callerUid, uid, next); - } - ], callback); -}; - -apiController.getUserDataByEmail = function(callerUid, email, callback) { - async.waterfall([ - function(next) { - user.getUidByEmail(email, next); - }, - function(uid, next) { + function (uid, next) { + if (!uid) { + return next(); + } apiController.getUserDataByUID(callerUid, uid, next); } ], callback); diff --git a/src/socket.io/user.js b/src/socket.io/user.js index 8ca3e4231e..75ecd949fd 100644 --- a/src/socket.io/user.js +++ b/src/socket.io/user.js @@ -339,15 +339,15 @@ SocketUser.invite = function(socket, email, callback) { }; SocketUser.getUserByUID = function(socket, uid, callback) { - apiController.getUserDataByUID(socket.uid, uid, callback); + apiController.getUserDataByField(socket.uid, 'uid', uid, callback); }; SocketUser.getUserByUsername = function(socket, username, callback) { - apiController.getUserDataByUsername(socket.uid, username, callback); + apiController.getUserDataByField(socket.uid, 'username', username, callback); }; SocketUser.getUserByEmail = function(socket, email, callback) { - apiController.getUserDataByEmail(socket.uid, email, callback); + apiController.getUserDataByField(socket.uid, 'email', email, callback); }; From 7365b9cc73fe78936e8e4ce77948b4faabb06531 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sat, 30 Apr 2016 22:34:36 +0300 Subject: [PATCH 0159/1109] more chat refactors --- public/src/client/chats.js | 190 ++++------------------------ public/src/client/chats/messages.js | 145 +++++++++++++++++++++ public/src/modules/chat.js | 41 +++--- 3 files changed, 189 insertions(+), 187 deletions(-) create mode 100644 public/src/client/chats/messages.js diff --git a/public/src/client/chats.js b/public/src/client/chats.js index 7a91ef40df..619dbc9ec0 100644 --- a/public/src/client/chats.js +++ b/public/src/client/chats.js @@ -1,17 +1,15 @@ 'use strict'; -/* globals define, app, ajaxify, utils, socket, templates, bootbox */ +/* globals define, app, ajaxify, utils, socket, templates */ define('forum/chats', [ 'components', - 'string', - 'sounds', - 'forum/infinitescroll', 'translator', 'mousetrap', 'forum/chats/recent', - 'forum/chats/search' -], function(components, S, sounds, infinitescroll, translator, mousetrap, recentChats, search) { + 'forum/chats/search', + 'forum/chats/messages' +], function(components, translator, mousetrap, recentChats, search, messages) { var Chats = { initialised: false }; @@ -35,7 +33,7 @@ define('forum/chats', [ Chats.addHotkeys(); } - Chats.scrollToBottom($('.expanded-chat ul')); + messages.scrollToBottom($('.expanded-chat ul')); Chats.initialised = true; @@ -77,16 +75,7 @@ define('forum/chats', [ }); }); - components.get('chat/messages') - .on('click', '[data-action="edit"]', function() { - var messageId = $(this).parents('[data-mid]').attr('data-mid'); - var inputEl = components.get('chat/input'); - Chats.prepEdit(inputEl, messageId, ajaxify.data.roomId); - }) - .on('click', '[data-action="delete"]', function() { - var messageId = $(this).parents('[data-mid]').attr('data-mid'); - Chats.delete(messageId, ajaxify.data.roomId); - }); + Chats.addEditDeleteHandler(components.get('chat/messages'), ajaxify.data.roomId); recentChats.init(); @@ -94,6 +83,17 @@ define('forum/chats', [ Chats.addRenameHandler(ajaxify.data.roomId, $('[component="chat/room/name"]')); }; + Chats.addEditDeleteHandler = function(element, roomId) { + element.on('click', '[data-action="edit"]', function() { + var messageId = $(this).parents('[data-mid]').attr('data-mid'); + var inputEl = components.get('chat/input'); + messages.prepEdit(inputEl, messageId, roomId); + }).on('click', '[data-action="delete"]', function() { + var messageId = $(this).parents('[data-mid]').attr('data-mid'); + messages.delete(messageId, roomId); + }); + }; + Chats.addHotkeys = function() { mousetrap.bind('ctrl+up', function() { var activeContact = $('.chats-list .bg-primary'), @@ -118,49 +118,11 @@ define('forum/chats', [ var lastMid = message.attr('data-mid'); var inputEl = components.get('chat/input'); - Chats.prepEdit(inputEl, lastMid, ajaxify.data.roomId); + messages.prepEdit(inputEl, lastMid, ajaxify.data.roomId); } }); }; - Chats.prepEdit = function(inputEl, messageId, roomId) { - socket.emit('modules.chats.getRaw', { mid: messageId, roomId: roomId }, function(err, raw) { - if (err) { - return app.alertError(err.message); - } - // Populate the input field with the raw message content - if (inputEl.val().length === 0) { - // By setting the `data-mid` attribute, I tell the chat code that I am editing a - // message, instead of posting a new one. - inputEl.attr('data-mid', messageId).addClass('editing'); - inputEl.val(raw); - } - }); - }; - - Chats.delete = function(messageId, roomId) { - translator.translate('[[modules:chat.delete_message_confirm]]', function(translated) { - bootbox.confirm(translated, function(ok) { - if (!ok) { - return; - } - - socket.emit('modules.chats.delete', { - messageId: messageId, - roomId: roomId - }, function(err) { - if (err) { - return app.alertError(err.message); - } - - components.get('chat/message', messageId).slideUp('slow', function() { - $(this).remove(); - }); - }); - }); - }); - }; - Chats.addSinceHandler = function(roomId, chatContentEl, sinceEl) { sinceEl.on('click', function() { var since = $(this).attr('data-since'); @@ -193,25 +155,15 @@ define('forum/chats', [ }; Chats.addSendHandlers = function(roomId, inputEl, sendEl) { - inputEl.off('keypress').on('keypress', function(e) { if (e.which === 13 && !e.shiftKey) { - Chats.sendMessage(roomId, inputEl); + messages.sendMessage(roomId, inputEl); return false; } }); - inputEl.off('keyup').on('keyup', function() { - var val = !!$(this).val(); - if ((val && $(this).attr('data-typing') === 'true') || (!val && $(this).attr('data-typing') === 'false')) { - return; - } - - $(this).attr('data-typing', val); - }); - sendEl.off('click').on('click', function() { - Chats.sendMessage(roomId, inputEl); + messages.sendMessage(roomId, inputEl); inputEl.focus(); return false; }); @@ -320,14 +272,14 @@ define('forum/chats', [ if (!roomId) { return; } - socket.emit('modules.chats.get', {roomId: roomId, since: since}, function(err, messages) { + socket.emit('modules.chats.get', {roomId: roomId, since: since}, function(err, messageData) { if (err) { return app.alertError(err.message); } chatContentEl.find('[component="chat/message"]').remove(); - Chats.appendChatMessage(chatContentEl, messages); + messages.appendChatMessage(chatContentEl, messageData); }); }; @@ -341,34 +293,13 @@ define('forum/chats', [ }); }; - Chats.appendChatMessage = function(chatContentEl, data) { - - var lastSpeaker = parseInt(chatContentEl.find('.chat-message').last().attr('data-uid'), 10); - if (!Array.isArray(data)) { - data.newSet = lastSpeaker !== data.fromuid; - } - - Chats.parseMessage(data, function(html) { - onMessagesParsed(chatContentEl, html); - }); - }; - - function onMessagesParsed(chatContentEl, html) { - var newMessage = $(html); - - newMessage.appendTo(chatContentEl); - newMessage.find('.timeago').timeago(); - newMessage.find('img:not(.not-responsive)').addClass('img-responsive'); - Chats.scrollToBottom(chatContentEl); - } - Chats.addSocketListeners = function() { socket.on('event:chats.receive', function(data) { if (parseInt(data.roomId, 10) === parseInt(ajaxify.data.roomId, 10)) { newMessage = data.self === 0; data.message.self = data.self; - Chats.appendChatMessage($('.expanded-chat .chat-content'), data.message); + messages.appendChatMessage($('.expanded-chat .chat-content'), data.message); } else { if (ajaxify.currentPage.startsWith("chats")) { var roomEl = $('[data-roomid=' + data.roomId + ']'); @@ -393,29 +324,13 @@ define('forum/chats', [ app.updateUserStatus($('.chats-list [data-uid="' + data.uid + '"] [component="user/status"]'), data.status); }); - Chats.onChatEdit(); + messages.onChatMessageEdit(); socket.on('event:chats.roomRename', function(data) { $('[component="chat/room/name"]').val($('
    ').html(data.newName).text()); }); }; - Chats.onChatEdit = function() { - socket.on('event:chats.edit', function(data) { - data.messages.forEach(function(message) { - var self = parseInt(message.fromuid, 10) === parseInt(app.user.uid); - message.self = self ? 1 : 0; - Chats.parseMessage(message, function(html) { - var body = components.get('chat/message', message.messageId); - if (body.length) { - body.replaceWith(html); - components.get('chat/message', message.messageId).find('.timeago').timeago(); - } - }); - }); - }); - }; - Chats.resizeMainWindow = function() { var messagesList = $('.expanded-chat .chat-content'); @@ -434,56 +349,6 @@ define('forum/chats', [ Chats.setActive(); }; - Chats.sendMessage = function(roomId, inputEl) { - var msg = inputEl.val(); - var mid = inputEl.attr('data-mid'); - - if (msg.length > ajaxify.data.maximumChatMessageLength) { - return app.alertError('[[error:chat-message-too-long]]'); - } - - if (!msg.length) { - return; - } - - inputEl.val(''); - inputEl.removeAttr('data-mid'); - - if (!mid) { - socket.emit('modules.chats.send', { - roomId: roomId, - message: msg - }, function(err) { - if (err) { - if (err.message === '[[error:email-not-confirmed-chat]]') { - return app.showEmailConfirmWarning(err); - } - return app.alertError(err.message); - } - - sounds.play('chat-outgoing'); - }); - } else { - socket.emit('modules.chats.edit', { - roomId: roomId, - mid: mid, - message: msg - }, function(err) { - if (err) { - return app.alertError(err.message); - } - }); - } - }; - - Chats.scrollToBottom = function(containerEl) { - if (containerEl.length) { - containerEl.scrollTop( - containerEl[0].scrollHeight - containerEl.height() - ); - } - }; - Chats.setActive = function() { if (ajaxify.data.roomId) { socket.emit('modules.chats.markRead', ajaxify.data.roomId); @@ -493,13 +358,6 @@ define('forum/chats', [ $('.chats-list li[data-roomid="' + ajaxify.data.roomId + '"]').addClass('bg-primary'); }; - Chats.parseMessage = function(data, callback) { - templates.parse('partials/chat_message' + (Array.isArray(data) ? 's' : ''), { - messages: data - }, function(html) { - translator.translate(html, callback); - }); - }; return Chats; }); diff --git a/public/src/client/chats/messages.js b/public/src/client/chats/messages.js new file mode 100644 index 0000000000..ab444e36a4 --- /dev/null +++ b/public/src/client/chats/messages.js @@ -0,0 +1,145 @@ +'use strict'; + +/* globals define, socket, app, ajaxify, templates, bootbox */ + +define('forum/chats/messages', ['components', 'sounds', 'translator'], function(components, sounds, translator) { + + var messages = {}; + + messages.sendMessage = function(roomId, inputEl) { + var msg = inputEl.val(); + var mid = inputEl.attr('data-mid'); + + if (msg.length > ajaxify.data.maximumChatMessageLength) { + return app.alertError('[[error:chat-message-too-long]]'); + } + + if (!msg.length) { + return; + } + + inputEl.val(''); + inputEl.removeAttr('data-mid'); + + if (!mid) { + socket.emit('modules.chats.send', { + roomId: roomId, + message: msg + }, function(err) { + if (err) { + if (err.message === '[[error:email-not-confirmed-chat]]') { + return app.showEmailConfirmWarning(err); + } + return app.alertError(err.message); + } + + sounds.play('chat-outgoing'); + }); + } else { + socket.emit('modules.chats.edit', { + roomId: roomId, + mid: mid, + message: msg + }, function(err) { + if (err) { + return app.alertError(err.message); + } + }); + } + }; + + messages.appendChatMessage = function(chatContentEl, data) { + + var lastSpeaker = parseInt(chatContentEl.find('.chat-message').last().attr('data-uid'), 10); + if (!Array.isArray(data)) { + data.newSet = lastSpeaker !== data.fromuid; + } + + messages.parseMessage(data, function(html) { + onMessagesParsed(chatContentEl, html); + }); + }; + + function onMessagesParsed(chatContentEl, html) { + var newMessage = $(html); + + newMessage.appendTo(chatContentEl); + newMessage.find('.timeago').timeago(); + newMessage.find('img:not(.not-responsive)').addClass('img-responsive'); + messages.scrollToBottom(chatContentEl); + } + + + messages.parseMessage = function(data, callback) { + templates.parse('partials/chat_message' + (Array.isArray(data) ? 's' : ''), { + messages: data + }, function(html) { + translator.translate(html, callback); + }); + }; + + + messages.scrollToBottom = function(containerEl) { + if (containerEl.length) { + containerEl.scrollTop( + containerEl[0].scrollHeight - containerEl.height() + ); + } + }; + + messages.prepEdit = function(inputEl, messageId, roomId) { + socket.emit('modules.chats.getRaw', { mid: messageId, roomId: roomId }, function(err, raw) { + if (err) { + return app.alertError(err.message); + } + // Populate the input field with the raw message content + if (inputEl.val().length === 0) { + // By setting the `data-mid` attribute, I tell the chat code that I am editing a + // message, instead of posting a new one. + inputEl.attr('data-mid', messageId).addClass('editing'); + inputEl.val(raw); + } + }); + }; + + messages.onChatMessageEdit = function() { + socket.on('event:chats.edit', function(data) { + data.messages.forEach(function(message) { + var self = parseInt(message.fromuid, 10) === parseInt(app.user.uid); + message.self = self ? 1 : 0; + messages.parseMessage(message, function(html) { + var body = components.get('chat/message', message.messageId); + if (body.length) { + body.replaceWith(html); + components.get('chat/message', message.messageId).find('.timeago').timeago(); + } + }); + }); + }); + }; + + messages.delete = function(messageId, roomId) { + translator.translate('[[modules:chat.delete_message_confirm]]', function(translated) { + bootbox.confirm(translated, function(ok) { + if (!ok) { + return; + } + + socket.emit('modules.chats.delete', { + messageId: messageId, + roomId: roomId + }, function(err) { + if (err) { + return app.alertError(err.message); + } + + components.get('chat/message', messageId).slideUp('slow', function() { + $(this).remove(); + }); + }); + }); + }); + }; + + return messages; +}); \ No newline at end of file diff --git a/public/src/modules/chat.js b/public/src/modules/chat.js index 8c3e8c7962..3bc391cfd1 100644 --- a/public/src/modules/chat.js +++ b/public/src/modules/chat.js @@ -1,7 +1,15 @@ "use strict"; /* globals app, define, socket, templates, utils, ajaxify */ -define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'translator'], function(components, taskbar, S, sounds, Chats, translator) { +define('chat', [ + 'components', + 'taskbar', + 'string', + 'sounds', + 'forum/chats', + 'forum/chats/messages', + 'translator' +], function(components, taskbar, S, sounds, Chats, ChatsMessages, translator) { var module = {}; var newMessage = false; @@ -35,11 +43,11 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra if (module.modalExists(data.roomId)) { var modal = module.getModal(data.roomId); - Chats.appendChatMessage(modal.find('.chat-content'), data.message); + ChatsMessages.appendChatMessage(modal.find('.chat-content'), data.message); if (modal.is(':visible')) { taskbar.updateActive(modal.attr('UUID')); - Chats.scrollToBottom(modal.find('.chat-content')); + ChatsMessages.scrollToBottom(modal.find('.chat-content')); } else { module.toggleNew(modal.attr('UUID'), true, true); } @@ -83,7 +91,7 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra module.getModal(data.roomId).find('[component="chat/room/name"]').val($('
    ').html(data.newName).text()); }); - Chats.onChatEdit(); + ChatsMessages.onChatMessageEdit(); }; module.loadChatsDropdown = function(chatsListEl) { @@ -258,16 +266,7 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra } }); - chatModal.find('[component="chat/messages"]') - .on('click', '[data-action="edit"]', function() { - var messageId = $(this).parents('[data-mid]').attr('data-mid'); - var inputEl = chatModal.find('[component="chat/input"]'); - Chats.prepEdit(inputEl, messageId, data.roomId); - }) - .on('click', '[data-action="delete"]', function() { - var messageId = $(this).parents('[data-mid]').attr('data-mid'); - Chats.delete(messageId, data.roomId); - }); + Chats.addEditDeleteHandler(chatModal.find('[component="chat/messages"]'), data.roomId); chatModal.find('[component="chat/controlsToggle"]').on('click', function() { var messagesEl = chatModal.find('[component="chat/messages"]'); @@ -308,7 +307,7 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra chatModal.find('#chat-message-input').focus(); }; - module.close = function(chatModal, silent) { + module.close = function(chatModal) { clearInterval(chatModal.attr('intervalId')); chatModal.attr('intervalId', 0); chatModal.remove(); @@ -340,7 +339,7 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra chatModal.removeClass('hide'); checkStatus(chatModal); taskbar.updateActive(uuid); - Chats.scrollToBottom(chatModal.find('.chat-content')); + ChatsMessages.scrollToBottom(chatModal.find('.chat-content')); module.bringModalToTop(chatModal); module.focusInput(chatModal); socket.emit('modules.chats.markRead', chatModal.attr('roomId')); @@ -367,11 +366,11 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra }; module.calculateChatListHeight = function(modalEl) { - var totalHeight = modalEl.find('.modal-content').outerHeight() - modalEl.find('.modal-header').outerHeight(), - padding = parseInt(modalEl.find('.modal-body').css('padding-top'), 10) + parseInt(modalEl.find('.modal-body').css('padding-bottom'), 10), - contentMargin = parseInt(modalEl.find('.chat-content').css('margin-top'), 10) + parseInt(modalEl.find('.chat-content').css('margin-bottom'), 10), - sinceHeight = modalEl.find('.since-bar').outerHeight(true), - inputGroupHeight = modalEl.find('.input-group').outerHeight(); + var totalHeight = modalEl.find('.modal-content').outerHeight() - modalEl.find('.modal-header').outerHeight(); + var padding = parseInt(modalEl.find('.modal-body').css('padding-top'), 10) + parseInt(modalEl.find('.modal-body').css('padding-bottom'), 10); + var contentMargin = parseInt(modalEl.find('.chat-content').css('margin-top'), 10) + parseInt(modalEl.find('.chat-content').css('margin-bottom'), 10); + var sinceHeight = modalEl.find('.since-bar').outerHeight(true); + var inputGroupHeight = modalEl.find('.input-group').outerHeight(); return totalHeight - padding - contentMargin - inputGroupHeight; }; From e9d548d0576314fab773d4aaa42402381e52ba50 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sun, 1 May 2016 12:26:57 +0300 Subject: [PATCH 0160/1109] closes #4580 removed path.parse --- src/controllers/uploads.js | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/src/controllers/uploads.js b/src/controllers/uploads.js index 5a8873239b..6be1344c1e 100644 --- a/src/controllers/uploads.js +++ b/src/controllers/uploads.js @@ -71,23 +71,31 @@ uploadsController.uploadPost = function(req, res, next) { return next(null, fileObj); } - var fullPath = path.join(nconf.get('base_dir'), nconf.get('upload_path'), '..', fileObj.url), - parsedPath = path.parse(fullPath); + var fullPath = path.join(nconf.get('base_dir'), nconf.get('upload_path'), '..', fileObj.url); + //var parsedPath = path.parse(fullPath); + var dirname = path.dirname(fullPath); + var extname = path.extname(fullPath); + var basename = path.basename(fullPath, extname); image.resizeImage({ path: fullPath, - target: path.join(parsedPath.dir, parsedPath.name + '-resized' + parsedPath.ext), - extension: parsedPath.ext, + target: path.join(dirname, basename + '-resized' + extname), + extension: extname, width: parseInt(meta.config.maximumImageWidth, 10) || 760 }, function(err) { - // Return the resized version to the composer/postData - var parsedUrl = path.parse(fileObj.url); - parsedUrl.base = parsedUrl.name + '-resized' + parsedUrl.ext; - parsedUrl.name = parsedUrl.name + '-resized'; - fileObj.url = path.format(parsedUrl); - next(err, fileObj); }); + }, + function (fileObj, next) { + + // Return the resized version to the composer/postData + var dirname = path.dirname(fileObj.url); + var extname = path.extname(fileObj.url); + var basename = path.basename(fileObj.url, extname); + + fileObj.url = path.join(dirname, basename + '-resized' + extname); + + next(null, fileObj); } ], next); }, next); @@ -174,9 +182,9 @@ function uploadFile(uid, uploadedFile, callback) { function saveFileToLocal(uploadedFile, callback) { var extension = path.extname(uploadedFile.name); if(!extension) { - extension = '.' + mime.extension(uploadedFile.type); + extension = '.' + mime.extension(uploadedFile.type); } - + var filename = uploadedFile.name || 'upload'; filename = Date.now() + '-' + validator.escape(filename.replace(extension, '')).substr(0, 255) + extension; From fea18a050f253bcdd7b113eda102f5b5484914b3 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sun, 1 May 2016 12:44:43 +0300 Subject: [PATCH 0161/1109] closes #4590 --- src/controllers/uploads.js | 64 +++++++++++++++++++++++--------------- src/image.js | 10 ++++-- 2 files changed, 47 insertions(+), 27 deletions(-) diff --git a/src/controllers/uploads.js b/src/controllers/uploads.js index 6be1344c1e..223f7818a1 100644 --- a/src/controllers/uploads.js +++ b/src/controllers/uploads.js @@ -71,36 +71,50 @@ uploadsController.uploadPost = function(req, res, next) { return next(null, fileObj); } - var fullPath = path.join(nconf.get('base_dir'), nconf.get('upload_path'), '..', fileObj.url); - //var parsedPath = path.parse(fullPath); - var dirname = path.dirname(fullPath); - var extname = path.extname(fullPath); - var basename = path.basename(fullPath, extname); - - image.resizeImage({ - path: fullPath, - target: path.join(dirname, basename + '-resized' + extname), - extension: extname, - width: parseInt(meta.config.maximumImageWidth, 10) || 760 - }, function(err) { - next(err, fileObj); - }); - }, - function (fileObj, next) { - - // Return the resized version to the composer/postData - var dirname = path.dirname(fileObj.url); - var extname = path.extname(fileObj.url); - var basename = path.basename(fileObj.url, extname); - - fileObj.url = path.join(dirname, basename + '-resized' + extname); - - next(null, fileObj); + resizeImage(fileObj, next); } ], next); }, next); }; +function resizeImage(fileObj, callback) { + var fullPath; + async.waterfall([ + function(next) { + fullPath = path.join(nconf.get('base_dir'), nconf.get('upload_path'), '..', fileObj.url); + + image.load(fullPath, next); + }, + function (imageData, next) { + if (imageData.width < parseInt(meta.config.maximumImageWidth, 10) || 760) { + return callback(null, fileObj); + } + + var dirname = path.dirname(fullPath); + var extname = path.extname(fullPath); + var basename = path.basename(fullPath, extname); + + image.resizeImage({ + path: fullPath, + target: path.join(dirname, basename + '-resized' + extname), + extension: extname, + width: parseInt(meta.config.maximumImageWidth, 10) || 760 + }, next); + }, + function (next) { + + // Return the resized version to the composer/postData + var dirname = path.dirname(fileObj.url); + var extname = path.extname(fileObj.url); + var basename = path.basename(fileObj.url, extname); + + fileObj.url = path.join(dirname, basename + '-resized' + extname); + + next(null, fileObj); + } + ], callback); +} + uploadsController.uploadThumb = function(req, res, next) { if (parseInt(meta.config.allowTopicsThumbnail, 10) !== 1) { deleteTempFiles(req.files.files); diff --git a/src/image.js b/src/image.js index fccdc0f5ad..7efe86c6ee 100644 --- a/src/image.js +++ b/src/image.js @@ -15,7 +15,7 @@ image.resizeImage = function(data, callback) { extension: data.extension, width: data.width, height: data.height - }, function(err, data) { + }, function(err) { callback(err); }); } else { @@ -79,7 +79,7 @@ image.normalise = function(path, extension, callback) { plugins.fireHook('filter:image.normalise', { path: path, extension: extension - }, function(err, data) { + }, function(err) { callback(err); }); } else { @@ -94,6 +94,12 @@ image.normalise = function(path, extension, callback) { } }; +image.load = function(path, callback) { + new Jimp(path, function(err, data) { + callback(err, data ? data.bitmap : null); + }); +}; + image.convertImageToBase64 = function(path, callback) { fs.readFile(path, function(err, data) { callback(err, data ? data.toString('base64') : null); From 77cf860c7a8cee118992a38d5677a5be5e5479ae Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sun, 1 May 2016 13:09:41 +0300 Subject: [PATCH 0162/1109] closes #4588 --- public/src/admin/extend/plugins.js | 19 +++++++++++++++++-- src/views/admin/extend/plugins.tpl | 4 ++++ .../admin/partials/installed_plugin_item.tpl | 2 +- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/public/src/admin/extend/plugins.js b/public/src/admin/extend/plugins.js index 9a130723bf..0cca29bef8 100644 --- a/public/src/admin/extend/plugins.js +++ b/public/src/admin/extend/plugins.js @@ -16,12 +16,18 @@ define('admin/extend/plugins', function() { $('#plugin-search').val(''); pluginsList.on('click', 'button[data-action="toggleActive"]', function() { - pluginID = $(this).parents('li').attr('data-plugin-id'); - var btn = $(this); + var pluginEl = $(this).parents('li'); + pluginID = pluginEl.attr('data-plugin-id'); + var btn = $('#' + pluginID + ' [data-action="toggleActive"]'); socket.emit('admin.plugins.toggleActive', pluginID, function(err, status) { btn.html(' ' + (status.active ? 'Deactivate' : 'Activate')); btn.toggleClass('btn-warning', status.active).toggleClass('btn-success', !status.active); + //clone it to active plugins tab + if (status.active && !$('#active #' + pluginID).length) { + $('#active ul').prepend(pluginEl.clone(true)); + } + app.alert({ alert_id: 'plugin_toggled', title: 'Plugin ' + (status.active ? 'Enabled' : 'Disabled'), @@ -141,6 +147,7 @@ define('admin/extend/plugins', function() { }); populateUpgradeablePlugins(); + populateActivePlugins(); }; function confirmInstall(pluginID, callback) { @@ -235,5 +242,13 @@ define('admin/extend/plugins', function() { }); } + function populateActivePlugins() { + $('#installed ul li').each(function() { + if ($(this).hasClass('active')) { + $('#active ul').append($(this).clone(true)); + } + }); + } + return Plugins; }); diff --git a/src/views/admin/extend/plugins.tpl b/src/views/admin/extend/plugins.tpl index ac6781c66b..730c2a56a0 100644 --- a/src/views/admin/extend/plugins.tpl +++ b/src/views/admin/extend/plugins.tpl @@ -1,5 +1,6 @@ @@ -15,6 +16,9 @@
    +
    +
      +
        diff --git a/src/views/admin/partials/installed_plugin_item.tpl b/src/views/admin/partials/installed_plugin_item.tpl index b0399df5e2..3c95bcc2c1 100644 --- a/src/views/admin/partials/installed_plugin_item.tpl +++ b/src/views/admin/partials/installed_plugin_item.tpl @@ -1,5 +1,5 @@ -
      • +
      • Themes From eb3c9104e198c0c36bf281f5dd73df2e9d6281e8 Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Mon, 2 May 2016 09:03:01 -0400 Subject: [PATCH 0163/1109] Latest translations and fallbacks --- public/language/ru/category.json | 2 +- public/language/sv/global.json | 8 ++++---- public/language/sv/modules.json | 2 +- public/language/sv/notifications.json | 2 +- public/language/sv/pages.json | 2 +- public/language/sv/tags.json | 2 +- public/language/sv/topic.json | 6 +++--- public/language/sv/unread.json | 8 ++++---- public/language/sv/uploads.json | 4 ++-- public/language/sv/user.json | 6 +++--- 10 files changed, 21 insertions(+), 21 deletions(-) diff --git a/public/language/ru/category.json b/public/language/ru/category.json index 347af2bd0e..2d4aeb0dc3 100644 --- a/public/language/ru/category.json +++ b/public/language/ru/category.json @@ -2,7 +2,7 @@ "category": "Категория", "subcategories": "Подкатегории", "new_topic_button": "Создать тему", - "guest-login-post": "Войдите, чтобы создавать сообщения", + "guest-login-post": "Войдите, чтобы ответить в теме", "no_topics": "В этой категории еще нет тем.
        Почему бы вам не создать первую?", "browsing": "просматривают", "no_replies": "Нет ответов", diff --git a/public/language/sv/global.json b/public/language/sv/global.json index a9cb801869..00a61776c7 100644 --- a/public/language/sv/global.json +++ b/public/language/sv/global.json @@ -2,7 +2,7 @@ "home": "Hem", "search": "Sök", "buttons.close": "Stäng", - "403.title": "Tillgång Nekad", + "403.title": "Tillgång nekad", "403.message": "Du verkar ha ramlat in på en sida du ej har tillgång till.", "403.login": "Du kanske bör försöka logga in?", "404.title": "Sidan saknas", @@ -39,7 +39,7 @@ "motd.welcome": "Välkommen till NodeBB, framtidens diskussions-plattform.", "previouspage": "Föregående sida", "nextpage": "Nästa sida", - "alert.success": "success", + "alert.success": "Success", "alert.error": "Fel", "alert.banned": "Bannad", "alert.banned.message": "Du har blivit bannlyst och kommer nu att loggas ut. ", @@ -88,7 +88,7 @@ "sessions": "Login Sessions", "ip_address": "IP Address", "enter_page_number": "Enter page number", - "upload_file": "Upload file", - "upload": "Upload", + "upload_file": "Ladda upp en fil", + "upload": "Ladda upp", "allowed-file-types": "Allowed file types are %1" } \ No newline at end of file diff --git a/public/language/sv/modules.json b/public/language/sv/modules.json index ae9799ad2e..19bc422e9b 100644 --- a/public/language/sv/modules.json +++ b/public/language/sv/modules.json @@ -5,7 +5,7 @@ "chat.no_active": "Du har inte några aktiva chattar.", "chat.user_typing": "%1 skriver ...", "chat.user_has_messaged_you": "%1 har skickat ett medelande till dig.", - "chat.see_all": "See all chats", + "chat.see_all": "Se alla chattar", "chat.mark_all_read": "Mark all chats read", "chat.no-messages": "Välj mottagare för att visa historik för chatmeddelande", "chat.no-users-in-room": "No users in this room", diff --git a/public/language/sv/notifications.json b/public/language/sv/notifications.json index 743451971a..0eeb2e9509 100644 --- a/public/language/sv/notifications.json +++ b/public/language/sv/notifications.json @@ -1,7 +1,7 @@ { "title": "Notiser", "no_notifs": "Du har inga nya notiser", - "see_all": "See all notifications", + "see_all": "Visa alla notiser", "mark_all_read": "Markera alla notiser som lästa", "back_to_home": "Tillbaka till %1", "outgoing_link": "Utgående länk", diff --git a/public/language/sv/pages.json b/public/language/sv/pages.json index 6953bf554e..7c4baee1e2 100644 --- a/public/language/sv/pages.json +++ b/public/language/sv/pages.json @@ -6,7 +6,7 @@ "popular-month": "Populära ämnen denna månad", "popular-alltime": "All time popular topics", "recent": "Senaste ämnena", - "flagged-posts": "Flagged Posts", + "flagged-posts": "Flaggade inlägg", "users/online": "Användare online", "users/latest": "Senaste Användare", "users/sort-posts": "Användare med flest inlägg", diff --git a/public/language/sv/tags.json b/public/language/sv/tags.json index b3fbeebd24..341c5aad2b 100644 --- a/public/language/sv/tags.json +++ b/public/language/sv/tags.json @@ -1,6 +1,6 @@ { "no_tag_topics": "Det finns inga ämnen med detta märkord.", - "tags": "Märkord", + "tags": "Taggar", "enter_tags_here": "Fyll i märkord på mellan %1 och %2 tecken här.", "enter_tags_here_short": "Ange taggar...", "no_tags": "Det finns inga märkord ännu." diff --git a/public/language/sv/topic.json b/public/language/sv/topic.json index f1188f7ad6..8f1e9c94b6 100644 --- a/public/language/sv/topic.json +++ b/public/language/sv/topic.json @@ -101,10 +101,10 @@ "newest_to_oldest": "Nyaste till äldst", "most_votes": "Mest röster", "most_posts": "Felst inlägg", - "stale.title": "Create new topic instead?", + "stale.title": "Skapa nytt ämne istället?", "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", - "stale.create": "Create a new topic", - "stale.reply_anyway": "Reply to this topic anyway", + "stale.create": "Skapa nytt ämne", + "stale.reply_anyway": "Svara på ämnet ändå", "link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", diff --git a/public/language/sv/unread.json b/public/language/sv/unread.json index 7b99714700..06ae0bbe92 100644 --- a/public/language/sv/unread.json +++ b/public/language/sv/unread.json @@ -2,12 +2,12 @@ "title": "Olästa", "no_unread_topics": "Det finns inga olästa ämnen.", "load_more": "Ladda fler", - "mark_as_read": "Markerad som läst", + "mark_as_read": "Markera som läst", "selected": "Vald", "all": "Alla", "all_categories": "Alla kategorier", "topics_marked_as_read.success": "Ämnet markerat som läst.", - "all-topics": "All Topics", - "new-topics": "New Topics", - "watched-topics": "Watched Topics" + "all-topics": "Alla ämnen", + "new-topics": "Nya ämnen", + "watched-topics": "Bevakade ämnen" } \ No newline at end of file diff --git a/public/language/sv/uploads.json b/public/language/sv/uploads.json index 1622cb5693..3c116a397f 100644 --- a/public/language/sv/uploads.json +++ b/public/language/sv/uploads.json @@ -1,6 +1,6 @@ { - "uploading-file": "Uploading the file...", - "select-file-to-upload": "Select a file to upload!", + "uploading-file": "Laddar upp filen...", + "select-file-to-upload": "Välj en fil att ladda upp!", "upload-success": "File uploaded successfully!", "maximum-file-size": "Maximum %1 kb" } \ No newline at end of file diff --git a/public/language/sv/user.json b/public/language/sv/user.json index a592658839..cb7c26150e 100644 --- a/public/language/sv/user.json +++ b/public/language/sv/user.json @@ -40,10 +40,10 @@ "change_email": "Change Email", "edit": "Ändra", "edit-profile": "Edit Profile", - "default_picture": "Default Icon", + "default_picture": "Standard-ikon", "uploaded_picture": "Uppladdad bild", "upload_new_picture": "Ladda upp ny bild", - "upload_new_picture_from_url": "Ladda Upp Ny Bild Från Länk", + "upload_new_picture_from_url": "Ladda upp ny bild från länk", "current_password": "Nuvarande lösenord", "change_password": "Ändra lösenord", "change_password_error": "Ogiltigt lösenord.", @@ -105,7 +105,7 @@ "homepage_description": "Select a page to use as the forum homepage or 'None' to use the default homepage.", "custom_route": "Custom Homepage Route", "custom_route_help": "Enter a route name here, without any preceding slash (e.g. \"recent\", or \"popular\")", - "sso.title": "Single Sign-on Services", + "sso.title": "Single Sign-on-tjänster", "sso.associated": "Associated with", "sso.not-associated": "Click here to associate with" } \ No newline at end of file From 27ad34138bb36638c2f626f2a1807531994c5223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 2 May 2016 18:24:50 +0300 Subject: [PATCH 0164/1109] fix crash --- src/user/settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/user/settings.js b/src/user/settings.js index 81b42d5c17..8856819a2f 100644 --- a/src/user/settings.js +++ b/src/user/settings.js @@ -123,7 +123,7 @@ module.exports = function(User) { topicSearchEnabled: data.topicSearchEnabled, delayImageLoading: data.delayImageLoading, groupTitle: data.groupTitle, - homePageRoute: (data.homePageCustom || data.homePageRoute).replace(/^\//, ''), + homePageRoute: (data.homePageCustom || data.homePageRoute || '').replace(/^\//, ''), scrollToMyPost: data.scrollToMyPost }; From 03b047bd59ccf88e0e94399c8ddcbb0afadc2ae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 2 May 2016 18:28:33 +0300 Subject: [PATCH 0165/1109] fix another crash --- src/routes/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/index.js b/src/routes/index.js index 1b08d42020..8efdc1f2a7 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -174,7 +174,7 @@ function handle404(app, middleware) { res.type('text/javascript').status(200).send(''); } else if (isLanguage.test(req.url)) { res.status(200).json({}); - } else if (req.path.startsWith(relativePath + '/uploads') || req.get('accept').indexOf('text/html') === -1 || req.path === '/favicon.ico') { + } else if (req.path.startsWith(relativePath + '/uploads') || (req.get('accept') && req.get('accept').indexOf('text/html') === -1) || req.path === '/favicon.ico') { res.sendStatus(404); } else if (req.accepts('html')) { if (process.env.NODE_ENV === 'development') { From 2ce24f8ba921507ee3bea908687fae54d85c4722 Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Tue, 3 May 2016 09:02:29 -0400 Subject: [PATCH 0166/1109] Latest translations and fallbacks --- public/language/sv/category.json | 2 +- public/language/sv/email.json | 20 +++---- public/language/sv/error.json | 52 ++++++++--------- public/language/sv/global.json | 56 +++++++++--------- public/language/sv/groups.json | 24 ++++---- public/language/sv/modules.json | 34 +++++------ public/language/sv/notifications.json | 38 ++++++------- public/language/sv/pages.json | 48 ++++++++-------- public/language/sv/recent.json | 6 +- public/language/sv/register.json | 6 +- public/language/sv/reset_password.json | 6 +- public/language/sv/search.json | 2 +- public/language/sv/tags.json | 6 +- public/language/sv/topic.json | 48 ++++++++-------- public/language/sv/uploads.json | 4 +- public/language/sv/user.json | 78 +++++++++++++------------- public/language/sv/users.json | 4 +- 17 files changed, 217 insertions(+), 217 deletions(-) diff --git a/public/language/sv/category.json b/public/language/sv/category.json index 12204804ed..6736de62eb 100644 --- a/public/language/sv/category.json +++ b/public/language/sv/category.json @@ -6,7 +6,7 @@ "no_topics": "Det finns inga ämnen i denna kategori.
        Varför skapar inte du ett ämne?", "browsing": "läser", "no_replies": "Ingen har svarat", - "no_new_posts": "Inga nya inlägg", + "no_new_posts": "Inga nya inlägg.", "share_this_category": "Dela den här kategorin", "watch": "Bevaka", "ignore": "Ignorera", diff --git a/public/language/sv/email.json b/public/language/sv/email.json index 5cf3bec72b..e51dfda9e5 100644 --- a/public/language/sv/email.json +++ b/public/language/sv/email.json @@ -5,9 +5,9 @@ "greeting_no_name": "Hej", "greeting_with_name": "Hej %1", "welcome.text1": "Tack för att du registerar dig på %1!", - "welcome.text2": "För att slutföra aktiveringen av ditt konto, behöver vi verifiera att du har tillgång till den epostadress du registrerade dig med.", + "welcome.text2": "För att slutföra aktiveringen av ditt konto, behöver vi verifiera att du har tillgång till den e-postadress du registrerade dig med.", "welcome.text3": "En administrator har accepterat din registreringsansökan. Du kan logga in med ditt användarnamn och lösenord nu.", - "welcome.cta": "Klicka här för att bekräfta din epostadress ", + "welcome.cta": "Klicka här för att bekräfta din e-postadress ", "invitation.text1": "%1 har bjudit in dig till %2", "invitation.ctr": "Klicka här för att skapa ditt konto.", "reset.text1": "Vi fick en förfrågan om att återställa ditt lösenord, möjligen för att du har glömt det. Om detta inte är fallet, så kan du bortse från det här epostmeddelandet. ", @@ -15,22 +15,22 @@ "reset.cta": "Klicka här för att återställa ditt lösenord", "reset.notify.subject": "Lösenordet ändrat", "reset.notify.text1": "Vi vill uppmärksamma dig på att ditt lösenord ändrades den %1", - "reset.notify.text2": "Om du inte godkänt det här så vänligen kontakta en admin snarast. ", + "reset.notify.text2": "Om du inte godkänt det här så vänligen kontakta en administratör snarast. ", "digest.notifications": "Du har olästa notiser från %1:", "digest.latest_topics": "Senaste ämnen från %1", "digest.cta": "Klicka här för att besöka %1", "digest.unsub.info": "Det här meddelandet fick du på grund av dina inställningar för prenumeration. ", - "digest.no_topics": "Inga aktiva ämnen dom senaste %1", - "digest.day": "day", - "digest.week": "week", - "digest.month": "month", - "digest.subject": "Digest for %1", + "digest.no_topics": "Inga aktiva ämnen de senaste %1", + "digest.day": "dag", + "digest.week": "vecka", + "digest.month": "månad", + "digest.subject": "Sammanställt flöde för %1", "notif.chat.subject": "Nytt chatt-meddelande från %1", "notif.chat.cta": "Klicka här för att fortsätta konversationen", "notif.chat.unsub.info": "Denna chatt-notifikation skickades till dig på grund av dina inställningar för prenumerationer.", "notif.post.cta": "Klicka här för att läsa hela ämnet", "notif.post.unsub.info": "Det här meddelandet fick du på grund av dina inställningar för prenumeration. ", - "test.text1": "\nDet här är ett textmeddelande som verifierar att eposten är korrekt installerat för din NodeBB. ", - "unsub.cta": "Klicka här för att ändra dom inställningarna", + "test.text1": "\nDet här är ett testmeddelande som verifierar att e-posten är korrekt installerad för din NodeBB. ", + "unsub.cta": "Klicka här för att ändra de inställningarna", "closing": "Tack!" } \ No newline at end of file diff --git a/public/language/sv/error.json b/public/language/sv/error.json index cdc57388fd..64b1436f5e 100644 --- a/public/language/sv/error.json +++ b/public/language/sv/error.json @@ -14,7 +14,7 @@ "invalid-password": "Ogiltigt lösenord", "invalid-username-or-password": "Specificera både användarnamn och lösenord", "invalid-search-term": "Ogiltig sökterm", - "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", + "invalid-pagination-value": "Ogiltigt värde för siduppdelning. Värdet måste vara mellan %1 och %2", "username-taken": "Användarnamn upptaget", "email-taken": "Epostadress upptagen", "email-not-confirmed": "Din epostadress är ännu inte bekräftad. Klicka här för att bekräfta din epostadress.", @@ -27,7 +27,7 @@ "password-too-long": "Lösenordet är för långt", "user-banned": "Användare bannlyst", "user-too-new": "När du är ny medlem måste du vänta %1 sekund(er) innan du gör ditt första inlägg", - "blacklisted-ip": "Sorry, your IP address has been banned from this community. If you feel this is in error, please contact an administrator.", + "blacklisted-ip": "Din IP-adress har blivit bannlyst från det här forumet. Om du tror att det beror på ett misstag, vad god kontakta en administratör. ", "no-category": "Kategorin finns inte", "no-topic": "Ämnet finns inte", "no-post": "Inlägget finns inte", @@ -44,15 +44,15 @@ "title-too-long": "Skriv en kortare rubrik. Rubriker kan inte innehålla mer än %1 tecken.", "too-many-posts": "Du måste vänta minst %1 sekund(er) mellan varje inlägg", "too-many-posts-newbie": "Som ny användare måste du vänta %1 sekund(er) mellan varje inlägg tills dess du har %2 förtroende", - "tag-too-short": "Fyll i ett längre märkord. Märkord måste vara minst %1 tecken långa", - "tag-too-long": "Fyll i ett kortare märkord. Märkord kan ej vara längre än %1 tecken långa", - "not-enough-tags": "Ej tillräckligt många märkord. Ämnen måste ha minst %1 märkord", - "too-many-tags": "För många märkord. Ämnen kan ej har mer än %1 märkord", + "tag-too-short": "Fyll i en längre tagg. Taggar måste vara minst %1 tecken långa", + "tag-too-long": "Fyll i en kortare tagg. Taggar kan ej vara längre än %1 tecken långa", + "not-enough-tags": "Otillräckligt antal taggar. Ämnen måste ha minst %1 taggar", + "too-many-tags": "För många taggar. Ämnen kan ej har mer än %1 tagg(ar)", "still-uploading": "Vänta medan uppladdningen slutförs.", - "file-too-big": "Den maximalt tillåtna filstorleken är %1 kB - ladda upp en mindre fil", - "guest-upload-disabled": "Guest uploading has been disabled", - "already-favourited": "You have already bookmarked this post", - "already-unfavourited": "You have already unbookmarked this post", + "file-too-big": "Den maximalt tillåtna filstorleken är %1 kB - var god ladda upp en mindre fil", + "guest-upload-disabled": "Uppladdningar av oregistrerade användare har inaktiverats", + "already-favourited": "Du har redan lagt till bokmärke för det här inlägget", + "already-unfavourited": "Du har redan tagit bort bokmärket för det här inlägget", "cant-ban-other-admins": "Du kan inte bannlysa andra administratörer.", "cant-remove-last-admin": "Du är den enda administratören. Lägg till en annan användare som administratör innan du tar bort dig själv.", "invalid-image-type": "Ogiltig bildtyp. Tillåtna typer är: % 1", @@ -61,8 +61,8 @@ "group-name-too-short": "Gruppnamnet är för kort", "group-already-exists": "Gruppen existerar redan", "group-name-change-not-allowed": "Gruppnamnet får inte ändras", - "group-already-member": "Already part of this group", - "group-not-member": "Not a member of this group", + "group-already-member": "Redan i denna grupp", + "group-not-member": "Ej medlem av denna grupp", "group-needs-owner": "Gruppen kräver minst en ägare", "group-already-invited": "Användaren har redan bjudits in", "group-already-requested": "Din medlemsskapsförfrågan har redan skickats", @@ -70,22 +70,22 @@ "post-already-restored": "Inlägget är redan återställt", "topic-already-deleted": "Ämnet är redan raderat", "topic-already-restored": "Ämnet är redan återställt", - "cant-purge-main-post": "Huvudinlägg kan ej rensas, ta bort ämnet istället", + "cant-purge-main-post": "Huvudinlägg kan ej rensas bort, ta bort ämnet istället", "topic-thumbnails-are-disabled": "Miniatyrbilder för ämnen är inaktiverat", "invalid-file": "Ogiltig fil", "uploads-are-disabled": "Uppladdningar är inaktiverat", "signature-too-long": "Din signatur kan inte vara längre än %1 tecken.", - "about-me-too-long": "Din om mig kan inte vara längre än %1 tecken.", + "about-me-too-long": "Din text om dig själv kan inte vara längre än %1 tecken.", "cant-chat-with-yourself": "Du kan inte chatta med dig själv.", - "chat-restricted": "Denna användaren har begränsat sina chatt-meddelanden. Användaren måste följa dig innan ni kan chatta med varann", - "chat-disabled": "Chat system disabled", + "chat-restricted": "Denna användaren har begränsat sina chatt-meddelanden. Användaren måste följa dig innan ni kan chatta med varandra", + "chat-disabled": "Chatt är inaktiverat", "too-many-messages": "Du har skickat för många meddelanden, var god vänta", "invalid-chat-message": "Ogiltigt chattmeddelande", "chat-message-too-long": "Chattmeddelande är för långt", - "cant-edit-chat-message": "You are not allowed to edit this message", - "cant-remove-last-user": "You can't remove the last user", - "cant-delete-chat-message": "You are not allowed to delete this message", - "already-voting-for-this-post": "You have already voted for this post.", + "cant-edit-chat-message": "Du har inte rättigheter att redigera det här meddelandet", + "cant-remove-last-user": "Du kan inte ta bort den sista användaren", + "cant-delete-chat-message": "Du har inte rättigheter att radera det här meddelandet", + "already-voting-for-this-post": "Du har redan röstat på det här inlägget.", "reputation-system-disabled": "Ryktessystemet är inaktiverat.", "downvoting-disabled": "Nedröstning är inaktiverat", "not-enough-reputation-to-downvote": "Du har inte tillräckligt förtroende för att rösta ner det här meddelandet", @@ -94,11 +94,11 @@ "reload-failed": "NodeBB stötte på problem med att ladda om: \"%1\". NodeBB kommer fortsätta servera den befintliga resurser till klienten, men du borde återställa det du gjorde alldeles innan du försökte ladda om.", "registration-error": "Registreringsfel", "parse-error": "Något gick fel vid tolkning av svar från servern", - "wrong-login-type-email": "Använd din e-post adress för att logga in", + "wrong-login-type-email": "Använd din e-postadress för att logga in", "wrong-login-type-username": "Använd ditt användarnamn för att logga in", - "invite-maximum-met": "You have invited the maximum amount of people (%1 out of %2).", - "no-session-found": "No login session found!", - "not-in-room": "User not in room", - "no-users-in-room": "No users in this room", - "cant-kick-self": "You can't kick yourself from the group" + "invite-maximum-met": "Du har bjudit in det maximala antalet användare (%1 av %2)", + "no-session-found": "Ingen login-session hittades!", + "not-in-room": "Användaren finns inte i rummet", + "no-users-in-room": "Inga användare i det här rummet", + "cant-kick-self": "Du kan inte sparka ut dig själv ifrån gruppen" } \ No newline at end of file diff --git a/public/language/sv/global.json b/public/language/sv/global.json index 00a61776c7..d9c105b855 100644 --- a/public/language/sv/global.json +++ b/public/language/sv/global.json @@ -8,7 +8,7 @@ "404.title": "Sidan saknas", "404.message": "Du verkar ha ramlat in på en sida som inte finns. Återgå till första sidan.", "500.title": "Internt fel.", - "500.message": "Hoppsan! Verkar som att något gått snett!", + "500.message": "Hoppsan! Något verkar ha gått snett!", "register": "Registrera", "login": "Logga in", "please_log_in": "Var god logga in", @@ -25,7 +25,7 @@ "header.categories": "Kategorier", "header.recent": "Senaste", "header.unread": "Olästa", - "header.tags": "Märkningar", + "header.tags": "Taggar", "header.popular": "Populära", "header.users": "Användare", "header.groups": "Grupper", @@ -33,15 +33,15 @@ "header.notifications": "Notiser", "header.search": "Sök", "header.profile": "Profil", - "header.navigation": "Navigation", - "notifications.loading": "Laddar Notiser", - "chats.loading": "Laddar Chattar", - "motd.welcome": "Välkommen till NodeBB, framtidens diskussions-plattform.", + "header.navigation": "Navigering", + "notifications.loading": "Laddar notiser", + "chats.loading": "Laddar chattar", + "motd.welcome": "Välkommen till NodeBB, framtidens diskussionsplattform.", "previouspage": "Föregående sida", "nextpage": "Nästa sida", - "alert.success": "Success", + "alert.success": "Lyckat", "alert.error": "Fel", - "alert.banned": "Bannad", + "alert.banned": "Bannlyst", "alert.banned.message": "Du har blivit bannlyst och kommer nu att loggas ut. ", "alert.unfollow": "Du följer inte längre %1!", "alert.follow": "Du följer nu %1!", @@ -49,46 +49,46 @@ "users": "Användare", "topics": "Ämnen", "posts": "Inlägg", - "best": "Best", - "upvoted": "Upvoted", - "downvoted": "Downvoted", + "best": "Bästa", + "upvoted": "Uppröstad", + "downvoted": "Nedröstad", "views": "Visningar", "reputation": "Rykte", "read_more": "läs mer", "more": "Mer", "posted_ago_by_guest": "inskickad %1 av anonym", "posted_ago_by": "inskickad %1 av %2", - "posted_ago": "inskickad %1", - "posted_in": "posted in %1", - "posted_in_by": "posted in %1 by %2", + "posted_ago": "postat %1", + "posted_in": "postat i %1", + "posted_in_by": "postat i %1 av %2", "posted_in_ago": "inskickad i %1 %2", - "posted_in_ago_by": "inskickad i %1 %2 av %3", - "user_posted_ago": "%1 skickades in %2", - "guest_posted_ago": "Anonym skickade in %1", - "last_edited_by": "last edited by %1", + "posted_in_ago_by": "postat i %1 %2 av %3", + "user_posted_ago": "%1 postades %2", + "guest_posted_ago": "Anonym postade %1", + "last_edited_by": "Senaste redigerad av %1", "norecentposts": "Inga nya inlägg", "norecenttopics": "Inga nya ämnen", - "recentposts": "Senaste ämnena", + "recentposts": "Senaste inläggen", "recentips": "Nyligen inloggade IPn", "away": "Borta", - "dnd": "Do not disturb", + "dnd": "Stör inte", "invisible": "Osynlig", "offline": "Offline", - "email": "Epost", + "email": "E-post", "language": "Språk", "guest": "Anonym", "guests": "Anonyma", - "updated.title": "Forum uppdaterades", + "updated.title": "Forumet uppdaterades", "updated.message": "Det här forumet har nu uppdaterats till senaste versionen. Klicka här för att ladda om sidan.", "privacy": "Integritet", "follow": "Följ", "unfollow": "Sluta följ", - "delete_all": "Ta bort Alla", - "map": "Map", - "sessions": "Login Sessions", - "ip_address": "IP Address", - "enter_page_number": "Enter page number", + "delete_all": "Ta bort alla", + "map": "Karta", + "sessions": "Login-sessioner", + "ip_address": "IP-adress", + "enter_page_number": "Skriv in sidnummer", "upload_file": "Ladda upp en fil", "upload": "Ladda upp", - "allowed-file-types": "Allowed file types are %1" + "allowed-file-types": "Tillåtna filtyper är %1" } \ No newline at end of file diff --git a/public/language/sv/groups.json b/public/language/sv/groups.json index 2fa0d40823..a88962291c 100644 --- a/public/language/sv/groups.json +++ b/public/language/sv/groups.json @@ -7,30 +7,30 @@ "pending.accept": "Acceptera", "pending.reject": "Neka", "pending.accept_all": "Acceptera alla", - "pending.reject_all": "Neka alla", + "pending.reject_all": "Avvisa alla", "pending.none": "Det finns inga väntande medlemmar just nu", "invited.none": "Det finns inga inbjudna medlemmar just nu", "invited.uninvite": "Dra tillbaka inbjudan", "invited.search": "Sök efter en användare att lägga till i denna grupp", - "invited.notification_title": "You have been invited to join %1", - "request.notification_title": "Group Membership Request from %1", - "request.notification_text": "%1 has requested to become a member of %2", + "invited.notification_title": "Du har blivit inbjuden att bli medlem i %1", + "request.notification_title": "Förfrågan om gruppmedlemskap från %1", + "request.notification_text": "%1 har skickat en förfrågan om medlemskap i %2", "cover-save": "Spara", "cover-saving": "Sparar", "details.title": "Detaljer för gruppen ", - "details.members": "Medlemmar", + "details.members": "Medlemslista", "details.pending": "Väntande medlemmar", "details.invited": "Inbjudna medlemmar", "details.has_no_posts": "Den här gruppens medlemmar har inte skrivit några inlägg.", "details.latest_posts": "Senaste inlägg", "details.private": "Privat", - "details.disableJoinRequests": "Disable join requests", - "details.grant": "Ge/Ta ifrån ägarskap", + "details.disableJoinRequests": "Inaktivera förfrågningar om att gå med", + "details.grant": "Tilldela/Dra tillbaka ägarskap", "details.kick": "Sparka ut", "details.owner_options": "Gruppadministration", "details.group_name": "Gruppnamn", "details.member_count": "Medlemsantal", - "details.creation_date": "Skapatdatum", + "details.creation_date": "Skapardatum", "details.description": "Beskrivning", "details.badge_preview": "Förhandsgranskning av märke", "details.change_icon": "Byt ikon", @@ -41,14 +41,14 @@ "details.hidden": "Dold", "details.hidden_help": "Om aktiverat kommer gruppen inte synas i grupplistan och användare måste bli inbjudna manuellt", "details.delete_group": "Ta bort grupp", - "details.private_system_help": "Private groups is disabled at system level, this option does not do anything", - "event.updated": "Gruppdetaljerna har uppdaterats", + "details.private_system_help": "Privata grupper är ej tillgängligt. Den här inställningen har ingen effekt.", + "event.updated": "Gruppinformationen har uppdaterats", "event.deleted": "Gruppen \"%1\" har tagits bort", "membership.accept-invitation": "Acceptera inbjudan", "membership.invitation-pending": "Inbjudan väntar på svar", "membership.join-group": "Gå med i grupp", "membership.leave-group": "Lämna grupp", "membership.reject": "Neka", - "new-group.group_name": "Group Name:", - "upload-group-cover": "Upload group cover" + "new-group.group_name": "Gruppnamn:", + "upload-group-cover": "Ladda upp omslagsbild för grupp" } \ No newline at end of file diff --git a/public/language/sv/modules.json b/public/language/sv/modules.json index 19bc422e9b..25349f9baa 100644 --- a/public/language/sv/modules.json +++ b/public/language/sv/modules.json @@ -1,38 +1,38 @@ { "chat.chatting_with": "Chatta med ", - "chat.placeholder": "Skriv chatmeddelande här och tryck sen enter för att skicka ", + "chat.placeholder": "Skriv chattmeddelande här och tryck sen Enter för att skicka ", "chat.send": "Skicka", "chat.no_active": "Du har inte några aktiva chattar.", "chat.user_typing": "%1 skriver ...", "chat.user_has_messaged_you": "%1 har skickat ett medelande till dig.", "chat.see_all": "Se alla chattar", - "chat.mark_all_read": "Mark all chats read", - "chat.no-messages": "Välj mottagare för att visa historik för chatmeddelande", - "chat.no-users-in-room": "No users in this room", + "chat.mark_all_read": "Markera alla chattar som lästa", + "chat.no-messages": "Välj mottagare för att visa historik för chattmeddelande", + "chat.no-users-in-room": "Inga användare i detta rum", "chat.recent-chats": "Senaste chattarna", "chat.contacts": "Kontakter ", "chat.message-history": "Historik för meddelande", "chat.pop-out": "Utskjutande chatt", "chat.maximize": "Maximera", - "chat.seven_days": "7 Dagar", - "chat.thirty_days": "30 Dagar", - "chat.three_months": "3 Månader", - "chat.delete_message_confirm": "Are you sure you wish to delete this message?", - "chat.roomname": "Chat Room %1", - "chat.add-users-to-room": "Add users to room", + "chat.seven_days": "7 dagar", + "chat.thirty_days": "30 dagar", + "chat.three_months": "3 månader", + "chat.delete_message_confirm": "Är du säker på att du vill radera det här meddelandet?", + "chat.roomname": "Chattrum %1", + "chat.add-users-to-room": "Addera användare till rum", "composer.compose": "Komponera", "composer.show_preview": "Visa förhandsgranskning", "composer.hide_preview": "Dölj förhandsgranskning", "composer.user_said_in": "%1 sa i %2:", "composer.user_said": "%1 sa:", - "composer.discard": "Är du säker på att du vill förkasta det här inlägget?", + "composer.discard": "Är du säker på att du vill ta bort det här inlägget?", "composer.submit_and_lock": "Skicka och lås", "composer.toggle_dropdown": "Visa/Dölj dropdown", - "composer.uploading": "Uploading %1", + "composer.uploading": "Laddar upp %1", "bootbox.ok": "OK", - "bootbox.cancel": "Cancel", - "bootbox.confirm": "Confirm", - "cover.dragging_title": "Cover Photo Positioning", - "cover.dragging_message": "Drag the cover photo to the desired position and click \"Save\"", - "cover.saved": "Cover photo image and position saved" + "bootbox.cancel": "Avbryt", + "bootbox.confirm": "Bekräfta", + "cover.dragging_title": "Positionering av omslagsbild", + "cover.dragging_message": "Dra omslagsbilden till önskad position och tryck \"Spara\"", + "cover.saved": "Omslagsbilden sparad" } \ No newline at end of file diff --git a/public/language/sv/notifications.json b/public/language/sv/notifications.json index 0eeb2e9509..df0b331ac3 100644 --- a/public/language/sv/notifications.json +++ b/public/language/sv/notifications.json @@ -5,34 +5,34 @@ "mark_all_read": "Markera alla notiser som lästa", "back_to_home": "Tillbaka till %1", "outgoing_link": "Utgående länk", - "outgoing_link_message": "You are now leaving %1", + "outgoing_link_message": "Du lämnar nu %1", "continue_to": "Fortsätt till %1", "return_to": "Återgå till %1", "new_notification": "Ny notis", "you_have_unread_notifications": "Du har olästa notiser.", "new_message_from": "Nytt medelande från %1", "upvoted_your_post_in": "%1 har röstat upp ditt inlägg i %2", - "upvoted_your_post_in_dual": "%1 and %2 have upvoted your post in %3.", - "upvoted_your_post_in_multiple": "%1 and %2 others have upvoted your post in %3.", - "moved_your_post": "%1 has moved your post to %2", - "moved_your_topic": "%1 has moved %2", - "favourited_your_post_in": "%1 has bookmarked your post in %2.", - "favourited_your_post_in_dual": "%1 and %2 have bookmarked your post in %3.", - "favourited_your_post_in_multiple": "%1 and %2 others have bookmarked your post in %3.", + "upvoted_your_post_in_dual": "%1 och %2 har röstat upp ditt inlägg i %3.", + "upvoted_your_post_in_multiple": "%1 och %2 andra har röstat upp ditt inlägg i %3.", + "moved_your_post": "%1 har flyttat ditt inlägg till %2", + "moved_your_topic": "%1 har flyttat %2", + "favourited_your_post_in": "%1 har lagt till bokmärke på ditt inlägg i %2.", + "favourited_your_post_in_dual": "%1 och %2 har lagt till bokmärke på ditt inlägg i %3.", + "favourited_your_post_in_multiple": "%1 och %2 andra har lagt till bokmärke på ditt inlägg i %3.", "user_flagged_post_in": "%1 flaggade ett inlägg i %2", - "user_flagged_post_in_dual": "%1 and %2 flagged a post in %3", - "user_flagged_post_in_multiple": "%1 and %2 others flagged a post in %3", + "user_flagged_post_in_dual": "%1 och %2 rapporterade ett inlägg i %3", + "user_flagged_post_in_multiple": "%1 och %2 andra rapporterade ett inlägg i %3", "user_posted_to": "%1 har skrivit ett svar på: %2", - "user_posted_to_dual": "%1 and %2 have posted replies to: %3", - "user_posted_to_multiple": "%1 and %2 others have posted replies to: %3", + "user_posted_to_dual": "%1 och %2 har svarat på: %3", + "user_posted_to_multiple": "%1 och %2 andra har svarat på: %3", "user_posted_topic": "%1 har skapat ett nytt ämne: %2", "user_started_following_you": "%1 började följa dig.", - "user_started_following_you_dual": "%1 and %2 started following you.", - "user_started_following_you_multiple": "%1 and %2 others started following you.", + "user_started_following_you_dual": "%1 och %2 började följa dig.", + "user_started_following_you_multiple": "%1 och %2 andra började följa dig.", "new_register": "%1 skickade en registreringsförfrågan.", - "new_register_multiple": "There are %1 registration requests awaiting review.", - "email-confirmed": "Epost bekräftad", - "email-confirmed-message": "Tack för att du bekräftat din epostadress. Ditt konto är nu fullt ut aktiverat.", - "email-confirm-error-message": "Det uppstod ett fel med att bekräfta din epostadress. Kanske var koden ogiltig eller har gått ut.", - "email-confirm-sent": "Bekräftelseepost skickat." + "new_register_multiple": "Det finns %1 förfrågningar om registrering som inväntar granskning.", + "email-confirmed": "E-post bekräftad", + "email-confirmed-message": "Tack för att du bekräftat din e-postadress. Ditt konto är nu fullt ut aktiverat.", + "email-confirm-error-message": "Det uppstod ett problem med bekräftelsen av din e-postadress. Kanske var koden felaktig eller ogiltig.", + "email-confirm-sent": "Bekräftelsemeddelande skickat." } \ No newline at end of file diff --git a/public/language/sv/pages.json b/public/language/sv/pages.json index 7c4baee1e2..a2ad0b69b1 100644 --- a/public/language/sv/pages.json +++ b/public/language/sv/pages.json @@ -4,43 +4,43 @@ "popular-day": "Populära ämnen idag", "popular-week": "Populära ämnen den här veckan", "popular-month": "Populära ämnen denna månad", - "popular-alltime": "All time popular topics", + "popular-alltime": "Populäraste ämnena genom tiderna", "recent": "Senaste ämnena", "flagged-posts": "Flaggade inlägg", "users/online": "Användare online", "users/latest": "Senaste Användare", "users/sort-posts": "Användare med flest inlägg", - "users/sort-reputation": "Users with the most reputation", - "users/banned": "Banned Users", + "users/sort-reputation": "Användare med bäst rykte", + "users/banned": "Bannlysta användare", "users/search": "Användar Sök", "notifications": "Notiser", "tags": "Etiketter", "tag": "Ämnen märkta med \"%1\"", - "register": "Register an account", + "register": "Registrera ett konto", "login": "Logga in på ditt konto", "reset": "Återställ lösenord", "categories": "Kategorier", "groups": "Grupper", - "group": "%1 group", - "chats": "Chats", - "chat": "Chatting with %1", - "account/edit": "Editing \"%1\"", - "account/edit/password": "Editing password of \"%1\"", - "account/edit/username": "Editing username of \"%1\"", - "account/edit/email": "Editing email of \"%1\"", - "account/following": "People %1 follows", - "account/followers": "People who follow %1", - "account/posts": "Posts made by %1", - "account/topics": "Topics created by %1", - "account/groups": "%1's Groups", - "account/favourites": "%1's Bookmarked Posts", + "group": "%1 grupp", + "chats": "Chattar", + "chat": "Chattar med %1", + "account/edit": "Redigerar \"%1\"", + "account/edit/password": "Redigerar lösenord för \"%1\"", + "account/edit/username": "Redigerar användarnamn för \"%1\"", + "account/edit/email": "Redigerar e-postadress för \"%1\"", + "account/following": "Användare som %1 följer", + "account/followers": "Användare som följer %1", + "account/posts": "Inlägg skapade av %1", + "account/topics": "Ämnen skapade av %1 ", + "account/groups": "%1's grupper", + "account/favourites": "%1's bokmärken", "account/settings": "Avnändarinställningar", - "account/watched": "Topics watched by %1", - "account/upvoted": "Posts upvoted by %1", - "account/downvoted": "Posts downvoted by %1", - "account/best": "Best posts made by %1", - "confirm": "Email Confirmed", + "account/watched": "Ämnen som bevakas av %1", + "account/upvoted": "Inlägg som röstats upp av %1", + "account/downvoted": "Inlägg som röstats ned av %1", + "account/best": "Bästa inläggen skapade av %1", + "confirm": "E-postadress bekräftad", "maintenance.text": "%1 genomgår underhåll just nu. Vänligen kom tillbaka lite senare.", - "maintenance.messageIntro": "Ytterligare så lämnade administratören detta meddelande:", - "throttled.text": "%1 is currently unavailable due to excessive load. Please come back another time." + "maintenance.messageIntro": "Utöver det så lämnade administratören följande meddelande:", + "throttled.text": "%1 ligger tillfälligt nere på grund av överbelastning. Var god återkom senare. " } \ No newline at end of file diff --git a/public/language/sv/recent.json b/public/language/sv/recent.json index 46d7531d3c..0e75be8355 100644 --- a/public/language/sv/recent.json +++ b/public/language/sv/recent.json @@ -6,12 +6,12 @@ "year": "År", "alltime": "Alltid", "no_recent_topics": "Det finns inga olästa ämnen.", - "no_popular_topics": "Det finns inga populära ämnen", - "there-is-a-new-topic": "Det finns ett nytt ämne", + "no_popular_topics": "Det finns inga populära ämnen.", + "there-is-a-new-topic": "Det finns ett nytt ämne.", "there-is-a-new-topic-and-a-new-post": "Det finns ett nytt ämne och ett nytt inlägg.", "there-is-a-new-topic-and-new-posts": "Det finns ett nytt ämne och %1 nya inlägg.", "there-are-new-topics": "Det finns %1 nya ämnen.", - "there-are-new-topics-and-a-new-post": "Det finns %1 nya ämnen och ett nytt inlägg..", + "there-are-new-topics-and-a-new-post": "Det finns %1 nya ämnen och ett nytt inlägg.", "there-are-new-topics-and-new-posts": "Det finns %1 nya ämnen och %2 nya inlägg.", "there-is-a-new-post": "Det finns ett nytt inlägg.", "there-are-new-posts": "Det finns %1 nya inlägg.", diff --git a/public/language/sv/register.json b/public/language/sv/register.json index 6f1aa3764b..1ada86d0ba 100644 --- a/public/language/sv/register.json +++ b/public/language/sv/register.json @@ -1,10 +1,10 @@ { "register": "Registrera", - "help.email": "Som standard, är din epost-adress dold för allmänheten.", + "help.email": "Som standard, är din e-postadress dold för allmänheten.", "help.username_restrictions": "Ett unikt användarnamn mellan %1 och %2 bokstäver. Andra kan nämna dig med @användarnamn.", "help.minimum_password_length": "Ditt lösenord måste vara minst %1 bokstäver.", - "email_address": "Epost-adress", - "email_address_placeholder": "Ange Epost-adress", + "email_address": "E-postadress", + "email_address_placeholder": "Ange E-postadress", "username": "Användarnamn", "username_placeholder": "Ange användarnamn", "password": "Lösenord", diff --git a/public/language/sv/reset_password.json b/public/language/sv/reset_password.json index 9f79207d43..a6ee1793e1 100644 --- a/public/language/sv/reset_password.json +++ b/public/language/sv/reset_password.json @@ -7,10 +7,10 @@ "wrong_reset_code.message": "Den mottagna återställningskoden var felaktig. Var god försök igen, eller begär en ny återställningskod.", "new_password": "Nytt lösenord", "repeat_password": "Bekräfta lösenord", - "enter_email": "Var god fyll i din epost-adress så får du snart en epost med instruktioner hur du återsätller ditt konto.", - "enter_email_address": "Skriv in epostadress", + "enter_email": "Var god fyll i din e-postadress så skickas ett e-postmeddelande med instruktioner hur du återställer ditt konto.", + "enter_email_address": "Skriv in e-postadress", "password_reset_sent": "Lösenordsåterställning skickad", - "invalid_email": "Felaktig epost / Epost finns inte!", + "invalid_email": "Felaktig e-post / E-post finns inte!", "password_too_short": "Lösenordet är för kort, var god välj ett annat lösenord.", "passwords_do_not_match": "De två lösenorden du har fyllt i matchar ej varandra.", "password_expired": "Ditt lösenord har gått ut, var god välj ett nytt lösenord." diff --git a/public/language/sv/search.json b/public/language/sv/search.json index eeb5a36feb..3682c8bef5 100644 --- a/public/language/sv/search.json +++ b/public/language/sv/search.json @@ -4,7 +4,7 @@ "advanced-search": "Avancerad sökning", "in": "i", "titles": "Ämnen", - "titles-posts": "Ämnen och Inlägg", + "titles-posts": "Ämnen och inlägg", "posted-by": "Skapad av", "in-categories": "I kategorier", "search-child-categories": "Sök i underkategorier", diff --git a/public/language/sv/tags.json b/public/language/sv/tags.json index 341c5aad2b..cc8a7e02dc 100644 --- a/public/language/sv/tags.json +++ b/public/language/sv/tags.json @@ -1,7 +1,7 @@ { - "no_tag_topics": "Det finns inga ämnen med detta märkord.", + "no_tag_topics": "Det finns inga ämnen med denna tagg.", "tags": "Taggar", - "enter_tags_here": "Fyll i märkord på mellan %1 och %2 tecken här.", + "enter_tags_here": "Fyll i taggar på %1 till %2 tecken här.", "enter_tags_here_short": "Ange taggar...", - "no_tags": "Det finns inga märkord ännu." + "no_tags": "Det finns inga taggar ännu." } \ No newline at end of file diff --git a/public/language/sv/topic.json b/public/language/sv/topic.json index 8f1e9c94b6..603390ac0e 100644 --- a/public/language/sv/topic.json +++ b/public/language/sv/topic.json @@ -13,7 +13,7 @@ "notify_me": "Få notiser om nya svar i detta ämne", "quote": "Citera", "reply": "Svara", - "reply-as-topic": "Reply as topic", + "reply-as-topic": "Svara som ämne", "guest-login-reply": "Logga in för att posta", "edit": "Ändra", "delete": "Ta bort", @@ -26,7 +26,7 @@ "tools": "Verktyg", "flag": "Rapportera", "locked": "Låst", - "bookmark_instructions": "Click here to return to the last read post in this thread.", + "bookmark_instructions": "Klicka här för att återgå till senast lästa inlägg i detta ämne.", "flag_title": "Rapportera detta inlägg för granskning", "flag_success": "Det här inlägget har flaggats för moderering.", "deleted_message": "Det här ämnet har raderats. Endast användare med ämneshanterings-privilegier kan se det.", @@ -34,8 +34,8 @@ "not_following_topic.message": "Du kommer inte längre få notiser från detta ämne.", "login_to_subscribe": "Var god registrera eller logga in för att kunna prenumerera på detta ämne.", "markAsUnreadForAll.success": "Ämne markerat som oläst av alla.", - "mark_unread": "Mark unread", - "mark_unread.success": "Topic marked as unread.", + "mark_unread": "Markera som oläst", + "mark_unread.success": "Ämne markerat som oläst.", "watch": "Bevaka", "unwatch": "Sluta bevaka", "watch.title": "Få notis om nya svar till det här ämnet", @@ -43,46 +43,46 @@ "share_this_post": "Dela detta inlägg", "thread_tools.title": "Ämnesverktyg", "thread_tools.markAsUnreadForAll": "Markera som oläst", - "thread_tools.pin": "Fäst ämne", + "thread_tools.pin": "Nåla fast ämne", "thread_tools.unpin": "Lösgör ämne", "thread_tools.lock": "Lås ämne", - "thread_tools.unlock": "Öppna upp ämne", + "thread_tools.unlock": "Lås upp ämne", "thread_tools.move": "Flytta ämne", - "thread_tools.move_all": "Flytta alla.", + "thread_tools.move_all": "Flytta alla", "thread_tools.fork": "Grena ämne", "thread_tools.delete": "Ta bort ämne", - "thread_tools.delete-posts": "Delete Posts", + "thread_tools.delete-posts": "Radera inlägg", "thread_tools.delete_confirm": "Är du säker på att du vill ta bort det här ämnet?", "thread_tools.restore": "Återställ ämne", "thread_tools.restore_confirm": "Är du säker på att du vill återställa det här ämnet?", - "thread_tools.purge": "Rensa ämne", - "thread_tools.purge_confirm": "Är du säker att du vill rensa ut det här ämnet?", + "thread_tools.purge": "Rensa bort ämne", + "thread_tools.purge_confirm": "Är du säker att du vill rensa bort det här ämnet?", "topic_move_success": "Det här ämnet har flyttats till %1", "post_delete_confirm": "Är du säker på att du vill ta bort det här inlägget?", "post_restore_confirm": "Är du säker på att du vill återställa det här inlägget?", - "post_purge_confirm": "Är du säker att du vill rensa ut det här inlägget?", + "post_purge_confirm": "Är du säker att du vill rensa bort det här inlägget?", "load_categories": "Laddar kategorier", "disabled_categories_note": "Inaktiverade kategorier är utgråade", "confirm_move": "Flytta", "confirm_fork": "Grena", - "favourite": "Bookmark", - "favourites": "Bookmarks", - "favourites.has_no_favourites": "You haven't bookmarked any posts yet.", + "favourite": "Bokmärke", + "favourites": "Bokmärken", + "favourites.has_no_favourites": "Du har inte lagt till bokmärke på något inlägg än.", "loading_more_posts": "Laddar fler inlägg", "move_topic": "Flytta ämne", "move_topics": "Flytta ämnen", "move_post": "Flytta inlägg", "post_moved": "Inlägget flyttades.", "fork_topic": "Grena ämne", - "topic_will_be_moved_to": "Detta ämne kommer bli flytta till kategori", + "topic_will_be_moved_to": "Detta ämne kommer att flyttas till kategorin", "fork_topic_instruction": "Klicka på de inlägg du vill grena", "fork_no_pids": "Inga inlägg valda!", "fork_success": "Ämnet har blivit förgrenat. Klicka här för att gå till det förgrenade ämnet.", - "delete_posts_instruction": "Click the posts you want to delete/purge", + "delete_posts_instruction": "Klicka på inläggen du vill radera/rensa bort", "composer.title_placeholder": "Skriv in ämnets titel här...", "composer.handle_placeholder": "Namn", "composer.discard": "Avbryt", - "composer.submit": "Skicka", + "composer.submit": "Posta inlägg", "composer.replying_to": "Svarar till %1", "composer.new_topic": "Nytt ämne", "composer.uploading": "laddar upp...", @@ -92,21 +92,21 @@ "composer.thumb_file_label": "Eller ladda upp en fil", "composer.thumb_remove": "Töm fält", "composer.drag_and_drop_images": "Dra och släpp bilder här", - "more_users_and_guests": "%1 fler användare() och %2 gäst(er)", - "more_users": "%1 fler användare()", + "more_users_and_guests": "%1 fler användare och %2 gäst(er)", + "more_users": "%1 fler användare", "more_guests": "1% fler gäst(er)", "users_and_others": "%1 och %2 andra", "sort_by": "Sortera på", "oldest_to_newest": "Äldst till nyaste", "newest_to_oldest": "Nyaste till äldst", - "most_votes": "Mest röster", - "most_posts": "Felst inlägg", + "most_votes": "Flest röster", + "most_posts": "Flest inlägg", "stale.title": "Skapa nytt ämne istället?", - "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.warning": "Ämnet du svarar på är ganska gammalt. Vill du skapa ett nytt ämne istället och inkludera en referens till det här ämnet i ditt inlägg?", "stale.create": "Skapa nytt ämne", "stale.reply_anyway": "Svara på ämnet ändå", "link_back": "Re: [%1](%2)", "spam": "Spam", - "offensive": "Offensive", - "custom-flag-reason": "Enter a flagging reason" + "offensive": "Kränkande", + "custom-flag-reason": "Ange skälet för rapporteringen" } \ No newline at end of file diff --git a/public/language/sv/uploads.json b/public/language/sv/uploads.json index 3c116a397f..4546acd888 100644 --- a/public/language/sv/uploads.json +++ b/public/language/sv/uploads.json @@ -1,6 +1,6 @@ { "uploading-file": "Laddar upp filen...", "select-file-to-upload": "Välj en fil att ladda upp!", - "upload-success": "File uploaded successfully!", - "maximum-file-size": "Maximum %1 kb" + "upload-success": "Filen laddades upp!", + "maximum-file-size": "Maximalt %1 kb" } \ No newline at end of file diff --git a/public/language/sv/user.json b/public/language/sv/user.json index cb7c26150e..008e790f70 100644 --- a/public/language/sv/user.json +++ b/public/language/sv/user.json @@ -1,11 +1,11 @@ { - "banned": "Bannad", + "banned": "Bannlyst", "offline": "Offline", "username": "Användarnamn", "joindate": "Gick med", "postcount": "Antal inlägg", - "email": "Epost", - "confirm_email": "Bekräfta epostadress ", + "email": "E-post", + "confirm_email": "Bekräfta e-postadress ", "ban_account": "Bannlys konto", "ban_account_confirm": "Vill du verkligen bannlysa den här användaren?", "unban_account": "Ta bort bannlysning", @@ -22,7 +22,7 @@ "profile": "Profil", "profile_views": "Profil-visningar", "reputation": "Rykte", - "favourites": "Bookmarks", + "favourites": "Bokmärken", "watched": "Bevakad", "followers": "Följare", "following": "Följer", @@ -30,20 +30,20 @@ "signature": "Signatur", "birthday": "Födelsedag", "chat": "Chatta", - "chat_with": "Chat with %1", + "chat_with": "Chatta med %1", "follow": "Följ", "unfollow": "Sluta följ", "more": "Mer", "profile_update_success": "Profilen uppdaterades.", "change_picture": "Ändra bild", - "change_username": "Change Username", - "change_email": "Change Email", + "change_username": "Ändra användarnamn", + "change_email": "Ändra e-postadress", "edit": "Ändra", - "edit-profile": "Edit Profile", + "edit-profile": "Redigera profil", "default_picture": "Standard-ikon", "uploaded_picture": "Uppladdad bild", "upload_new_picture": "Ladda upp ny bild", - "upload_new_picture_from_url": "Ladda upp ny bild från länk", + "upload_new_picture_from_url": "Ladda upp ny bild via länk", "current_password": "Nuvarande lösenord", "change_password": "Ändra lösenord", "change_password_error": "Ogiltigt lösenord.", @@ -56,56 +56,56 @@ "password": "Lösenord", "username_taken_workaround": "Användarnamnet är redan upptaget, så vi förändrade det lite. Du kallas nu för %1", "password_same_as_username": "Ditt lösenord är samma som ditt användarnamn, välj ett annat lösenord.", - "password_same_as_email": "Your password is the same as your email, please select another password.", + "password_same_as_email": "Ditt lösenord är detsamma som din e-postadress. Var god välj ett annat lösenord.", "upload_picture": "Ladda upp bild", "upload_a_picture": "Ladda upp en bild", "remove_uploaded_picture": "Ta bort uppladdad bild", - "upload_cover_picture": "Upload cover picture", + "upload_cover_picture": "Ladda upp omslagsbild", "settings": "Inställningar", - "show_email": "Visa min epost", - "show_fullname": "Visa Fullständigt Namn", + "show_email": "Visa min e-postadress", + "show_fullname": "Visa fullständigt namn", "restrict_chats": "Tillåt endast chatt-meddelanden från användare som jag följer", "digest_label": "Prenumerera på sammanställt flöde", - "digest_description": "Prenumerera på epostuppdateringar för det här forumet (notiser och ämnen) med en viss regelbundenhet", + "digest_description": "Prenumerera på e-postuppdateringar för det här forumet (notiser och ämnen) med en viss regelbundenhet", "digest_off": "Avslagen", - "digest_daily": "Daligen", + "digest_daily": "Dagligen", "digest_weekly": "Veckovis", "digest_monthly": "Månadsvis", - "send_chat_notifications": "Skicka ett epostmeddelande om nya chatt-meddelanden tas emot när jag inte är online.", - "send_post_notifications": "Skicka ett epost när svar kommit på ämnen jag prenumererar på till", + "send_chat_notifications": "Skicka ett e-postmeddelande om nya chatt-meddelanden tas emot när jag inte är online.", + "send_post_notifications": "Skicka ett e-postmeddelande när svar tillkommit på ämnen jag prenumererar på", "settings-require-reload": "Vissa inställningar som ändrades kräver att sidan laddas om. Klicka här för att ladda om sidan.", "has_no_follower": "Denna användare har inga följare :(", "follows_no_one": "Denna användare följer ingen :(", - "has_no_posts": "Användaren har inte skrivit några inlägg ännu", - "has_no_topics": "Användaren har inte skrivit några ämnen ännu", - "has_no_watched_topics": "Användaren har inte bevakat några ämnen ännu", - "has_no_upvoted_posts": "This user hasn't upvoted any posts yet.", - "has_no_downvoted_posts": "This user hasn't downvoted any posts yet.", - "has_no_voted_posts": "This user has no voted posts", - "email_hidden": "Epost dold", + "has_no_posts": "Användaren har inte skrivit några inlägg ännu.", + "has_no_topics": "Användaren har inte postat några ämnen ännu.", + "has_no_watched_topics": "Användaren har inte bevakat några ämnen ännu.", + "has_no_upvoted_posts": "Den här användaren har inte röstat upp några inlägg än.", + "has_no_downvoted_posts": "Den här användaren har inte röstat ned några inlägg än.", + "has_no_voted_posts": "Den här användaren har inga inlägg med röster", + "email_hidden": "E-post dold", "hidden": "dold", "paginate_description": "Gör så att ämnen och inlägg visas som sidor istället för oändlig skroll", "topics_per_page": "Ämnen per sida", "posts_per_page": "Inlägg per sida", "notification_sounds": "Spela ett ljud när du får en notis", "browsing": "Inställning för bläddring", - "open_links_in_new_tab": "Öppna utgående länkar på ny flik", - "enable_topic_searching": "Aktivera Sökning Inom Ämne", + "open_links_in_new_tab": "Öppna utgående länkar i ny flik", + "enable_topic_searching": "Aktivera sökning inom ämne", "topic_search_help": "Om aktiverat kommer sökning inom ämne överskrida webbläsarens vanliga funktionen för sökning bland sidor och tillåta dig att söka genom hela ämnet istället för det som endast visas på skärmen.", - "delay_image_loading": "Delay Image Loading", - "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", - "scroll_to_my_post": "After posting a reply, show the new post", - "follow_topics_you_reply_to": "Följ ämnen som du svarat på", - "follow_topics_you_create": "Följ ämnen du skapat", - "grouptitle": "Group Title", + "delay_image_loading": "Fördröj inladdning av bilder", + "image_load_delay_help": "Aktivera för att hindra bilder ifrån att ladda in, innan de skrollats fram på skärmen. ", + "scroll_to_my_post": "Visa det nya inlägget när ett svar har postats", + "follow_topics_you_reply_to": "Följ ämnen som du svarar på", + "follow_topics_you_create": "Följ ämnen du skapar", + "grouptitle": "Grupptitel", "no-group-title": "Ingen titel på gruppen", "select-skin": "Välj ett Skin", - "select-homepage": "Select a Homepage", - "homepage": "Homepage", - "homepage_description": "Select a page to use as the forum homepage or 'None' to use the default homepage.", - "custom_route": "Custom Homepage Route", - "custom_route_help": "Enter a route name here, without any preceding slash (e.g. \"recent\", or \"popular\")", + "select-homepage": "Välj en startsida", + "homepage": "Startsida", + "homepage_description": "Välj en sida som ska användas som forumets startsida eller 'Ingen' för att använda standardstartsidan.", + "custom_route": "Sökväg till egen startsida", + "custom_route_help": "Skriv in ett sökvägsnamn här, utan föregående slash. (tex \"recent\" eller \"popular\")", "sso.title": "Single Sign-on-tjänster", - "sso.associated": "Associated with", - "sso.not-associated": "Click here to associate with" + "sso.associated": "Associerad med", + "sso.not-associated": "Klicka här för att associera med" } \ No newline at end of file diff --git a/public/language/sv/users.json b/public/language/sv/users.json index 29f91b76c0..a6b2aebd35 100644 --- a/public/language/sv/users.json +++ b/public/language/sv/users.json @@ -15,6 +15,6 @@ "popular_topics": "Populära ämnen", "unread_topics": "Olästa ämnen", "categories": "Kategorier", - "tags": "Märkord", - "no-users-found": "No users found!" + "tags": "Taggar", + "no-users-found": "Inga användare hittades!" } \ No newline at end of file From 9b54ce7235bd9a5db9b5b16127aa03c37c4921ee Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 3 May 2016 16:14:41 +0300 Subject: [PATCH 0167/1109] fix uploads with no extensions --- src/controllers/uploads.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/controllers/uploads.js b/src/controllers/uploads.js index 223f7818a1..d096ecf0de 100644 --- a/src/controllers/uploads.js +++ b/src/controllers/uploads.js @@ -185,6 +185,9 @@ function uploadFile(uid, uploadedFile, callback) { if (meta.config.hasOwnProperty('allowedFileExtensions')) { var allowed = file.allowedExtensions(); var extension = path.extname(uploadedFile.name); + if (!extension) { + extension = '.' + mime.extension(uploadedFile.type); + } if (allowed.length > 0 && allowed.indexOf(extension) === -1) { return callback(new Error('[[error:invalid-file-type, ' + allowed.join(', ') + ']]')); } @@ -195,7 +198,7 @@ function uploadFile(uid, uploadedFile, callback) { function saveFileToLocal(uploadedFile, callback) { var extension = path.extname(uploadedFile.name); - if(!extension) { + if (!extension) { extension = '.' + mime.extension(uploadedFile.type); } From e791ed90029a92d910698244c58d9a6c364f496b Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 3 May 2016 16:28:20 +0300 Subject: [PATCH 0168/1109] up composer --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1e7842cbe4..61eaaf7af0 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "morgan": "^1.3.2", "mousetrap": "^1.5.3", "nconf": "~0.8.2", - "nodebb-plugin-composer-default": "3.0.27", + "nodebb-plugin-composer-default": "3.0.28", "nodebb-plugin-dbsearch": "1.0.1", "nodebb-plugin-emoji-one": "1.1.3", "nodebb-plugin-emoji-extended": "1.1.0", From c758f59014a382513147c423c3e977acf0bdfa37 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 3 May 2016 17:17:38 +0300 Subject: [PATCH 0169/1109] closes #2302 --- public/src/widgets.js | 3 ++- src/controllers/api.js | 1 + src/views/admin/partials/widget-settings.tpl | 18 +++++++++++++++++ src/widgets/admin.js | 21 ++++++++++---------- src/widgets/index.js | 17 +++++++++------- 5 files changed, 42 insertions(+), 18 deletions(-) create mode 100644 src/views/admin/partials/widget-settings.tpl diff --git a/public/src/widgets.js b/public/src/widgets.js index 2a8b052bba..ffa539c6ff 100644 --- a/public/src/widgets.js +++ b/public/src/widgets.js @@ -40,7 +40,8 @@ $.get(RELATIVE_PATH + '/api/widgets/render' + (config['cache-buster'] ? '?v=' + config['cache-buster'] : ''), { locations: locations, template: template + '.tpl', - url: url + url: url, + isMobile: utils.isMobile() }, function(renderedAreas) { for (var x=0; x + +
        + + + + +
        + +
        + +
        + +
        + +
        + +
        diff --git a/src/widgets/admin.js b/src/widgets/admin.js index 110f523e21..03f16f3a0a 100644 --- a/src/widgets/admin.js +++ b/src/widgets/admin.js @@ -1,8 +1,9 @@ "use strict"; - -var async = require('async'), - plugins = require('../plugins'); +var fs = require('fs'); +var path = require('path'); +var async = require('async'); +var plugins = require('../plugins'); var admin = {}; @@ -22,6 +23,9 @@ admin.get = function(callback) { }, widgets: function(next) { plugins.fireHook('filter:widgets.getWidgets', [], next); + }, + adminTemplate: function(next) { + fs.readFile(path.resolve(__dirname, '../../public/templates/admin/partials/widget-settings.tpl'), 'utf8', next); } }, function(err, widgetData) { if (err) { @@ -34,17 +38,14 @@ admin.get = function(callback) { area.data = areaData; next(err); }); - }, function(err) { if (err) { return callback(err); } - for (var w in widgetData.widgets) { - if (widgetData.widgets.hasOwnProperty(w)) { - // if this gets anymore complicated, it needs to be a template - widgetData.widgets[w].content += "

        "; - } - } + + widgetData.widgets.forEach(function(w) { + w.content += widgetData.adminTemplate; + }); var templates = [], list = {}, index = 0; diff --git a/src/widgets/index.js b/src/widgets/index.js index c1421b44b6..d220f73740 100644 --- a/src/widgets/index.js +++ b/src/widgets/index.js @@ -1,12 +1,12 @@ "use strict"; -var async = require('async'), - winston = require('winston'), - templates = require('templates.js'), +var async = require('async'); +var winston = require('winston'); +var templates = require('templates.js'); - plugins = require('../plugins'), - translator = require('../../public/src/modules/translator'), - db = require('../database'); +var plugins = require('../plugins'); +var translator = require('../../public/src/modules/translator'); +var db = require('../database'); var widgets = {}; @@ -30,7 +30,10 @@ widgets.render = function(uid, area, req, res, callback) { } async.map(widgetsByLocation[location], function(widget, next) { - if (!widget || !widget.data || (!!widget.data['hide-registered'] && uid !== 0) || (!!widget.data['hide-guests'] && uid === 0)) { + if (!widget || !widget.data || + (!!widget.data['hide-registered'] && uid !== 0) || + (!!widget.data['hide-guests'] && uid === 0) || + (!!widget.data['hide-mobile'] && area.isMobile)) { return next(); } From cef7fb545b6c7525a1002e05cf6a890b7f31e760 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 3 May 2016 19:13:10 +0300 Subject: [PATCH 0170/1109] closes #1972 --- public/src/ajaxify.js | 16 +++++++++------- public/src/client/login.js | 7 ++++++- src/controllers/authentication.js | 2 ++ src/controllers/index.js | 22 +++++++++++++++++----- src/middleware/middleware.js | 26 ++++++++++++++++++++++++-- 5 files changed, 58 insertions(+), 15 deletions(-) diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js index 53f979224a..993e45eb81 100644 --- a/public/src/ajaxify.js +++ b/public/src/ajaxify.js @@ -63,6 +63,10 @@ $(document).ready(function() { url = ajaxify.start(url, quiet); + if (!window.location.pathname.match(/\/(403|404)$/g)) { + app.previousUrl = window.location.href; + } + $('body').removeClass(ajaxify.data.bodyClass); $('#footer, #content').removeClass('hide').addClass('ajaxifying'); @@ -85,9 +89,10 @@ $(document).ready(function() { ajaxify.handleRedirects = function(url) { url = ajaxify.removeRelativePath(url.replace(/\/$/, '')).toLowerCase(); - var isAdminRoute = url.startsWith('admin') && window.location.pathname.indexOf(RELATIVE_PATH + '/admin') !== 0; + var isClientToAdmin = url.startsWith('admin') && window.location.pathname.indexOf(RELATIVE_PATH + '/admin') !== 0; + var isAdminToClient = !url.startsWith('admin') && window.location.pathname.indexOf(RELATIVE_PATH + '/admin') === 0; var uploadsOrApi = url.startsWith('uploads') || url.startsWith('api'); - if (isAdminRoute || uploadsOrApi) { + if (isClientToAdmin || isAdminToClient || uploadsOrApi) { window.open(RELATIVE_PATH + '/' + url, '_top'); return true; } @@ -100,10 +105,6 @@ $(document).ready(function() { $(window).trigger('action:ajaxify.start', {url: url}); - if (!window.location.pathname.match(/\/(403|404)$/g)) { - app.previousUrl = window.location.href; - } - ajaxify.currentPage = url.split(/[?#]/)[0]; if (window.history && window.history.pushState) { window.history[!quiet ? 'pushState' : 'replaceState']({ @@ -136,7 +137,8 @@ $(document).ready(function() { } else if (status === 401) { app.alertError('[[global:please_log_in]]'); app.previousUrl = url; - return ajaxify.go('login'); + window.location.href = config.relative_path + '/login'; + return; } else if (status === 302 || status === 308) { if (data.responseJSON.external) { window.location.href = data.responseJSON.external; diff --git a/public/src/client/login.js b/public/src/client/login.js index ecbd607f05..85aeb68be5 100644 --- a/public/src/client/login.js +++ b/public/src/client/login.js @@ -45,7 +45,12 @@ define('forum/login', ['csrf', 'translator'], function(csrf, translator) { return false; }); - $('#content #username').focus(); + if ($('#content #username').attr('readonly')) { + $('#content #password').focus(); + } else { + $('#content #username').focus(); + } + // Add "returnTo" data if present if (app.previousUrl) { diff --git a/src/controllers/authentication.js b/src/controllers/authentication.js index 560965f8ec..0912d99ac9 100644 --- a/src/controllers/authentication.js +++ b/src/controllers/authentication.js @@ -208,6 +208,8 @@ authenticationController.onSuccessfulLogin = function(req, uid, callback) { var uuid = utils.generateUUID(); req.session.meta = {}; + delete req.session.forceLogin; + // Associate IP used during login with user account user.logIP(uid, req.ip); req.session.meta.ip = req.ip; diff --git a/src/controllers/index.js b/src/controllers/index.js index 282d6c1f0a..0a3bf6f67f 100644 --- a/src/controllers/index.js +++ b/src/controllers/index.js @@ -95,15 +95,17 @@ Controllers.reset = function(req, res, next) { }; Controllers.login = function(req, res, next) { - var data = {}, - loginStrategies = require('../routes/authentication').getLoginStrategies(), - registrationType = meta.config.registrationType || 'normal'; + var data = {}; + var loginStrategies = require('../routes/authentication').getLoginStrategies(); + var registrationType = meta.config.registrationType || 'normal'; + + var allowLoginWith = (meta.config.allowLoginWith || 'username-email'); data.alternate_logins = loginStrategies.length > 0; data.authentication = loginStrategies; data.allowLocalLogin = parseInt(meta.config.allowLocalLogin, 10) === 1 || parseInt(req.query.local, 10) === 1; data.allowRegistration = registrationType === 'normal' || registrationType === 'admin-approval'; - data.allowLoginWith = '[[login:' + (meta.config.allowLoginWith || 'username-email') + ']]'; + data.allowLoginWith = '[[login:' + allowLoginWith + ']]'; data.breadcrumbs = helpers.buildBreadcrumbs([{text: '[[global:login]]'}]); data.error = req.flash('error')[0]; data.title = '[[pages:login]]'; @@ -113,8 +115,18 @@ Controllers.login = function(req, res, next) { external: data.authentication[0].url }); } + if (req.uid) { + user.getUserFields(req.uid, ['username', 'email'], function(err, user) { + if (err) { + return next(err); + } + data.username = allowLoginWith === 'email' ? user.email : user.username; + res.render('login', data); + }); + } else { + res.render('login', data); + } - res.render('login', data); }; Controllers.register = function(req, res, next) { diff --git a/src/middleware/middleware.js b/src/middleware/middleware.js index d09270c3c9..184ea28a78 100644 --- a/src/middleware/middleware.js +++ b/src/middleware/middleware.js @@ -87,7 +87,9 @@ middleware.addHeaders = function (req, res, next) { headers = _.pick(headers, Boolean); // Remove falsy headers for(var key in headers) { - res.setHeader(key, headers[key]); + if (headers.hasOwnProperty(key)) { + res.setHeader(key, headers[key]); + } } next(); @@ -103,6 +105,10 @@ middleware.pluginHooks = function(req, res, next) { }; middleware.redirectToAccountIfLoggedIn = function(req, res, next) { + if (req.session.forceLogin) { + return next(); + } + if (!req.user) { return next(); } @@ -165,10 +171,26 @@ middleware.isAdmin = function(req, res, next) { } user.isAdministrator(req.uid, function (err, isAdmin) { - if (err || isAdmin) { + if (err) { return next(err); } + if (isAdmin) { + var loginTime = req.session.meta ? req.session.meta.datetime : 0; + if (loginTime && parseInt(loginTime, 10) > Date.now() - 3600000) { + return next(); + } + + req.session.returnTo = nconf.get('relative_path') + req.path.replace(/^\/api/, ''); + req.session.forceLogin = 1; + if (res.locals.isAPI) { + res.status(401).json({}); + } else { + res.redirect('/login'); + } + return; + } + if (res.locals.isAPI) { return controllers.helpers.notAllowed(req, res); } From 60c1401a70b86b6c9ae340844028366cd038f206 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 4 May 2016 12:20:53 +0300 Subject: [PATCH 0171/1109] up themes --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 61eaaf7af0..32e74878a1 100644 --- a/package.json +++ b/package.json @@ -56,8 +56,8 @@ "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", "nodebb-theme-lavender": "3.0.9", - "nodebb-theme-persona": "4.0.128", - "nodebb-theme-vanilla": "5.0.68", + "nodebb-theme-persona": "4.0.129", + "nodebb-theme-vanilla": "5.0.69", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", "nodemailer-sendmail-transport": "1.0.0", From 90446bdc7f42473ea9813130835e88da41414478 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 4 May 2016 12:29:34 +0300 Subject: [PATCH 0172/1109] closes #4524 --- src/controllers/accounts/profile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/accounts/profile.js b/src/controllers/accounts/profile.js index e52b5f4861..74e919d8f5 100644 --- a/src/controllers/accounts/profile.js +++ b/src/controllers/accounts/profile.js @@ -54,7 +54,7 @@ profileController.get = function(req, res, callback) { }, aboutme: function(next) { if (userData.aboutme) { - plugins.fireHook('filter:parse.raw', userData.aboutme, next); + plugins.fireHook('filter:parse.aboutme', userData.aboutme, next); } else { next(); } From a3c197751ea2097e648452c759bdd288135b061d Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 4 May 2016 12:31:12 +0300 Subject: [PATCH 0173/1109] up markdown --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 32e74878a1..2b4f699cc4 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "nodebb-plugin-dbsearch": "1.0.1", "nodebb-plugin-emoji-one": "1.1.3", "nodebb-plugin-emoji-extended": "1.1.0", - "nodebb-plugin-markdown": "5.1.3", + "nodebb-plugin-markdown": "5.1.4", "nodebb-plugin-mentions": "1.0.21", "nodebb-plugin-soundpack-default": "0.1.6", "nodebb-plugin-spam-be-gone": "0.4.6", From f473e03f76c6890068963e99b61584990b67d675 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 4 May 2016 12:54:26 +0300 Subject: [PATCH 0174/1109] closes #4565 --- public/src/client/topic/posts.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/src/client/topic/posts.js b/public/src/client/topic/posts.js index 605994c9e6..88d80a3872 100644 --- a/public/src/client/topic/posts.js +++ b/public/src/client/topic/posts.js @@ -336,8 +336,9 @@ define('forum/topic/posts', [ Posts.showBottomPostBar = function() { var mainPost = components.get('post', 'index', 0); var posts = $('[component="post"]'); - if (!!mainPost.length && posts.length > 1 && $('.post-bar').length < 2) { + if (!!mainPost.length && posts.length > 1 && $('.post-bar').length < 2 && $('.post-bar-placeholder').length) { $('.post-bar').clone().appendTo(mainPost); + $('.post-bar-placeholder').remove(); } else if (mainPost.length && posts.length < 2) { mainPost.find('.post-bar').remove(); } From a47e0f3384d54c6dfe274d922aa488e9c047eb87 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 4 May 2016 13:00:19 +0300 Subject: [PATCH 0175/1109] up themes --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2b4f699cc4..79641a4459 100644 --- a/package.json +++ b/package.json @@ -55,9 +55,9 @@ "nodebb-plugin-soundpack-default": "0.1.6", "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", - "nodebb-theme-lavender": "3.0.9", - "nodebb-theme-persona": "4.0.129", - "nodebb-theme-vanilla": "5.0.69", + "nodebb-theme-lavender": "3.0.10", + "nodebb-theme-persona": "4.0.130", + "nodebb-theme-vanilla": "5.0.70", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", "nodemailer-sendmail-transport": "1.0.0", From ddf83202dbb8282391eb273505c8fde222780acb Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Wed, 4 May 2016 09:02:31 -0400 Subject: [PATCH 0176/1109] Latest translations and fallbacks --- public/language/ar/error.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/language/ar/error.json b/public/language/ar/error.json index 505831c652..73e9b24094 100644 --- a/public/language/ar/error.json +++ b/public/language/ar/error.json @@ -1,5 +1,5 @@ { - "invalid-data": "بيانات غير صالحة", + "invalid-data": "بيانات غير صحيحة", "not-logged-in": "لم تقم بتسجيل الدخول", "account-locked": "تم حظر حسابك مؤقتًا.", "search-requires-login": "البحث في المنتدى يتطلب حساب - الرجاء تسجيل الدخول أو التسجيل", From b6c6e8c08d487c2b2e8dfb3a28ec6b2d61129221 Mon Sep 17 00:00:00 2001 From: "Paul Westerdale (ABRS Limited)" Date: Wed, 4 May 2016 14:17:31 +0100 Subject: [PATCH 0177/1109] Added hooks into topic follow and unfollow --- src/topics/follow.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/topics/follow.js b/src/topics/follow.js index c05a796741..6725c3534b 100644 --- a/src/topics/follow.js +++ b/src/topics/follow.js @@ -12,6 +12,7 @@ var notifications = require('../notifications'); var privileges = require('../privileges'); var meta = require('../meta'); var emailer = require('../emailer'); +var plugins = require('../plugins'); module.exports = function(Topics) { @@ -56,6 +57,7 @@ module.exports = function(Topics) { return next(new Error('[[error:no-topic]]')); } db.setAdd('tid:' + tid + ':followers', uid, next); + plugins.fireHook('action:topic.follow', {uid : uid, tid : tid}); }, function(next) { db.sortedSetAdd('uid:' + uid + ':followed_tids', Date.now(), tid, next); @@ -74,6 +76,7 @@ module.exports = function(Topics) { return next(new Error('[[error:no-topic]]')); } db.setRemove('tid:' + tid + ':followers', uid, next); + plugins.fireHook('action:topic.unfollow', {uid : uid, tid : tid}); }, function(next) { db.sortedSetRemove('uid:' + uid + ':followed_tids', tid, next); From cdf65600126e1b05d3af7b00ed80930890341161 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 4 May 2016 09:53:32 -0400 Subject: [PATCH 0178/1109] Using async.apply and fixed code style --- src/topics/follow.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/topics/follow.js b/src/topics/follow.js index 6725c3534b..f6f1da7dc5 100644 --- a/src/topics/follow.js +++ b/src/topics/follow.js @@ -57,8 +57,8 @@ module.exports = function(Topics) { return next(new Error('[[error:no-topic]]')); } db.setAdd('tid:' + tid + ':followers', uid, next); - plugins.fireHook('action:topic.follow', {uid : uid, tid : tid}); }, + async.apply(plugins.fireHook, 'action:topic.follow', { uid: uid, tid: tid }), function(next) { db.sortedSetAdd('uid:' + uid + ':followed_tids', Date.now(), tid, next); } @@ -76,8 +76,8 @@ module.exports = function(Topics) { return next(new Error('[[error:no-topic]]')); } db.setRemove('tid:' + tid + ':followers', uid, next); - plugins.fireHook('action:topic.unfollow', {uid : uid, tid : tid}); }, + async.apply(plugins.fireHook, 'action:topic.unfollow', { uid: uid, tid: tid }), function(next) { db.sortedSetRemove('uid:' + uid + ':followed_tids', tid, next); } From 05a55c7d6560f8f8fa9798df1602bee260d3a739 Mon Sep 17 00:00:00 2001 From: Paul Westerdale Date: Wed, 4 May 2016 14:54:51 +0100 Subject: [PATCH 0179/1109] add roomId to messaging filter (#4596) --- src/messaging/create.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/messaging/create.js b/src/messaging/create.js index 3b2b5dcf26..cf78affb64 100644 --- a/src/messaging/create.js +++ b/src/messaging/create.js @@ -55,7 +55,8 @@ module.exports = function(Messaging) { message = { content: content, timestamp: timestamp, - fromuid: fromuid + fromuid: fromuid, + roomId: roomId }; plugins.fireHook('filter:messaging.save', message, next); From b12811d21dd2b07bbe4d028ccecab53e5382cdc8 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 4 May 2016 10:08:56 -0400 Subject: [PATCH 0180/1109] spring cleaning --- src/controllers/authentication.js | 2 - src/plugins/hooks.js | 4 +- src/upgrade.js | 84 +------------------------------ src/user/delete.js | 4 -- 4 files changed, 2 insertions(+), 92 deletions(-) diff --git a/src/controllers/authentication.js b/src/controllers/authentication.js index 0912d99ac9..bc2369bd62 100644 --- a/src/controllers/authentication.js +++ b/src/controllers/authentication.js @@ -310,8 +310,6 @@ authenticationController.logout = function(req, res, next) { user.setUserField(uid, 'lastonline', Date.now() - 300000); - // action:user.loggedOut deprecated in > v0.9.3 - plugins.fireHook('action:user.loggedOut', {req: req, res: res, uid: uid}); plugins.fireHook('static:user.loggedOut', {req: req, res: res, uid: uid}, function() { res.status(200).send(''); }); diff --git a/src/plugins/hooks.js b/src/plugins/hooks.js index 3330608154..aad5466005 100644 --- a/src/plugins/hooks.js +++ b/src/plugins/hooks.js @@ -5,9 +5,7 @@ var winston = require('winston'), module.exports = function(Plugins) { Plugins.deprecatedHooks = { - 'filter:user.delete': 'static:user.delete', - 'filter:user.custom_fields': null, - 'action:user.loggedOut': 'static:user.loggedOut' + 'filter:user.custom_fields': null // remove in v1.1.0 }; /* diff --git a/src/upgrade.js b/src/upgrade.js index 87d2dc7c78..1874db129e 100644 --- a/src/upgrade.js +++ b/src/upgrade.js @@ -6,7 +6,7 @@ var db = require('./database'), Upgrade = {}, - minSchemaDate = Date.UTC(2015, 7, 18), // This value gets updated every new MINOR version + minSchemaDate = Date.UTC(2015, 10, 6), // This value gets updated every new MAJOR version schemaDate, thisSchemaDate, // IMPORTANT: REMEMBER TO UPDATE VALUE OF latestSchema @@ -62,88 +62,6 @@ Upgrade.upgrade = function(callback) { } }); }, - function(next) { - thisSchemaDate = Date.UTC(2015, 8, 30); - if (schemaDate < thisSchemaDate) { - updatesMade = true; - winston.info('[2015/09/30] Converting default Gravatar image to default User Avatar'); - - async.waterfall([ - async.apply(db.isObjectField, 'config', 'customGravatarDefaultImage'), - function(keyExists, _next) { - if (keyExists) { - _next(); - } else { - winston.info('[2015/09/30] Converting default Gravatar image to default User Avatar skipped'); - Upgrade.update(thisSchemaDate, next); - next(); - } - }, - async.apply(db.getObjectField, 'config', 'customGravatarDefaultImage'), - async.apply(db.setObjectField, 'config', 'defaultAvatar'), - async.apply(db.deleteObjectField, 'config', 'customGravatarDefaultImage') - ], function(err) { - if (err) { - return next(err); - } - - winston.info('[2015/09/30] Converting default Gravatar image to default User Avatar done'); - Upgrade.update(thisSchemaDate, next); - }); - } else { - winston.info('[2015/09/30] Converting default Gravatar image to default User Avatar skipped'); - next(); - } - }, - function(next) { - thisSchemaDate = Date.UTC(2015, 10, 6); - if (schemaDate < thisSchemaDate) { - updatesMade = true; - winston.info('[2015/11/06] Removing gravatar'); - - db.getSortedSetRange('users:joindate', 0, -1, function(err, uids) { - if (err) { - return next(err); - } - - async.eachLimit(uids, 500, function(uid, next) { - db.getObjectFields('user:' + uid, ['picture', 'gravatarpicture'], function(err, userData) { - if (err) { - return next(err); - } - - if (!userData.picture || !userData.gravatarpicture) { - return next(); - } - - if (userData.gravatarpicture === userData.picture) { - async.series([ - function (next) { - db.setObjectField('user:' + uid, 'picture', '', next); - }, - function (next) { - db.deleteObjectField('user:' + uid, 'gravatarpicture', next); - } - ], next); - } else { - db.deleteObjectField('user:' + uid, 'gravatarpicture', next); - } - }); - }, function(err) { - if (err) { - return next(err); - } - - winston.info('[2015/11/06] Gravatar pictures removed!'); - Upgrade.update(thisSchemaDate, next); - }); - }); - - } else { - winston.info('[2015/11/06] Gravatar removal skipped'); - next(); - } - }, function(next) { thisSchemaDate = Date.UTC(2015, 11, 15); diff --git a/src/user/delete.js b/src/user/delete.js index 3ab5176725..011ed0aa12 100644 --- a/src/user/delete.js +++ b/src/user/delete.js @@ -121,10 +121,6 @@ module.exports = function(User) { }, function(next) { groups.leaveAllGroups(uid, next); - }, - function(next) { - // Deprecated as of v0.7.4, remove in v1.0.0 - plugins.fireHook('filter:user.delete', uid, next); } ], next); }, From 52e4a37df8c58543a5114641a19347507a30904b Mon Sep 17 00:00:00 2001 From: boomzilla Date: Wed, 4 May 2016 10:29:43 -0400 Subject: [PATCH 0181/1109] When forking a topic, updates user bookmarks in the topic to keep the last read position (#4554) from inadvertently being too far down the topic due to post indices decreasing because some posts were moved to a new topic. --- public/src/client/topic/fork.js | 3 +- src/meta/configs.js | 2 +- src/socket.io/topics.js | 2 +- src/topics.js | 84 +++++++++++++++++++++++++++++ src/topics/fork.js | 5 +- tests/topics.js | 96 +++++++++++++++++++++++++++++++++ 6 files changed, 188 insertions(+), 4 deletions(-) diff --git a/public/src/client/topic/fork.js b/public/src/client/topic/fork.js index a55b45220c..50888a9ca3 100644 --- a/public/src/client/topic/fork.js +++ b/public/src/client/topic/fork.js @@ -55,7 +55,8 @@ define('forum/topic/fork', ['components', 'postSelect'], function(components, po forkCommit.attr('disabled', true); socket.emit('topics.createTopicFromPosts', { title: forkModal.find('#fork-title').val(), - pids: postSelect.pids + pids: postSelect.pids, + fromTid: ajaxify.data.tid }, function(err, newTopic) { function fadeOutAndRemove(pid) { components.get('post', 'pid', pid).fadeOut(500, function() { diff --git a/src/meta/configs.js b/src/meta/configs.js index 3ff42f66ae..69cc375b85 100644 --- a/src/meta/configs.js +++ b/src/meta/configs.js @@ -135,4 +135,4 @@ module.exports = function(Meta) { db.deleteObjectField('config', field); }; -}; \ No newline at end of file +}; diff --git a/src/socket.io/topics.js b/src/socket.io/topics.js index c96a77265e..6f5ab296d9 100644 --- a/src/socket.io/topics.js +++ b/src/socket.io/topics.js @@ -69,7 +69,7 @@ SocketTopics.createTopicFromPosts = function(socket, data, callback) { return callback(new Error('[[error:invalid-data]]')); } - topics.createTopicFromPosts(socket.uid, data.title, data.pids, callback); + topics.createTopicFromPosts(socket.uid, data.title, data.pids, data.fromTid, callback); }; SocketTopics.toggleFollow = function(socket, tid, callback) { diff --git a/src/topics.js b/src/topics.js index 385d3ae558..fbdd507d9a 100644 --- a/src/topics.js +++ b/src/topics.js @@ -328,4 +328,88 @@ var social = require('./social'); } }; + Topics.getTopicBookmarks = function( tid, callback ){ + db.getSortedSetRangeWithScores(['tid:' + tid + ':bookmarks'], 0, -1, callback ); + }; + + Topics.updateTopicBookmarks = function( tid, pids, callback ){ + var maxIndex; + var Posts = posts; + async.waterfall([ + function(next){ + Topics.getPostCount( tid, next ); + }, + function(postcount, next){ + maxIndex = postcount; + Topics.getTopicBookmarks( tid, next ); + }, + function(bookmarks, next){ + var uids = bookmarks.map( function( bookmark ){return bookmark.value}); + var forkedPosts = pids.map( function( pid ){ return { pid: pid, tid: tid }; } ); + var uidBookmark = new Object(); + var uidData = bookmarks.map( + function( bookmark ){ + var u = new Object(); + u.uid = bookmark.value; + u.bookmark = bookmark.score; + return u; + } ); + async.map( + uidData, + function( data, mapCallback ){ + Posts.getPostIndices( + forkedPosts, + data.uid, + function( err, indices ){ + if( err ){ + callback( err ); + } + data.postIndices = indices; + mapCallback( null, data ); + } ) + }, + function( err, results ){ + if( err ){ + return callback(); + } + async.map( + results, + function( data, mapCallback ){ + var uid = data.uid; + var bookmark = data.bookmark; + bookmark = bookmark < maxIndex ? bookmark : maxIndex; + var postIndices = data.postIndices; + var i; + for( i = 0; i < postIndices.length && postIndices[i] < data.bookmark; ++i ){ + --bookmark; + } + + if( bookmark != data.bookmark ){ + mapCallback( null, { uid: uid, bookmark: bookmark } ); + } + else{ + mapCallback( null, null ); + } + }, + function( err, results ){ + async.map( results, + function(ui, cb ){ + if( ui && ui.bookmark){ + Topics.setUserBookmark( tid, ui.uid, ui.bookmark, cb ); + } + else{ + return cb( null, null ); + } + }, + function( err, results ){ + next(); + } + ); + } + ); + } + ); + }], + function( err, result ){ callback();} ); + }; }(exports)); diff --git a/src/topics/fork.js b/src/topics/fork.js index 80143e4d46..768b656d2a 100644 --- a/src/topics/fork.js +++ b/src/topics/fork.js @@ -13,7 +13,7 @@ var meta = require('../meta'); module.exports = function(Topics) { - Topics.createTopicFromPosts = function(uid, title, pids, callback) { + Topics.createTopicFromPosts = function(uid, title, pids, fromTid, callback) { if (title) { title = title.trim(); } @@ -55,6 +55,9 @@ module.exports = function(Topics) { } Topics.create({uid: results.postData.uid, title: title, cid: cid}, next); }, + function( results, next) { + Topics.updateTopicBookmarks(fromTid, pids, function(){ next( null, results );} ); + }, function(_tid, next) { function move(pid, next) { privileges.posts.canEdit(pid, uid, function(err, canEdit) { diff --git a/tests/topics.js b/tests/topics.js index fe00db7646..60c71960cd 100644 --- a/tests/topics.js +++ b/tests/topics.js @@ -7,6 +7,8 @@ var db = require('./mocks/databasemock'); var topics = require('../src/topics'); var categories = require('../src/categories'); var User = require('../src/user'); +var groups = require('../src/groups'); +var async = require('async'); describe('Topic\'s', function() { var topic, @@ -188,6 +190,100 @@ describe('Topic\'s', function() { }); + describe('.fork', function(){ + var newTopic; + var replies = new Array(); + var topicPids; + var originalBookmark = 5; + function postReply( next ){ + topics.reply({uid: topic.userId, content: 'test post ' + replies.length, tid: newTopic.tid}, + function(err, result) { + assert.equal(err, null, 'was created with error'); + assert.ok(result); + replies.push( result ); + next(); + } + ); + } + + before( function(done) { + async.waterfall( + [ + function(next){ + groups.join('administrators', topic.userId, next); + }, + function( next ){ + topics.post({uid: topic.userId, title: topic.title, content: topic.content, cid: topic.categoryId}, function(err, result) { + assert.ifError( err ); + newTopic = result.topicData; + next(); + }); + }, + function( next ){ postReply( next );}, + function( next ){ postReply( next );}, + function( next ){ postReply( next );}, + function( next ){ postReply( next );}, + function( next ){ postReply( next );}, + function( next ){ postReply( next );}, + function( next ){ postReply( next );}, + function( next ){ postReply( next );}, + function( next ){ postReply( next );}, + function( next ){ postReply( next );}, + function( next ){ postReply( next );}, + function( next ){ postReply( next );}, + function( next ){ + topicPids = replies.map( function( reply ){ return reply.pid; } ); + topics.setUserBookmark( newTopic.tid, topic.userId, originalBookmark, next ); + }], + done ); + }); + + it('should have 12 replies', function(done) { + assert.equal( 12, replies.length ); + done(); + }); + + it('should not update the user\'s bookmark', function(done){ + async.waterfall([ + function(next){ + topics.createTopicFromPosts( + topic.userId, + 'Fork test, no bookmark update', + topicPids.slice( -2 ), + newTopic.tid, + next ); + }, + function( forkedTopicData, next){ + topics.getUserBookmark( newTopic.tid, topic.userId, next ); + }, + function( bookmark, next ){ + assert.equal( originalBookmark, bookmark ); + next(); + } + ],done); + }); + + it('should update the user\'s bookmark ', function(done){ + async.waterfall([ + function(next){ + topics.createTopicFromPosts( + topic.userId, + 'Fork test, no bookmark update', + topicPids.slice( 1, 3 ), + newTopic.tid, + next ); + }, + function( forkedTopicData, next){ + topics.getUserBookmark( newTopic.tid, topic.userId, next ); + }, + function( bookmark, next ){ + assert.equal( originalBookmark - 2, bookmark ); + next(); + } + ],done); + }); + }); + after(function() { db.flushdb(); }); From 7540fb54ac026f03a2ac6fba08cad819fc1dc447 Mon Sep 17 00:00:00 2001 From: Ben Lubar Date: Wed, 4 May 2016 09:53:06 -0500 Subject: [PATCH 0182/1109] fix avatar upload crash discovered by @AccaliaDeElementia --- src/user/picture.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/user/picture.js b/src/user/picture.js index a55eee2975..385050fcf2 100644 --- a/src/user/picture.js +++ b/src/user/picture.js @@ -63,7 +63,9 @@ module.exports = function(User) { async.series([ async.apply(image.normalise, picture.path, extension), async.apply(fs.rename, picture.path + '.png', picture.path) - ], next); + ], function(err) { + next(err); + }); }, function(next) { User.getUserField(updateUid, 'uploadedpicture', next); From eb0aea6390cd38c3802d070262068c676d796aaf Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 5 May 2016 20:24:03 +0300 Subject: [PATCH 0183/1109] add /user/ and /post/ redirects change notifications to use new redirects --- public/src/modules/notifications.js | 15 ++--- src/controllers/helpers.js | 14 ++-- src/controllers/index.js | 1 + src/controllers/posts.js | 24 +++++++ src/middleware/middleware.js | 15 +++++ src/notifications.js | 5 +- src/posts/topics.js | 51 +++++++++++++- src/routes/accounts.js | 4 +- src/routes/index.js | 38 ++++++----- src/socket.io/helpers.js | 3 +- src/socket.io/notifications.js | 24 ------- src/socket.io/posts/flag.js | 1 + src/socket.io/user.js | 2 +- src/topics/follow.js | 1 + src/user/notifications.js | 100 +++------------------------- 15 files changed, 142 insertions(+), 156 deletions(-) create mode 100644 src/controllers/posts.js diff --git a/public/src/modules/notifications.js b/public/src/modules/notifications.js index 35f1e677dd..f98074ac5b 100644 --- a/public/src/modules/notifications.js +++ b/public/src/modules/notifications.js @@ -84,14 +84,7 @@ define('notifications', ['sounds', 'translator', 'components'], function(sound, payload.message = notifData.bodyShort; payload.type = 'info'; payload.clickfn = function() { - socket.emit('notifications.generatePath', notifData.nid, function(err, path) { - if (err) { - return app.alertError(err.message); - } - if (path) { - ajaxify.go(path); - } - }); + window.location.href = config.relative_path + '/' + notifData.path; }; } else { payload.message = '[[notifications:you_have_unread_notifications]]'; @@ -104,13 +97,13 @@ define('notifications', ['sounds', 'translator', 'components'], function(sound, if (ajaxify.currentPage === 'notifications') { ajaxify.refresh(); } - + if (!unreadNotifs[notifData.nid]) { incrementNotifCount(1); sound.play('notification'); - unreadNotifs[notifData.nid] = true; - } + unreadNotifs[notifData.nid] = true; + } }); socket.on('event:notifications.updateCount', function(count) { diff --git a/src/controllers/helpers.js b/src/controllers/helpers.js index a558d665dd..8032ed7a0e 100644 --- a/src/controllers/helpers.js +++ b/src/controllers/helpers.js @@ -1,13 +1,13 @@ 'use strict'; -var nconf = require('nconf'), - async = require('async'), - validator = require('validator'), +var nconf = require('nconf'); +var async = require('async'); +var validator = require('validator'); - translator = require('../../public/src/modules/translator'), - categories = require('../categories'), - plugins = require('../plugins'), - meta = require('../meta'); +var translator = require('../../public/src/modules/translator'); +var categories = require('../categories'); +var plugins = require('../plugins'); +var meta = require('../meta'); var helpers = {}; diff --git a/src/controllers/index.js b/src/controllers/index.js index 0a3bf6f67f..76d86cee31 100644 --- a/src/controllers/index.js +++ b/src/controllers/index.js @@ -12,6 +12,7 @@ var helpers = require('./helpers'); var Controllers = { topics: require('./topics'), + posts: require('./posts'), categories: require('./categories'), category: require('./category'), unread: require('./unread'), diff --git a/src/controllers/posts.js b/src/controllers/posts.js new file mode 100644 index 0000000000..c8b490f65b --- /dev/null +++ b/src/controllers/posts.js @@ -0,0 +1,24 @@ +"use strict"; + +var posts = require('../posts'); +var helpers = require('./helpers'); + +var postsController = {}; + +postsController.redirectToPost = function(req, res, callback) { + var pid = parseInt(req.params.pid, 10); + if (!pid) { + return callback(); + } + + posts.generatePostPath(pid, req.uid, function(err, path) { + if (err) { + return callback(err); + } + + helpers.redirect(res, path); + }); +}; + + +module.exports = postsController; diff --git a/src/middleware/middleware.js b/src/middleware/middleware.js index 184ea28a78..1dd5eee7bc 100644 --- a/src/middleware/middleware.js +++ b/src/middleware/middleware.js @@ -165,6 +165,21 @@ middleware.checkAccountPermissions = function(req, res, next) { }); }; +middleware.redirectUidToUserslug = function(req, res, next) { + var uid = parseInt(req.params.userslug, 10); + if (!uid) { + return next(); + } + user.getUserField(uid, 'userslug', function(err, userslug) { + if (err || !userslug) { + return next(err); + } + + var path = req.path.replace(/^\/api/, '').replace(uid, function() { return userslug; }); + controllers.helpers.redirect(res, path); + }); +}; + middleware.isAdmin = function(req, res, next) { if (!req.uid) { return controllers.helpers.notAllowed(req, res); diff --git a/src/notifications.js b/src/notifications.js index 8a6b41d303..4f6d73f385 100644 --- a/src/notifications.js +++ b/src/notifications.js @@ -12,6 +12,7 @@ var User = require('./user'); var groups = require('./groups'); var meta = require('./meta'); var plugins = require('./plugins'); +var utils = require('../public/src/utils'); (function(Notifications) { @@ -45,6 +46,8 @@ var plugins = require('./plugins'); return next(null, null); } + notification.datetimeISO = utils.toISOString(notification.datetime); + if (notification.bodyLong) { notification.bodyLong = S(notification.bodyLong).escapeHTML().s; } @@ -85,7 +88,7 @@ var plugins = require('./plugins'); // Removes nids that have been pruned db.isSortedSetMembers('notifications', nids, function(err, exists) { if (err) { - return callbacK(err); + return callback(err); } nids = nids.filter(function(notifId, idx) { diff --git a/src/posts/topics.js b/src/posts/topics.js index a9946fdace..7ffd9592ce 100644 --- a/src/posts/topics.js +++ b/src/posts/topics.js @@ -1,8 +1,10 @@ 'use strict'; -var async = require('async'), - topics = require('../topics'); +var async = require('async'); + +var topics = require('../topics'); +var utils = require('../../public/src/utils'); module.exports = function(Posts) { @@ -42,4 +44,49 @@ module.exports = function(Posts) { ], callback); }; + Posts.generatePostPath = function (pid, uid, callback) { + Posts.generatePostPaths([pid], uid, function(err, paths) { + callback(err, Array.isArray(paths) && paths.length ? paths[0] : null); + }); + }; + + Posts.generatePostPaths = function (pids, uid, callback) { + async.waterfall([ + function (next) { + Posts.getPostsFields(pids, ['pid', 'tid'], next); + }, + function (postData, next) { + async.parallel({ + indices: function(next) { + Posts.getPostIndices(postData, uid, next); + }, + topics: function(next) { + var tids = postData.map(function(post) { + return post ? post.tid : null; + }); + + topics.getTopicsFields(tids, ['slug', 'deleted'], next); + } + }, next); + }, + function (results, next) { + var paths = pids.map(function(pid, index) { + if (parseInt(results.topics[index].deleted, 10) === 1) { + return null; + } + + var slug = results.topics[index] ? results.topics[index].slug : null; + var postIndex = utils.isNumber(results.indices[index]) ? parseInt(results.indices[index], 10) + 1 : null; + + if (slug && postIndex) { + return '/topic/' + slug + '/' + postIndex; + } + return null; + }); + + next(null, paths); + } + ], callback); + }; + }; \ No newline at end of file diff --git a/src/routes/accounts.js b/src/routes/accounts.js index 8c7a505d0b..48d23b0ce0 100644 --- a/src/routes/accounts.js +++ b/src/routes/accounts.js @@ -4,8 +4,8 @@ var helpers = require('./helpers'); var setupPageRoute = helpers.setupPageRoute; module.exports = function (app, middleware, controllers) { - var middlewares = [middleware.checkGlobalPrivacySettings]; - var accountMiddlewares = [middleware.checkGlobalPrivacySettings, middleware.checkAccountPermissions]; + var middlewares = [middleware.checkGlobalPrivacySettings, middleware.redirectUidToUserslug]; + var accountMiddlewares = [middleware.checkGlobalPrivacySettings, middleware.checkAccountPermissions, middleware.redirectUidToUserslug]; setupPageRoute(app, '/user/:userslug', middleware, middlewares, controllers.accounts.profile.get); setupPageRoute(app, '/user/:userslug/following', middleware, middlewares, controllers.accounts.follow.getFollowing); diff --git a/src/routes/index.js b/src/routes/index.js index 8efdc1f2a7..86198b56dd 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -1,23 +1,23 @@ "use strict"; -var nconf = require('nconf'), - path = require('path'), - async = require('async'), - winston = require('winston'), - controllers = require('../controllers'), - plugins = require('../plugins'), - express = require('express'), - validator = require('validator'), +var nconf = require('nconf'); +var path = require('path'); +var async = require('async'); +var winston = require('winston'); +var controllers = require('../controllers'); +var plugins = require('../plugins'); +var express = require('express'); +var validator = require('validator'); - accountRoutes = require('./accounts'), +var accountRoutes = require('./accounts'); - metaRoutes = require('./meta'), - apiRoutes = require('./api'), - adminRoutes = require('./admin'), - feedRoutes = require('./feeds'), - pluginRoutes = require('./plugins'), - authRoutes = require('./authentication'), - helpers = require('./helpers'); +var metaRoutes = require('./meta'); +var apiRoutes = require('./api'); +var adminRoutes = require('./admin'); +var feedRoutes = require('./feeds'); +var pluginRoutes = require('./plugins'); +var authRoutes = require('./authentication'); +var helpers = require('./helpers'); var setupPageRoute = helpers.setupPageRoute; @@ -46,6 +46,10 @@ function topicRoutes(app, middleware, controllers) { setupPageRoute(app, '/topic/:topic_id/:slug?', middleware, [], controllers.topics.get); } +function postRoutes(app, middleware, controllers) { + setupPageRoute(app, '/post/:pid', middleware, [], controllers.posts.redirectToPost); +} + function tagRoutes(app, middleware, controllers) { setupPageRoute(app, '/tags/:tag', middleware, [middleware.privateTagListing], controllers.tags.getTag); setupPageRoute(app, '/tags', middleware, [middleware.privateTagListing], controllers.tags.getTags); @@ -71,7 +75,6 @@ function userRoutes(app, middleware, controllers) { setupPageRoute(app, '/users/banned', middleware, middlewares, controllers.users.getBannedUsers); } - function groupRoutes(app, middleware, controllers) { var middlewares = [middleware.checkGlobalPrivacySettings, middleware.exposeGroupName]; @@ -124,6 +127,7 @@ module.exports = function(app, middleware, hotswapIds) { mainRoutes(router, middleware, controllers); topicRoutes(router, middleware, controllers); + postRoutes(router, middleware, controllers); globalModRoutes(router, middleware, controllers); tagRoutes(router, middleware, controllers); categoryRoutes(router, middleware, controllers); diff --git a/src/socket.io/helpers.js b/src/socket.io/helpers.js index e4621811ca..b39bf7360a 100644 --- a/src/socket.io/helpers.js +++ b/src/socket.io/helpers.js @@ -78,6 +78,7 @@ SocketHelpers.sendNotificationToPostOwner = function(pid, fromuid, notification) bodyShort: '[[' + notification + ', ' + results.username + ', ' + titleEscaped + ']]', bodyLong: results.postObj.content, pid: pid, + path: '/post/' + pid, nid: 'post:' + pid + ':uid:' + fromuid, from: fromuid, mergeId: notification + '|' + pid, @@ -110,7 +111,7 @@ SocketHelpers.sendNotificationToTopicOwner = function(tid, fromuid, notification notifications.create({ bodyShort: '[[' + notification + ', ' + results.username + ', ' + titleEscaped + ']]', - path: nconf.get('relative_path') + '/topic/' + results.topicData.slug, + path: '/topic/' + results.topicData.slug, nid: 'tid:' + tid + ':uid:' + fromuid, from: fromuid }, function(err, notification) { diff --git a/src/socket.io/notifications.js b/src/socket.io/notifications.js index 121ede2a96..db6753bc40 100644 --- a/src/socket.io/notifications.js +++ b/src/socket.io/notifications.js @@ -56,28 +56,4 @@ SocketNotifs.markAllRead = function(socket, data, callback) { notifications.markAllRead(socket.uid, callback); }; -SocketNotifs.generatePath = function(socket, nid, callback) { - if (!socket.uid) { - return callback(new Error('[[error:no-privileges]]'));; - } - async.waterfall([ - function (next) { - notifications.get(nid, next); - }, - function (notification, next) { - if (!notification) { - return next(null, ''); - } - user.notifications.generateNotificationPaths([notification], socket.uid, next); - }, - function (notificationsData, next) { - if (notificationsData && notificationsData.length) { - next(null, notificationsData[0].path); - } else { - next(); - } - } - ], callback); -}; - module.exports = SocketNotifs; diff --git a/src/socket.io/posts/flag.js b/src/socket.io/posts/flag.js index bbf7a4721c..e9d378d2be 100644 --- a/src/socket.io/posts/flag.js +++ b/src/socket.io/posts/flag.js @@ -90,6 +90,7 @@ module.exports = function(SocketPosts) { bodyShort: '[[notifications:user_flagged_post_in, ' + flaggingUser.username + ', ' + titleEscaped + ']]', bodyLong: post.content, pid: data.pid, + path: '/post/' + pid, nid: 'post_flag:' + data.pid + ':uid:' + socket.uid, from: socket.uid, mergeId: 'notifications:user_flagged_post_in|' + data.pid, diff --git a/src/socket.io/user.js b/src/socket.io/user.js index 75ecd949fd..59672c006b 100644 --- a/src/socket.io/user.js +++ b/src/socket.io/user.js @@ -155,7 +155,7 @@ SocketUser.follow = function(socket, data, callback) { bodyShort: '[[notifications:user_started_following_you, ' + userData.username + ']]', nid: 'follow:' + data.uid + ':uid:' + socket.uid, from: socket.uid, - path: '/user/' + userData.userslug, + path: '/user/' + socket.uid, mergeId: 'notifications:user_started_following_you' }, next); }, diff --git a/src/topics/follow.js b/src/topics/follow.js index f6f1da7dc5..90708ba50a 100644 --- a/src/topics/follow.js +++ b/src/topics/follow.js @@ -141,6 +141,7 @@ module.exports = function(Topics) { bodyShort: '[[notifications:user_posted_to, ' + postData.user.username + ', ' + titleEscaped + ']]', bodyLong: postData.content, pid: postData.pid, + path: '/post/' + postData.pid, nid: 'new_post:tid:' + postData.topic.tid + ':pid:' + postData.pid + ':uid:' + exceptUid, tid: postData.topic.tid, from: exceptUid, diff --git a/src/user/notifications.js b/src/user/notifications.js index 2f766a72de..852f9f0924 100644 --- a/src/user/notifications.js +++ b/src/user/notifications.js @@ -1,19 +1,14 @@ 'use strict'; -var async = require('async'), - nconf = require('nconf'), - winston = require('winston'), - S = require('string'), +var async = require('async'); +var winston = require('winston'); +var S = require('string'); - user = require('../user'), - db = require('../database'), - meta = require('../meta'), - notifications = require('../notifications'), - posts = require('../posts'), - topics = require('../topics'), - privileges = require('../privileges'), - utils = require('../../public/src/utils'); +var db = require('../database'); +var meta = require('../meta'); +var notifications = require('../notifications'); +var privileges = require('../privileges'); (function(UserNotifications) { @@ -103,89 +98,13 @@ var async = require('async'), if (err) { return callback(err); } - - UserNotifications.generateNotificationPaths(notifications, uid, callback); - }); - }; - - UserNotifications.generateNotificationPaths = function (notifications, uid, callback) { - var pids = notifications.map(function(notification) { - return notification ? notification.pid : null; - }); - - generatePostPaths(pids, uid, function(err, pidToPaths) { - if (err) { - return callback(err); - } - - notifications = notifications.map(function(notification, index) { - if (!notification) { - return null; - } - - notification.path = pidToPaths[notification.pid] || notification.path || null; - - if (notification.nid.startsWith('follow')) { - notification.path = '/user/' + notification.user.userslug; - } - - notification.datetimeISO = utils.toISOString(notification.datetime); - return notification; - }).filter(function(notification) { - // Remove notifications that do not resolve to a path - return notification && notification.path !== null; + notifications = notifications.filter(function(notification) { + return notification && notification.path; }); - callback(null, notifications); }); }; - function generatePostPaths(pids, uid, callback) { - pids = pids.filter(Boolean); - var postKeys = pids.map(function(pid) { - return 'post:' + pid; - }); - - db.getObjectsFields(postKeys, ['pid', 'tid'], function(err, postData) { - if (err) { - return callback(err); - } - - var topicKeys = postData.map(function(post) { - return post ? 'topic:' + post.tid : null; - }); - - async.parallel({ - indices: function(next) { - posts.getPostIndices(postData, uid, next); - }, - topics: function(next) { - db.getObjectsFields(topicKeys, ['slug', 'deleted'], next); - } - }, function(err, results) { - if (err) { - return callback(err); - } - - var pidToPaths = {}; - pids.forEach(function(pid, index) { - if (parseInt(results.topics[index].deleted, 10) === 1) { - pidToPaths[pid] = null; - return; - } - - var slug = results.topics[index] ? results.topics[index].slug : null; - var postIndex = utils.isNumber(results.indices[index]) ? parseInt(results.indices[index], 10) + 1 : null; - - if (slug && postIndex) { - pidToPaths[pid] = '/topic/' + slug + '/' + postIndex; - } - }); - - callback(null, pidToPaths); - }); - }); - } UserNotifications.getDailyUnread = function(uid, callback) { var yesterday = Date.now() - (1000 * 60 * 60 * 24); // Approximate, can be more or less depending on time changes, makes no difference really. @@ -300,6 +219,7 @@ var async = require('async'), bodyShort: '[[notifications:user_posted_topic, ' + postData.user.username + ', ' + title + ']]', bodyLong: postData.content, pid: postData.pid, + path: '/post/' + postData.pid, nid: 'tid:' + postData.tid + ':uid:' + uid, tid: postData.tid, from: uid From 78e9c81de4079d99281ee2a94da8c1002a81bbbb Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 5 May 2016 20:29:31 +0300 Subject: [PATCH 0184/1109] up mentions --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 79641a4459..eb0da69ac6 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "nodebb-plugin-emoji-one": "1.1.3", "nodebb-plugin-emoji-extended": "1.1.0", "nodebb-plugin-markdown": "5.1.4", - "nodebb-plugin-mentions": "1.0.21", + "nodebb-plugin-mentions": "1.0.22", "nodebb-plugin-soundpack-default": "0.1.6", "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", From 22e7f8356434621a6fe11a1af66489e5e7e5317b Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 5 May 2016 20:52:49 +0300 Subject: [PATCH 0185/1109] up composer --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index eb0da69ac6..2dd99993a2 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "morgan": "^1.3.2", "mousetrap": "^1.5.3", "nconf": "~0.8.2", - "nodebb-plugin-composer-default": "3.0.28", + "nodebb-plugin-composer-default": "3.0.29", "nodebb-plugin-dbsearch": "1.0.1", "nodebb-plugin-emoji-one": "1.1.3", "nodebb-plugin-emoji-extended": "1.1.0", From b493b81dbdeaaad4443ec67e1745224024e49d54 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 5 May 2016 21:00:15 +0300 Subject: [PATCH 0186/1109] fix crash if category or children is invalid --- public/src/modules/helpers.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/src/modules/helpers.js b/public/src/modules/helpers.js index fda87711fb..7250fab3b6 100644 --- a/public/src/modules/helpers.js +++ b/public/src/modules/helpers.js @@ -103,7 +103,9 @@ helpers.generateChildrenCategories = function(category) { var html = ''; var relative_path = (typeof config !== 'undefined' ? config.relative_path : require('nconf').get('relative_path')); - + if (!category || !category.children) { + return html; + } category.children.forEach(function(child) { if (!child) { return; From 19b9242934ca8e63c85b8ad58641925c85565580 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 5 May 2016 22:08:15 +0300 Subject: [PATCH 0187/1109] up mentions --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2dd99993a2..8f8ce4227e 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "nodebb-plugin-emoji-one": "1.1.3", "nodebb-plugin-emoji-extended": "1.1.0", "nodebb-plugin-markdown": "5.1.4", - "nodebb-plugin-mentions": "1.0.22", + "nodebb-plugin-mentions": "1.0.23", "nodebb-plugin-soundpack-default": "0.1.6", "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", From decd8535071b9f40ab6effc6d6ac851941296f83 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 5 May 2016 22:13:52 +0300 Subject: [PATCH 0188/1109] closes #4602 --- public/src/modules/notifications.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/src/modules/notifications.js b/public/src/modules/notifications.js index f98074ac5b..86723dc3e5 100644 --- a/public/src/modules/notifications.js +++ b/public/src/modules/notifications.js @@ -84,7 +84,11 @@ define('notifications', ['sounds', 'translator', 'components'], function(sound, payload.message = notifData.bodyShort; payload.type = 'info'; payload.clickfn = function() { - window.location.href = config.relative_path + '/' + notifData.path; + if (notifData.path.startsWith('http') && notifData.path.startsWith('https')) { + window.location.href = notifData.path; + } else { + window.location.href = window.location.protocol + '//' + window.location.host + config.relative_path + notifData.path; + } }; } else { payload.message = '[[notifications:you_have_unread_notifications]]'; From 2ea57e41104284106f1538db79e9d238ec87fb82 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 5 May 2016 23:03:21 +0300 Subject: [PATCH 0189/1109] up composer --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8f8ce4227e..84e5e936ec 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "morgan": "^1.3.2", "mousetrap": "^1.5.3", "nconf": "~0.8.2", - "nodebb-plugin-composer-default": "3.0.29", + "nodebb-plugin-composer-default": "3.0.30", "nodebb-plugin-dbsearch": "1.0.1", "nodebb-plugin-emoji-one": "1.1.3", "nodebb-plugin-emoji-extended": "1.1.0", From 4cdeae33e5f25f84108a7663680a513f84ac7513 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Thu, 5 May 2016 22:44:14 -0400 Subject: [PATCH 0190/1109] don't add "page-xxx-" class if trailing slash exists --- src/middleware/render.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middleware/render.js b/src/middleware/render.js index 0dd0543600..aacc20c281 100644 --- a/src/middleware/render.js +++ b/src/middleware/render.js @@ -98,7 +98,7 @@ module.exports = function(middleware) { }; function buildBodyClass(req) { - var clean = req.path.replace(/^\/api/, '').replace(/^\//, ''); + var clean = req.path.replace(/^\/api/, '').replace(/^\/|\/$/g, ''); var parts = clean.split('/').slice(0, 3); parts.forEach(function(p, index) { parts[index] = index ? parts[0] + '-' + p : 'page-' + (p || 'home'); From 458d4996a62c4ff43c3108f7710e063f5214b3e5 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Fri, 6 May 2016 00:05:58 -0400 Subject: [PATCH 0191/1109] filter:categories.get --- src/controllers/categories.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controllers/categories.js b/src/controllers/categories.js index 7e3e4b0efe..12c94954b2 100644 --- a/src/controllers/categories.js +++ b/src/controllers/categories.js @@ -73,7 +73,9 @@ categoriesController.list = function(req, res, next) { } }); - res.render('categories', data); + plugins.fireHook('filter:categories.get', data, function(err, data) { + res.render('categories', data); + }); }); }; From 0287703047ea134ff2c8a1261be0fae5b455aa1a Mon Sep 17 00:00:00 2001 From: psychobunny Date: Fri, 6 May 2016 00:07:05 -0400 Subject: [PATCH 0192/1109] missed plugins req --- src/controllers/categories.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/controllers/categories.js b/src/controllers/categories.js index 12c94954b2..7429cae666 100644 --- a/src/controllers/categories.js +++ b/src/controllers/categories.js @@ -6,6 +6,7 @@ var validator = require('validator'); var categories = require('../categories'); var meta = require('../meta'); +var plugins = require('../plugins'); var helpers = require('./helpers'); var categoriesController = {}; From 702597d759ba21e982e3cf42253112fd52a135c3 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 6 May 2016 09:41:30 +0300 Subject: [PATCH 0193/1109] change /user/uid to /uid/:uid so it doesn't conflict with actual user routes was causing incorrect redirects if a user had a numeric userslug @julianlam --- src/middleware/middleware.js | 6 ++++-- src/routes/accounts.js | 6 ++++-- src/socket.io/user.js | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/middleware/middleware.js b/src/middleware/middleware.js index 1dd5eee7bc..bc07719ade 100644 --- a/src/middleware/middleware.js +++ b/src/middleware/middleware.js @@ -166,7 +166,7 @@ middleware.checkAccountPermissions = function(req, res, next) { }; middleware.redirectUidToUserslug = function(req, res, next) { - var uid = parseInt(req.params.userslug, 10); + var uid = parseInt(req.params.uid, 10); if (!uid) { return next(); } @@ -175,7 +175,9 @@ middleware.redirectUidToUserslug = function(req, res, next) { return next(err); } - var path = req.path.replace(/^\/api/, '').replace(uid, function() { return userslug; }); + var path = req.path.replace(/^\/api/, '') + .replace('uid', 'user') + .replace(uid, function() { return userslug; }); controllers.helpers.redirect(res, path); }); }; diff --git a/src/routes/accounts.js b/src/routes/accounts.js index 48d23b0ce0..9ee4b3af20 100644 --- a/src/routes/accounts.js +++ b/src/routes/accounts.js @@ -4,8 +4,10 @@ var helpers = require('./helpers'); var setupPageRoute = helpers.setupPageRoute; module.exports = function (app, middleware, controllers) { - var middlewares = [middleware.checkGlobalPrivacySettings, middleware.redirectUidToUserslug]; - var accountMiddlewares = [middleware.checkGlobalPrivacySettings, middleware.checkAccountPermissions, middleware.redirectUidToUserslug]; + var middlewares = [middleware.checkGlobalPrivacySettings]; + var accountMiddlewares = [middleware.checkGlobalPrivacySettings, middleware.checkAccountPermissions]; + + setupPageRoute(app, '/uid/:uid/:section?', middleware, [], middleware.redirectUidToUserslug); setupPageRoute(app, '/user/:userslug', middleware, middlewares, controllers.accounts.profile.get); setupPageRoute(app, '/user/:userslug/following', middleware, middlewares, controllers.accounts.follow.getFollowing); diff --git a/src/socket.io/user.js b/src/socket.io/user.js index 59672c006b..c38bcc5bbf 100644 --- a/src/socket.io/user.js +++ b/src/socket.io/user.js @@ -155,7 +155,7 @@ SocketUser.follow = function(socket, data, callback) { bodyShort: '[[notifications:user_started_following_you, ' + userData.username + ']]', nid: 'follow:' + data.uid + ':uid:' + socket.uid, from: socket.uid, - path: '/user/' + socket.uid, + path: '/uid/' + socket.uid, mergeId: 'notifications:user_started_following_you' }, next); }, From bafbcad163e0016fda40b8202c542fa5a89bb9b5 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Fri, 6 May 2016 03:54:13 -0400 Subject: [PATCH 0194/1109] use filter:categories.build instead of .get --- src/controllers/categories.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/controllers/categories.js b/src/controllers/categories.js index 7429cae666..7e3e4b0efe 100644 --- a/src/controllers/categories.js +++ b/src/controllers/categories.js @@ -6,7 +6,6 @@ var validator = require('validator'); var categories = require('../categories'); var meta = require('../meta'); -var plugins = require('../plugins'); var helpers = require('./helpers'); var categoriesController = {}; @@ -74,9 +73,7 @@ categoriesController.list = function(req, res, next) { } }); - plugins.fireHook('filter:categories.get', data, function(err, data) { - res.render('categories', data); - }); + res.render('categories', data); }); }; From d85a8d068d91009a1ee7e6f32e24e8fa028a8799 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Fri, 6 May 2016 04:42:59 -0400 Subject: [PATCH 0195/1109] consolidate allowed image types in ACP --- src/controllers/admin/uploads.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/controllers/admin/uploads.js b/src/controllers/admin/uploads.js index aea79e3934..0affec8f6b 100644 --- a/src/controllers/admin/uploads.js +++ b/src/controllers/admin/uploads.js @@ -9,13 +9,13 @@ var fs = require('fs'), image = require('../../image'), plugins = require('../../plugins'); +var allowedImageTypes = ['image/png', 'image/jpeg', 'image/pjpeg', 'image/jpg', 'image/gif', 'image/svg+xml']; var uploadsController = {}; uploadsController.uploadCategoryPicture = function(req, res, next) { var uploadedFile = req.files.files[0]; - var allowedTypes = ['image/png', 'image/jpeg', 'image/jpg', 'image/gif', 'image/svg+xml'], - params = null; + var params = null; try { params = JSON.parse(req.body.params); @@ -28,7 +28,7 @@ uploadsController.uploadCategoryPicture = function(req, res, next) { return next(e); } - if (validateUpload(req, res, next, uploadedFile, allowedTypes)) { + if (validateUpload(req, res, next, uploadedFile, allowedImageTypes)) { var filename = 'category-' + params.cid + path.extname(uploadedFile.name); uploadImage(filename, 'category', uploadedFile, req, res, next); } @@ -126,8 +126,8 @@ uploadsController.uploadDefaultAvatar = function(req, res, next) { function upload(name, req, res, next) { var uploadedFile = req.files.files[0]; - var allowedTypes = ['image/png', 'image/jpeg', 'image/pjpeg', 'image/jpg', 'image/gif']; - if (validateUpload(req, res, next, uploadedFile, allowedTypes)) { + + if (validateUpload(req, res, next, uploadedFile, allowedImageTypes)) { var filename = name + path.extname(uploadedFile.name); uploadImage(filename, 'system', uploadedFile, req, res, next); } From 1501eda31140d94ceb018c8b2d6461394ad0d0e6 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 6 May 2016 12:23:44 +0300 Subject: [PATCH 0196/1109] up mentions --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 84e5e936ec..2c7f00a2ea 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "nodebb-plugin-emoji-one": "1.1.3", "nodebb-plugin-emoji-extended": "1.1.0", "nodebb-plugin-markdown": "5.1.4", - "nodebb-plugin-mentions": "1.0.23", + "nodebb-plugin-mentions": "1.0.24", "nodebb-plugin-soundpack-default": "0.1.6", "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", From b446ff42c3a1bc26f49cffb32e2503a868e107ef Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 6 May 2016 13:47:10 +0300 Subject: [PATCH 0197/1109] style changes --- src/socket.io/helpers.js | 97 ++++++++++++++++++++++----------------- src/user/notifications.js | 37 +++++++++------ 2 files changed, 79 insertions(+), 55 deletions(-) diff --git a/src/socket.io/helpers.js b/src/socket.io/helpers.js index b39bf7360a..69a4a26b54 100644 --- a/src/socket.io/helpers.js +++ b/src/socket.io/helpers.js @@ -3,7 +3,6 @@ var async = require('async'); var winston = require('winston'); var S = require('string'); -var nconf = require('nconf'); var websockets = require('./index'); var user = require('../user'); @@ -53,24 +52,24 @@ SocketHelpers.sendNotificationToPostOwner = function(pid, fromuid, notification) if (!pid || !fromuid || !notification) { return; } - posts.getPostFields(pid, ['tid', 'uid', 'content'], function(err, postData) { - if (err) { - return; - } - - if (!postData.uid || fromuid === parseInt(postData.uid, 10)) { - return; - } - - async.parallel({ - username: async.apply(user.getUserField, fromuid, 'username'), - topicTitle: async.apply(topics.getTopicField, postData.tid, 'title'), - postObj: async.apply(posts.parsePost, postData) - }, function(err, results) { - if (err) { + fromuid = parseInt(fromuid, 10); + var postData; + async.waterfall([ + function (next) { + posts.getPostFields(pid, ['tid', 'uid', 'content'], next); + }, + function (_postData, next) { + postData = _postData; + if (!postData.uid || fromuid === parseInt(postData.uid, 10)) { return; } - + async.parallel({ + username: async.apply(user.getUserField, fromuid, 'username'), + topicTitle: async.apply(topics.getTopicField, postData.tid, 'title'), + postObj: async.apply(posts.parsePost, postData) + }, next); + }, + function (results, next) { var title = S(results.topicTitle).decodeHTMLEntities().s; var titleEscaped = title.replace(/%/g, '%').replace(/,/g, ','); @@ -83,12 +82,15 @@ SocketHelpers.sendNotificationToPostOwner = function(pid, fromuid, notification) from: fromuid, mergeId: notification + '|' + pid, topicTitle: results.topicTitle - }, function(err, notification) { - if (!err && notification) { - notifications.push(notification, [postData.uid]); - } - }); - }); + }, next); + } + ], function(err, notification) { + if (err) { + return winston.error(err); + } + if (notification) { + notifications.push(notification, [postData.uid]); + } }); }; @@ -98,27 +100,38 @@ SocketHelpers.sendNotificationToTopicOwner = function(tid, fromuid, notification return; } - async.parallel({ - username: async.apply(user.getUserField, fromuid, 'username'), - topicData: async.apply(topics.getTopicFields, tid, ['uid', 'slug', 'title']), - }, function(err, results) { - if (err || fromuid === parseInt(results.topicData.uid, 10)) { - return; - } + fromuid = parseInt(fromuid, 10); - var title = S(results.topicData.title).decodeHTMLEntities().s; - var titleEscaped = title.replace(/%/g, '%').replace(/,/g, ','); - - notifications.create({ - bodyShort: '[[' + notification + ', ' + results.username + ', ' + titleEscaped + ']]', - path: '/topic/' + results.topicData.slug, - nid: 'tid:' + tid + ':uid:' + fromuid, - from: fromuid - }, function(err, notification) { - if (!err && notification) { - notifications.push(notification, [results.topicData.uid]); + var ownerUid; + async.waterfall([ + function (next) { + async.parallel({ + username: async.apply(user.getUserField, fromuid, 'username'), + topicData: async.apply(topics.getTopicFields, tid, ['uid', 'slug', 'title']), + }, next); + }, + function (results, next) { + if (fromuid === parseInt(results.topicData.uid, 10)) { + return; } - }); + ownerUid = results.topicData.uid; + var title = S(results.topicData.title).decodeHTMLEntities().s; + var titleEscaped = title.replace(/%/g, '%').replace(/,/g, ','); + + notifications.create({ + bodyShort: '[[' + notification + ', ' + results.username + ', ' + titleEscaped + ']]', + path: '/topic/' + results.topicData.slug, + nid: 'tid:' + tid + ':uid:' + fromuid, + from: fromuid + }, next); + } + ], function(err, notification) { + if (err) { + return winston.error(err); + } + if (notification && parseInt(ownerUid, 10)) { + notifications.push(notification, [ownerUid]); + } }); }; diff --git a/src/user/notifications.js b/src/user/notifications.js index 852f9f0924..b08cb6aaff 100644 --- a/src/user/notifications.js +++ b/src/user/notifications.js @@ -200,13 +200,20 @@ var privileges = require('../privileges'); }; UserNotifications.sendTopicNotificationToFollowers = function(uid, topicData, postData) { - db.getSortedSetRange('followers:' + uid, 0, -1, function(err, followers) { - if (err || !Array.isArray(followers) || !followers.length) { - return; - } - - privileges.categories.filterUids('read', topicData.cid, followers, function(err, followers) { - if (err || !followers.length) { + var followers; + async.waterfall([ + function (next) { + db.getSortedSetRange('followers:' + uid, 0, -1, next); + }, + function (followers, next) { + if (!Array.isArray(followers) || !followers.length) { + return; + } + privileges.categories.filterUids('read', topicData.cid, followers, next); + }, + function (_followers, next) { + followers = _followers; + if (!followers.length) { return; } @@ -223,12 +230,16 @@ var privileges = require('../privileges'); nid: 'tid:' + postData.tid + ':uid:' + uid, tid: postData.tid, from: uid - }, function(err, notification) { - if (!err && notification) { - notifications.push(notification, followers); - } - }); - }); + }, next); + } + ], function(err, notification) { + if (err) { + return winston.error(err); + } + + if (notification) { + notifications.push(notification, followers); + } }); }; From a919d40e51a398f7d5e4b4a824010b53782658d6 Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Fri, 6 May 2016 09:02:30 -0400 Subject: [PATCH 0198/1109] Latest translations and fallbacks --- public/language/zh_TW/category.json | 10 ++++----- public/language/zh_TW/email.json | 18 +++++++-------- public/language/zh_TW/global.json | 34 ++++++++++++++--------------- public/language/zh_TW/register.json | 2 +- public/language/zh_TW/tags.json | 2 +- 5 files changed, 33 insertions(+), 33 deletions(-) diff --git a/public/language/zh_TW/category.json b/public/language/zh_TW/category.json index c1ab395ea5..341f400cd8 100644 --- a/public/language/zh_TW/category.json +++ b/public/language/zh_TW/category.json @@ -1,16 +1,16 @@ { - "category": "Category", - "subcategories": "Subcategories", + "category": "類別", + "subcategories": "子類別", "new_topic_button": "新主題", - "guest-login-post": "登錄後才能發表", + "guest-login-post": "登入後才能張貼", "no_topics": "這個類別還沒有任何主題。
        為何不來發點東西呢?", "browsing": "正在瀏覽", "no_replies": "還沒有回覆", - "no_new_posts": "No new posts.", + "no_new_posts": "沒有新的張貼", "share_this_category": "分享這類別", "watch": "觀看", "ignore": "忽略", "watch.message": "您正觀看著此類別的更新", "ignore.message": "您已忽略此類別的更新", - "watched-categories": "Watched categories" + "watched-categories": "看過的類別" } \ No newline at end of file diff --git a/public/language/zh_TW/email.json b/public/language/zh_TW/email.json index 8361ff52d0..6fb33ade9c 100644 --- a/public/language/zh_TW/email.json +++ b/public/language/zh_TW/email.json @@ -1,15 +1,15 @@ { "password-reset-requested": "已要求重設密碼 - %1!", "welcome-to": "歡迎來到%1", - "invite": "Invitation from %1", + "invite": "邀請來自 %1", "greeting_no_name": "您好", "greeting_with_name": "您好,%1", - "welcome.text1": "多謝登記%1!", + "welcome.text1": "感謝您註冊 %1!", "welcome.text2": "要啟用你的帳戶,我們先要驗證你用作登記的電郵地址", - "welcome.text3": "An administrator has accepted your registration application. You can login with your username/password now.", + "welcome.text3": "管理者已經批準您的註冊申請。你現在可以使用你的帳號/密碼進行登入。", "welcome.cta": "請點擊此處確認您的電郵地址", - "invitation.text1": "%1 has invited you to join %2", - "invitation.ctr": "Click here to create your account.", + "invitation.text1": "%1 邀請您加入 %2", + "invitation.ctr": "點擊這裡來建立你的帳號", "reset.text1": "我們收到一個重設密碼的請求,你忘掉了密碼嗎?如果不是,請忽略這封郵件。", "reset.text2": "要繼續重置密碼,請點擊以下鏈接:", "reset.cta": "點擊這裡重置密碼", @@ -21,10 +21,10 @@ "digest.cta": "點擊這裡訪問%1", "digest.unsub.info": "本摘要按您的訂閱設置發送給您。", "digest.no_topics": "在過去%1沒有活躍的話題", - "digest.day": "day", - "digest.week": "week", - "digest.month": "month", - "digest.subject": "Digest for %1", + "digest.day": "日", + "digest.week": "週", + "digest.month": "月", + "digest.subject": "摘要於 %1", "notif.chat.subject": "收到來自$1的聊天消息", "notif.chat.cta": "點擊此處繼續對話", "notif.chat.unsub.info": "本聊天通知按您的訂閱設置發送給您。", diff --git a/public/language/zh_TW/global.json b/public/language/zh_TW/global.json index 10e4169e07..57791619b2 100644 --- a/public/language/zh_TW/global.json +++ b/public/language/zh_TW/global.json @@ -22,7 +22,7 @@ "pagination.out_of": "%1 out of %2", "pagination.enter_index": "輸入Index", "header.admin": "管理", - "header.categories": "Categories", + "header.categories": "類別", "header.recent": "最近", "header.unread": "未讀", "header.tags": "標籤", @@ -33,7 +33,7 @@ "header.notifications": "通知", "header.search": "搜尋", "header.profile": "設置", - "header.navigation": "Navigation", + "header.navigation": "導覽", "notifications.loading": "消息載入中", "chats.loading": "聊天載入中···", "motd.welcome": "歡迎來到 NodeBB,一個未來的討論平台。", @@ -49,29 +49,29 @@ "users": "使用者", "topics": "主題", "posts": "文章", - "best": "Best", - "upvoted": "Upvoted", - "downvoted": "Downvoted", + "best": "最棒", + "upvoted": "讚", + "downvoted": "爛", "views": "Views", "reputation": "聲譽", "read_more": "閱讀更多...", - "more": "More", + "more": "更多", "posted_ago_by_guest": "posted %1 by Guest", "posted_ago_by": "posted %1 by %2", "posted_ago": "posted %1", - "posted_in": "posted in %1", - "posted_in_by": "posted in %1 by %2", + "posted_in": "張貼於 %1", + "posted_in_by": "張貼於 %1 由 %2", "posted_in_ago": "posted in %1", "posted_in_ago_by": "posted in %1 %2 by %3", "user_posted_ago": "%1 posted %2", "guest_posted_ago": "Guest posted %1", - "last_edited_by": "last edited by %1", + "last_edited_by": "最後編輯由 %1", "norecentposts": "最近沒新文章", "norecenttopics": "最近沒新主題", "recentposts": "最近的文章", "recentips": "最近登錄的 IP 來源位址", "away": "離開", - "dnd": "Do not disturb", + "dnd": "不要打擾", "invisible": "隱藏", "offline": "離線", "email": "Email", @@ -84,11 +84,11 @@ "follow": "追蹤", "unfollow": "取消追蹤", "delete_all": "全部刪除", - "map": "Map", - "sessions": "Login Sessions", - "ip_address": "IP Address", - "enter_page_number": "Enter page number", - "upload_file": "Upload file", - "upload": "Upload", - "allowed-file-types": "Allowed file types are %1" + "map": "地圖", + "sessions": "登入連線階段", + "ip_address": "IP地址", + "enter_page_number": "輸入頁碼", + "upload_file": "上傳檔案", + "upload": "上傳", + "allowed-file-types": "允許的檔案類型是 %1" } \ No newline at end of file diff --git a/public/language/zh_TW/register.json b/public/language/zh_TW/register.json index e690779ae8..d61934f70d 100644 --- a/public/language/zh_TW/register.json +++ b/public/language/zh_TW/register.json @@ -15,5 +15,5 @@ "alternative_registration": "其他註冊方式", "terms_of_use": "使用條款", "agree_to_terms_of_use": "同意遵守使用條款", - "registration-added-to-queue": "Your registration has been added to the approval queue. You will receive an email when it is accepted by an administrator." + "registration-added-to-queue": "您的註冊已經被加入到審核序列中。您將會在管理者批準後收到一封電子郵件。" } \ No newline at end of file diff --git a/public/language/zh_TW/tags.json b/public/language/zh_TW/tags.json index ce9de5c88b..8b2046b293 100644 --- a/public/language/zh_TW/tags.json +++ b/public/language/zh_TW/tags.json @@ -1,7 +1,7 @@ { "no_tag_topics": "沒有此標籤的主題。", "tags": "標籤", - "enter_tags_here": "Enter tags here, between %1 and %2 characters each.", + "enter_tags_here": "在這裡輸入標籤,每個介於 %1 到 %2 字元。 ", "enter_tags_here_short": "輸入標籤...", "no_tags": "還沒有標籤呢。" } \ No newline at end of file From a1d2fbefe7d8ec59f9b5b26b560cf7e7702a928e Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Sat, 7 May 2016 09:02:27 -0400 Subject: [PATCH 0199/1109] Latest translations and fallbacks --- public/language/zh_TW/error.json | 54 +++++++++++------------ public/language/zh_TW/groups.json | 44 +++++++++--------- public/language/zh_TW/modules.json | 36 +++++++-------- public/language/zh_TW/pages.json | 40 ++++++++--------- public/language/zh_TW/recent.json | 16 +++---- public/language/zh_TW/reset_password.json | 6 +-- public/language/zh_TW/search.json | 2 +- public/language/zh_TW/topic.json | 34 +++++++------- public/language/zh_TW/unread.json | 8 ++-- public/language/zh_TW/uploads.json | 8 ++-- public/language/zh_TW/users.json | 20 ++++----- 11 files changed, 134 insertions(+), 134 deletions(-) diff --git a/public/language/zh_TW/error.json b/public/language/zh_TW/error.json index 5deae59892..0376a3c3de 100644 --- a/public/language/zh_TW/error.json +++ b/public/language/zh_TW/error.json @@ -2,7 +2,7 @@ "invalid-data": "無效的資料", "not-logged-in": "您似乎還沒有登入喔!", "account-locked": "您的帳戶暫時被鎖定!", - "search-requires-login": "Searching requires an account - please login or register.", + "search-requires-login": "進行搜尋需要有帳號 - 請先註冊或登入", "invalid-cid": "無效的類別 ID", "invalid-tid": "無效的主題 ID", "invalid-pid": "無效的文章 ID", @@ -14,17 +14,17 @@ "invalid-password": "無效的密碼", "invalid-username-or-password": "請指定用戶名和密碼", "invalid-search-term": "無效的搜索字詞", - "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", + "invalid-pagination-value": "無效的分頁數值, 必需是至少 %1 與最多 %2", "username-taken": "該使用者名稱已被使用", "email-taken": "該信箱已被使用", "email-not-confirmed": "您的電郵尚未得到確認,請點擊此處確認您的電子郵件。", "email-not-confirmed-chat": "You are unable to chat until your email is confirmed, please click here to confirm your email.", "no-email-to-confirm": "This forum requires email confirmation, please click here to enter an email", - "email-confirm-failed": "We could not confirm your email, please try again later.", + "email-confirm-failed": "我們無法確認你的Email,請之後再重試。", "confirm-email-already-sent": "Confirmation email already sent, please wait %1 minute(s) to send another one.", - "username-too-short": "使用者名稱太簡短", - "username-too-long": "使用者名稱太長", - "password-too-long": "Password too long", + "username-too-short": "帳號太短", + "username-too-long": "帳號太長", + "password-too-long": "密碼太長", "user-banned": "該使用者已被停用", "user-too-new": "抱歉,發表您第一篇文章須要等待 %1 秒", "blacklisted-ip": "Sorry, your IP address has been banned from this community. If you feel this is in error, please contact an administrator.", @@ -50,9 +50,9 @@ "too-many-tags": "Too many tags. Topics can't have more than %1 tag(s)", "still-uploading": "請等待上傳完成。", "file-too-big": "Maximum allowed file size is %1 kB - please upload a smaller file", - "guest-upload-disabled": "Guest uploading has been disabled", - "already-favourited": "You have already bookmarked this post", - "already-unfavourited": "You have already unbookmarked this post", + "guest-upload-disabled": "訪客上傳是被禁止的", + "already-favourited": "你已經將這篇張貼加入書籤", + "already-unfavourited": "你已經將這篇張貼移除書籤", "cant-ban-other-admins": "您無法禁止其他的管理員!", "cant-remove-last-admin": "You are the only administrator. Add another user as an administrator before removing yourself as admin", "invalid-image-type": "無效的圖像類型。允許的類型:%1", @@ -61,11 +61,11 @@ "group-name-too-short": "群組名稱太短了", "group-already-exists": "群組名稱已存在", "group-name-change-not-allowed": "變更群組名稱不被允許", - "group-already-member": "Already part of this group", - "group-not-member": "Not a member of this group", - "group-needs-owner": "This group requires at least one owner", - "group-already-invited": "This user has already been invited", - "group-already-requested": "Your membership request has already been submitted", + "group-already-member": "已經加入這個群組", + "group-not-member": "不是這個群組的一員", + "group-needs-owner": "這個群組需要至少一個擁有者", + "group-already-invited": "這個使用者已經被邀請", + "group-already-requested": "你的會員申請已經被提交", "post-already-deleted": "此文章已經被刪除", "post-already-restored": "此文章已還原", "topic-already-deleted": "此主題已經被刪除", @@ -78,27 +78,27 @@ "about-me-too-long": "Sorry, your about me cannot be longer than %1 character(s).", "cant-chat-with-yourself": "你不能與自己聊天!", "chat-restricted": "此用戶已限制了他的聊天功能。你要在他關注你之後,才能跟他聊天", - "chat-disabled": "Chat system disabled", + "chat-disabled": "聊天系統被禁止", "too-many-messages": "You have sent too many messages, please wait awhile.", - "invalid-chat-message": "Invalid chat message", - "chat-message-too-long": "Chat message is too long", - "cant-edit-chat-message": "You are not allowed to edit this message", - "cant-remove-last-user": "You can't remove the last user", - "cant-delete-chat-message": "You are not allowed to delete this message", - "already-voting-for-this-post": "You have already voted for this post.", + "invalid-chat-message": "無效的聊天訊息", + "chat-message-too-long": "聊天訊息太長", + "cant-edit-chat-message": "你不被允許編輯這條訊息", + "cant-remove-last-user": "你不能移除最後的使用者", + "cant-delete-chat-message": "你不被允許刪除這條訊息", + "already-voting-for-this-post": "你已經對這個張貼投過票了", "reputation-system-disabled": "信譽系統已停用。", "downvoting-disabled": "Downvoting已停用", "not-enough-reputation-to-downvote": "你沒有足夠的信譽downvote這個帖子", "not-enough-reputation-to-flag": "你沒有足夠的信譽來舉報這個帖子", - "already-flagged": "You have already flagged this post", + "already-flagged": "你已經對這個張貼標記過了", "reload-failed": "NodeBB重載\"%1\"時遇到了問題。 NodeBB將繼續提供現有的客戶端資源,但請你撤消重載前的動作。", "registration-error": "註冊錯誤", - "parse-error": "Something went wrong while parsing server response", + "parse-error": "當剖析伺服器回應時發生了某個錯誤", "wrong-login-type-email": "請使用您的電子郵件進行登錄", "wrong-login-type-username": "請使用您的使用者名稱進行登錄", "invite-maximum-met": "You have invited the maximum amount of people (%1 out of %2).", - "no-session-found": "No login session found!", - "not-in-room": "User not in room", - "no-users-in-room": "No users in this room", - "cant-kick-self": "You can't kick yourself from the group" + "no-session-found": "沒有找到登入的連線階段!", + "not-in-room": "使用者沒有在聊天室中", + "no-users-in-room": "沒有使用者在聊天室中", + "cant-kick-self": "你不能把自己從群組中踢出" } \ No newline at end of file diff --git a/public/language/zh_TW/groups.json b/public/language/zh_TW/groups.json index d562fb5ccd..511331e301 100644 --- a/public/language/zh_TW/groups.json +++ b/public/language/zh_TW/groups.json @@ -6,25 +6,25 @@ "no_groups_found": "這裡看不到任何群組", "pending.accept": "接受", "pending.reject": "拒絕", - "pending.accept_all": "Accept All", - "pending.reject_all": "Reject All", - "pending.none": "There are no pending members at this time", - "invited.none": "There are no invited members at this time", - "invited.uninvite": "Rescind Invitation", - "invited.search": "Search for a user to invite to this group", - "invited.notification_title": "You have been invited to join %1", - "request.notification_title": "Group Membership Request from %1", - "request.notification_text": "%1 has requested to become a member of %2", + "pending.accept_all": "同意所有", + "pending.reject_all": "拒絕所有", + "pending.none": "目前沒有等待中的會員", + "invited.none": "目前沒有邀請的會員", + "invited.uninvite": "撤銷邀請", + "invited.search": "搜尋要邀請加入這個群組的用戶", + "invited.notification_title": "你已被邀請加入%1", + "request.notification_title": "群組會員要求,來自%1", + "request.notification_text": "%1已經要求成為%2群組的會員", "cover-save": "儲存", "cover-saving": "儲存中", "details.title": "群組詳細信息", "details.members": "成員列表", "details.pending": "待審成員", - "details.invited": "Invited Members", + "details.invited": "邀請會員", "details.has_no_posts": "這個群組的成員還未發出任何帖子。", "details.latest_posts": "最新文章", "details.private": "私人", - "details.disableJoinRequests": "Disable join requests", + "details.disableJoinRequests": "禁止加入要求", "details.grant": "准許/撤銷 所有權", "details.kick": "剔除", "details.owner_options": "群組管理員", @@ -37,18 +37,18 @@ "details.change_colour": "變更顏色", "details.badge_text": "徽章字串", "details.userTitleEnabled": "顯示徽章", - "details.private_help": "If enabled, joining of groups requires approval from a group owner", + "details.private_help": "如果開啟,加入群組需要經過群組擁有者批準", "details.hidden": "隱藏", - "details.hidden_help": "If enabled, this group will not be found in the groups listing, and users will have to be invited manually", - "details.delete_group": "Delete Group", - "details.private_system_help": "Private groups is disabled at system level, this option does not do anything", + "details.hidden_help": "如果開啟的話,群組將不會在群組列表中被看到,而且用戶將需要手動邀請", + "details.delete_group": "刪除群組", + "details.private_system_help": "私有群組在系統層級被禁用,這個選項沒有任何作用", "event.updated": "群組詳細訊息已被更新", "event.deleted": "此 \"%1\" 群組已被刪除了", - "membership.accept-invitation": "Accept Invitation", - "membership.invitation-pending": "Invitation Pending", - "membership.join-group": "Join Group", - "membership.leave-group": "Leave Group", - "membership.reject": "Reject", - "new-group.group_name": "Group Name:", - "upload-group-cover": "Upload group cover" + "membership.accept-invitation": "同意邀請", + "membership.invitation-pending": "邀請等待中", + "membership.join-group": "加入群組", + "membership.leave-group": "離開群組", + "membership.reject": "拒絕", + "new-group.group_name": "群組名稱:", + "upload-group-cover": "上傳群組封面圖" } \ No newline at end of file diff --git a/public/language/zh_TW/modules.json b/public/language/zh_TW/modules.json index c34132769a..109139f9c2 100644 --- a/public/language/zh_TW/modules.json +++ b/public/language/zh_TW/modules.json @@ -5,10 +5,10 @@ "chat.no_active": "暫無聊天", "chat.user_typing": "%1 正在輸入中...", "chat.user_has_messaged_you": "%1 已傳送訊息給你了", - "chat.see_all": "See all chats", - "chat.mark_all_read": "Mark all chats read", + "chat.see_all": "顯示全部聊天", + "chat.mark_all_read": "所有訊息標為已讀", "chat.no-messages": "請選擇收件人來查看聊天記錄", - "chat.no-users-in-room": "No users in this room", + "chat.no-users-in-room": "沒有用戶在聊天室中", "chat.recent-chats": "最近的聊天記錄", "chat.contacts": "通訊錄", "chat.message-history": "消息記錄", @@ -17,22 +17,22 @@ "chat.seven_days": "7日", "chat.thirty_days": "30日", "chat.three_months": "3個月", - "chat.delete_message_confirm": "Are you sure you wish to delete this message?", - "chat.roomname": "Chat Room %1", - "chat.add-users-to-room": "Add users to room", - "composer.compose": "Compose", - "composer.show_preview": "Show Preview", - "composer.hide_preview": "Hide Preview", + "chat.delete_message_confirm": "你確定要刪除這個訊息?", + "chat.roomname": "聊天室 %1", + "chat.add-users-to-room": "將用戶加入聊天室中", + "composer.compose": "撰寫", + "composer.show_preview": "顯示預覽", + "composer.hide_preview": "隱藏預覽", "composer.user_said_in": "%1在%2裡說:", "composer.user_said": "%1說:", "composer.discard": "你確定要放棄這帖子嗎?", - "composer.submit_and_lock": "Submit and Lock", - "composer.toggle_dropdown": "Toggle Dropdown", - "composer.uploading": "Uploading %1", - "bootbox.ok": "OK", - "bootbox.cancel": "Cancel", - "bootbox.confirm": "Confirm", - "cover.dragging_title": "Cover Photo Positioning", - "cover.dragging_message": "Drag the cover photo to the desired position and click \"Save\"", - "cover.saved": "Cover photo image and position saved" + "composer.submit_and_lock": "提交然後鎖定", + "composer.toggle_dropdown": "切換下拉選單", + "composer.uploading": "上傳中 %1", + "bootbox.ok": "好", + "bootbox.cancel": "取消", + "bootbox.confirm": "確認", + "cover.dragging_title": "封面照片位置", + "cover.dragging_message": "拖拉封面照片到想要的位置,然後按下\"儲存\"", + "cover.saved": "封面照片與位置已儲存" } \ No newline at end of file diff --git a/public/language/zh_TW/pages.json b/public/language/zh_TW/pages.json index 121be06593..431b71a11d 100644 --- a/public/language/zh_TW/pages.json +++ b/public/language/zh_TW/pages.json @@ -1,30 +1,30 @@ { "home": "首頁", "unread": "未讀的主題", - "popular-day": "Popular topics today", - "popular-week": "Popular topics this week", - "popular-month": "Popular topics this month", - "popular-alltime": "All time popular topics", + "popular-day": "今天受歡迎的主題", + "popular-week": "本週受歡迎的主題", + "popular-month": "本月受歡迎的主題", + "popular-alltime": "所有時間受歡迎的主題", "recent": "近期的主題", - "flagged-posts": "Flagged Posts", - "users/online": "Online Users", - "users/latest": "Latest Users", + "flagged-posts": "標記的張貼", + "users/online": "線上用戶", + "users/latest": "最近用戶", "users/sort-posts": "Users with the most posts", "users/sort-reputation": "Users with the most reputation", - "users/banned": "Banned Users", - "users/search": "User Search", + "users/banned": "已封鎖用戶", + "users/search": "用戶搜尋", "notifications": "新訊息通知", "tags": "標籤", "tag": "Topics tagged under \"%1\"", - "register": "Register an account", - "login": "Login to your account", + "register": "註冊帳號", + "login": "登入帳號", "reset": "Reset your account password", - "categories": "Categories", - "groups": "Groups", - "group": "%1 group", - "chats": "Chats", - "chat": "Chatting with %1", - "account/edit": "Editing \"%1\"", + "categories": "類別", + "groups": "群組", + "group": "%1 群組", + "chats": "聊天", + "chat": "與 %1 聊天", + "account/edit": "編輯 \"%1\"", "account/edit/password": "Editing password of \"%1\"", "account/edit/username": "Editing username of \"%1\"", "account/edit/email": "Editing email of \"%1\"", @@ -32,14 +32,14 @@ "account/followers": "People who follow %1", "account/posts": "Posts made by %1", "account/topics": "Topics created by %1", - "account/groups": "%1's Groups", + "account/groups": "%1 的群組", "account/favourites": "%1's Bookmarked Posts", - "account/settings": "User Settings", + "account/settings": "用戶設定", "account/watched": "Topics watched by %1", "account/upvoted": "Posts upvoted by %1", "account/downvoted": "Posts downvoted by %1", "account/best": "Best posts made by %1", - "confirm": "Email Confirmed", + "confirm": "已確認電子郵件", "maintenance.text": "目前 %1 正在進行維修。請稍後再來。", "maintenance.messageIntro": "此外,管理員有以下訊息:", "throttled.text": "%1 is currently unavailable due to excessive load. Please come back another time." diff --git a/public/language/zh_TW/recent.json b/public/language/zh_TW/recent.json index cf46a366d3..6076b0acb6 100644 --- a/public/language/zh_TW/recent.json +++ b/public/language/zh_TW/recent.json @@ -7,13 +7,13 @@ "alltime": "所有時間", "no_recent_topics": "最近沒有新的主題。", "no_popular_topics": "最近沒有受歡迎的主題。", - "there-is-a-new-topic": "There is a new topic.", - "there-is-a-new-topic-and-a-new-post": "There is a new topic and a new post.", - "there-is-a-new-topic-and-new-posts": "There is a new topic and %1 new posts.", - "there-are-new-topics": "There are %1 new topics.", - "there-are-new-topics-and-a-new-post": "There are %1 new topics and a new post.", - "there-are-new-topics-and-new-posts": "There are %1 new topics and %2 new posts.", - "there-is-a-new-post": "There is a new post.", - "there-are-new-posts": "There are %1 new posts.", + "there-is-a-new-topic": "有一篇新主題", + "there-is-a-new-topic-and-a-new-post": "有一篇新主題與一篇新張貼", + "there-is-a-new-topic-and-new-posts": "有一篇新主題與 %1 篇新張貼", + "there-are-new-topics": "有 %1 篇新主題", + "there-are-new-topics-and-a-new-post": "有 %1 篇新主題與一篇新張貼", + "there-are-new-topics-and-new-posts": "有 %1 篇新主題與 %2 篇新張貼", + "there-is-a-new-post": "有一篇新張貼", + "there-are-new-posts": "有 %1 篇新張貼", "click-here-to-reload": "點擊這裡進行重整。" } \ No newline at end of file diff --git a/public/language/zh_TW/reset_password.json b/public/language/zh_TW/reset_password.json index 5c2964579c..85ec4482e8 100644 --- a/public/language/zh_TW/reset_password.json +++ b/public/language/zh_TW/reset_password.json @@ -11,7 +11,7 @@ "enter_email_address": "輸入電子郵件地址", "password_reset_sent": "密碼重設郵件已發送。", "invalid_email": "無效的電子郵件 / 電子郵件不存在!", - "password_too_short": "The password entered is too short, please pick a different password.", - "passwords_do_not_match": "The two passwords you've entered do not match.", - "password_expired": "Your password has expired, please choose a new password" + "password_too_short": "輸入的密碼太短,請使用另一個不同的密碼", + "passwords_do_not_match": "你已經輸入的兩個密碼不一樣", + "password_expired": "你的密碼已過期,請選擇一組新密碼" } \ No newline at end of file diff --git a/public/language/zh_TW/search.json b/public/language/zh_TW/search.json index 9eadd12f6d..457f1bfb7b 100644 --- a/public/language/zh_TW/search.json +++ b/public/language/zh_TW/search.json @@ -1,7 +1,7 @@ { "results_matching": "有%1個跟\"%2\"相符的結果(%3秒)", "no-matches": "沒有找到相符的主題", - "advanced-search": "Advanced Search", + "advanced-search": "進階搜尋", "in": "在", "titles": "標題", "titles-posts": "標題與發布", diff --git a/public/language/zh_TW/topic.json b/public/language/zh_TW/topic.json index 4b344c6a31..e5718a0040 100644 --- a/public/language/zh_TW/topic.json +++ b/public/language/zh_TW/topic.json @@ -13,7 +13,7 @@ "notify_me": "該主題有新回覆時通知我", "quote": "引用", "reply": "回覆", - "reply-as-topic": "Reply as topic", + "reply-as-topic": "回復為另一個新主題", "guest-login-reply": "登入以回覆", "edit": "編輯", "delete": "刪除", @@ -26,7 +26,7 @@ "tools": "工具", "flag": "檢舉", "locked": "已鎖定", - "bookmark_instructions": "Click here to return to the last read post in this thread.", + "bookmark_instructions": "點擊這裡返回到這個討論串的最後一篇張貼文", "flag_title": "檢舉這篇文章, 交給仲裁者來審閱.", "flag_success": "這文章已經被檢舉要求仲裁.", "deleted_message": "此主題已被刪除。只有具有主題管理權限的用戶才能看到它。", @@ -34,8 +34,8 @@ "not_following_topic.message": "有人貼文回覆主題時, 你將不會收到通知.", "login_to_subscribe": "請先註冊或登錄, 才可訂閱此主題.", "markAsUnreadForAll.success": "將全部的主題設為未讀.", - "mark_unread": "Mark unread", - "mark_unread.success": "Topic marked as unread.", + "mark_unread": "標為未讀", + "mark_unread.success": "標記主題為未讀", "watch": "關注", "unwatch": "取消關注", "watch.title": "當主題有新回覆時將收到通知", @@ -51,7 +51,7 @@ "thread_tools.move_all": "移動全部", "thread_tools.fork": "Fork 主題", "thread_tools.delete": "刪除主題", - "thread_tools.delete-posts": "Delete Posts", + "thread_tools.delete-posts": "刪除張貼", "thread_tools.delete_confirm": "你確定要刪除這個主題?", "thread_tools.restore": "還原刪除的主題", "thread_tools.restore_confirm": "你確定你要恢復這個主題嗎?", @@ -65,9 +65,9 @@ "disabled_categories_note": "停用的版面為灰色", "confirm_move": "移動", "confirm_fork": "作為主題", - "favourite": "Bookmark", - "favourites": "Bookmarks", - "favourites.has_no_favourites": "You haven't bookmarked any posts yet.", + "favourite": "書籤", + "favourites": "書籤", + "favourites.has_no_favourites": "你尚未將任何張貼加入書籤", "loading_more_posts": "載入更多文章", "move_topic": "移動主題", "move_topics": "移動主題", @@ -78,7 +78,7 @@ "fork_topic_instruction": "點擊要作為主題的文章", "fork_no_pids": "尚未選擇文章!", "fork_success": "成功分叉成新的主題!點擊這裡進入新的主題。", - "delete_posts_instruction": "Click the posts you want to delete/purge", + "delete_posts_instruction": "點擊你想要刪除/清除的張貼", "composer.title_placeholder": "輸入標題...", "composer.handle_placeholder": "名字", "composer.discard": "放棄", @@ -101,12 +101,12 @@ "newest_to_oldest": "從新到舊", "most_votes": "得票最多", "most_posts": "最多post", - "stale.title": "Create new topic instead?", - "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", - "stale.create": "Create a new topic", - "stale.reply_anyway": "Reply to this topic anyway", - "link_back": "Re: [%1](%2)", - "spam": "Spam", - "offensive": "Offensive", - "custom-flag-reason": "Enter a flagging reason" + "stale.title": "改為建立新的主題?", + "stale.warning": "你正回覆的主題是非常舊的一篇。你想要改為建立一個新主題,然後參考到這篇你回覆的?", + "stale.create": "建立新主題", + "stale.reply_anyway": "無論如何都回覆這個主題", + "link_back": "回覆: [%1](%2)", + "spam": "灌水", + "offensive": "攻擊", + "custom-flag-reason": "輸入標記的理由" } \ No newline at end of file diff --git a/public/language/zh_TW/unread.json b/public/language/zh_TW/unread.json index cf5b8d662c..b11d2ee762 100644 --- a/public/language/zh_TW/unread.json +++ b/public/language/zh_TW/unread.json @@ -5,9 +5,9 @@ "mark_as_read": "標記成已讀", "selected": "已選擇", "all": "全部", - "all_categories": "All categories", + "all_categories": "所有類別", "topics_marked_as_read.success": "標記主題成已讀!", - "all-topics": "All Topics", - "new-topics": "New Topics", - "watched-topics": "Watched Topics" + "all-topics": "所有主題", + "new-topics": "新主題", + "watched-topics": "已觀看主題" } \ No newline at end of file diff --git a/public/language/zh_TW/uploads.json b/public/language/zh_TW/uploads.json index 1622cb5693..aaef40f16c 100644 --- a/public/language/zh_TW/uploads.json +++ b/public/language/zh_TW/uploads.json @@ -1,6 +1,6 @@ { - "uploading-file": "Uploading the file...", - "select-file-to-upload": "Select a file to upload!", - "upload-success": "File uploaded successfully!", - "maximum-file-size": "Maximum %1 kb" + "uploading-file": "檔案上傳中...", + "select-file-to-upload": "選擇要上傳的檔案!", + "upload-success": "檔案已成功上傳!", + "maximum-file-size": "最大大小 %1 kb" } \ No newline at end of file diff --git a/public/language/zh_TW/users.json b/public/language/zh_TW/users.json index 9d42c05416..b3e5acd9cb 100644 --- a/public/language/zh_TW/users.json +++ b/public/language/zh_TW/users.json @@ -6,15 +6,15 @@ "enter_username": "輸入想找的使用者帳號", "load_more": "載入更多", "users-found-search-took": "發現 %1 用戶!搜尋只用 %2 秒。", - "filter-by": "Filter By", + "filter-by": "過濾依照", "online-only": "線上僅有", - "invite": "Invite", - "invitation-email-sent": "An invitation email has been sent to %1", - "user_list": "User List", - "recent_topics": "Recent Topics", - "popular_topics": "Popular Topics", - "unread_topics": "Unread Topics", - "categories": "Categories", - "tags": "Tags", - "no-users-found": "No users found!" + "invite": "邀請", + "invitation-email-sent": "所有邀請Email已經被寄送到 %1", + "user_list": "用戶列表", + "recent_topics": "最新的主題", + "popular_topics": "受歡迎的主題", + "unread_topics": "未讀的主題", + "categories": "類別", + "tags": "標籤", + "no-users-found": "沒有找到用戶!" } \ No newline at end of file From 1f70f886b5d4f3f1e2ab16a107d62dbe270ac70b Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Sun, 8 May 2016 20:05:16 -0400 Subject: [PATCH 0200/1109] fixed reference to undefined variable /cc @BenLubar --- src/socket.io/posts/flag.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/socket.io/posts/flag.js b/src/socket.io/posts/flag.js index e9d378d2be..dbb3f7f551 100644 --- a/src/socket.io/posts/flag.js +++ b/src/socket.io/posts/flag.js @@ -90,7 +90,7 @@ module.exports = function(SocketPosts) { bodyShort: '[[notifications:user_flagged_post_in, ' + flaggingUser.username + ', ' + titleEscaped + ']]', bodyLong: post.content, pid: data.pid, - path: '/post/' + pid, + path: '/post/' + data.pid, nid: 'post_flag:' + data.pid + ':uid:' + socket.uid, from: socket.uid, mergeId: 'notifications:user_flagged_post_in|' + data.pid, From 39d9be787edaf2895d0635ba4adb2a0a3d870d40 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 9 May 2016 10:22:37 -0400 Subject: [PATCH 0201/1109] fixes #4614 --- public/src/modules/uploader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/modules/uploader.js b/public/src/modules/uploader.js index 6a0d7f161a..dc17484452 100644 --- a/public/src/modules/uploader.js +++ b/public/src/modules/uploader.js @@ -23,7 +23,7 @@ define('uploader', ['csrf', 'translator'], function(csrf, translator) { title: data.title || '[[global:upload_file]]', description: data.description || '', button: data.button || '[[global:upload]]', - accept: data.accept ? data.accept.replace(/,/g, ',') : '' + accept: data.accept ? data.accept.replace(/,/g, ', ') : '' }, function(uploadModal) { uploadModal = $(uploadModal); From f08a9c4def241787ef4904a69b6665262c0f5bfa Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 9 May 2016 10:31:24 -0400 Subject: [PATCH 0202/1109] fixes #4613 --- package.json | 4 ++-- public/src/client/topic/threadTools.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2c7f00a2ea..4d9dbb5d47 100644 --- a/package.json +++ b/package.json @@ -56,8 +56,8 @@ "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", "nodebb-theme-lavender": "3.0.10", - "nodebb-theme-persona": "4.0.130", - "nodebb-theme-vanilla": "5.0.70", + "nodebb-theme-persona": "4.0.131", + "nodebb-theme-vanilla": "5.0.71", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", "nodemailer-sendmail-transport": "1.0.0", diff --git a/public/src/client/topic/threadTools.js b/public/src/client/topic/threadTools.js index 7b5b9605f7..433c12e575 100644 --- a/public/src/client/topic/threadTools.js +++ b/public/src/client/topic/threadTools.js @@ -162,7 +162,7 @@ define('forum/topic/threadTools', [ components.get('topic/lock').toggleClass('hidden', data.isLocked); components.get('topic/unlock').toggleClass('hidden', !data.isLocked); - components.get('topic/reply').toggleClass('hidden', isLocked); + components.get('topic/reply/container').toggleClass('hidden', isLocked); components.get('topic/reply/locked').toggleClass('hidden', !isLocked); threadEl.find('[component="post/reply"], [component="post/quote"], [component="post/edit"], [component="post/delete"]').toggleClass('hidden', isLocked); From a507768a8fc41577c94a71ac36b523d32f39a1a0 Mon Sep 17 00:00:00 2001 From: pichalite Date: Mon, 9 May 2016 07:59:47 -0700 Subject: [PATCH 0203/1109] fix ACP->General->Sounds layout on mobile (#4606) * fix ACP->General->Sounds layout on mobile * just to make @juluanlam happy --- src/views/admin/general/sounds.tpl | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/views/admin/general/sounds.tpl b/src/views/admin/general/sounds.tpl index dfdbae512d..6fcd83bfe7 100644 --- a/src/views/admin/general/sounds.tpl +++ b/src/views/admin/general/sounds.tpl @@ -1,5 +1,5 @@
        -
        +
        Notifications
        @@ -53,22 +53,17 @@
        + +
        + + + +
        -
        -
        -
        -
        - - - -
        -
        -
        -
      - +
    • @@ -35,7 +35,7 @@
      - +
      @@ -50,7 +50,7 @@
      - +
      From d8c21cc09df820d323c9d9740f40808ad01fe235 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 9 May 2016 11:40:42 -0400 Subject: [PATCH 0205/1109] fixes #4593 --- package.json | 2 +- public/language/en_GB/error.json | 1 + public/language/en_GB/login.json | 2 +- public/src/client/login.js | 10 +++++++--- public/src/client/register.js | 10 +++++++--- src/controllers/index.js | 14 ++++++++++++-- 6 files changed, 29 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 0ab698c631..34bbfc76cd 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", "nodebb-theme-lavender": "3.0.10", - "nodebb-theme-persona": "4.0.131", + "nodebb-theme-persona": "4.0.132", "nodebb-theme-vanilla": "5.0.71", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", diff --git a/public/language/en_GB/error.json b/public/language/en_GB/error.json index a77cf6cb06..a159a0e42c 100644 --- a/public/language/en_GB/error.json +++ b/public/language/en_GB/error.json @@ -17,6 +17,7 @@ "invalid-password": "Invalid Password", "invalid-username-or-password": "Please specify both a username and password", "invalid-search-term": "Invalid search term", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", diff --git a/public/language/en_GB/login.json b/public/language/en_GB/login.json index 02abac6371..e76658fe3d 100644 --- a/public/language/en_GB/login.json +++ b/public/language/en_GB/login.json @@ -5,7 +5,7 @@ "remember_me": "Remember Me?", "forgot_password": "Forgot Password?", "alternative_logins": "Alternative Logins", - "failed_login_attempt": "Failed login attempt, please try again.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "You have successfully logged in!", "dont_have_account": "Don't have an account?" } diff --git a/public/src/client/login.js b/public/src/client/login.js index 85aeb68be5..eda34c8add 100644 --- a/public/src/client/login.js +++ b/public/src/client/login.js @@ -31,9 +31,13 @@ define('forum/login', ['csrf', 'translator'], function(csrf, translator) { window.location.href = data + '?loggedin'; }, error: function(data, status) { - errorEl.find('p').translateText(data.responseText); - errorEl.show(); - submitEl.removeClass('disabled'); + if (data.status === 403 && data.statusText === 'Forbidden') { + window.location.href = config.relative_path + '/login?error=csrf-invalid'; + } else { + errorEl.find('p').translateText(data.responseText); + errorEl.show(); + submitEl.removeClass('disabled'); + } } }); } diff --git a/public/src/client/register.js b/public/src/client/register.js index da86c0231d..fdf4b3ab7e 100644 --- a/public/src/client/register.js +++ b/public/src/client/register.js @@ -99,9 +99,13 @@ define('forum/register', ['csrf', 'translator'], function(csrf, translator) { }, error: function(data) { translator.translate(data.responseText, config.defaultLang, function(translated) { - errorEl.find('p').text(translated); - errorEl.removeClass('hidden'); - registerBtn.removeClass('disabled'); + if (data.status === 403 && data.statusText === 'Forbidden') { + window.location.href = config.relative_path + '/register?error=csrf-invalid'; + } else { + errorEl.find('p').text(translated); + errorEl.removeClass('hidden'); + registerBtn.removeClass('disabled'); + } }); } }); diff --git a/src/controllers/index.js b/src/controllers/index.js index 76d86cee31..f0a6e8d023 100644 --- a/src/controllers/index.js +++ b/src/controllers/index.js @@ -102,13 +102,18 @@ Controllers.login = function(req, res, next) { var allowLoginWith = (meta.config.allowLoginWith || 'username-email'); + var errorText; + if (req.query.error === 'csrf-invalid') { + errorText = '[[error:csrf-invalid]]'; + } + data.alternate_logins = loginStrategies.length > 0; data.authentication = loginStrategies; data.allowLocalLogin = parseInt(meta.config.allowLocalLogin, 10) === 1 || parseInt(req.query.local, 10) === 1; data.allowRegistration = registrationType === 'normal' || registrationType === 'admin-approval'; data.allowLoginWith = '[[login:' + allowLoginWith + ']]'; data.breadcrumbs = helpers.buildBreadcrumbs([{text: '[[global:login]]'}]); - data.error = req.flash('error')[0]; + data.error = req.flash('error')[0] || errorText; data.title = '[[pages:login]]'; if (!data.allowLocalLogin && !data.allowRegistration && data.alternate_logins && data.authentication.length === 1) { @@ -137,6 +142,11 @@ Controllers.register = function(req, res, next) { return next(); } + var errorText; + if (req.query.error === 'csrf-invalid') { + errorText = '[[error:csrf-invalid]]'; + } + async.waterfall([ function(next) { if (registrationType === 'invite-only' || registrationType === 'admin-invite-only') { @@ -166,7 +176,7 @@ Controllers.register = function(req, res, next) { data.termsOfUse = termsOfUse.postData.content; data.breadcrumbs = helpers.buildBreadcrumbs([{text: '[[register:register]]'}]); data.regFormEntry = []; - data.error = req.flash('error')[0]; + data.error = req.flash('error')[0] || errorText; data.title = '[[pages:register]]'; res.render('register', data); From bc0359475c8f897c2133ffe1658599a194da6195 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 9 May 2016 13:04:52 -0400 Subject: [PATCH 0206/1109] fixed link to documentation, @akhoury --- src/plugins/hooks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/hooks.js b/src/plugins/hooks.js index 35eed900c3..1b186857f4 100644 --- a/src/plugins/hooks.js +++ b/src/plugins/hooks.js @@ -63,7 +63,7 @@ module.exports = function(Plugins) { if (Plugins.deprecatedHooksParams[_hook]) { winston.warn('[plugins/' + id + '] Hook `' + _hook + '` parameters: `' + Plugins.deprecatedHooksParams[_hook] + '`, are being deprecated, ' + 'all plugins should now use the `middleware/cls` module instead of hook\'s arguments to get a reference to the `req`, `res` and/or `socket` object(s) (from which you can get the current `uid` if you need to.) ' - + '- for more info, visit https://docs.nodebb.org/en/latest/plugins/create.html#getting-a-reference-to-each-request-from-within-any-plugin-hook'); + + '- for more info, visit https://docs.nodebb.org/en/latest/plugins/create.html#getting-a-reference-to-req-res-socket-and-uid-within-any-plugin-hook'); delete Plugins.deprecatedHooksParams[_hook]; } } From acc030e6da538d78c77627ba0582aa0729862faf Mon Sep 17 00:00:00 2001 From: barisusakli Date: Mon, 9 May 2016 22:25:51 +0300 Subject: [PATCH 0207/1109] added filter:image.size fix uploading of gifs if imagemagick plugin is installed but no image upload plugins are present. --- src/controllers/uploads.js | 2 +- src/image.js | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/controllers/uploads.js b/src/controllers/uploads.js index d096ecf0de..087889d340 100644 --- a/src/controllers/uploads.js +++ b/src/controllers/uploads.js @@ -83,7 +83,7 @@ function resizeImage(fileObj, callback) { function(next) { fullPath = path.join(nconf.get('base_dir'), nconf.get('upload_path'), '..', fileObj.url); - image.load(fullPath, next); + image.size(fullPath, next); }, function (imageData, next) { if (imageData.width < parseInt(meta.config.maximumImageWidth, 10) || 760) { diff --git a/src/image.js b/src/image.js index 7efe86c6ee..fca120d1e5 100644 --- a/src/image.js +++ b/src/image.js @@ -94,11 +94,19 @@ image.normalise = function(path, extension, callback) { } }; -image.load = function(path, callback) { - new Jimp(path, function(err, data) { - callback(err, data ? data.bitmap : null); - }); -}; +image.size = function(path, callback) { + if (plugins.hasListeners('filter:image.size')) { + plugins.fireHook('filter:image.size', { + path: path, + }, function(err, image) { + callback(err, image); + }); + } else { + new Jimp(path, function(err, data) { + callback(err, data ? data.bitmap : null); + }); + } +} image.convertImageToBase64 = function(path, callback) { fs.readFile(path, function(err, data) { From 6392cd31df3b311fbbfdf2ff09a1a7509ef62139 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Mon, 9 May 2016 22:37:03 +0300 Subject: [PATCH 0208/1109] closes #4618 dont need deleted check --- src/posts/topics.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/posts/topics.js b/src/posts/topics.js index 7ffd9592ce..a653e69b03 100644 --- a/src/posts/topics.js +++ b/src/posts/topics.js @@ -65,16 +65,12 @@ module.exports = function(Posts) { return post ? post.tid : null; }); - topics.getTopicsFields(tids, ['slug', 'deleted'], next); + topics.getTopicsFields(tids, ['slug'], next); } }, next); }, function (results, next) { var paths = pids.map(function(pid, index) { - if (parseInt(results.topics[index].deleted, 10) === 1) { - return null; - } - var slug = results.topics[index] ? results.topics[index].slug : null; var postIndex = utils.isNumber(results.indices[index]) ? parseInt(results.indices[index], 10) + 1 : null; From 69e25fe4d51c08d5cd44594812aadbcc8fc751ad Mon Sep 17 00:00:00 2001 From: barisusakli Date: Mon, 9 May 2016 23:39:00 +0300 Subject: [PATCH 0209/1109] closes #4612 --- public/src/client/topic/posts.js | 14 +++++++++++++- src/controllers/topics.js | 32 ++++++++++++++++++++++++++++++++ src/routes/api.js | 1 + 3 files changed, 46 insertions(+), 1 deletion(-) diff --git a/public/src/client/topic/posts.js b/public/src/client/topic/posts.js index 88d80a3872..db22a215a4 100644 --- a/public/src/client/topic/posts.js +++ b/public/src/client/topic/posts.js @@ -32,6 +32,7 @@ define('forum/topic/posts', [ }); updatePostCounts(data.posts); + ajaxify.data.postcount ++; postTools.updatePostCount(ajaxify.data.postcount); @@ -60,15 +61,26 @@ define('forum/topic/posts', [ ajaxify.data.pagination.pageCount = Math.max(1, Math.ceil((posts[0].topic.postcount - 1) / 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) || (ajaxify.data.pagination.currentPage === 1 && direction === -1); + var isPostVisible = (ajaxify.data.pagination.currentPage === ajaxify.data.pagination.pageCount && direction === 1) || + (ajaxify.data.pagination.currentPage === 1 && direction === -1); if (isPostVisible) { createNewPosts(data, components.get('post').not('[data-index=0]'), direction, scrollToPost); } else if (ajaxify.data.scrollToMyPost && parseInt(posts[0].uid, 10) === parseInt(app.user.uid, 10)) { pagination.loadPage(ajaxify.data.pagination.pageCount, scrollToPost); + } else { + updatePagination(); } } + function updatePagination() { + $.get(config.relative_path + '/api/topic/pagination/' + ajaxify.data.tid, {page: ajaxify.data.pagination.currentPage}, function(paginationData) { + app.parseAndTranslate('partials/paginator', {pagination: paginationData}, function(html) { + $('[component="pagination"]').after(html).remove(); + }); + }); + } + function onNewPostInfiniteScroll(data) { var direction = config.topicPostSort === 'oldest_to_newest' || config.topicPostSort === 'most_votes' ? 1 : -1; diff --git a/src/controllers/topics.js b/src/controllers/topics.js index 6b7793f58c..02a9017b75 100644 --- a/src/controllers/topics.js +++ b/src/controllers/topics.js @@ -327,5 +327,37 @@ topicsController.teaser = function(req, res, next) { }); }; +topicsController.pagination = function(req, res, callback) { + var tid = req.params.topic_id; + var currentPage = parseInt(req.query.page, 10) || 1; + + if (!utils.isNumber(tid)) { + return callback(); + } + + async.parallel({ + privileges: async.apply(privileges.topics.get, tid, req.uid), + settings: async.apply(user.getSettings, req.uid), + topic: async.apply(topics.getTopicData, tid) + }, function (err, results) { + if (err || !results.topic) { + return callback(err); + } + + if (!results.privileges.read || (parseInt(results.topic.deleted, 10) && !results.privileges.view_deleted)) { + return helpers.notAllowed(req, res); + } + + var postCount = parseInt(results.topic.postcount, 10); + var pageCount = Math.max(1, Math.ceil((postCount - 1) / results.settings.postsPerPage)); + + var paginationData = pagination.create(currentPage, pageCount); + paginationData.rel.forEach(function(rel) { + rel.href = nconf.get('url') + '/topic/' + results.topic.slug + rel.href; + }); + + res.json(paginationData); + }); +}; module.exports = topicsController; diff --git a/src/routes/api.js b/src/routes/api.js index 4806663460..1a84f59c3a 100644 --- a/src/routes/api.js +++ b/src/routes/api.js @@ -24,6 +24,7 @@ module.exports = function(app, middleware, controllers) { router.get('/recent/posts/:term?', controllers.api.getRecentPosts); router.get('/unread/:filter?/total', middleware.authenticate, controllers.unread.unreadTotal); router.get('/topic/teaser/:topic_id', controllers.topics.teaser); + router.get('/topic/pagination/:topic_id', controllers.topics.pagination); var multipart = require('connect-multiparty'); var multipartMiddleware = multipart(); From e8650dcaa485510c1dd96503ddd8e173d54cf0a9 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 10 May 2016 11:39:38 +0300 Subject: [PATCH 0210/1109] closes #4619 --- public/src/client/topic.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/client/topic.js b/public/src/client/topic.js index fd6fd7dbfa..6d9daad827 100644 --- a/public/src/client/topic.js +++ b/public/src/client/topic.js @@ -71,7 +71,7 @@ define('forum/topic', [ handleTopicSearch(); - $(window).trigger('action:topic.loaded'); + $(window).trigger('action:topic.loaded', ajaxify.data); }; function handleKeys() { From 4907773e6afbde6f115aad61e18fda0ac8504cec Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 10 May 2016 11:41:35 +0300 Subject: [PATCH 0211/1109] closes #4615 --- src/user/delete.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/user/delete.js b/src/user/delete.js index 011ed0aa12..99119c7ffb 100644 --- a/src/user/delete.js +++ b/src/user/delete.js @@ -30,7 +30,7 @@ module.exports = function(User) { function deletePosts(callerUid, uid, callback) { batch.processSortedSet('uid:' + uid + ':posts', function(ids, next) { - async.eachSeries(ids, function(pid, netx) { + async.eachSeries(ids, function(pid, next) { posts.purge(pid, callerUid, next); }, next); }, {alwaysStartAt: 0}, callback); From f0c9623878200de7c3cab8311370c71282158f94 Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Tue, 10 May 2016 09:02:33 -0400 Subject: [PATCH 0212/1109] Latest translations and fallbacks --- public/language/ar/error.json | 1 + public/language/ar/login.json | 2 +- public/language/ar/modules.json | 8 ++++++++ public/language/bg/error.json | 1 + public/language/bg/login.json | 2 +- public/language/bg/modules.json | 8 ++++++++ public/language/bn/error.json | 1 + public/language/bn/login.json | 2 +- public/language/bn/modules.json | 8 ++++++++ public/language/cs/error.json | 1 + public/language/cs/login.json | 2 +- public/language/cs/modules.json | 8 ++++++++ public/language/da/error.json | 1 + public/language/da/login.json | 2 +- public/language/da/modules.json | 8 ++++++++ public/language/de/error.json | 1 + public/language/de/login.json | 2 +- public/language/de/modules.json | 8 ++++++++ public/language/el/error.json | 1 + public/language/el/login.json | 2 +- public/language/el/modules.json | 8 ++++++++ public/language/en@pirate/category.json | 8 ++++---- public/language/en@pirate/email.json | 6 +++--- public/language/en@pirate/error.json | 1 + public/language/en@pirate/login.json | 2 +- public/language/en@pirate/modules.json | 8 ++++++++ public/language/en@pirate/uploads.json | 2 +- public/language/en_US/error.json | 1 + public/language/en_US/login.json | 2 +- public/language/en_US/modules.json | 8 ++++++++ public/language/es/error.json | 1 + public/language/es/login.json | 2 +- public/language/es/modules.json | 8 ++++++++ public/language/et/error.json | 1 + public/language/et/login.json | 2 +- public/language/et/modules.json | 8 ++++++++ public/language/fa_IR/error.json | 1 + public/language/fa_IR/login.json | 2 +- public/language/fa_IR/modules.json | 8 ++++++++ public/language/fi/error.json | 1 + public/language/fi/login.json | 2 +- public/language/fi/modules.json | 8 ++++++++ public/language/fr/error.json | 1 + public/language/fr/login.json | 2 +- public/language/fr/modules.json | 8 ++++++++ public/language/gl/error.json | 1 + public/language/gl/login.json | 2 +- public/language/gl/modules.json | 8 ++++++++ public/language/he/error.json | 1 + public/language/he/login.json | 2 +- public/language/he/modules.json | 8 ++++++++ public/language/hu/error.json | 1 + public/language/hu/login.json | 2 +- public/language/hu/modules.json | 8 ++++++++ public/language/id/error.json | 1 + public/language/id/login.json | 2 +- public/language/id/modules.json | 8 ++++++++ public/language/it/error.json | 1 + public/language/it/login.json | 2 +- public/language/it/modules.json | 8 ++++++++ public/language/ja/error.json | 1 + public/language/ja/login.json | 2 +- public/language/ja/modules.json | 8 ++++++++ public/language/ko/error.json | 1 + public/language/ko/login.json | 2 +- public/language/ko/modules.json | 8 ++++++++ public/language/lt/error.json | 1 + public/language/lt/login.json | 2 +- public/language/lt/modules.json | 8 ++++++++ public/language/ms/error.json | 1 + public/language/ms/login.json | 2 +- public/language/ms/modules.json | 8 ++++++++ public/language/nb/error.json | 1 + public/language/nb/login.json | 2 +- public/language/nb/modules.json | 8 ++++++++ public/language/nl/error.json | 1 + public/language/nl/login.json | 2 +- public/language/nl/modules.json | 8 ++++++++ public/language/pl/error.json | 1 + public/language/pl/login.json | 2 +- public/language/pl/modules.json | 8 ++++++++ public/language/pt_BR/error.json | 1 + public/language/pt_BR/login.json | 2 +- public/language/pt_BR/modules.json | 8 ++++++++ public/language/ro/error.json | 1 + public/language/ro/login.json | 2 +- public/language/ro/modules.json | 8 ++++++++ public/language/ru/error.json | 1 + public/language/ru/login.json | 2 +- public/language/ru/modules.json | 8 ++++++++ public/language/rw/error.json | 1 + public/language/rw/login.json | 2 +- public/language/rw/modules.json | 8 ++++++++ public/language/sc/error.json | 1 + public/language/sc/login.json | 2 +- public/language/sc/modules.json | 8 ++++++++ public/language/sk/error.json | 1 + public/language/sk/login.json | 2 +- public/language/sk/modules.json | 8 ++++++++ public/language/sl/error.json | 1 + public/language/sl/login.json | 2 +- public/language/sl/modules.json | 8 ++++++++ public/language/sr/error.json | 1 + public/language/sr/login.json | 2 +- public/language/sr/modules.json | 8 ++++++++ public/language/sv/error.json | 1 + public/language/sv/login.json | 2 +- public/language/sv/modules.json | 8 ++++++++ public/language/th/error.json | 1 + public/language/th/login.json | 2 +- public/language/th/modules.json | 8 ++++++++ public/language/tr/error.json | 1 + public/language/tr/login.json | 2 +- public/language/tr/modules.json | 8 ++++++++ public/language/vi/error.json | 1 + public/language/vi/login.json | 2 +- public/language/vi/modules.json | 8 ++++++++ public/language/zh_CN/error.json | 1 + public/language/zh_CN/login.json | 2 +- public/language/zh_CN/modules.json | 8 ++++++++ public/language/zh_TW/error.json | 1 + public/language/zh_TW/login.json | 2 +- public/language/zh_TW/modules.json | 8 ++++++++ 123 files changed, 408 insertions(+), 48 deletions(-) diff --git a/public/language/ar/error.json b/public/language/ar/error.json index 73e9b24094..a7812cddb0 100644 --- a/public/language/ar/error.json +++ b/public/language/ar/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "هذا المنتدى يستلزم تفعيل بريدك الإلكتروني، انقر هنا من فضلك لإدخاله.", "email-confirm-failed": "لم نستطع تفعيل بريدك الإلكتروني، المرجو المحاولة لاحقًا.", "confirm-email-already-sent": "لقد تم ارسال بريد التأكيد، الرجاء اﻹنتظار 1% دقائق لإعادة اﻹرسال", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "اسم المستخدم قصير.", "username-too-long": "اسم المستخدم طويل", "password-too-long": "Password too long", diff --git a/public/language/ar/login.json b/public/language/ar/login.json index 29d256203f..c6007a15ff 100644 --- a/public/language/ar/login.json +++ b/public/language/ar/login.json @@ -5,7 +5,7 @@ "remember_me": "تذكرني؟", "forgot_password": "نسيت كلمة المرور؟", "alternative_logins": "تسجيلات الدخول البديلة", - "failed_login_attempt": "فشلت محاولة تسجيل الدخول، يرجى المحاولة مرة أخرى.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "قمت بتسجيل الدخول بنجاح!", "dont_have_account": "لا تملك حساب؟" } \ No newline at end of file diff --git a/public/language/ar/modules.json b/public/language/ar/modules.json index a92c2d6953..c753143075 100644 --- a/public/language/ar/modules.json +++ b/public/language/ar/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Submit and Lock", "composer.toggle_dropdown": "Toggle Dropdown", "composer.uploading": "Uploading %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "OK", "bootbox.cancel": "إلغاء", "bootbox.confirm": "تأكيد", diff --git a/public/language/bg/error.json b/public/language/bg/error.json index 5a1e1a5e75..3086ffa309 100644 --- a/public/language/bg/error.json +++ b/public/language/bg/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "Този форум изисква потвърдена е-поща. Моля, натиснете тук, за да въведете е-поща", "email-confirm-failed": "Не успяхме да потвърдим е-пощата Ви. Моля, опитайте отново по-късно.", "confirm-email-already-sent": "Е-писмото за потвърждение вече е изпратено. Моля, почакайте още %1 минута/и, преди да изпратите ново.", + "sendmail-not-found": "Изпълнимият файл на „sendmail“ не може да бъде намерен. Моля, уверете се, че е инсталиран и изпълним за потребителя, чрез който е пуснат NodeBB.", "username-too-short": "Потребителското име е твърде кратко", "username-too-long": "Потребителското име е твърде дълго", "password-too-long": "Паролата е твърде дълга", diff --git a/public/language/bg/login.json b/public/language/bg/login.json index f8340495af..4091422daa 100644 --- a/public/language/bg/login.json +++ b/public/language/bg/login.json @@ -5,7 +5,7 @@ "remember_me": "Запомнете ме?", "forgot_password": "Забравена парола?", "alternative_logins": "Други начини за влизане", - "failed_login_attempt": "Неуспешно влизане. Моля, опитайте отново.", + "failed_login_attempt": "Влизането беше неуспешно", "login_successful": "Вие влязохте успешно!", "dont_have_account": "Нямате акаунт?" } \ No newline at end of file diff --git a/public/language/bg/modules.json b/public/language/bg/modules.json index f3afdaaa4a..441f89ea42 100644 --- a/public/language/bg/modules.json +++ b/public/language/bg/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Публикуване и заключване", "composer.toggle_dropdown": "Превключване на падащото меню", "composer.uploading": "Качване на %1", + "composer.formatting.bold": "Получер", + "composer.formatting.italic": "Курсив", + "composer.formatting.list": "Списък", + "composer.formatting.strikethrough": "Зачертан", + "composer.formatting.link": "Връзка", + "composer.formatting.picture": "Снимка", + "composer.upload-picture": "Качване на изображение", + "composer.upload-file": "Качване на файл", "bootbox.ok": "Добре", "bootbox.cancel": "Отказ", "bootbox.confirm": "Потвърждаване", diff --git a/public/language/bn/error.json b/public/language/bn/error.json index b95faf8f70..76929fd53b 100644 --- a/public/language/bn/error.json +++ b/public/language/bn/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "This forum requires email confirmation, please click here to enter an email", "email-confirm-failed": "We could not confirm your email, please try again later.", "confirm-email-already-sent": "Confirmation email already sent, please wait %1 minute(s) to send another one.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "খুব ছোট ইউজারনেম", "username-too-long": "ইউজারনেম বড় হয়ে গিয়েছে", "password-too-long": "Password too long", diff --git a/public/language/bn/login.json b/public/language/bn/login.json index 7ecec47587..0fea8218ba 100644 --- a/public/language/bn/login.json +++ b/public/language/bn/login.json @@ -5,7 +5,7 @@ "remember_me": "মনে রাখুন", "forgot_password": "পাসওয়ার্ড ভুলে গিয়েছেন?", "alternative_logins": "বিকল্প প্রবেশ", - "failed_login_attempt": "প্রবেশ সফল হয় নি, আবার চেষ্টা করুন।", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "আপনি সফলভাবে প্রবেশ করেছেন!", "dont_have_account": "কোন একাউন্ট নেই?" } \ No newline at end of file diff --git a/public/language/bn/modules.json b/public/language/bn/modules.json index 51c65a2a6a..567a648df0 100644 --- a/public/language/bn/modules.json +++ b/public/language/bn/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Submit and Lock", "composer.toggle_dropdown": "Toggle Dropdown", "composer.uploading": "Uploading %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "OK", "bootbox.cancel": "Cancel", "bootbox.confirm": "Confirm", diff --git a/public/language/cs/error.json b/public/language/cs/error.json index 7dae341dc3..2eee12d6a7 100644 --- a/public/language/cs/error.json +++ b/public/language/cs/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "This forum requires email confirmation, please click here to enter an email", "email-confirm-failed": "We could not confirm your email, please try again later.", "confirm-email-already-sent": "Confirmation email already sent, please wait %1 minute(s) to send another one.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Uživatelské jméno je příliš krátké", "username-too-long": "Uživatelské jméno je příliš dlouhé", "password-too-long": "Password too long", diff --git a/public/language/cs/login.json b/public/language/cs/login.json index 3308fbdde6..2b1dfba6a2 100644 --- a/public/language/cs/login.json +++ b/public/language/cs/login.json @@ -5,7 +5,7 @@ "remember_me": "Zapamatovat si mě?", "forgot_password": "Zapomněli jste heslo?", "alternative_logins": "Další způsoby přihlášení", - "failed_login_attempt": "Přihlášení se nezdařilo, zkuste to prosím znovu.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "Přihlášení proběhlo úspěšně!", "dont_have_account": "Nemáte účet?" } \ No newline at end of file diff --git a/public/language/cs/modules.json b/public/language/cs/modules.json index cb37aa7539..f353581a1d 100644 --- a/public/language/cs/modules.json +++ b/public/language/cs/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Submit and Lock", "composer.toggle_dropdown": "Toggle Dropdown", "composer.uploading": "Uploading %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "OK", "bootbox.cancel": "Cancel", "bootbox.confirm": "Confirm", diff --git a/public/language/da/error.json b/public/language/da/error.json index 70ac398753..6f59d6352c 100644 --- a/public/language/da/error.json +++ b/public/language/da/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "Dette forum kræver bekræftelse af din email, klik her for at indtaste en email", "email-confirm-failed": "Vi kunne ikke bekræfte din email, prøv igen senere.", "confirm-email-already-sent": "Bekræftelses email er allerede afsendt, vent venligt %1 minut(ter) for at sende endnu en.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Brugernavn er for kort", "username-too-long": "Brugernavn er for langt", "password-too-long": "Kodeord er for langt", diff --git a/public/language/da/login.json b/public/language/da/login.json index 1aabf6ec75..2196a937ee 100644 --- a/public/language/da/login.json +++ b/public/language/da/login.json @@ -5,7 +5,7 @@ "remember_me": "Husk mig?", "forgot_password": "Glemt kodeord?", "alternative_logins": "alternative logins", - "failed_login_attempt": "Login mislykkedes, venligt prøv igen.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "Du har successfuldt logged in!", "dont_have_account": "Har du ikke en konto?" } \ No newline at end of file diff --git a/public/language/da/modules.json b/public/language/da/modules.json index 31ea913abe..d54ad1ec52 100644 --- a/public/language/da/modules.json +++ b/public/language/da/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Send og lås", "composer.toggle_dropdown": "Skift mellem dropdown", "composer.uploading": "Uploader %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "OK", "bootbox.cancel": "Annuller", "bootbox.confirm": "Bekræft", diff --git a/public/language/de/error.json b/public/language/de/error.json index 52009800ba..9e8b5f46e1 100644 --- a/public/language/de/error.json +++ b/public/language/de/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "Dieses Forum setzt eine E-Mail-Bestätigung voraus, bitte klicke hier um eine E-Mail-Adresse einzugeben.", "email-confirm-failed": "Wir konnten deine E-Mail-Adresse nicht bestätigen, bitte versuch es später noch einmal", "confirm-email-already-sent": "Die Bestätigungsmail wurde verschickt, bitte warte %1 Minute(n) um eine Weitere zu verschicken.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Benutzername ist zu kurz", "username-too-long": "Benutzername ist zu lang", "password-too-long": "Passwort ist zu lang", diff --git a/public/language/de/login.json b/public/language/de/login.json index 8551266044..2c2d8267c1 100644 --- a/public/language/de/login.json +++ b/public/language/de/login.json @@ -5,7 +5,7 @@ "remember_me": "Eingeloggt bleiben?", "forgot_password": "Passwort vergessen?", "alternative_logins": "Alternative Logins", - "failed_login_attempt": " Anmeldeversuch fehlgeschlagen, versuche es erneut.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "Du hast dich erfolgreich eingeloggt!", "dont_have_account": "Du hast noch kein Konto?" } \ No newline at end of file diff --git a/public/language/de/modules.json b/public/language/de/modules.json index 2210c035fd..d4d5d5f6f4 100644 --- a/public/language/de/modules.json +++ b/public/language/de/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Einreichen und Sperren", "composer.toggle_dropdown": "Menu aus-/einblenden", "composer.uploading": "Lade %1 hoch", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "OK", "bootbox.cancel": "Abbrechen", "bootbox.confirm": "Bestätigen", diff --git a/public/language/el/error.json b/public/language/el/error.json index 030e5497f1..a6ae7a4c8d 100644 --- a/public/language/el/error.json +++ b/public/language/el/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "This forum requires email confirmation, please click here to enter an email", "email-confirm-failed": "We could not confirm your email, please try again later.", "confirm-email-already-sent": "Confirmation email already sent, please wait %1 minute(s) to send another one.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Το όνομα χρήστη είναι πολύ μικρό", "username-too-long": "Το όνομα χρήστη είναι πολύ μεγάλο", "password-too-long": "Password too long", diff --git a/public/language/el/login.json b/public/language/el/login.json index 6c10fb3de8..c46d2220f5 100644 --- a/public/language/el/login.json +++ b/public/language/el/login.json @@ -5,7 +5,7 @@ "remember_me": "Απομνημόνευση;", "forgot_password": "Ξέχασες τον κωδικό σου;", "alternative_logins": "Εναλλακτικά Login", - "failed_login_attempt": "Η προσπάθεια σύνδεσης απέτυχε, παρακαλώ προσπάθησε ξανά.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "Συνδέθηκες επιτυχώς!", "dont_have_account": "Δεν έχεις λογαριασμό;" } \ No newline at end of file diff --git a/public/language/el/modules.json b/public/language/el/modules.json index 4b1dc9e48a..af0d74e3cd 100644 --- a/public/language/el/modules.json +++ b/public/language/el/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Submit and Lock", "composer.toggle_dropdown": "Toggle Dropdown", "composer.uploading": "Uploading %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "OK", "bootbox.cancel": "Cancel", "bootbox.confirm": "Confirm", diff --git a/public/language/en@pirate/category.json b/public/language/en@pirate/category.json index 631d322e1a..77f9fdcb92 100644 --- a/public/language/en@pirate/category.json +++ b/public/language/en@pirate/category.json @@ -7,10 +7,10 @@ "browsing": "browsin'", "no_replies": "No one has replied to ye message", "no_new_posts": "Thar be no new posts.", - "share_this_category": "Share this category", - "watch": "Watch", - "ignore": "Ignore", + "share_this_category": "Share 'tis category", + "watch": "Be watchin'", + "ignore": "Be ignorin'", "watch.message": "Ye now be watchin' updates from 'tis category", "ignore.message": "Ye now be ignorin' updates from 'tis category", - "watched-categories": "Watched categories" + "watched-categories": "Categories ye be watchin'" } \ No newline at end of file diff --git a/public/language/en@pirate/email.json b/public/language/en@pirate/email.json index 691e6309a2..1ffc2ef7a7 100644 --- a/public/language/en@pirate/email.json +++ b/public/language/en@pirate/email.json @@ -1,14 +1,14 @@ { "password-reset-requested": "Password Reset Requested - %1!", - "welcome-to": "Welcome to %1", - "invite": "Invitation from %1", + "welcome-to": "Ahoy thar %1!", + "invite": "Ye be invited by %1", "greeting_no_name": "Hello", "greeting_with_name": "Hello %1", "welcome.text1": "Thank you for registering with %1!", "welcome.text2": "To fully activate your account, we need to verify that you own the email address you registered with.", "welcome.text3": "An administrator has accepted your registration application. You can login with your username/password now.", "welcome.cta": "Click here to confirm your email address", - "invitation.text1": "%1 has invited you to join %2", + "invitation.text1": "%1 be invitin' ye to join %2", "invitation.ctr": "Click here to create your account.", "reset.text1": "We received a request to reset your password, possibly because you have forgotten it. If this is not the case, please ignore this email.", "reset.text2": "To continue with the password reset, please click on the following link:", diff --git a/public/language/en@pirate/error.json b/public/language/en@pirate/error.json index 56a5530e02..08c7c49be2 100644 --- a/public/language/en@pirate/error.json +++ b/public/language/en@pirate/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "This forum requires email confirmation, please click here to enter an email", "email-confirm-failed": "We could not confirm your email, please try again later.", "confirm-email-already-sent": "Confirmation email already sent, please wait %1 minute(s) to send another one.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Username too short", "username-too-long": "Username too long", "password-too-long": "Password too long", diff --git a/public/language/en@pirate/login.json b/public/language/en@pirate/login.json index 6e7b7a36c0..a27ed4d761 100644 --- a/public/language/en@pirate/login.json +++ b/public/language/en@pirate/login.json @@ -5,7 +5,7 @@ "remember_me": "Remember Me?", "forgot_password": "My mind be a scatt'rbrain, help a matey out!", "alternative_logins": "Oth'r gangplanks", - "failed_login_attempt": "Failed login attempt, please give it a go' again.", + "failed_login_attempt": "Ye be refused boardin'", "login_successful": "Welcome on board, matey!", "dont_have_account": "Don't have an account?" } \ No newline at end of file diff --git a/public/language/en@pirate/modules.json b/public/language/en@pirate/modules.json index 0ae551df59..974cdf1b43 100644 --- a/public/language/en@pirate/modules.json +++ b/public/language/en@pirate/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Submit and Lock", "composer.toggle_dropdown": "Toggle Dropdown", "composer.uploading": "Uploading %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "OK", "bootbox.cancel": "Cancel", "bootbox.confirm": "Confirm", diff --git a/public/language/en@pirate/uploads.json b/public/language/en@pirate/uploads.json index 1622cb5693..f124670d4e 100644 --- a/public/language/en@pirate/uploads.json +++ b/public/language/en@pirate/uploads.json @@ -1,6 +1,6 @@ { "uploading-file": "Uploading the file...", "select-file-to-upload": "Select a file to upload!", - "upload-success": "File uploaded successfully!", + "upload-success": "Ye file be uploaded!", "maximum-file-size": "Maximum %1 kb" } \ No newline at end of file diff --git a/public/language/en_US/error.json b/public/language/en_US/error.json index 56a5530e02..08c7c49be2 100644 --- a/public/language/en_US/error.json +++ b/public/language/en_US/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "This forum requires email confirmation, please click here to enter an email", "email-confirm-failed": "We could not confirm your email, please try again later.", "confirm-email-already-sent": "Confirmation email already sent, please wait %1 minute(s) to send another one.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Username too short", "username-too-long": "Username too long", "password-too-long": "Password too long", diff --git a/public/language/en_US/login.json b/public/language/en_US/login.json index 70b7b98dd5..17c53b6628 100644 --- a/public/language/en_US/login.json +++ b/public/language/en_US/login.json @@ -5,7 +5,7 @@ "remember_me": "Remember Me?", "forgot_password": "Forgot Password?", "alternative_logins": "Alternative Logins", - "failed_login_attempt": "Failed login attempt, please try again.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "You have successfully logged in!", "dont_have_account": "Don't have an account?" } \ No newline at end of file diff --git a/public/language/en_US/modules.json b/public/language/en_US/modules.json index eb5e513640..b3775ab68f 100644 --- a/public/language/en_US/modules.json +++ b/public/language/en_US/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Submit and Lock", "composer.toggle_dropdown": "Toggle Dropdown", "composer.uploading": "Uploading %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "OK", "bootbox.cancel": "Cancel", "bootbox.confirm": "Confirm", diff --git a/public/language/es/error.json b/public/language/es/error.json index 527c0cbfd2..5f1db4a740 100644 --- a/public/language/es/error.json +++ b/public/language/es/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "Este foro requiere confirmación de su email, por favor pulse aquí para introducir un email", "email-confirm-failed": "No se ha podido confirmar su email, por favor inténtelo de nuevo más tarde.", "confirm-email-already-sent": "El email de confirmación ya ha sido enviado, por favor espera %1 minuto(s) para enviar otro.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Nombre de usuario es demasiado corto", "username-too-long": "Nombre de usuario demasiado largo", "password-too-long": "Contraseña muy corta", diff --git a/public/language/es/login.json b/public/language/es/login.json index 448ce31f43..b3c5427cf2 100644 --- a/public/language/es/login.json +++ b/public/language/es/login.json @@ -5,7 +5,7 @@ "remember_me": "¿Recordarme?", "forgot_password": "¿Olvidaste tu contraseña?", "alternative_logins": "Métodos alternativos", - "failed_login_attempt": "Error al iniciar sesión, inténtalo otra vez.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "¡Identificado satisfactoriamente!", "dont_have_account": "¿Aún no tienes cuenta?" } \ No newline at end of file diff --git a/public/language/es/modules.json b/public/language/es/modules.json index f0e34b04a1..5313f0735a 100644 --- a/public/language/es/modules.json +++ b/public/language/es/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Enviar y Bloquear", "composer.toggle_dropdown": "Alternar desplegable", "composer.uploading": "Subiendo %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "OK", "bootbox.cancel": "Cancelar", "bootbox.confirm": "Confirmar", diff --git a/public/language/et/error.json b/public/language/et/error.json index 05682e9068..334979ae0d 100644 --- a/public/language/et/error.json +++ b/public/language/et/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "See foorum nõuab emaili kinnitust, palun vajuta siia, et sisestada email", "email-confirm-failed": "Meil ei õnnestunud sinu emaili kinnitada, proovi hiljem uuesti.", "confirm-email-already-sent": "Kinnituskiri on juba saadetud, palun oota %1 minut(it) uue kirja saatmiseks.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Kasutajanimi on liiga lühike", "username-too-long": "Kasutajanimi on liiga pikk", "password-too-long": "Parool liiga pikk", diff --git a/public/language/et/login.json b/public/language/et/login.json index 6c283a8b83..09a875ef4a 100644 --- a/public/language/et/login.json +++ b/public/language/et/login.json @@ -5,7 +5,7 @@ "remember_me": "Mäleta mind?", "forgot_password": "Unustasid parooli?", "alternative_logins": "Alternatiivsed sisse logimise võimalused", - "failed_login_attempt": "Sisse logimine ebaõnnestus, palun proovi uuesti.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "Edukalt sisse logitud!", "dont_have_account": "Pole veel kasutajat?" } \ No newline at end of file diff --git a/public/language/et/modules.json b/public/language/et/modules.json index ec23804489..0df09f3b63 100644 --- a/public/language/et/modules.json +++ b/public/language/et/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Kinnita ja Lukusta", "composer.toggle_dropdown": "Aktiveeri rippmenüü", "composer.uploading": "%1 Üleslaadimine", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "Olgu", "bootbox.cancel": "Katkesta", "bootbox.confirm": "Kinnita", diff --git a/public/language/fa_IR/error.json b/public/language/fa_IR/error.json index 44dc7935e0..4b4a8095e9 100644 --- a/public/language/fa_IR/error.json +++ b/public/language/fa_IR/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "ایمیل شما تایید نشده است ، لطفا برای وارد کردن ایمیل اینجا کلیک کنید", "email-confirm-failed": "سیستم موفق به تایید ایمیل شما نشد، لطفا بعدا دوباره سعی کنید", "confirm-email-already-sent": "ایمیل فعال‌سازی قبلا فرستاده شده، لطفا %1 دقیقه صبر کنید تا ایمیل دیگری بفرستید.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "نام کاربری خیلی کوتاه است.", "username-too-long": "نام کاربری بسیار طولانیست", "password-too-long": "کلمه عبور بسیار طولانیست", diff --git a/public/language/fa_IR/login.json b/public/language/fa_IR/login.json index 578071109d..ea5e13bce4 100644 --- a/public/language/fa_IR/login.json +++ b/public/language/fa_IR/login.json @@ -5,7 +5,7 @@ "remember_me": "مرا به یاد بسپار؟", "forgot_password": "گذرواژه را فراموش کرده‌اید؟", "alternative_logins": "روش‌های درون آمدن جایگزین", - "failed_login_attempt": "شکست در درون آمدن، لطفا دوباره تلاش کنید.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "شما با موفقیت به درون آمده‌اید!", "dont_have_account": "حساب کاربری ندارید؟" } \ No newline at end of file diff --git a/public/language/fa_IR/modules.json b/public/language/fa_IR/modules.json index cae06f83b0..c60817f334 100644 --- a/public/language/fa_IR/modules.json +++ b/public/language/fa_IR/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "ارسال و قفل", "composer.toggle_dropdown": "باز و بسته کردن کرکره", "composer.uploading": "در حال بارگذاری %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "باشه", "bootbox.cancel": "لغو", "bootbox.confirm": "تایید", diff --git a/public/language/fi/error.json b/public/language/fi/error.json index 701277e694..35296e7776 100644 --- a/public/language/fi/error.json +++ b/public/language/fi/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "This forum requires email confirmation, please click here to enter an email", "email-confirm-failed": "We could not confirm your email, please try again later.", "confirm-email-already-sent": "Confirmation email already sent, please wait %1 minute(s) to send another one.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Käyttäjänimi on liian lyhyt", "username-too-long": "Käyttäjänimi on liian pitkä", "password-too-long": "Password too long", diff --git a/public/language/fi/login.json b/public/language/fi/login.json index 3dc14792ee..a9c69851b2 100644 --- a/public/language/fi/login.json +++ b/public/language/fi/login.json @@ -5,7 +5,7 @@ "remember_me": "Muista minut?", "forgot_password": "Unohditko salasanasi?", "alternative_logins": "Vaihtoehtoiset kirjautumistavat", - "failed_login_attempt": "Kirjautumisyritys epäonnistui, ole hyvä ja yritä uudestaan.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "Olet onnistuneesti kirjautunut sisään!", "dont_have_account": "Ei käyttäjätunnusta?" } \ No newline at end of file diff --git a/public/language/fi/modules.json b/public/language/fi/modules.json index 978d306170..77fff03fd5 100644 --- a/public/language/fi/modules.json +++ b/public/language/fi/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Submit and Lock", "composer.toggle_dropdown": "Toggle Dropdown", "composer.uploading": "Uploading %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "OK", "bootbox.cancel": "Cancel", "bootbox.confirm": "Confirm", diff --git a/public/language/fr/error.json b/public/language/fr/error.json index 6dddeafd53..5588e0a2f0 100644 --- a/public/language/fr/error.json +++ b/public/language/fr/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "Ce forum requiert une vérification de votre adresse email. Veuillez cliquer ici pour entrer une adresse.", "email-confirm-failed": "Votre adresse email n'a pas pu être vérifiée. Veuillez ré-essayer plus tard.", "confirm-email-already-sent": "L'email de confirmation a déjà été envoyé. Veuillez attendre %1 minute(s) avant de redemander un nouvel envoi.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Nom d'utilisateur trop court", "username-too-long": "Nom d'utilisateur trop long", "password-too-long": "Mot de passe trop long", diff --git a/public/language/fr/login.json b/public/language/fr/login.json index 6470717691..f48fe914c8 100644 --- a/public/language/fr/login.json +++ b/public/language/fr/login.json @@ -5,7 +5,7 @@ "remember_me": "Se souvenir de moi ?", "forgot_password": "Mot de passe oublié ?", "alternative_logins": "Autres méthodes de connexion", - "failed_login_attempt": "Echèc d'authentification, veuillez réessayer.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "Vous êtes maintenant connecté !", "dont_have_account": "Vous n'avez pas de compte ?" } \ No newline at end of file diff --git a/public/language/fr/modules.json b/public/language/fr/modules.json index 33fd5fe494..4cba60a328 100644 --- a/public/language/fr/modules.json +++ b/public/language/fr/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Envoyer et verrouiller", "composer.toggle_dropdown": "Afficher/masquer le menu", "composer.uploading": "Envoi en cours %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "OK", "bootbox.cancel": "Annuler", "bootbox.confirm": "Confirmer", diff --git a/public/language/gl/error.json b/public/language/gl/error.json index 862bdbcda3..f5b4235c3d 100644 --- a/public/language/gl/error.json +++ b/public/language/gl/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "Este foro require confirmación de correo, por favor pica aquí para introducir un correo.", "email-confirm-failed": "Non podemos confirmar o teu correo, por favor téntao de novo máis tarde.", "confirm-email-already-sent": "O correo de confirmación foi enviado, agarda %1 minute(s) para enviar outro.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Nome de usuario demasiado curto", "username-too-long": "Nome de usuario demasiado longo.", "password-too-long": "Contrasinal moi longa", diff --git a/public/language/gl/login.json b/public/language/gl/login.json index 34e3a89ecb..04e5fc39ed 100644 --- a/public/language/gl/login.json +++ b/public/language/gl/login.json @@ -5,7 +5,7 @@ "remember_me": "Lembrarme?", "forgot_password": "Esqueciches o teu contrasinal?", "alternative_logins": "Métodos alternativos", - "failed_login_attempt": "Erro ao iniciar sesión, téntao de novo.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "Sesión iniciada con éxito!", "dont_have_account": "Aínda non tes conta?" } \ No newline at end of file diff --git a/public/language/gl/modules.json b/public/language/gl/modules.json index a50f0a5a03..762fad15a2 100644 --- a/public/language/gl/modules.json +++ b/public/language/gl/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Enviar e bloquear", "composer.toggle_dropdown": "Alternar despregable", "composer.uploading": "Subindo %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "De acordo", "bootbox.cancel": "Cancelar", "bootbox.confirm": "Confirmar", diff --git a/public/language/he/error.json b/public/language/he/error.json index 3386b8a054..5592b1d9cb 100644 --- a/public/language/he/error.json +++ b/public/language/he/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "פורום זה דורש אישור בדוא\"ל, אנא לחץ כאן כדי להכניס לדואר אלקטרוני", "email-confirm-failed": "לא הצלחנו לאשר את הדוא\"ל שלך, תנסה שוב אחר כך", "confirm-email-already-sent": "מייל האישור כבר נשלח, אנא המתן %1 דקות כדי לשלוח מייל נוסף.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "שם משתמש קצר מדי", "username-too-long": "שם משתמש ארוך מדי", "password-too-long": "הסיסמה ארוכה מדי", diff --git a/public/language/he/login.json b/public/language/he/login.json index 6142a8a045..c0c679e0cd 100644 --- a/public/language/he/login.json +++ b/public/language/he/login.json @@ -5,7 +5,7 @@ "remember_me": "זכור אותי?", "forgot_password": "שכחת סיסמתך?", "alternative_logins": "התחבר באמצעות...", - "failed_login_attempt": "נסיון התחברות נכשל, נסה שוב.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "התחברת בהצלחה!", "dont_have_account": "אין לך חשבון עדיין?" } \ No newline at end of file diff --git a/public/language/he/modules.json b/public/language/he/modules.json index 6b6f8c40f3..3664bac5b3 100644 --- a/public/language/he/modules.json +++ b/public/language/he/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "אשר ונעל", "composer.toggle_dropdown": "הדלק/כבה את התפריט הנפתח", "composer.uploading": "העלאה %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "בסדר", "bootbox.cancel": "בטל", "bootbox.confirm": "אשר", diff --git a/public/language/hu/error.json b/public/language/hu/error.json index db1c8cd322..fc1fbd3fed 100644 --- a/public/language/hu/error.json +++ b/public/language/hu/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "Ez a fórum e-mail megerősítést kíván, kérlek kattints ide egy cím beírásához", "email-confirm-failed": "Nem tudtuk ellenőrizni az e-mail címedet, kérlek próbálkozz később.", "confirm-email-already-sent": "Confirmation email already sent, please wait %1 minute(s) to send another one.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Túl rövid felhasználónév", "username-too-long": "Túl hosszú felhasználónév", "password-too-long": "Password too long", diff --git a/public/language/hu/login.json b/public/language/hu/login.json index 14be774171..4323321c44 100644 --- a/public/language/hu/login.json +++ b/public/language/hu/login.json @@ -5,7 +5,7 @@ "remember_me": "Megjegyzés", "forgot_password": "Elfelejtett Jelszó?", "alternative_logins": "Alternatív belépés", - "failed_login_attempt": "Sikertelen belépési kísérlet, kérlek próbálkozzunk újra.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "Sikeres belépés", "dont_have_account": "Nincs még fiók?" } \ No newline at end of file diff --git a/public/language/hu/modules.json b/public/language/hu/modules.json index 65142c04d3..e7262c7dff 100644 --- a/public/language/hu/modules.json +++ b/public/language/hu/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Submit and Lock", "composer.toggle_dropdown": "Toggle Dropdown", "composer.uploading": "Uploading %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "OK", "bootbox.cancel": "Cancel", "bootbox.confirm": "Confirm", diff --git a/public/language/id/error.json b/public/language/id/error.json index d3cc609cfe..d308c417b5 100644 --- a/public/language/id/error.json +++ b/public/language/id/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "This forum requires email confirmation, please click here to enter an email", "email-confirm-failed": "We could not confirm your email, please try again later.", "confirm-email-already-sent": "Confirmation email already sent, please wait %1 minute(s) to send another one.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Username terlalu pendek", "username-too-long": "Username terlalu panjang", "password-too-long": "Password too long", diff --git a/public/language/id/login.json b/public/language/id/login.json index 7a1c52fe71..48aa87589d 100644 --- a/public/language/id/login.json +++ b/public/language/id/login.json @@ -5,7 +5,7 @@ "remember_me": "Ingin Diingat?", "forgot_password": "Lupa Password?", "alternative_logins": "Login Alternatif", - "failed_login_attempt": "Percobaan login gagal, cobalah kembali.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "Kamu telah berhasil login!", "dont_have_account": "Belum memiliki akun?" } \ No newline at end of file diff --git a/public/language/id/modules.json b/public/language/id/modules.json index 7ddec19b96..bd2946c9d7 100644 --- a/public/language/id/modules.json +++ b/public/language/id/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Submit and Lock", "composer.toggle_dropdown": "Toggle Dropdown", "composer.uploading": "Uploading %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "OK", "bootbox.cancel": "Cancel", "bootbox.confirm": "Confirm", diff --git a/public/language/it/error.json b/public/language/it/error.json index ec1f8d0e9b..d0ddddf45a 100644 --- a/public/language/it/error.json +++ b/public/language/it/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "Questo forum richiede la conferma dell'indirizzo email, per favore clicca qui per inserirne uno", "email-confirm-failed": "Non possiamo confermare la tua email, per favore prova ancora più tardi.", "confirm-email-already-sent": "Email di conferma già inviata, per favore attendere %1 minuti per richiederne un'altra.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Nome utente troppo corto", "username-too-long": "Nome utente troppo lungo", "password-too-long": "Password troppo lunga", diff --git a/public/language/it/login.json b/public/language/it/login.json index f04d6cdfb4..cdfa00c223 100644 --- a/public/language/it/login.json +++ b/public/language/it/login.json @@ -5,7 +5,7 @@ "remember_me": "Ricordami?", "forgot_password": "Password dimenticata?", "alternative_logins": "Accessi Alternativi", - "failed_login_attempt": "Tentativo di accesso fallito, prova ancora.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "Sei entrato con successo!", "dont_have_account": "Non hai un account?" } \ No newline at end of file diff --git a/public/language/it/modules.json b/public/language/it/modules.json index fd58d80dd1..1d39879d23 100644 --- a/public/language/it/modules.json +++ b/public/language/it/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Invia e Blocca", "composer.toggle_dropdown": "Mostra/Nascondi menu a discesa", "composer.uploading": "Uploading %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "OK", "bootbox.cancel": "Annulla", "bootbox.confirm": "Conferma", diff --git a/public/language/ja/error.json b/public/language/ja/error.json index a6147ee989..c84f8c161e 100644 --- a/public/language/ja/error.json +++ b/public/language/ja/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "このフォーラムを利用するにはメールアドレスの確認を行う必要があります。メールアドレスを確認するためにはここをクリックしてください。", "email-confirm-failed": "メールアドレスの確認が出来ませんでした。再度お試しください。", "confirm-email-already-sent": "確認のメールは既に送信されています。再度送信するには、%1分後に再度お試しください。", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "ユーザー名が短すぎます", "username-too-long": "ユーザー名が長すぎます", "password-too-long": "パスワードが長すぎます", diff --git a/public/language/ja/login.json b/public/language/ja/login.json index 916593a30d..59c72797e6 100644 --- a/public/language/ja/login.json +++ b/public/language/ja/login.json @@ -5,7 +5,7 @@ "remember_me": "ログイン情報を記憶", "forgot_password": "パスワードを忘れましたか?", "alternative_logins": "ほかのログイン方法", - "failed_login_attempt": "ログインに失敗しました.ユーザー名やパスワードをご確認ください。", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "ログインしました!", "dont_have_account": "アカウントをもっていませんか?" } \ No newline at end of file diff --git a/public/language/ja/modules.json b/public/language/ja/modules.json index 204c392bbb..bc661721f9 100644 --- a/public/language/ja/modules.json +++ b/public/language/ja/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Submit and Lock", "composer.toggle_dropdown": "Toggle Dropdown", "composer.uploading": "Uploading %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "OK", "bootbox.cancel": "Cancel", "bootbox.confirm": "Confirm", diff --git a/public/language/ko/error.json b/public/language/ko/error.json index 01e81ea804..fb0eedc042 100644 --- a/public/language/ko/error.json +++ b/public/language/ko/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "이메일 인증이 필요합니다. 이곳을 클릭하여 이메일 입력하세요.", "email-confirm-failed": "이메일 인증이 실패하였습니다. 잠시 후에 다시 시도하세요.", "confirm-email-already-sent": "인증 메일이 이미 발송되었습니다. %1 분 이후에 재 발송이 가능합니다.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "사용자 이름이 너무 짧습니다.", "username-too-long": "사용자 이름이 너무 깁니다.", "password-too-long": "패스워드가 너무 깁니다.", diff --git a/public/language/ko/login.json b/public/language/ko/login.json index 61413fcb8a..d71e824596 100644 --- a/public/language/ko/login.json +++ b/public/language/ko/login.json @@ -5,7 +5,7 @@ "remember_me": "로그인 유지", "forgot_password": "비밀번호 초기화", "alternative_logins": "다른 방법으로 로그인", - "failed_login_attempt": "로그인에 실패했습니다.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "성공적으로 로그인했습니다.", "dont_have_account": "계정이 없으신가요?" } \ No newline at end of file diff --git a/public/language/ko/modules.json b/public/language/ko/modules.json index 99aea82699..3d7b19c6a1 100644 --- a/public/language/ko/modules.json +++ b/public/language/ko/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "잠금 상태로 작성 완료", "composer.toggle_dropdown": "내려서 확인하기", "composer.uploading": "%1 업로드 중", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "확인", "bootbox.cancel": "취소", "bootbox.confirm": "확인", diff --git a/public/language/lt/error.json b/public/language/lt/error.json index fa04fa5803..7e087906d9 100644 --- a/public/language/lt/error.json +++ b/public/language/lt/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "Šis forumas reikalauja patvirtinimo el. paštu prašome spausti čia el. adreso įrašymui", "email-confirm-failed": "Negalime patvirtinti jūsų el. adreso, prašom bandyti vėliau.", "confirm-email-already-sent": "Patvirtinimo laiškas išsiųstas, prašome palaukti %1 minute(s) kad išsiųstume kita", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Slapyvardis per trumpas", "username-too-long": "Vartotojo vardas per ilgas", "password-too-long": "Password too long", diff --git a/public/language/lt/login.json b/public/language/lt/login.json index dd18d2949c..09d9b42d62 100644 --- a/public/language/lt/login.json +++ b/public/language/lt/login.json @@ -5,7 +5,7 @@ "remember_me": "Prisiminti?", "forgot_password": "Užmiršote slaptažodį?", "alternative_logins": "Alternatyvūs prisijungimo būdai", - "failed_login_attempt": "Prisijungti nepavyko, bandykite dar kartą.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "Jūs sėkmingai prisijungėte!", "dont_have_account": "Neturite paskyros?" } \ No newline at end of file diff --git a/public/language/lt/modules.json b/public/language/lt/modules.json index 252dd3bfa3..a490086245 100644 --- a/public/language/lt/modules.json +++ b/public/language/lt/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Pateikti ir užrakinti", "composer.toggle_dropdown": "Perjungti Nukritimą", "composer.uploading": "Uploading %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "OK", "bootbox.cancel": "Cancel", "bootbox.confirm": "Confirm", diff --git a/public/language/ms/error.json b/public/language/ms/error.json index 8466ee6bbe..3930f53059 100644 --- a/public/language/ms/error.json +++ b/public/language/ms/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "Forum ini memerlukan pengesahan emel, sila klik sini untuk memasukkan emel", "email-confirm-failed": "Kami tidak dapat memastikan emel anda, sila cuba lagi nanti", "confirm-email-already-sent": "Pengesahan emel telah dihantar, sila tunggu %1 minit() untuk menghantar yang baru.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Nama pengunna terlalu pendek", "username-too-long": "Nama pengunna terlalu panjang", "password-too-long": "Kata laluan terlalu panjang", diff --git a/public/language/ms/login.json b/public/language/ms/login.json index 7536a7c973..3c3a1fd1d1 100644 --- a/public/language/ms/login.json +++ b/public/language/ms/login.json @@ -5,7 +5,7 @@ "remember_me": "Ingatkan Saya", "forgot_password": "Lupa Kata Laluan?", "alternative_logins": "Log Masuk Alternatif", - "failed_login_attempt": "Log masuk gagal, sila cuba lagi.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "Anda berjaya log masuk!", "dont_have_account": "Tiada akaun?" } \ No newline at end of file diff --git a/public/language/ms/modules.json b/public/language/ms/modules.json index 996443d174..774d674123 100644 --- a/public/language/ms/modules.json +++ b/public/language/ms/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Hantar dan Kunci", "composer.toggle_dropdown": "Togol Kebawah", "composer.uploading": "Memuat naik %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "Ok", "bootbox.cancel": "Batal", "bootbox.confirm": "Pasti", diff --git a/public/language/nb/error.json b/public/language/nb/error.json index ab24f7cf2b..ff6dbda377 100644 --- a/public/language/nb/error.json +++ b/public/language/nb/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "Dette forumet krever e-postbekreftelse, vennligst klikk her for å skrive inn en e-post", "email-confirm-failed": "Vi kunne ikke bekrefte e-posten din, vennligst prøv igjen senere.", "confirm-email-already-sent": "E-post for bekreftelse er allerede sendt, vennligst vent %1 minutt(er) for å sende en til.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Brukernavnet er for kort", "username-too-long": "Brukernavnet er for langt", "password-too-long": "Password too long", diff --git a/public/language/nb/login.json b/public/language/nb/login.json index 785a7defc4..cdf5766265 100644 --- a/public/language/nb/login.json +++ b/public/language/nb/login.json @@ -5,7 +5,7 @@ "remember_me": "Husk meg?", "forgot_password": "Glemt passord?", "alternative_logins": "Alternativ innlogging", - "failed_login_attempt": "Mislykket innloggingsforsøk, vennligst prøv igjen.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "Du har blitt logget inn!", "dont_have_account": "Har du ikke en konto?" } \ No newline at end of file diff --git a/public/language/nb/modules.json b/public/language/nb/modules.json index a25a971028..6b3309287d 100644 --- a/public/language/nb/modules.json +++ b/public/language/nb/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Send og lås", "composer.toggle_dropdown": "Veksle nedtrekksfelt", "composer.uploading": "Uploading %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "OK", "bootbox.cancel": "Avbryt", "bootbox.confirm": "Bekreft", diff --git a/public/language/nl/error.json b/public/language/nl/error.json index 6b042d72e0..02030890f9 100644 --- a/public/language/nl/error.json +++ b/public/language/nl/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "Dit berichtenforum vereist bevestiging per e-mail, klik hier om een e-mailadres te registreren", "email-confirm-failed": "Helaas kon het e-mailadres niet bevestigd worden, probeer het later nog eens.", "confirm-email-already-sent": "Bevestigingsmail is zojuist al verzonden, wacht alsjeblieft %1 minuut (minuten) voordat je opnieuw een bevestigingsmail aanvraagt.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Gebruikersnaam is te kort", "username-too-long": "Gebruikersnaam is te lang", "password-too-long": "Wachtwoord is te lang", diff --git a/public/language/nl/login.json b/public/language/nl/login.json index 9b84acdc8a..d03d51ffde 100644 --- a/public/language/nl/login.json +++ b/public/language/nl/login.json @@ -5,7 +5,7 @@ "remember_me": "Aangemeld blijven?", "forgot_password": "Wachtwoord vergeten?", "alternative_logins": "Andere manieren van aanmelden", - "failed_login_attempt": "Aanmelden niet geslaagd. Probeer het nog eens.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "Je bent succesvol ingelogd!", "dont_have_account": "Geen gebruikersaccount?" } \ No newline at end of file diff --git a/public/language/nl/modules.json b/public/language/nl/modules.json index dd7de3cc62..dcb755bc64 100644 --- a/public/language/nl/modules.json +++ b/public/language/nl/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Bericht plaatsen en sluiten", "composer.toggle_dropdown": "Keuzelijst schakelen", "composer.uploading": "Uploaden van %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "OK", "bootbox.cancel": "Annuleren", "bootbox.confirm": "Bevestig", diff --git a/public/language/pl/error.json b/public/language/pl/error.json index f36ce1a124..24516197a6 100644 --- a/public/language/pl/error.json +++ b/public/language/pl/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "To forum wymaga weryfikacji przez email. Proszę kliknąć tutaj, aby wprowadzić adres.", "email-confirm-failed": "Nie byliśmy w stanie potwierdzić twojego email-a. Proszę spróbować później.", "confirm-email-already-sent": "Email potwierdzający został już wysłany, proszę odczekaj jeszcze %1 minut(y), aby wysłać kolejny.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Nazwa użytkownika za krótka", "username-too-long": "Zbyt długa nazwa użytkownika", "password-too-long": "Hasło jest za długie", diff --git a/public/language/pl/login.json b/public/language/pl/login.json index 1133f6afba..4c02c73c6d 100644 --- a/public/language/pl/login.json +++ b/public/language/pl/login.json @@ -5,7 +5,7 @@ "remember_me": "Zapamiętaj mnie", "forgot_password": "Zapomniałeś hasło?", "alternative_logins": "Alternatywne logowanie", - "failed_login_attempt": "Nie udało się zalogować. Spróbuj ponownie.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "Zostałeś pomyślnie zalogowany.", "dont_have_account": "Nie masz konta?" } \ No newline at end of file diff --git a/public/language/pl/modules.json b/public/language/pl/modules.json index 4ae07a0b74..2fa29ed5ae 100644 --- a/public/language/pl/modules.json +++ b/public/language/pl/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Prześlij i Zablokuj", "composer.toggle_dropdown": "Przełącz Listę Rozwijaną", "composer.uploading": "Wysyłanie %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "OK", "bootbox.cancel": "Anuluj", "bootbox.confirm": "Potwierdź", diff --git a/public/language/pt_BR/error.json b/public/language/pt_BR/error.json index 8e91a585e8..d7e9f197c5 100644 --- a/public/language/pt_BR/error.json +++ b/public/language/pt_BR/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "Este fórum exige confirmação de email, por gentileza clique aqui para digitar um email", "email-confirm-failed": "Nós não pudemos confirmar seu email, por gentileza tente novamente mais tarde.", "confirm-email-already-sent": "O email de confirmação já foi enviado, por favor aguarde %1 minuto(s) para enviar outro.", + "sendmail-not-found": "O executável do sendmail não pôde ser encontrado, por favor se certifique de que ele está instalado e é executável pelo usuário que roda o NodeBB.", "username-too-short": "Nome de usuário muito curto", "username-too-long": "Nome de usuário muito longo", "password-too-long": "A senha é muito grande", diff --git a/public/language/pt_BR/login.json b/public/language/pt_BR/login.json index 7b8299af75..eaccc74fac 100644 --- a/public/language/pt_BR/login.json +++ b/public/language/pt_BR/login.json @@ -5,7 +5,7 @@ "remember_me": "Lembrar de Mim?", "forgot_password": "Esqueceu a Senha?", "alternative_logins": "Logins Alternativos", - "failed_login_attempt": "Falha no login, por favor tente novamente.", + "failed_login_attempt": "Falha no Login", "login_successful": "Você logou com sucesso!", "dont_have_account": "Não tem uma conta?" } \ No newline at end of file diff --git a/public/language/pt_BR/modules.json b/public/language/pt_BR/modules.json index 597e750246..20d1fe1805 100644 --- a/public/language/pt_BR/modules.json +++ b/public/language/pt_BR/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Enviar e Trancar", "composer.toggle_dropdown": "Alternar Dropdown", "composer.uploading": "Enviando %1", + "composer.formatting.bold": "Negrito", + "composer.formatting.italic": "Itálico", + "composer.formatting.list": "Lista", + "composer.formatting.strikethrough": "Riscado", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Imagem", + "composer.upload-picture": "Fazer upload de Imagem", + "composer.upload-file": "Fazer upload de Arquivo", "bootbox.ok": "OK", "bootbox.cancel": "Cancelar", "bootbox.confirm": "Confirmar", diff --git a/public/language/ro/error.json b/public/language/ro/error.json index ba8d12b53d..d185a27d6f 100644 --- a/public/language/ro/error.json +++ b/public/language/ro/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "Ca sa accesezi forumul trebuie sa iti confirmi email-ul, click aici ca sa intri in mail.", "email-confirm-failed": "Mail-ul tau nu a putut fi confirmat, te rog incearca mai tarziu.", "confirm-email-already-sent": "Email-ul de confirmare ti-a fost trimis, asteapta te rog %1 minut(e) ca sa trimiti inca unul.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Numele de utilizator este prea scurt", "username-too-long": "Numele de utilizator este prea lung", "password-too-long": "Parola prea lunga.", diff --git a/public/language/ro/login.json b/public/language/ro/login.json index 479e3a83be..56396705d2 100644 --- a/public/language/ro/login.json +++ b/public/language/ro/login.json @@ -5,7 +5,7 @@ "remember_me": "Autentifică-mă automat la fiecare vizită", "forgot_password": "Ai uitat parola?", "alternative_logins": "Autentificare Alternativă", - "failed_login_attempt": "Încercare de autentificare eșuată, te rugăm să încerci dinou.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "Te-ai autentificat cu succes!", "dont_have_account": "Nu ai un cont?" } \ No newline at end of file diff --git a/public/language/ro/modules.json b/public/language/ro/modules.json index f1f0bdf9d6..7382e34154 100644 --- a/public/language/ro/modules.json +++ b/public/language/ro/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Submit and Lock", "composer.toggle_dropdown": "Toggle Dropdown", "composer.uploading": "Uploading %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "OK", "bootbox.cancel": "Cancel", "bootbox.confirm": "Confirm", diff --git a/public/language/ru/error.json b/public/language/ru/error.json index 5877e5be07..319bea7abe 100644 --- a/public/language/ru/error.json +++ b/public/language/ru/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "Этот форум требует подтверждения по E-mail. Нажмите здесь для ввода E-mail.", "email-confirm-failed": "Мы не можем подтвердить Ваш E-mail, попробуйте позже.", "confirm-email-already-sent": "Сообщение для подтверждения уже выслано на E-mail. Повторная отправка возможна через %1 мин.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Слишком короткое имя пользователя", "username-too-long": "Имя пользователя слишком длинное", "password-too-long": "Пароль слишком длинный", diff --git a/public/language/ru/login.json b/public/language/ru/login.json index b0a5793412..43764ef23b 100644 --- a/public/language/ru/login.json +++ b/public/language/ru/login.json @@ -5,7 +5,7 @@ "remember_me": "Запомнить меня", "forgot_password": "Забыли пароль?", "alternative_logins": "Войти через", - "failed_login_attempt": "Не удалось войти, попробуйте еще раз.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "Вы успешно вошли!", "dont_have_account": "Нет акканута?" } \ No newline at end of file diff --git a/public/language/ru/modules.json b/public/language/ru/modules.json index 07ecb488c8..ef7ef72724 100644 --- a/public/language/ru/modules.json +++ b/public/language/ru/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Отправить и закрыть", "composer.toggle_dropdown": "Показать выпадающий список", "composer.uploading": "Загрузка %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "ОК", "bootbox.cancel": "Отмена", "bootbox.confirm": "Подтвердить", diff --git a/public/language/rw/error.json b/public/language/rw/error.json index 3dfb30b539..edf874c96d 100644 --- a/public/language/rw/error.json +++ b/public/language/rw/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "Uru rubuga rusaba ko wemeza ko utunze email. Kanda hano kugirango utange email yawe", "email-confirm-failed": "Ntabwo email yawe yabashije kwemezwa. Ongera ugerageze mu bundi buryo. ", "confirm-email-already-sent": "Email yo kwemeza yamaze koherezwa. Tegereza iminota (umunota) %1 mbere yo kohereza indi. ", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Izina ni rigufi cyane", "username-too-long": "Izina ni rirerire cyane", "password-too-long": "Password too long", diff --git a/public/language/rw/login.json b/public/language/rw/login.json index 72ae32e57c..5bdb99dc21 100644 --- a/public/language/rw/login.json +++ b/public/language/rw/login.json @@ -5,7 +5,7 @@ "remember_me": "Wibukwe?", "forgot_password": "Wibagiwe ijambobanga?", "alternative_logins": "Ukundi Wakwinjiramo", - "failed_login_attempt": "Ntiwinjiyemo. Ongera ugerageze. ", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "Winjiyemo nta ngorane!", "dont_have_account": "Nta konte ufite?" } \ No newline at end of file diff --git a/public/language/rw/modules.json b/public/language/rw/modules.json index e0aff84e80..15d1ea25eb 100644 --- a/public/language/rw/modules.json +++ b/public/language/rw/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Shyiraho kandi Unafungirane", "composer.toggle_dropdown": "Hindura Icyerekezo", "composer.uploading": "Ugupakira %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "Sawa", "bootbox.cancel": "Isubire", "bootbox.confirm": "Emeza", diff --git a/public/language/sc/error.json b/public/language/sc/error.json index 56a5530e02..08c7c49be2 100644 --- a/public/language/sc/error.json +++ b/public/language/sc/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "This forum requires email confirmation, please click here to enter an email", "email-confirm-failed": "We could not confirm your email, please try again later.", "confirm-email-already-sent": "Confirmation email already sent, please wait %1 minute(s) to send another one.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Username too short", "username-too-long": "Username too long", "password-too-long": "Password too long", diff --git a/public/language/sc/login.json b/public/language/sc/login.json index 83a84e0ad1..ee7f253df5 100644 --- a/public/language/sc/login.json +++ b/public/language/sc/login.json @@ -5,7 +5,7 @@ "remember_me": "Regorda·mi?", "forgot_password": "Password Iscarèssida?", "alternative_logins": "Intradas Alternativas", - "failed_login_attempt": "Intrada isballiada, pro praghere torra a provare.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "Ses intradu!", "dont_have_account": "Don't have an account?" } \ No newline at end of file diff --git a/public/language/sc/modules.json b/public/language/sc/modules.json index 89b779d53e..93c5b11202 100644 --- a/public/language/sc/modules.json +++ b/public/language/sc/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Submit and Lock", "composer.toggle_dropdown": "Toggle Dropdown", "composer.uploading": "Uploading %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "OK", "bootbox.cancel": "Cancel", "bootbox.confirm": "Confirm", diff --git a/public/language/sk/error.json b/public/language/sk/error.json index a8b3ba06a7..bdd340532b 100644 --- a/public/language/sk/error.json +++ b/public/language/sk/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "This forum requires email confirmation, please click here to enter an email", "email-confirm-failed": "We could not confirm your email, please try again later.", "confirm-email-already-sent": "Confirmation email already sent, please wait %1 minute(s) to send another one.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Username too short", "username-too-long": "Username too long", "password-too-long": "Password too long", diff --git a/public/language/sk/login.json b/public/language/sk/login.json index bc2f675ff2..0736ab4faa 100644 --- a/public/language/sk/login.json +++ b/public/language/sk/login.json @@ -5,7 +5,7 @@ "remember_me": "Zapamätať si ma?", "forgot_password": "Zabudol si heslo?", "alternative_logins": "Ďalšie spôsoby prihlásenia", - "failed_login_attempt": "Prihlásenie sa nepodarilo, skús to znovu.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "Prihlásenie prebehlo úspešne!", "dont_have_account": "Nemáš účet?" } \ No newline at end of file diff --git a/public/language/sk/modules.json b/public/language/sk/modules.json index b9be2fb6c3..0268001e7f 100644 --- a/public/language/sk/modules.json +++ b/public/language/sk/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Submit and Lock", "composer.toggle_dropdown": "Toggle Dropdown", "composer.uploading": "Uploading %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "OK", "bootbox.cancel": "Cancel", "bootbox.confirm": "Confirm", diff --git a/public/language/sl/error.json b/public/language/sl/error.json index d9df817190..33d0da5f79 100644 --- a/public/language/sl/error.json +++ b/public/language/sl/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "Ta forum zahteva potrjen e-mail naslov. Prosim kliknite tu za vnos e-mail naslova.", "email-confirm-failed": "Nismo mogli potrditi vašega e-mail naslova. Prosimo poskusite ponovno.", "confirm-email-already-sent": "Potrditveni e-mail naslov je že poslan. Prosimo počakajte %1 minut(o) za ponovno pošiljanje.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Uporabniško ime je prekratko", "username-too-long": "Uporabniško ime je predolgo", "password-too-long": "Password too long", diff --git a/public/language/sl/login.json b/public/language/sl/login.json index 6955d274bd..7f3d80e3cb 100644 --- a/public/language/sl/login.json +++ b/public/language/sl/login.json @@ -5,7 +5,7 @@ "remember_me": "Spomni me?", "forgot_password": "Pozabljeno geslo?", "alternative_logins": "Prijava z drugim računom", - "failed_login_attempt": "Napačna prijava, prosim poskusi ponovno.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "Prijava je uspešna.", "dont_have_account": "Ali še nimaš uporabniškega računa?" } \ No newline at end of file diff --git a/public/language/sl/modules.json b/public/language/sl/modules.json index 911a9f1588..a9b88e3019 100644 --- a/public/language/sl/modules.json +++ b/public/language/sl/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Pošlji in zakleni", "composer.toggle_dropdown": "Preklopi spustni meni", "composer.uploading": "Uploading %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "Vredu", "bootbox.cancel": "Prekliči", "bootbox.confirm": "Potrdi", diff --git a/public/language/sr/error.json b/public/language/sr/error.json index 5c66e812ac..2a22dd111e 100644 --- a/public/language/sr/error.json +++ b/public/language/sr/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "Форум захтева потврду е-поште, кликните овде да бисте отворили е-пошту", "email-confirm-failed": "Потврда е-поште није успела, молимо вас да покушате касније.", "confirm-email-already-sent": "Конфирмациони имејл је већ послат, молимо вас да сачекате %1 минут(а) да бисте послали други.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Корисничко име је прекратко", "username-too-long": "Корисничко име је предуго", "password-too-long": "Шифра је предугачка.", diff --git a/public/language/sr/login.json b/public/language/sr/login.json index 8fefdb9068..abcf584db7 100644 --- a/public/language/sr/login.json +++ b/public/language/sr/login.json @@ -5,7 +5,7 @@ "remember_me": "Памти ме?", "forgot_password": "Заборављена лозинка?", "alternative_logins": "Алтернативно пријављивање", - "failed_login_attempt": "Неуспело пријављивање, покушајте поново.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "Успешно сте се пријавили!", "dont_have_account": "Немате налог?" } \ No newline at end of file diff --git a/public/language/sr/modules.json b/public/language/sr/modules.json index c4f4c3314a..24d2e521f9 100644 --- a/public/language/sr/modules.json +++ b/public/language/sr/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Пошаљи и закључај", "composer.toggle_dropdown": "Подесите \"Dropdown\"", "composer.uploading": "Убацивање %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "ОК", "bootbox.cancel": "Откажи", "bootbox.confirm": "Потврди", diff --git a/public/language/sv/error.json b/public/language/sv/error.json index 64b1436f5e..84e3bfa3a3 100644 --- a/public/language/sv/error.json +++ b/public/language/sv/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "Detta forum kräver bekräftning av epostadresser, var god klicka här för att fylla i en epostadress", "email-confirm-failed": "Vi kunde ej bekräfta din epostadress, var god försök igen senare.", "confirm-email-already-sent": "Bekräftningsbrev redan skickat, var god vänta %1 minut(er) innan du skickar ett nytt.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Användarnamnet är för kort", "username-too-long": "Användarnamnet är för långt", "password-too-long": "Lösenordet är för långt", diff --git a/public/language/sv/login.json b/public/language/sv/login.json index 67478a02ca..a3d66ea4bc 100644 --- a/public/language/sv/login.json +++ b/public/language/sv/login.json @@ -5,7 +5,7 @@ "remember_me": "Kom ihåg mig?", "forgot_password": "Glömt lösenord?", "alternative_logins": "Alternativa inloggningssätt", - "failed_login_attempt": "Inloggningen misslyckades, var god försök igen.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "Du är nu inloggad!", "dont_have_account": "Har du inget konto?" } \ No newline at end of file diff --git a/public/language/sv/modules.json b/public/language/sv/modules.json index 25349f9baa..61938266dc 100644 --- a/public/language/sv/modules.json +++ b/public/language/sv/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Skicka och lås", "composer.toggle_dropdown": "Visa/Dölj dropdown", "composer.uploading": "Laddar upp %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "OK", "bootbox.cancel": "Avbryt", "bootbox.confirm": "Bekräfta", diff --git a/public/language/th/error.json b/public/language/th/error.json index 44cef957ae..033d5d50d3 100644 --- a/public/language/th/error.json +++ b/public/language/th/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "Forum นี้ต้องการการยืนยันอีเมล กรุณากดที่นี่เพื่อระบุอีเมล", "email-confirm-failed": "เราไม่สามารถยืนยันอีเมลของคุณ ณ ขณะนี้ กรุณาลองใหม่อีกครั้งภายหลัง", "confirm-email-already-sent": "Confirmation email already sent, please wait %1 minute(s) to send another one.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "ชื่อบัญชีผู้ใช้ สั้นเกินไป", "username-too-long": "ชื่อบัญชีผู้ใช้ ยาวเกินไป", "password-too-long": "Password too long", diff --git a/public/language/th/login.json b/public/language/th/login.json index 5eba336a39..c9e8a589eb 100644 --- a/public/language/th/login.json +++ b/public/language/th/login.json @@ -5,7 +5,7 @@ "remember_me": "จำไว้ในระบบ?", "forgot_password": "ลืมรหัสผ่าน?", "alternative_logins": "เข้าสู่ระบบโดยทางอื่น", - "failed_login_attempt": "เข้าสู่ระบบล้มเหลว โปรดลองอีกครั้ง", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "คุณเข้าสู่ระบบเรียบร้อยแล้ว", "dont_have_account": "คุณยังไม่มีบัญชีเข้าระบบ?" } \ No newline at end of file diff --git a/public/language/th/modules.json b/public/language/th/modules.json index 15a7bb1fa5..51c6065cd8 100644 --- a/public/language/th/modules.json +++ b/public/language/th/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Submit and Lock", "composer.toggle_dropdown": "Toggle Dropdown", "composer.uploading": "Uploading %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "OK", "bootbox.cancel": "Cancel", "bootbox.confirm": "Confirm", diff --git a/public/language/tr/error.json b/public/language/tr/error.json index fedcf00bba..61a8cf34dd 100644 --- a/public/language/tr/error.json +++ b/public/language/tr/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "Bu forum e-posta doğrulaması gerektirir, lütfen buraya bir e-posta adresi girin", "email-confirm-failed": "E-posta adresinizi doğrulayamıyoruz. Lütfen daha sonra tekrar deneyin.", "confirm-email-already-sent": "E-mail onayı zaten gönderilmiş, yeni bir onay göndermek için lütfen 1 dakika bekleyin.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Kullanıcı ismi çok kısa", "username-too-long": "Kullanıcı ismi çok uzun.", "password-too-long": "Parola çok uzun", diff --git a/public/language/tr/login.json b/public/language/tr/login.json index bd13e81d46..bf8b5ea7b9 100644 --- a/public/language/tr/login.json +++ b/public/language/tr/login.json @@ -5,7 +5,7 @@ "remember_me": "Beni Hatırla!", "forgot_password": "Şifrenizi mi unuttunuz?", "alternative_logins": "Alternatif Girişler", - "failed_login_attempt": "Oturum açma girişimi başarısız, lütfen tekrar deneyin.", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "Başarıyla giriş yaptınız!", "dont_have_account": "Hesabınız yok mu?" } \ No newline at end of file diff --git a/public/language/tr/modules.json b/public/language/tr/modules.json index b896b442a0..6c4f661003 100644 --- a/public/language/tr/modules.json +++ b/public/language/tr/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Gönder ve Kitle", "composer.toggle_dropdown": "Menü aç", "composer.uploading": "Yükleniyor %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "Tamam", "bootbox.cancel": "İptal", "bootbox.confirm": "Onayla", diff --git a/public/language/vi/error.json b/public/language/vi/error.json index b6c0c79455..69c9b989bd 100644 --- a/public/language/vi/error.json +++ b/public/language/vi/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "Diễn đàn này yêu cầu xác nhận email, vui lòng nhấn vào đây để nhập email.", "email-confirm-failed": "Chúng tôi không thể xác nhận email của bạn, vui lòng thử lại sau.", "confirm-email-already-sent": "Email xác nhận đã được gửi, vui lòng chờ %1 phút để yêu cầu gửi lại.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "Tên đăng nhập quá ngắn", "username-too-long": "Tên đăng nhập quá dài", "password-too-long": "Mật khẩu quá dài", diff --git a/public/language/vi/login.json b/public/language/vi/login.json index 01b7f2dc96..5fe1cdf892 100644 --- a/public/language/vi/login.json +++ b/public/language/vi/login.json @@ -5,7 +5,7 @@ "remember_me": "Ghi nhớ?", "forgot_password": "Quên mật khẩu?", "alternative_logins": "Đăng nhập bằng tài khoản khác", - "failed_login_attempt": "Đăng nhập thất bại, xin hãy thử lại", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "Bạn đã đăng nhập thành công!", "dont_have_account": "Chưa có tài khoản?" } \ No newline at end of file diff --git a/public/language/vi/modules.json b/public/language/vi/modules.json index 0f5ba2fe46..1c81e64ed6 100644 --- a/public/language/vi/modules.json +++ b/public/language/vi/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "Đăng và Khoá", "composer.toggle_dropdown": "Đóng/mở dropdown", "composer.uploading": "Đang tải lên %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "OK", "bootbox.cancel": "Huỷ bỏ", "bootbox.confirm": "Xác nhận", diff --git a/public/language/zh_CN/error.json b/public/language/zh_CN/error.json index af0a03bc4a..c5d4846358 100644 --- a/public/language/zh_CN/error.json +++ b/public/language/zh_CN/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "本论坛需要电子邮箱确认,请点击这里输入电子邮箱地址", "email-confirm-failed": "我们无法确认您的电子邮箱,请重试", "confirm-email-already-sent": "确认邮件已发出,如需重新发送请等待 %1 分钟后再试。", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "用户名太短", "username-too-long": "用户名太长", "password-too-long": "密码太长", diff --git a/public/language/zh_CN/login.json b/public/language/zh_CN/login.json index 9cf15f0e15..cda3446936 100644 --- a/public/language/zh_CN/login.json +++ b/public/language/zh_CN/login.json @@ -5,7 +5,7 @@ "remember_me": "记住我?", "forgot_password": "忘记密码?", "alternative_logins": "使用合作网站帐号登录", - "failed_login_attempt": "登录失败,请重试。", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "您已经成功登录!", "dont_have_account": "没有帐号?" } \ No newline at end of file diff --git a/public/language/zh_CN/modules.json b/public/language/zh_CN/modules.json index bf50d3f496..4add0374c7 100644 --- a/public/language/zh_CN/modules.json +++ b/public/language/zh_CN/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "提交并锁定", "composer.toggle_dropdown": "标为 Dropdown", "composer.uploading": "正在上传 %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "确认", "bootbox.cancel": "取消", "bootbox.confirm": "确认", diff --git a/public/language/zh_TW/error.json b/public/language/zh_TW/error.json index 0376a3c3de..d0e206c62e 100644 --- a/public/language/zh_TW/error.json +++ b/public/language/zh_TW/error.json @@ -22,6 +22,7 @@ "no-email-to-confirm": "This forum requires email confirmation, please click here to enter an email", "email-confirm-failed": "我們無法確認你的Email,請之後再重試。", "confirm-email-already-sent": "Confirmation email already sent, please wait %1 minute(s) to send another one.", + "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", "username-too-short": "帳號太短", "username-too-long": "帳號太長", "password-too-long": "密碼太長", diff --git a/public/language/zh_TW/login.json b/public/language/zh_TW/login.json index 4ffc8773e6..0381db2d4b 100644 --- a/public/language/zh_TW/login.json +++ b/public/language/zh_TW/login.json @@ -5,7 +5,7 @@ "remember_me": "記住我?", "forgot_password": "忘記密碼?", "alternative_logins": "其他登錄方式", - "failed_login_attempt": "登錄失敗,請再嘗試。", + "failed_login_attempt": "Login Unsuccessful", "login_successful": "你已成功登錄!", "dont_have_account": "還沒有賬號?" } \ No newline at end of file diff --git a/public/language/zh_TW/modules.json b/public/language/zh_TW/modules.json index 109139f9c2..9c7d72d98d 100644 --- a/public/language/zh_TW/modules.json +++ b/public/language/zh_TW/modules.json @@ -29,6 +29,14 @@ "composer.submit_and_lock": "提交然後鎖定", "composer.toggle_dropdown": "切換下拉選單", "composer.uploading": "上傳中 %1", + "composer.formatting.bold": "Bold", + "composer.formatting.italic": "Italic", + "composer.formatting.list": "List", + "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.link": "Link", + "composer.formatting.picture": "Picture", + "composer.upload-picture": "Upload Image", + "composer.upload-file": "Upload File", "bootbox.ok": "好", "bootbox.cancel": "取消", "bootbox.confirm": "確認", From 693e724802e2e78ccc188a78f79ade9052698159 Mon Sep 17 00:00:00 2001 From: AdJones Date: Tue, 10 May 2016 14:13:45 +0100 Subject: [PATCH 0213/1109] Fixing issue where the relative path was ignored for express modules (#4621) * Fixing issue where the relative path was ignored for express modules * Fixing issue where the relative path was ignored for express modules (without the console log lines!) --- src/meta/js.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/meta/js.js b/src/meta/js.js index 6f591cc9fd..b7585bbee8 100644 --- a/src/meta/js.js +++ b/src/meta/js.js @@ -92,7 +92,9 @@ module.exports = function(Meta) { // Add routes for AMD-type modules to serve those files var numBridged = 0, addRoute = function(relPath) { - app.get('/src/modules/' + relPath, function(req, res) { + var relativePath = nconf.get('relative_path'); + + app.get(relativePath + '/src/modules/' + relPath, function(req, res) { return res.sendFile(path.join(__dirname, '../../', Meta.js.scripts.modules[relPath]), { maxAge: app.enabled('cache') ? 5184000000 : 0 }); From f1deaa6fa5696adf3244483938a6225224bb979f Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 10 May 2016 10:36:19 -0400 Subject: [PATCH 0214/1109] Exposing middleware to app/req, organisation. Organisation -- moved 404 and error controllers into the controllers file instead of as local variables in routes/index --- src/controllers/index.js | 73 +++++++++++++++++++++++++++++++++++++-- src/routes/index.js | 74 ++-------------------------------------- src/webserver.js | 2 +- 3 files changed, 74 insertions(+), 75 deletions(-) diff --git a/src/controllers/index.js b/src/controllers/index.js index f0a6e8d023..185f4f5249 100644 --- a/src/controllers/index.js +++ b/src/controllers/index.js @@ -3,6 +3,7 @@ var async = require('async'); var nconf = require('nconf'); var validator = require('validator'); +var winston = require('winston'); var meta = require('../meta'); var user = require('../user'); @@ -205,7 +206,7 @@ Controllers.compose = function(req, res, next) { }); }; -Controllers.confirmEmail = function(req, res, next) { +Controllers.confirmEmail = function(req, res) { user.email.confirm(req.params.code, function (err) { res.render('confirm', { error: err ? err.message : '', @@ -217,6 +218,10 @@ Controllers.confirmEmail = function(req, res, next) { Controllers.sitemap = {}; Controllers.sitemap.render = function(req, res, next) { sitemap.render(function(err, tplData) { + if (err) { + return next(err); + } + Controllers.render('sitemap', tplData, function(err, xml) { res.header('Content-Type', 'application/xml'); res.send(xml); @@ -327,7 +332,7 @@ Controllers.manifest = function(req, res) { res.status(200).json(manifest); }; -Controllers.outgoing = function(req, res, next) { +Controllers.outgoing = function(req, res) { var url = req.query.url; var data = { url: validator.escape(String(url)), @@ -349,4 +354,68 @@ Controllers.termsOfUse = function(req, res, next) { res.render('tos', {termsOfUse: meta.config.termsOfUse}); }; +Controllers.handle404 = function(req, res) { + var relativePath = nconf.get('relative_path'); + var isLanguage = new RegExp('^' + relativePath + '/language/.*/.*.json'); + var isClientScript = new RegExp('^' + relativePath + '\\/src\\/.+\\.js'); + + if (plugins.hasListeners('action:meta.override404')) { + return plugins.fireHook('action:meta.override404', { + req: req, + res: res, + error: {} + }); + } + + if (isClientScript.test(req.url)) { + res.type('text/javascript').status(200).send(''); + } else if (isLanguage.test(req.url)) { + res.status(200).json({}); + } else if (req.path.startsWith(relativePath + '/uploads') || (req.get('accept') && req.get('accept').indexOf('text/html') === -1) || req.path === '/favicon.ico') { + res.sendStatus(404); + } else if (req.accepts('html')) { + if (process.env.NODE_ENV === 'development') { + winston.warn('Route requested but not found: ' + req.url); + } + + res.status(404); + + if (res.locals.isAPI) { + return res.json({path: validator.escape(req.path.replace(/^\/api/, '') || ''), title: '[[global:404.title]]'}); + } + + req.app.locals.middleware.buildHeader(req, res, function() { + res.render('404', {path: validator.escape(req.path || ''), title: '[[global:404.title]]'}); + }); + } else { + res.status(404).type('txt').send('Not found'); + } +}; + +Controllers.handleErrors = function(err, req, res, next) { + switch (err.code) { + case 'EBADCSRFTOKEN': + winston.error(req.path + '\n', err.message); + return res.sendStatus(403); + case 'blacklisted-ip': + return res.status(403).type('text/plain').send(err.message); + } + + if (parseInt(err.status, 10) === 302 && err.path) { + return res.locals.isAPI ? res.status(302).json(err.path) : res.redirect(err.path); + } + + winston.error(req.path + '\n', err.stack); + + res.status(err.status || 500); + + if (res.locals.isAPI) { + res.json({path: validator.escape(req.path || ''), error: err.message}); + } else { + req.app.locals.middleware.buildHeader(req, res, function() { + res.render('500', {path: validator.escape(String(req.path || '')), error: validator.escape(err.message)}); + }); + } +}; + module.exports = Controllers; diff --git a/src/routes/index.js b/src/routes/index.js index 86198b56dd..5aaf32b318 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -149,9 +149,8 @@ module.exports = function(app, middleware, hotswapIds) { maxAge: app.enabled('cache') ? 5184000000 : 0 })); - handle404(app, middleware); - handleErrors(app, middleware); - + app.use(controllers.handle404); + app.use(controllers.handleErrors); // Add plugin routes async.series([ @@ -159,72 +158,3 @@ module.exports = function(app, middleware, hotswapIds) { async.apply(authRoutes.reloadRoutes) ]); }; - -function handle404(app, middleware) { - var relativePath = nconf.get('relative_path'); - var isLanguage = new RegExp('^' + relativePath + '/language/.*/.*.json'); - var isClientScript = new RegExp('^' + relativePath + '\\/src\\/.+\\.js'); - - app.use(function(req, res) { - if (plugins.hasListeners('action:meta.override404')) { - return plugins.fireHook('action:meta.override404', { - req: req, - res: res, - error: {} - }); - } - - if (isClientScript.test(req.url)) { - res.type('text/javascript').status(200).send(''); - } else if (isLanguage.test(req.url)) { - res.status(200).json({}); - } else if (req.path.startsWith(relativePath + '/uploads') || (req.get('accept') && req.get('accept').indexOf('text/html') === -1) || req.path === '/favicon.ico') { - res.sendStatus(404); - } else if (req.accepts('html')) { - if (process.env.NODE_ENV === 'development') { - winston.warn('Route requested but not found: ' + req.url); - } - - res.status(404); - - if (res.locals.isAPI) { - return res.json({path: validator.escape(req.path.replace(/^\/api/, '') || ''), title: '[[global:404.title]]'}); - } - - middleware.buildHeader(req, res, function() { - res.render('404', {path: validator.escape(req.path || ''), title: '[[global:404.title]]'}); - }); - } else { - res.status(404).type('txt').send('Not found'); - } - }); -} - -function handleErrors(app, middleware) { - app.use(function(err, req, res, next) { - switch (err.code) { - case 'EBADCSRFTOKEN': - winston.error(req.path + '\n', err.message); - return res.sendStatus(403); - case 'blacklisted-ip': - return res.status(403).type('text/plain').send(err.message); - } - - if (parseInt(err.status, 10) === 302 && err.path) { - return res.locals.isAPI ? res.status(302).json(err.path) : res.redirect(err.path); - } - - winston.error(req.path + '\n', err.stack); - - res.status(err.status || 500); - - if (res.locals.isAPI) { - res.json({path: validator.escape(req.path || ''), error: err.message}); - } else { - middleware.buildHeader(req, res, function() { - res.render('500', {path: validator.escape(String(req.path || '')), error: validator.escape(err.message)}); - }); - } - }); -} - diff --git a/src/webserver.js b/src/webserver.js index 28b0197dec..78808d5371 100644 --- a/src/webserver.js +++ b/src/webserver.js @@ -45,7 +45,7 @@ server.on('error', function(err) { module.exports.listen = function() { emailer.registerApp(app); - middleware = middleware(app); + app.locals.middleware = middleware = middleware(app); helpers.register(); From 621e0d145ea126fbdead91b7b6371bb4c2e67f03 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 10 May 2016 11:07:03 -0400 Subject: [PATCH 0215/1109] closes #4617 Serving english timeago strings from server instead of round-trip re-request on failure. --- public/src/modules/translator.js | 11 ----------- src/middleware/middleware.js | 23 +++++++++++++++++++++++ src/routes/index.js | 3 +-- 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/public/src/modules/translator.js b/public/src/modules/translator.js index b208a0af48..587f22d96b 100644 --- a/public/src/modules/translator.js +++ b/public/src/modules/translator.js @@ -109,17 +109,6 @@ $.getScript(RELATIVE_PATH + '/vendor/jquery/timeago/locales/jquery.timeago.' + languageCode + '-short.js').success(function() { // Switch back to long-form translator.toggleTimeagoShorthand(); - }).fail(function() { - $.getScript(RELATIVE_PATH + '/vendor/jquery/timeago/locales/jquery.timeago.en-short.js').success(function() { - // Switch back to long-form - translator.toggleTimeagoShorthand(); - }); - }); - }).fail(function() { - $.getScript(RELATIVE_PATH + '/vendor/jquery/timeago/locales/jquery.timeago.en-short.js').success(function() { - // Switch back to long-form - translator.toggleTimeagoShorthand(); - $.getScript(RELATIVE_PATH + '/vendor/jquery/timeago/locales/jquery.timeago.en.js'); }); }); diff --git a/src/middleware/middleware.js b/src/middleware/middleware.js index bc07719ade..7d324e136e 100644 --- a/src/middleware/middleware.js +++ b/src/middleware/middleware.js @@ -5,6 +5,7 @@ var app, admin: {} }, async = require('async'), + fs = require('fs'), path = require('path'), csrf = require('csurf'), _ = require('underscore'), @@ -302,6 +303,28 @@ middleware.applyBlacklist = function(req, res, next) { }); }; +middleware.processLanguages = function(req, res, next) { + var fallback = req.path.indexOf('-short') === -1 ? 'jquery.timeago.en.js' : 'jquery.timeago.en-short.js', + localPath = path.join(__dirname, '../../public/vendor/jquery/timeago/locales', req.path), + exists; + + try { + exists = fs.accessSync(localPath, fs.F_OK | fs.R_OK); + } catch(e) { + exists = false; + } + + if (exists) { + res.status(200).sendFile(localPath, { + maxAge: app.enabled('cache') ? 5184000000 : 0 + }); + } else { + res.status(200).sendFile(path.join(__dirname, '../../public/vendor/jquery/timeago/locales', fallback), { + maxAge: app.enabled('cache') ? 5184000000 : 0 + }); + } +}; + module.exports = function(webserver) { app = webserver; middleware.admin = require('./admin')(webserver); diff --git a/src/routes/index.js b/src/routes/index.js index 5aaf32b318..c5d2d25178 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -144,11 +144,10 @@ module.exports = function(app, middleware, hotswapIds) { } app.use(middleware.privateUploads); - app.use(relativePath, express.static(path.join(__dirname, '../../', 'public'), { maxAge: app.enabled('cache') ? 5184000000 : 0 })); - + app.use('/vendor/jquery/timeago/locales', middleware.processLanguages); app.use(controllers.handle404); app.use(controllers.handleErrors); From 5ec62ef81c6c558dd42dc65b0713e914cea959d3 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 10 May 2016 11:13:15 -0400 Subject: [PATCH 0216/1109] fixes #4603 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a6b49c3ae7..2b14641de2 100644 --- a/package.json +++ b/package.json @@ -57,8 +57,8 @@ "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", "nodebb-theme-lavender": "3.0.10", - "nodebb-theme-persona": "4.0.132", - "nodebb-theme-vanilla": "5.0.71", + "nodebb-theme-persona": "4.0.133", + "nodebb-theme-vanilla": "5.0.72", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", "nodemailer-sendmail-transport": "1.0.0", From a4646abe434b0b85958449744c2746da5b36ab44 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 10 May 2016 18:25:33 +0300 Subject: [PATCH 0217/1109] up persona --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2b14641de2..444f41a5df 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", "nodebb-theme-lavender": "3.0.10", - "nodebb-theme-persona": "4.0.133", + "nodebb-theme-persona": "4.0.134", "nodebb-theme-vanilla": "5.0.72", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", From b56aef22a9fffc05bf5ff870629efdfa64d81869 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 10 May 2016 18:34:41 +0300 Subject: [PATCH 0218/1109] empty pwd --- public/src/client/login.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/client/login.js b/public/src/client/login.js index eda34c8add..9f90926063 100644 --- a/public/src/client/login.js +++ b/public/src/client/login.js @@ -50,7 +50,7 @@ define('forum/login', ['csrf', 'translator'], function(csrf, translator) { }); if ($('#content #username').attr('readonly')) { - $('#content #password').focus(); + $('#content #password').val('').focus(); } else { $('#content #username').focus(); } From 2a7732789df6a598822957bf4cb51f68e8679db2 Mon Sep 17 00:00:00 2001 From: "lex(a) mourek" Date: Tue, 10 May 2016 23:53:00 +0200 Subject: [PATCH 0219/1109] Fixed czech translation for timeago (#4622) When czech language is set, browser throws 404 Not Found error on jquery.timeago.cz.js Thats because translation file were renamed https://github.com/rmm5t/jquery-timeago/commit/81f072ebb253eca4eea47edcb3009d326c329843 https://github.com/NodeBB/NodeBB/blob/master/public/vendor/jquery/timeago/locales/jquery.timeago.cs.js so that cs->cz override is no needed anymore. --- public/src/modules/translator.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/public/src/modules/translator.js b/public/src/modules/translator.js index 587f22d96b..9e2417795c 100644 --- a/public/src/modules/translator.js +++ b/public/src/modules/translator.js @@ -72,10 +72,6 @@ languageCode = 'en'; break; - case 'cs': - languageCode = 'cz'; - break; - case 'fa_IR': languageCode = 'fa'; break; From 47b4b86bf1c3a9168156eb627c78052423921e31 Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Wed, 11 May 2016 09:02:27 -0400 Subject: [PATCH 0220/1109] Latest translations and fallbacks --- public/language/cs/category.json | 16 +++--- public/language/cs/email.json | 26 ++++----- public/language/cs/error.json | 8 +-- public/language/cs/global.json | 48 ++++++++-------- public/language/cs/groups.json | 94 ++++++++++++++++---------------- public/language/cs/login.json | 2 +- public/language/cs/modules.json | 12 ++-- public/language/cs/pages.json | 52 +++++++++--------- public/language/cs/recent.json | 26 ++++----- public/language/cs/register.json | 2 +- public/language/cs/search.json | 28 +++++----- public/language/cs/success.json | 8 +-- public/language/cs/topic.json | 60 ++++++++++---------- public/language/cs/unread.json | 6 +- public/language/cs/uploads.json | 6 +- public/language/cs/user.json | 50 ++++++++--------- public/language/cs/users.json | 22 ++++---- public/language/tr/login.json | 2 +- public/language/tr/modules.json | 16 +++--- 19 files changed, 242 insertions(+), 242 deletions(-) diff --git a/public/language/cs/category.json b/public/language/cs/category.json index d91e9ebda0..223da66ff3 100644 --- a/public/language/cs/category.json +++ b/public/language/cs/category.json @@ -1,16 +1,16 @@ { - "category": "Category", - "subcategories": "Subcategories", + "category": "Kategorie", + "subcategories": "Podkategorie", "new_topic_button": "Nové téma", - "guest-login-post": "Log in to post", + "guest-login-post": "Přihlásit se pro přidání", "no_topics": "V této kategorii zatím nejsou žádné příspěvky.
      Můžeš být první!", "browsing": "prohlíží", "no_replies": "Nikdo ještě neodpověděl", - "no_new_posts": "No new posts.", + "no_new_posts": "Žádné nové příspěvky", "share_this_category": "Share this category", - "watch": "Watch", + "watch": "Sledovat", "ignore": "Ignorovat", - "watch.message": "You are now watching updates from this category", - "ignore.message": "You are now ignoring updates from this category", - "watched-categories": "Watched categories" + "watch.message": "Nyní sledujete aktualizace ve skupině", + "ignore.message": "Nyní ignorujete aktualizace ve skupině ", + "watched-categories": "Sledované kategorie" } \ No newline at end of file diff --git a/public/language/cs/email.json b/public/language/cs/email.json index b31b6dea73..cec1b4ac52 100644 --- a/public/language/cs/email.json +++ b/public/language/cs/email.json @@ -1,35 +1,35 @@ { "password-reset-requested": "Požadována obnova hesla - %1!", "welcome-to": "Vítejte v %1", - "invite": "Invitation from %1", + "invite": "Pozvánka od %1", "greeting_no_name": "Dobrý den", "greeting_with_name": "Dobrý den %1", "welcome.text1": "Děkujeme vám za registraci s %1!", "welcome.text2": "Pro úplnou aktivaci vašeho účtu potřebujeme ověřit vaší emailovou adresu.", - "welcome.text3": "An administrator has accepted your registration application. You can login with your username/password now.", + "welcome.text3": "Administrátor právě potvrdil vaší registraci. Nyní se můžete přihlásit jménem a heslem.", "welcome.cta": "Klikněte zde pro potvrzení vaší emailové adresy", - "invitation.text1": "%1 has invited you to join %2", - "invitation.ctr": "Click here to create your account.", + "invitation.text1": "%1 Vás pozval abyste se připojil k %2", + "invitation.ctr": "Klikněte zde pro vytvoření vašeho účtu", "reset.text1": "Obdrželi jsme požadavek na obnovu hesla, pravděpodobně kvůli tomu, že jste ho zapomněli. Pokud to není tento případ, ignorujte, prosím, tento email.", "reset.text2": "Přejete-li si pokračovat v obnově vašeho hesla, klikněte, prosím, na následující odkaz:", "reset.cta": "Klikněte zde, chcete-li obnovit vaše heslo", - "reset.notify.subject": "Password successfully changed", - "reset.notify.text1": "We are notifying you that on %1, your password was changed successfully.", - "reset.notify.text2": "If you did not authorise this, please notify an administrator immediately.", + "reset.notify.subject": "Heslo úspěšně změněno", + "reset.notify.text1": "Informujeme Vás, že na %1 vaše heslo bylo úspěšně změněno.", + "reset.notify.text2": "Pokud jste to neschválil, prosíme neprodleně kontaktujte správce.", "digest.notifications": "Máte tu nepřečtená oznámení od %1:", "digest.latest_topics": "Nejnovější témata od %1", "digest.cta": "Kliknutím zde navštívíte %1", "digest.unsub.info": "Tento výtah vám byl odeslán, protože jste si to nastavili ve vašich odběrech.", "digest.no_topics": "Dosud tu nebyly žádné aktivní témata %1", - "digest.day": "day", - "digest.week": "week", - "digest.month": "month", - "digest.subject": "Digest for %1", + "digest.day": "den", + "digest.week": "týden", + "digest.month": "měsíc", + "digest.subject": "Výběr pro %1", "notif.chat.subject": "Nová zpráva z chatu od %1", "notif.chat.cta": "Chcete-li pokračovat v konverzaci, klikněte zde.", "notif.chat.unsub.info": "Toto oznámení z chatu vám bylo zasláno, protože jste si to nastavili ve vašich odběrech.", - "notif.post.cta": "Click here to read the full topic", - "notif.post.unsub.info": "This post notification was sent to you due to your subscription settings.", + "notif.post.cta": "Klikněte zde pro přečtené celého tématu", + "notif.post.unsub.info": "Toto oznámení Vám bylo odesláno na základě vašeho nastavení odběru.", "test.text1": "Tento testovací email slouží k ověření, že mailer je správně nastaven. NodeBB.", "unsub.cta": "Chcete-li změnit tyto nastavení, klikněte zde.", "closing": "Díky!" diff --git a/public/language/cs/error.json b/public/language/cs/error.json index 2eee12d6a7..001ed0998f 100644 --- a/public/language/cs/error.json +++ b/public/language/cs/error.json @@ -95,11 +95,11 @@ "reload-failed": "NodeBB encountered a problem while reloading: \"%1\". NodeBB will continue to serve the existing client-side assets, although you should undo what you did just prior to reloading.", "registration-error": "Chyba při registraci", "parse-error": "Something went wrong while parsing server response", - "wrong-login-type-email": "Please use your email to login", - "wrong-login-type-username": "Please use your username to login", - "invite-maximum-met": "You have invited the maximum amount of people (%1 out of %2).", + "wrong-login-type-email": "Použijte prosím Váš e-mail pro přihlášení", + "wrong-login-type-username": "Použijte prosím Váše přihlašovací jméno pro přihlášení", + "invite-maximum-met": "Již jste pozval/a maximálně možný počet lidí (%1 z %2).", "no-session-found": "No login session found!", "not-in-room": "User not in room", "no-users-in-room": "No users in this room", - "cant-kick-self": "You can't kick yourself from the group" + "cant-kick-self": "Nemůžete vyhodit sami sebe ze kupiny" } \ No newline at end of file diff --git a/public/language/cs/global.json b/public/language/cs/global.json index 1f1900a0f6..6fe0e8d32c 100644 --- a/public/language/cs/global.json +++ b/public/language/cs/global.json @@ -3,10 +3,10 @@ "search": "Hledat", "buttons.close": "Zavřít", "403.title": "Přístup odepřen", - "403.message": "You seem to have stumbled upon a page that you do not have access to.", - "403.login": "Perhaps you should try logging in?", + "403.message": "Zdá se, že jste narazil/a na stránky na které nemáte přístup.", + "403.login": "Možná byste měli se zkusit přihlásit?", "404.title": "Stránka nenalezena", - "404.message": "You seem to have stumbled upon a page that does not exist. Return to the home page.", + "404.message": "Zdá se, že jste narazil/a na stránku která neexistuje. Vrátit se zpět na domovskou stránku.", "500.title": "Neznámá chyba", "500.message": "Jejda, vypadá to, že se něco pokazilo.", "register": "Registrovat", @@ -22,40 +22,40 @@ "pagination.out_of": "%1 z %2", "pagination.enter_index": "Enter index", "header.admin": "Administrace", - "header.categories": "Categories", + "header.categories": "Kategorie", "header.recent": "Aktuality", "header.unread": "Nepřečtené", "header.tags": "Tagy", "header.popular": "Populární", "header.users": "Uživatelé", - "header.groups": "Groups", + "header.groups": "Skupiny", "header.chats": "Chats", "header.notifications": "Oznámení", "header.search": "Hledat", "header.profile": "Můj profil", - "header.navigation": "Navigation", + "header.navigation": "Navigace", "notifications.loading": "Načítání upozornění", "chats.loading": "Načítání grafů", "motd.welcome": "Vítejte na NodeBB, diskusní platforma buducnosti.", "previouspage": "Předchozí stránka", "nextpage": "Další stránka", - "alert.success": "Success", + "alert.success": "Úspěch", "alert.error": "Chyba", "alert.banned": "Banned", "alert.banned.message": "You have just been banned, you will now be logged out.", - "alert.unfollow": "You are no longer following %1!", - "alert.follow": "You are now following %1!", + "alert.unfollow": "Již nesledujete %1!", + "alert.follow": "Nyní sledujete %1!", "online": "Online", "users": "Uživatelé", "topics": "Témata", "posts": "Příspěvky", - "best": "Best", + "best": "Nejlepší", "upvoted": "Upvoted", "downvoted": "Downvoted", "views": "Zobrazení", - "reputation": "Reputation", - "read_more": "read more", - "more": "More", + "reputation": "Reputace", + "read_more": "čtěte více", + "more": "Více", "posted_ago_by_guest": "posted %1 by Guest", "posted_ago_by": "posted %1 by %2", "posted_ago": "posted %1", @@ -69,9 +69,9 @@ "norecentposts": "Žádné nedávné příspěvky", "norecenttopics": "Žádné nedávné témata", "recentposts": "Nedávné příspěvky", - "recentips": "Recently Logged In IPs", + "recentips": "Naposledy zaznamenané IP adresy", "away": "Pryč", - "dnd": "Do not disturb", + "dnd": "Nevyrušovat", "invisible": "Neviditelný", "offline": "Offline", "email": "Email", @@ -80,15 +80,15 @@ "guests": "Hosté", "updated.title": "Fórum zaktualizováno", "updated.message": "Toto fórum bylo právě aktualizováno na poslední verzi. Klikněte zde a obnovte tuto stránku.", - "privacy": "Privacy", - "follow": "Follow", - "unfollow": "Unfollow", + "privacy": "Soukromí", + "follow": "Sledovat", + "unfollow": "Prestat sledovat", "delete_all": "Vymazat vše", - "map": "Map", + "map": "Mapa", "sessions": "Login Sessions", - "ip_address": "IP Address", - "enter_page_number": "Enter page number", - "upload_file": "Upload file", - "upload": "Upload", - "allowed-file-types": "Allowed file types are %1" + "ip_address": "IP adresa", + "enter_page_number": "Zadejte číslo stránky", + "upload_file": "Nahrár soubor", + "upload": "Nahrát", + "allowed-file-types": "Povolené typy souborů jsou %1" } \ No newline at end of file diff --git a/public/language/cs/groups.json b/public/language/cs/groups.json index 5bfd7ed3ec..c1684ee4f0 100644 --- a/public/language/cs/groups.json +++ b/public/language/cs/groups.json @@ -1,54 +1,54 @@ { "groups": "Skupiny", "view_group": "Prohlédnout skupinu", - "owner": "Group Owner", - "new_group": "Create New Group", - "no_groups_found": "There are no groups to see", - "pending.accept": "Accept", - "pending.reject": "Reject", - "pending.accept_all": "Accept All", - "pending.reject_all": "Reject All", - "pending.none": "There are no pending members at this time", - "invited.none": "There are no invited members at this time", - "invited.uninvite": "Rescind Invitation", - "invited.search": "Search for a user to invite to this group", - "invited.notification_title": "You have been invited to join %1", - "request.notification_title": "Group Membership Request from %1", - "request.notification_text": "%1 has requested to become a member of %2", - "cover-save": "Save", - "cover-saving": "Saving", - "details.title": "podrobnosti skupiny", + "owner": "Vlastník skupiny", + "new_group": "Vytvořit novou skupinu", + "no_groups_found": "Žádné skupiny k prohlížení", + "pending.accept": "Přijmout", + "pending.reject": "Odmítnout", + "pending.accept_all": "Přijmout vše", + "pending.reject_all": "Odmítnout vše", + "pending.none": "Žádní čekající členové v tuto chvíli", + "invited.none": "Žádní pozvaní členové v tuto chvíli", + "invited.uninvite": "Zrušit pozvánku", + "invited.search": "Hledat uživatele k pozvání do této skupiny", + "invited.notification_title": "Byl jste pozván abyste se připojil/a k %1", + "request.notification_title": "Požadavek na členství ve skupině od %1", + "request.notification_text": "%1 požádál o členství v %2", + "cover-save": "Uložit", + "cover-saving": "Ukládám", + "details.title": "Podrobnosti skupiny", "details.members": "Seznam členů", - "details.pending": "Pending Members", - "details.invited": "Invited Members", + "details.pending": "Čekající členové", + "details.invited": "Pozvaní členové", "details.has_no_posts": "Členové této skupiny dosud neodeslali ani jeden příspěvek.", "details.latest_posts": "Nejnovější příspěvky", - "details.private": "Private", - "details.disableJoinRequests": "Disable join requests", - "details.grant": "Grant/Rescind Ownership", - "details.kick": "Kick", - "details.owner_options": "Group Administration", - "details.group_name": "Group Name", - "details.member_count": "Member Count", - "details.creation_date": "Creation Date", - "details.description": "Description", - "details.badge_preview": "Badge Preview", - "details.change_icon": "Change Icon", - "details.change_colour": "Change Colour", - "details.badge_text": "Badge Text", - "details.userTitleEnabled": "Show Badge", - "details.private_help": "If enabled, joining of groups requires approval from a group owner", - "details.hidden": "Hidden", - "details.hidden_help": "If enabled, this group will not be found in the groups listing, and users will have to be invited manually", - "details.delete_group": "Delete Group", - "details.private_system_help": "Private groups is disabled at system level, this option does not do anything", - "event.updated": "Group details have been updated", - "event.deleted": "The group \"%1\" has been deleted", - "membership.accept-invitation": "Accept Invitation", - "membership.invitation-pending": "Invitation Pending", - "membership.join-group": "Join Group", - "membership.leave-group": "Leave Group", - "membership.reject": "Reject", - "new-group.group_name": "Group Name:", - "upload-group-cover": "Upload group cover" + "details.private": "Soukromé", + "details.disableJoinRequests": "Zakázat žádosti o připojení", + "details.grant": "Přidat/Zrušit vlastnictví", + "details.kick": "Vyhodit", + "details.owner_options": "Administrátor skupiny", + "details.group_name": "Název skupiny", + "details.member_count": "Počet členů", + "details.creation_date": "Datum vytvoření", + "details.description": "Popis", + "details.badge_preview": "Náhled odznaku", + "details.change_icon": "Změnit ikonu", + "details.change_colour": "Změnit barvu", + "details.badge_text": "Text odznaku", + "details.userTitleEnabled": "Zobrazit odznak", + "details.private_help": "Pokud je povoleno, připojování do skupin vyžaduje schválení od vlastníka skupiny", + "details.hidden": "Skrytý", + "details.hidden_help": "Pokud je povoleno, tato skupina nebude zobrazena v seznamu skupin, uživatelé budou muset být pozváni manuálně", + "details.delete_group": "Odstranit skupinu", + "details.private_system_help": "Soukromé skupiny jsou zakázáné na systémové úrovni, tato možnost nic nedělá", + "event.updated": "Podrobnosti skupiny byly aktualizovány", + "event.deleted": "Skupina \"%1\" byla odstraněna", + "membership.accept-invitation": "Přijmout pozvání", + "membership.invitation-pending": "Čekající pozvání", + "membership.join-group": "Vstoupit do skupiny", + "membership.leave-group": "Opustit skupinu", + "membership.reject": "Odmítnout", + "new-group.group_name": "Název skupiny:", + "upload-group-cover": "Nahrát titulní obrázek skupiny" } \ No newline at end of file diff --git a/public/language/cs/login.json b/public/language/cs/login.json index 2b1dfba6a2..c6699ab6ae 100644 --- a/public/language/cs/login.json +++ b/public/language/cs/login.json @@ -5,7 +5,7 @@ "remember_me": "Zapamatovat si mě?", "forgot_password": "Zapomněli jste heslo?", "alternative_logins": "Další způsoby přihlášení", - "failed_login_attempt": "Login Unsuccessful", + "failed_login_attempt": "Přihlášení neúspěšné", "login_successful": "Přihlášení proběhlo úspěšně!", "dont_have_account": "Nemáte účet?" } \ No newline at end of file diff --git a/public/language/cs/modules.json b/public/language/cs/modules.json index f353581a1d..61bae78b68 100644 --- a/public/language/cs/modules.json +++ b/public/language/cs/modules.json @@ -17,7 +17,7 @@ "chat.seven_days": "7 dní", "chat.thirty_days": "30 dní", "chat.three_months": "3 měsíce", - "chat.delete_message_confirm": "Are you sure you wish to delete this message?", + "chat.delete_message_confirm": "Jste si jisti že chcete odstranit tuto zprávu?", "chat.roomname": "Chat Room %1", "chat.add-users-to-room": "Add users to room", "composer.compose": "Compose", @@ -33,13 +33,13 @@ "composer.formatting.italic": "Italic", "composer.formatting.list": "List", "composer.formatting.strikethrough": "Strikethrough", - "composer.formatting.link": "Link", - "composer.formatting.picture": "Picture", - "composer.upload-picture": "Upload Image", - "composer.upload-file": "Upload File", + "composer.formatting.link": "Odkaz", + "composer.formatting.picture": "Obrázek", + "composer.upload-picture": "Nahrát obrázek", + "composer.upload-file": "Nahrát soubor", "bootbox.ok": "OK", "bootbox.cancel": "Cancel", - "bootbox.confirm": "Confirm", + "bootbox.confirm": "Potvrdit", "cover.dragging_title": "Cover Photo Positioning", "cover.dragging_message": "Drag the cover photo to the desired position and click \"Save\"", "cover.saved": "Cover photo image and position saved" diff --git a/public/language/cs/pages.json b/public/language/cs/pages.json index 285aa30017..b2dad21ab9 100644 --- a/public/language/cs/pages.json +++ b/public/language/cs/pages.json @@ -1,27 +1,27 @@ { "home": "Home", "unread": "Unread Topics", - "popular-day": "Popular topics today", - "popular-week": "Popular topics this week", - "popular-month": "Popular topics this month", - "popular-alltime": "All time popular topics", + "popular-day": "Dnešní oblíbená témata", + "popular-week": "Oblíbená témata pro tento týden", + "popular-month": "Oblíbená témata pro tento měsíc", + "popular-alltime": "Oblíbená témata za celou dobu", "recent": "Recent Topics", - "flagged-posts": "Flagged Posts", - "users/online": "Online Users", - "users/latest": "Latest Users", - "users/sort-posts": "Users with the most posts", - "users/sort-reputation": "Users with the most reputation", + "flagged-posts": "Označené příspěvky", + "users/online": "Uživatelé online", + "users/latest": "Nejnovější uživatelé", + "users/sort-posts": "Uživatelé s nejvíce příspěvky", + "users/sort-reputation": "Uživatelé s nejlepší reputací", "users/banned": "Banned Users", - "users/search": "User Search", + "users/search": "Hledání uživatele", "notifications": "Notifications", - "tags": "Tags", - "tag": "Topics tagged under \"%1\"", - "register": "Register an account", - "login": "Login to your account", - "reset": "Reset your account password", - "categories": "Categories", - "groups": "Groups", - "group": "%1 group", + "tags": "Tagy", + "tag": "Téma označeno pod \"%1\"", + "register": "Zaregistrovat účet", + "login": "Přihlásit se ke svému účtu", + "reset": "Obnovit heslo k účtu", + "categories": "Kategorie", + "groups": "Skupiny", + "group": "%1 skupina", "chats": "Chats", "chat": "Chatting with %1", "account/edit": "Editing \"%1\"", @@ -29,18 +29,18 @@ "account/edit/username": "Editing username of \"%1\"", "account/edit/email": "Editing email of \"%1\"", "account/following": "People %1 follows", - "account/followers": "People who follow %1", - "account/posts": "Posts made by %1", - "account/topics": "Topics created by %1", - "account/groups": "%1's Groups", + "account/followers": "Lidé kteří sledují %1", + "account/posts": "Příspěvky od %1", + "account/topics": "Příspěvky vytvořeny uživatelem %1", + "account/groups": "%1's skupiny", "account/favourites": "%1's Bookmarked Posts", - "account/settings": "User Settings", + "account/settings": "Uživatelské nastavení", "account/watched": "Topics watched by %1", "account/upvoted": "Posts upvoted by %1", "account/downvoted": "Posts downvoted by %1", - "account/best": "Best posts made by %1", - "confirm": "Email Confirmed", + "account/best": "Nejlepší příspěvky od %1", + "confirm": "Email potvrzen", "maintenance.text": "%1 is currently undergoing maintenance. Please come back another time.", "maintenance.messageIntro": "Additionally, the administrator has left this message:", - "throttled.text": "%1 is currently unavailable due to excessive load. Please come back another time." + "throttled.text": "%1 je v současnou chvíli nedostupný pro velkou zátěž. Prosíme zkuste to za chvíli." } \ No newline at end of file diff --git a/public/language/cs/recent.json b/public/language/cs/recent.json index 13e8b2284e..68867fe0a5 100644 --- a/public/language/cs/recent.json +++ b/public/language/cs/recent.json @@ -3,17 +3,17 @@ "day": "Den", "week": "Týden", "month": "Měsíc", - "year": "Year", - "alltime": "All Time", - "no_recent_topics": "There are no recent topics.", - "no_popular_topics": "There are no popular topics.", - "there-is-a-new-topic": "There is a new topic.", - "there-is-a-new-topic-and-a-new-post": "There is a new topic and a new post.", - "there-is-a-new-topic-and-new-posts": "There is a new topic and %1 new posts.", - "there-are-new-topics": "There are %1 new topics.", - "there-are-new-topics-and-a-new-post": "There are %1 new topics and a new post.", - "there-are-new-topics-and-new-posts": "There are %1 new topics and %2 new posts.", - "there-is-a-new-post": "There is a new post.", - "there-are-new-posts": "There are %1 new posts.", - "click-here-to-reload": "Click here to reload." + "year": "Rok", + "alltime": "Pořád", + "no_recent_topics": "Nebyly nalezeny žádné nové téma.", + "no_popular_topics": "Žádná oblíbená téma.", + "there-is-a-new-topic": "K dispozici je nová téma.", + "there-is-a-new-topic-and-a-new-post": "K dispozici je nové téma a nový příspěvěk.", + "there-is-a-new-topic-and-new-posts": "K dispozici je nové téma a %1 nových příspěvků.", + "there-are-new-topics": "K dispozici je %1 nových témat.", + "there-are-new-topics-and-a-new-post": "K dispozici je %1 nových témat a jeden nový příspěvek.", + "there-are-new-topics-and-new-posts": "K dispozici je %1 nových témat a %2 nových příspěvků.", + "there-is-a-new-post": "K dispozici je nový příspěvek.", + "there-are-new-posts": "K dispozici je %1 nových příspěvků.", + "click-here-to-reload": "Kliknutím sem znovu načtete." } \ No newline at end of file diff --git a/public/language/cs/register.json b/public/language/cs/register.json index db7a689039..c6d339688a 100644 --- a/public/language/cs/register.json +++ b/public/language/cs/register.json @@ -15,5 +15,5 @@ "alternative_registration": "Jiný způsob registrace", "terms_of_use": "Podmínky", "agree_to_terms_of_use": "Souhlasím s Podmínkami", - "registration-added-to-queue": "Your registration has been added to the approval queue. You will receive an email when it is accepted by an administrator." + "registration-added-to-queue": "Vaše registrace byla přidána do fronty. Obdržíte e-mail až ji správce schválí." } \ No newline at end of file diff --git a/public/language/cs/search.json b/public/language/cs/search.json index 277c0a32bc..93fae4f92d 100644 --- a/public/language/cs/search.json +++ b/public/language/cs/search.json @@ -1,7 +1,7 @@ { "results_matching": "%1 result(s) matching \"%2\", (%3 seconds)", "no-matches": "No matches found", - "advanced-search": "Advanced Search", + "advanced-search": "Pokročilé hledání", "in": "In", "titles": "Titles", "titles-posts": "Titles and Posts", @@ -12,28 +12,28 @@ "at-least": "At least", "at-most": "At most", "post-time": "Post time", - "newer-than": "Newer than", - "older-than": "Older than", + "newer-than": "Novější než", + "older-than": "Starší než", "any-date": "Any date", - "yesterday": "Yesterday", - "one-week": "One week", - "two-weeks": "Two weeks", - "one-month": "One month", + "yesterday": "Včera", + "one-week": "Jeden týden", + "two-weeks": "Dva týdny", + "one-month": "Jeden měsíc", "three-months": "Three months", - "six-months": "Six months", - "one-year": "One year", - "sort-by": "Sort by", + "six-months": "Šest měsíců", + "one-year": "Jeden rok", + "sort-by": "Řadit dle", "last-reply-time": "Last reply time", "topic-title": "Topic title", "number-of-replies": "Number of replies", "number-of-views": "Number of views", "topic-start-date": "Topic start date", - "username": "Username", - "category": "Category", + "username": "Uživatelské jméno", + "category": "Kategorie", "descending": "In descending order", "ascending": "In ascending order", - "save-preferences": "Save preferences", - "clear-preferences": "Clear preferences", + "save-preferences": "Uložit nastavení", + "clear-preferences": "Vymazat nastavení", "search-preferences-saved": "Search preferences saved", "search-preferences-cleared": "Search preferences cleared", "show-results-as": "Show results as" diff --git a/public/language/cs/success.json b/public/language/cs/success.json index fde8a77044..e9dec2704e 100644 --- a/public/language/cs/success.json +++ b/public/language/cs/success.json @@ -1,6 +1,6 @@ { - "success": "Success", - "topic-post": "You have successfully posted.", - "authentication-successful": "Authentication Successful", - "settings-saved": "Settings saved!" + "success": "Úspěch", + "topic-post": "Úspěšně umístěno.", + "authentication-successful": "Úspěšné přihlášení", + "settings-saved": "Nastavení byla uložena!" } \ No newline at end of file diff --git a/public/language/cs/topic.json b/public/language/cs/topic.json index 8bdef36acc..2525cff40a 100644 --- a/public/language/cs/topic.json +++ b/public/language/cs/topic.json @@ -5,27 +5,27 @@ "no_topics_found": "Nebyla nalezena žádná témata!", "no_posts_found": "Nebyly nalezeny žádné příspěvky!", "post_is_deleted": "Tento příspěvek je vymazán!", - "topic_is_deleted": "This topic is deleted!", + "topic_is_deleted": "Toto téma je smazané!", "profile": "Profil", - "posted_by": "Posted by %1", - "posted_by_guest": "Posted by Guest", + "posted_by": "Přidal %1", + "posted_by_guest": "Přidal Host", "chat": "Chat", "notify_me": "Sledovat toto téma", "quote": "Citovat", "reply": "Odpovědět", - "reply-as-topic": "Reply as topic", - "guest-login-reply": "Log in to reply", + "reply-as-topic": "Odpovědět jako Téma", + "guest-login-reply": "Přihlásit se pro odpověď", "edit": "Upravit", "delete": "Smazat", - "purge": "Purge", - "restore": "Restore", + "purge": "Vypráznit", + "restore": "Obnovit", "move": "Přesunout", "fork": "Rozdělit", "link": "Odkaz", "share": "Sdílet", "tools": "Nástroje", "flag": "Flag", - "locked": "Locked", + "locked": "Uzamčeno", "bookmark_instructions": "Click here to return to the last read post in this thread.", "flag_title": "Flag this post for moderation", "flag_success": "This post has been flagged for moderation.", @@ -36,24 +36,24 @@ "markAsUnreadForAll.success": "Topic marked as unread for all.", "mark_unread": "Mark unread", "mark_unread.success": "Topic marked as unread.", - "watch": "Watch", + "watch": "Sledovat", "unwatch": "Unwatch", "watch.title": "Be notified of new replies in this topic", "unwatch.title": "Stop watching this topic", - "share_this_post": "Share this Post", + "share_this_post": "Sdílet toto téma", "thread_tools.title": "Topic Tools", "thread_tools.markAsUnreadForAll": "Označit jako nepřečtené", "thread_tools.pin": "Pin Topic", "thread_tools.unpin": "Unpin Topic", "thread_tools.lock": "Lock Topic", - "thread_tools.unlock": "Unlock Topic", - "thread_tools.move": "Move Topic", - "thread_tools.move_all": "Move All", + "thread_tools.unlock": "Odemknout téma", + "thread_tools.move": "Přesunout téma", + "thread_tools.move_all": "Přesunout vše", "thread_tools.fork": "Fork Topic", - "thread_tools.delete": "Delete Topic", - "thread_tools.delete-posts": "Delete Posts", + "thread_tools.delete": "Odstranit téma", + "thread_tools.delete-posts": "Odstranit přispěvky", "thread_tools.delete_confirm": "Are you sure you want to delete this topic?", - "thread_tools.restore": "Restore Topic", + "thread_tools.restore": "Obnovit téma", "thread_tools.restore_confirm": "Are you sure you want to restore this topic?", "thread_tools.purge": "Purge Topic", "thread_tools.purge_confirm": "Are you sure you want to purge this topic?", @@ -65,41 +65,41 @@ "disabled_categories_note": "Vypnuté (disabled) kategorie jsou šedé.", "confirm_move": "Přesunout", "confirm_fork": "Rozdělit", - "favourite": "Bookmark", - "favourites": "Bookmarks", + "favourite": "Záložka", + "favourites": "Záložky", "favourites.has_no_favourites": "You haven't bookmarked any posts yet.", "loading_more_posts": "Načítání více příspěvků", "move_topic": "Přesunout téma", - "move_topics": "Move Topics", + "move_topics": "Přesunout témata", "move_post": "Přesunout příspěvek", - "post_moved": "Post moved!", + "post_moved": "Příspěvek přesunut!", "fork_topic": "Rozdělit příspěvek", "topic_will_be_moved_to": "Toto téma bude přesunuto do kategorie", "fork_topic_instruction": "Vyber příspěvky, které chceš oddělit", "fork_no_pids": "Žádné příspěvky nebyly vybrány!", "fork_success": "Successfully forked topic! Click here to go to the forked topic.", "delete_posts_instruction": "Click the posts you want to delete/purge", - "composer.title_placeholder": "Enter your topic title here...", - "composer.handle_placeholder": "Name", + "composer.title_placeholder": "Zadejte název tématu...", + "composer.handle_placeholder": "Jméno", "composer.discard": "Discard", - "composer.submit": "Submit", + "composer.submit": "Odeslat", "composer.replying_to": "Replying to %1", - "composer.new_topic": "New Topic", - "composer.uploading": "uploading...", + "composer.new_topic": "Nové téma", + "composer.uploading": "nahrávání...", "composer.thumb_url_label": "Paste a topic thumbnail URL", "composer.thumb_title": "Add a thumbnail to this topic", "composer.thumb_url_placeholder": "http://example.com/thumb.png", - "composer.thumb_file_label": "Or upload a file", + "composer.thumb_file_label": "Nebo nahrajte soubor", "composer.thumb_remove": "Clear fields", "composer.drag_and_drop_images": "Drag and Drop Images Here", "more_users_and_guests": "%1 more user(s) and %2 guest(s)", "more_users": "%1 more user(s)", "more_guests": "%1 more guest(s)", "users_and_others": "%1 and %2 others", - "sort_by": "Sort by", - "oldest_to_newest": "Oldest to Newest", - "newest_to_oldest": "Newest to Oldest", - "most_votes": "Most votes", + "sort_by": "Řadit dle", + "oldest_to_newest": "Od nejstarších po nejnovější", + "newest_to_oldest": "Od nejnovějších po nejstarší", + "most_votes": "Nejvíce hlasů", "most_posts": "Most posts", "stale.title": "Create new topic instead?", "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", diff --git a/public/language/cs/unread.json b/public/language/cs/unread.json index 1a12bc4fbe..6380aebc5d 100644 --- a/public/language/cs/unread.json +++ b/public/language/cs/unread.json @@ -7,7 +7,7 @@ "all": "Vše", "all_categories": "All categories", "topics_marked_as_read.success": "Téma bylo označeno jako přečtené!", - "all-topics": "All Topics", - "new-topics": "New Topics", - "watched-topics": "Watched Topics" + "all-topics": "Všechna témata", + "new-topics": "Nová témata", + "watched-topics": "Sledovaná témata" } \ No newline at end of file diff --git a/public/language/cs/uploads.json b/public/language/cs/uploads.json index 1622cb5693..0adbf0d9f0 100644 --- a/public/language/cs/uploads.json +++ b/public/language/cs/uploads.json @@ -1,6 +1,6 @@ { - "uploading-file": "Uploading the file...", - "select-file-to-upload": "Select a file to upload!", - "upload-success": "File uploaded successfully!", + "uploading-file": "Nahrávání souboru...", + "select-file-to-upload": "Vyberte soubor pro nahrání!", + "upload-success": "Soubor byl úspěšně nahrán!", "maximum-file-size": "Maximum %1 kb" } \ No newline at end of file diff --git a/public/language/cs/user.json b/public/language/cs/user.json index e380634dfc..fb65c1ee4b 100644 --- a/public/language/cs/user.json +++ b/public/language/cs/user.json @@ -11,8 +11,8 @@ "unban_account": "Odblokovat účet", "delete_account": "Vymazat účet", "delete_account_confirm": "Opravdu chcete smazat váš účet?
      Tato akce je nevratná a nebude možné obnovit žádné vaše data.

      Pro potvrzení smazání účtu napište vaše uživatelské jméno.", - "delete_this_account_confirm": "Are you sure you want to delete this account?
      This action is irreversible and you will not be able to recover any data

      ", - "account-deleted": "Account deleted", + "delete_this_account_confirm": "Skutečně chcete zrušit tento účet?
      Tato akce je nevratná a již nebude žádná možnost obnovení vašich dat

      ", + "account-deleted": "Účet smazán", "fullname": "Jméno a příjmení", "website": "Webové stránky", "location": "Poloha", @@ -22,7 +22,7 @@ "profile": "Profil", "profile_views": "Zobrazení profilu", "reputation": "Reputace", - "favourites": "Bookmarks", + "favourites": "Záložky", "watched": "Sledován", "followers": "Sledují ho", "following": "Sleduje", @@ -36,11 +36,11 @@ "more": "Více", "profile_update_success": "Profil byl úspěšně aktualizován!", "change_picture": "Změnit obrázek", - "change_username": "Change Username", - "change_email": "Change Email", + "change_username": "Změnit uživatelské jméno", + "change_email": "Změnit email", "edit": "Upravit", - "edit-profile": "Edit Profile", - "default_picture": "Default Icon", + "edit-profile": "Editovat profil", + "default_picture": "Výchozí ikonka", "uploaded_picture": "Nahraný obrázek", "upload_new_picture": "Nahrát nový obrázek", "upload_new_picture_from_url": "Nahrát nový obrázek z URL", @@ -54,23 +54,23 @@ "change_password_success": "Heslo je aktualizované!", "confirm_password": "Potvrzení hesla", "password": "Heslo", - "username_taken_workaround": "The username you requested was already taken, so we have altered it slightly. You are now known as %1", - "password_same_as_username": "Your password is the same as your username, please select another password.", - "password_same_as_email": "Your password is the same as your email, please select another password.", + "username_taken_workaround": "Zvolené uživatelské jméno je již zabrané, takže jsme ho trochu upravili. Nyní jste znám jako %1", + "password_same_as_username": "Vaše heslo je stejné jako vaše přihlašovací jméno. Zvolte si prosím jiné heslo.", + "password_same_as_email": "Vaše heslo je stejné jako email. Vyberte si prosím jiné heslo.", "upload_picture": "Nahrát obrázek", "upload_a_picture": "Nahrát obrázek", - "remove_uploaded_picture": "Remove Uploaded Picture", - "upload_cover_picture": "Upload cover picture", + "remove_uploaded_picture": "Odstranit nahraný obrázek", + "upload_cover_picture": "Náhrát titulní obrázek", "settings": "Nastavení", "show_email": "Zobrazovat můj email v profilu", "show_fullname": "Zobrazovat celé jméno", "restrict_chats": "Only allow chat messages from users I follow", - "digest_label": "Subscribe to Digest", + "digest_label": "Odebírat přehled", "digest_description": "Subscribe to email updates for this forum (new notifications and topics) according to a set schedule", - "digest_off": "Off", - "digest_daily": "Daily", - "digest_weekly": "Weekly", - "digest_monthly": "Monthly", + "digest_off": "Vypnuto", + "digest_daily": "Denně", + "digest_weekly": "Týdně", + "digest_monthly": "Měsíčně", "send_chat_notifications": "Send an email if a new chat message arrives and I am not online", "send_post_notifications": "Send an email when replies are made to topics I am subscribed to", "settings-require-reload": "Some setting changes require a reload. Click here to reload the page.", @@ -85,9 +85,9 @@ "email_hidden": "Skrytý email", "hidden": "skrytý", "paginate_description": "Paginate topics and posts instead of using infinite scroll", - "topics_per_page": "Topics per Page", - "posts_per_page": "Posts per Page", - "notification_sounds": "Play a sound when you receive a notification", + "topics_per_page": "Témat na stránce", + "posts_per_page": "Příspěvků na stránce", + "notification_sounds": "Přehrát zvuk když dostanete notifikaci", "browsing": "Browsing Settings", "open_links_in_new_tab": "Open outgoing links in new tab", "enable_topic_searching": "Enable In-Topic Searching", @@ -97,11 +97,11 @@ "scroll_to_my_post": "After posting a reply, show the new post", "follow_topics_you_reply_to": "Follow topics that you reply to", "follow_topics_you_create": "Follow topics you create", - "grouptitle": "Group Title", - "no-group-title": "No group title", - "select-skin": "Select a Skin", - "select-homepage": "Select a Homepage", - "homepage": "Homepage", + "grouptitle": "Nadpis skupiny", + "no-group-title": "Žádný nadpis skupiny", + "select-skin": "Vybrat skin", + "select-homepage": "Vybrat domovskou stránku", + "homepage": "Domovská stránka", "homepage_description": "Select a page to use as the forum homepage or 'None' to use the default homepage.", "custom_route": "Custom Homepage Route", "custom_route_help": "Enter a route name here, without any preceding slash (e.g. \"recent\", or \"popular\")", diff --git a/public/language/cs/users.json b/public/language/cs/users.json index 6145c20f2a..d1a3af5416 100644 --- a/public/language/cs/users.json +++ b/public/language/cs/users.json @@ -6,15 +6,15 @@ "enter_username": "Zadej uživatelské jméno k hledání", "load_more": "Načíst další", "users-found-search-took": "%1 user(s) found! Search took %2 seconds.", - "filter-by": "Filter By", - "online-only": "Online only", - "invite": "Invite", - "invitation-email-sent": "An invitation email has been sent to %1", - "user_list": "User List", - "recent_topics": "Recent Topics", - "popular_topics": "Popular Topics", - "unread_topics": "Unread Topics", - "categories": "Categories", - "tags": "Tags", - "no-users-found": "No users found!" + "filter-by": "Filtrovat dle", + "online-only": "Pouze online", + "invite": "Pozvat", + "invitation-email-sent": "E-mailová pozvánka byla odeslána na adresu %1", + "user_list": "Seznam uživatelů", + "recent_topics": "Poslední témata", + "popular_topics": "Oblíbená témata", + "unread_topics": "Nepřečtená témata", + "categories": "Kategorie", + "tags": "Tagy", + "no-users-found": "Nebyly nalezeny žádní uživatelé!" } \ No newline at end of file diff --git a/public/language/tr/login.json b/public/language/tr/login.json index bf8b5ea7b9..e28dda2797 100644 --- a/public/language/tr/login.json +++ b/public/language/tr/login.json @@ -5,7 +5,7 @@ "remember_me": "Beni Hatırla!", "forgot_password": "Şifrenizi mi unuttunuz?", "alternative_logins": "Alternatif Girişler", - "failed_login_attempt": "Login Unsuccessful", + "failed_login_attempt": "Giriş Başarısız", "login_successful": "Başarıyla giriş yaptınız!", "dont_have_account": "Hesabınız yok mu?" } \ No newline at end of file diff --git a/public/language/tr/modules.json b/public/language/tr/modules.json index 6c4f661003..06e5876c68 100644 --- a/public/language/tr/modules.json +++ b/public/language/tr/modules.json @@ -29,14 +29,14 @@ "composer.submit_and_lock": "Gönder ve Kitle", "composer.toggle_dropdown": "Menü aç", "composer.uploading": "Yükleniyor %1", - "composer.formatting.bold": "Bold", - "composer.formatting.italic": "Italic", - "composer.formatting.list": "List", - "composer.formatting.strikethrough": "Strikethrough", - "composer.formatting.link": "Link", - "composer.formatting.picture": "Picture", - "composer.upload-picture": "Upload Image", - "composer.upload-file": "Upload File", + "composer.formatting.bold": "Kalın", + "composer.formatting.italic": "İtalik", + "composer.formatting.list": "Liste", + "composer.formatting.strikethrough": "Üstüçizili", + "composer.formatting.link": "Bağlantı", + "composer.formatting.picture": "Görsel", + "composer.upload-picture": "Görsel Yükle", + "composer.upload-file": "Dosya Yükle", "bootbox.ok": "Tamam", "bootbox.cancel": "İptal", "bootbox.confirm": "Onayla", From a9828a14650f850266d3e5efc44d213877ba71d6 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 11 May 2016 16:40:40 +0300 Subject: [PATCH 0221/1109] closes #4611 --- public/src/client/recent.js | 40 +++++++++++++++++++++++++++++++++++-- src/controllers/unread.js | 2 ++ src/socket.io/topics.js | 6 ++++++ 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/public/src/client/recent.js b/public/src/client/recent.js index e4223d519a..641beb5ca9 100644 --- a/public/src/client/recent.js +++ b/public/src/client/recent.js @@ -35,13 +35,49 @@ define('forum/recent', ['forum/infinitescroll', 'components'], function(infinite }; function onNewTopic(data) { + if (ajaxify.data.selectedCategory && parseInt(ajaxify.data.selectedCategory.cid, 10) !== parseInt(data.cid, 10)) { + return; + } + + if (ajaxify.data.selectedFilter && ajaxify.data.selectedFilter.url === 'unread/watched') { + return; + } + ++newTopicCount; Recent.updateAlertText(); } function onNewPost(data) { - ++newPostCount; - Recent.updateAlertText(); + function showAlert() { + ++newPostCount; + Recent.updateAlertText(); + } + + if (parseInt(data.topic.mainPid, 10) === parseInt(data.posts[0].pid, 10)) { + return; + } + + if (ajaxify.data.selectedCategory && parseInt(ajaxify.data.selectedCategory.cid, 10) !== parseInt(data.topic.cid, 10)) { + return; + } + + if (ajaxify.data.selectedFilter && ajaxify.data.selectedFilter.url === 'unread/new') { + return; + } + + if (ajaxify.data.selectedFilter && ajaxify.data.selectedFilter.url === 'unread/watched') { + socket.emit('topics.isFollowed', data.topic.tid, function(err, isFollowed) { + if (err) { + app.alertError(err.message); + } + if (isFollowed) { + showAlert(); + } + }); + return; + } + + showAlert(); } Recent.removeListeners = function() { diff --git a/src/controllers/unread.js b/src/controllers/unread.js index 1d80774fb0..f0b7471b63 100644 --- a/src/controllers/unread.js +++ b/src/controllers/unread.js @@ -78,6 +78,8 @@ unreadController.get = function(req, res, next) { return filter && filter.selected; })[0]; + results.unreadTopics.querystring = req.query.cid ? ('?cid=' + req.query.cid) : ''; + res.render('unread', results.unreadTopics); }); }; diff --git a/src/socket.io/topics.js b/src/socket.io/topics.js index 6f5ab296d9..18cad2d980 100644 --- a/src/socket.io/topics.js +++ b/src/socket.io/topics.js @@ -88,6 +88,12 @@ function followCommand(method, socket, tid, callback) { method(tid, socket.uid, callback); } +SocketTopics.isFollowed = function(socket, tid, callback) { + topics.isFollowing([tid], socket.uid, function(err, isFollowing) { + callback(err, Array.isArray(isFollowing) && isFollowing.length ? isFollowing[0] : false); + }); +}; + SocketTopics.search = function(socket, data, callback) { topics.search(data.tid, data.term, callback); }; From a44fdeec492774238f739382894f94428bbbfa68 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 11 May 2016 16:42:58 +0300 Subject: [PATCH 0222/1109] up themes --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 444f41a5df..15fab9abf1 100644 --- a/package.json +++ b/package.json @@ -57,8 +57,8 @@ "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", "nodebb-theme-lavender": "3.0.10", - "nodebb-theme-persona": "4.0.134", - "nodebb-theme-vanilla": "5.0.72", + "nodebb-theme-persona": "4.0.135", + "nodebb-theme-vanilla": "5.0.73", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", "nodemailer-sendmail-transport": "1.0.0", From 60e4ddc1454994a67d2e3575677412733899fc26 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 11 May 2016 14:19:28 -0400 Subject: [PATCH 0223/1109] Fixed regression in registration/login pages Error message was always the CSRF message, even when it wasn't a CSRF issue. re: #4593 --- public/src/client/login.js | 2 +- public/src/client/register.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/src/client/login.js b/public/src/client/login.js index 9f90926063..ace40db68d 100644 --- a/public/src/client/login.js +++ b/public/src/client/login.js @@ -31,7 +31,7 @@ define('forum/login', ['csrf', 'translator'], function(csrf, translator) { window.location.href = data + '?loggedin'; }, error: function(data, status) { - if (data.status === 403 && data.statusText === 'Forbidden') { + if (data.status === 403 && data.responseText === 'Forbidden') { window.location.href = config.relative_path + '/login?error=csrf-invalid'; } else { errorEl.find('p').translateText(data.responseText); diff --git a/public/src/client/register.js b/public/src/client/register.js index fdf4b3ab7e..306ef367fd 100644 --- a/public/src/client/register.js +++ b/public/src/client/register.js @@ -99,7 +99,7 @@ define('forum/register', ['csrf', 'translator'], function(csrf, translator) { }, error: function(data) { translator.translate(data.responseText, config.defaultLang, function(translated) { - if (data.status === 403 && data.statusText === 'Forbidden') { + if (data.status === 403 && data.responseText === 'Forbidden') { window.location.href = config.relative_path + '/register?error=csrf-invalid'; } else { errorEl.find('p').text(translated); From f5e928409cd6c33e4353ce41cd24a22bf4f0142d Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 11 May 2016 14:51:39 -0400 Subject: [PATCH 0224/1109] fixed #4624 --- src/sitemap.js | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/src/sitemap.js b/src/sitemap.js index 00bb195809..812ba9fe53 100644 --- a/src/sitemap.js +++ b/src/sitemap.js @@ -45,28 +45,11 @@ sitemap.render = function(callback) { }); }; -sitemap.getStaticUrls = function(callback) { - callback(null, [{ - url: '', - changefreq: 'weekly', - priority: '0.6' - }, { - url: '/recent', - changefreq: 'daily', - priority: '0.4' - }, { - url: '/users', - changefreq: 'daily', - priority: '0.4' - }, { - url: '/groups', - changefreq: 'daily', - priority: '0.4' - }]); -}; - sitemap.getPages = function(callback) { - if (sitemap.maps.pages && sitemap.maps.pages.cache.length) { + if ( + sitemap.maps.pages && + Date.now() < parseInt(sitemap.maps.pages.cacheSetTimestamp, 10) + parseInt(sitemap.maps.pages.cacheResetPeriod, 10) + ) { return sitemap.maps.pages.toXML(callback); } @@ -98,7 +81,10 @@ sitemap.getPages = function(callback) { }; sitemap.getCategories = function(callback) { - if (sitemap.maps.categories && sitemap.maps.categories.cache.length) { + if ( + sitemap.maps.categories && + Date.now() < parseInt(sitemap.maps.categories.cacheSetTimestamp, 10) + parseInt(sitemap.maps.categories.cacheResetPeriod, 10) + ) { return sitemap.maps.categories.toXML(callback); } @@ -137,7 +123,10 @@ sitemap.getTopicPage = function(page, callback) { var min = (parseInt(page, 10) - 1) * numTopics; var max = min + numTopics; - if (sitemap.maps.topics[page-1] && sitemap.maps.topics[page-1].cache.length) { + if ( + sitemap.maps.topics[page-1] && + Date.now() < parseInt(sitemap.maps.topics[page-1].cacheSetTimestamp, 10) + parseInt(sitemap.maps.topics[page-1].cacheResetPeriod, 10) + ) { return sitemap.maps.topics[page-1].toXML(callback); } From ead3e8611aadc8408b51305ebde53f676e6214df Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 11 May 2016 15:51:44 -0400 Subject: [PATCH 0225/1109] up mentions --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 15fab9abf1..a7d9160a97 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "nodebb-plugin-dbsearch": "1.0.1", "nodebb-plugin-emoji-one": "1.1.3", "nodebb-plugin-emoji-extended": "1.1.0", - "nodebb-plugin-markdown": "5.1.4", + "nodebb-plugin-markdown": "5.1.5", "nodebb-plugin-mentions": "1.0.24", "nodebb-plugin-soundpack-default": "0.1.6", "nodebb-plugin-spam-be-gone": "0.4.6", From 89c3d394867b44d69999269f3235f4e70750446a Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 11 May 2016 16:09:16 -0400 Subject: [PATCH 0226/1109] updated mentions --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a7d9160a97..7b5054ac90 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "nodebb-plugin-emoji-one": "1.1.3", "nodebb-plugin-emoji-extended": "1.1.0", "nodebb-plugin-markdown": "5.1.5", - "nodebb-plugin-mentions": "1.0.24", + "nodebb-plugin-mentions": "1.0.25", "nodebb-plugin-soundpack-default": "0.1.6", "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", From ce66dd96a9bf10ce674ecf861ac0252934002169 Mon Sep 17 00:00:00 2001 From: pichalite Date: Wed, 11 May 2016 17:43:37 -0700 Subject: [PATCH 0227/1109] send option to user settings page if in-topic search is available (#4627) --- src/controllers/accounts/settings.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/controllers/accounts/settings.js b/src/controllers/accounts/settings.js index ba7cc4dcaf..af746a07b6 100644 --- a/src/controllers/accounts/settings.js +++ b/src/controllers/accounts/settings.js @@ -125,6 +125,8 @@ settingsController.get = function(req, res, callback) { userData.disableCustomUserSkins = parseInt(meta.config.disableCustomUserSkins, 10) === 1; userData.allowUserHomePage = parseInt(meta.config.allowUserHomePage, 10) === 1; + + userData.inTopicSearchAvailable = plugins.hasListeners('filter:topic.search'); userData.title = '[[pages:account/settings]]'; userData.breadcrumbs = helpers.buildBreadcrumbs([{text: userData.username, url: '/user/' + userData.userslug}, {text: '[[user:settings]]'}]); From a2d8f430aeea824bfb6c7ad3f081f6243e9189e5 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 11 May 2016 20:45:46 -0400 Subject: [PATCH 0228/1109] Up themes --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7b5054ac90..4e39c4119e 100644 --- a/package.json +++ b/package.json @@ -57,8 +57,8 @@ "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", "nodebb-theme-lavender": "3.0.10", - "nodebb-theme-persona": "4.0.135", - "nodebb-theme-vanilla": "5.0.73", + "nodebb-theme-persona": "4.0.136", + "nodebb-theme-vanilla": "5.0.74", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", "nodemailer-sendmail-transport": "1.0.0", From 1ec9fc73342c79016c121046f705654f9e6bc460 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 12 May 2016 09:31:52 +0300 Subject: [PATCH 0229/1109] closes #4626 --- public/src/app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/src/app.js b/public/src/app.js index a4acd0468b..2f61be6994 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -133,13 +133,16 @@ app.cacheBuster = null; app.enterRoom = function (room, callback) { callback = callback || function() {}; if (socket && app.user.uid && app.currentRoom !== room) { + var previousRoom = app.currentRoom; + app.currentRoom = room; socket.emit('meta.rooms.enter', { enter: room }, function(err) { if (err) { + app.currentRoom = previousRoom; return app.alertError(err.message); } - app.currentRoom = room; + callback(); }); } From f4599e2ce2196fd51a69a4d5579c6de982160466 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 12 May 2016 18:48:22 +0300 Subject: [PATCH 0230/1109] closes #4629 --- public/src/client/unread.js | 3 ++- src/controllers/unread.js | 9 ++++++--- src/socket.io/topics/infinitescroll.js | 6 +++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/public/src/client/unread.js b/public/src/client/unread.js index 47b96e54ad..9300377ce3 100644 --- a/public/src/client/unread.js +++ b/public/src/client/unread.js @@ -88,7 +88,8 @@ define('forum/unread', ['forum/recent', 'topicSelect', 'forum/infinitescroll', ' var cid = params.cid; infinitescroll.loadMore('topics.loadMoreUnreadTopics', { after: $('[component="category"]').attr('data-nextstart'), - cid: cid + cid: cid, + filter: ajaxify.data.selectedFilter.filter }, function(data, done) { if (data.topics && data.topics.length) { recent.onTopicsLoaded('unread', data.topics, true, done); diff --git a/src/controllers/unread.js b/src/controllers/unread.js index f0b7471b63..d72099e7c5 100644 --- a/src/controllers/unread.js +++ b/src/controllers/unread.js @@ -63,15 +63,18 @@ unreadController.get = function(req, res, next) { results.unreadTopics.filters = [{ name: '[[unread:all-topics]]', url: 'unread', - selected: filter === '' + selected: filter === '', + filter: '' }, { name: '[[unread:new-topics]]', url: 'unread/new', - selected: filter === 'new' + selected: filter === 'new', + filter: 'new' }, { name: '[[unread:watched-topics]]', url: 'unread/watched', - selected: filter === 'watched' + selected: filter === 'watched', + filter: 'watched' }]; results.unreadTopics.selectedFilter = results.unreadTopics.filters.filter(function(filter) { diff --git a/src/socket.io/topics/infinitescroll.js b/src/socket.io/topics/infinitescroll.js index 5c45c6e4fb..5f089bd52e 100644 --- a/src/socket.io/topics/infinitescroll.js +++ b/src/socket.io/topics/infinitescroll.js @@ -96,10 +96,10 @@ module.exports = function(SocketTopics) { return callback(new Error('[[error:invalid-data]]')); } - var start = parseInt(data.after, 10), - stop = start + 9; + var start = parseInt(data.after, 10); + var stop = start + 9; - topics.getUnreadTopics(data.cid, socket.uid, start, stop, callback); + topics.getUnreadTopics(data.cid, socket.uid, start, stop, data.filter, callback); }; SocketTopics.loadMoreFromSet = function(socket, data, callback) { From 3fe786e7376ef8553d03b01109765812198fcd0c Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 12 May 2016 15:46:36 -0400 Subject: [PATCH 0231/1109] up persona --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4e39c4119e..a93f3c92f0 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", "nodebb-theme-lavender": "3.0.10", - "nodebb-theme-persona": "4.0.136", + "nodebb-theme-persona": "4.0.137", "nodebb-theme-vanilla": "5.0.74", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", From f9f4b3b91f09d12084207413b3802b33309d0740 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 13 May 2016 10:28:01 +0300 Subject: [PATCH 0232/1109] closes #4632 --- src/posts/delete.js | 83 ++++++++++++++++++++++++++------------------- 1 file changed, 49 insertions(+), 34 deletions(-) diff --git a/src/posts/delete.js b/src/posts/delete.js index 40b6554b6f..e28f3f8e36 100644 --- a/src/posts/delete.js +++ b/src/posts/delete.js @@ -24,15 +24,15 @@ module.exports = function(Posts) { }, function (_post, next) { postData = _post; - topics.getTopicField(_post.tid, 'cid', next); + topics.getTopicFields(_post.tid, ['tid', 'cid', 'pinned'], next); }, - function (cid, next) { + function (topicData, next) { async.parallel([ function(next) { - updateTopicTimestamp(postData.tid, next); + updateTopicTimestamp(topicData, next); }, function(next) { - db.sortedSetRemove('cid:' + cid + ':pids', pid, next); + db.sortedSetRemove('cid:' + topicData.cid + ':pids', pid, next); }, function(next) { Posts.dismissFlag(pid, next); @@ -40,10 +40,11 @@ module.exports = function(Posts) { function(next) { topics.updateTeaser(postData.tid, next); } - ], function(err) { - plugins.fireHook('action:post.delete', pid); - next(err, postData); - }); + ], next); + }, + function (results, next) { + plugins.fireHook('action:post.delete', pid); + next(null, postData); } ], callback); }; @@ -62,45 +63,56 @@ module.exports = function(Posts) { }, function (_post, next) { postData = _post; - topics.getTopicField(_post.tid, 'cid', next); + topics.getTopicFields(_post.tid, ['tid', 'cid', 'pinned'], next); }, - function (cid, next) { - postData.cid = cid; + function (topicData, next) { + postData.cid = topicData.cid; async.parallel([ function(next) { - updateTopicTimestamp(postData.tid, next); + updateTopicTimestamp(topicData, next); }, function(next) { - db.sortedSetAdd('cid:' + cid + ':pids', postData.timestamp, pid, next); + db.sortedSetAdd('cid:' + topicData.cid + ':pids', postData.timestamp, pid, next); }, function(next) { topics.updateTeaser(postData.tid, next); } - ], function(err) { - plugins.fireHook('action:post.restore', _.clone(postData)); - next(err, postData); - }); + ], next); + }, + function (results, next) { + plugins.fireHook('action:post.restore', _.clone(postData)); + next(null, postData); } ], callback); }; - function updateTopicTimestamp(tid, callback) { - topics.getLatestUndeletedPid(tid, function(err, pid) { - if(err || !pid) { - return callback(err); + function updateTopicTimestamp(topicData, callback) { + var timestamp; + async.waterfall([ + function (next) { + topics.getLatestUndeletedPid(topicData.tid, next); + }, + function (pid, next) { + if (!parseInt(pid, 10)) { + return callback(); + } + Posts.getPostField(pid, 'timestamp', next); + }, + function (_timestamp, next) { + timestamp = _timestamp; + if (!parseInt(timestamp, 10)) { + return callback(); + } + topics.updateTimestamp(topicData.tid, timestamp, next); + }, + function (next) { + if (parseInt(topicData.pinned, 10) !== 1) { + db.sortedSetAdd('cid:' + topicData.cid + ':tids', timestamp, topicData.tid, next); + } else { + next(); + } } - - Posts.getPostField(pid, 'timestamp', function(err, timestamp) { - if (err) { - return callback(err); - } - - if (timestamp) { - return topics.updateTimestamp(tid, timestamp, callback); - } - callback(); - }); - }); + ], callback); } Posts.purge = function(pid, uid, callback) { @@ -160,7 +172,7 @@ module.exports = function(Posts) { return callback(err); } - topics.getTopicFields(postData.tid, ['cid'], function(err, topicData) { + topics.getTopicFields(postData.tid, ['tid', 'cid', 'pinned'], function(err, topicData) { if (err) { return callback(err); } @@ -178,6 +190,9 @@ module.exports = function(Posts) { function(next) { topics.updateTeaser(postData.tid, next); }, + function (next) { + updateTopicTimestamp(topicData, next); + }, function(next) { db.sortedSetIncrBy('cid:' + topicData.cid + ':tids:posts', -1, postData.tid, next); }, From 96852906587a44ff10617a70379041ef453d6710 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 13 May 2016 10:40:04 +0300 Subject: [PATCH 0233/1109] check responseJSON --- public/src/ajaxify.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js index 993e45eb81..4f452f7b08 100644 --- a/public/src/ajaxify.js +++ b/public/src/ajaxify.js @@ -140,7 +140,7 @@ $(document).ready(function() { window.location.href = config.relative_path + '/login'; return; } else if (status === 302 || status === 308) { - if (data.responseJSON.external) { + if (data.responseJSON && data.responseJSON.external) { window.location.href = data.responseJSON.external; } else if (typeof data.responseJSON === 'string') { ajaxify.go(data.responseJSON.slice(1), callback, quiet); From bf3f19253f17907b35a8c23357595047c692e57c Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 13 May 2016 10:47:01 +0300 Subject: [PATCH 0234/1109] if post is not found go to 404 --- src/controllers/posts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/posts.js b/src/controllers/posts.js index c8b490f65b..be96fa7e43 100644 --- a/src/controllers/posts.js +++ b/src/controllers/posts.js @@ -12,7 +12,7 @@ postsController.redirectToPost = function(req, res, callback) { } posts.generatePostPath(pid, req.uid, function(err, path) { - if (err) { + if (err || !path) { return callback(err); } From 84a7b6690bb08c7b3be8ef19e59b3b8c05ef31c4 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 13 May 2016 14:08:50 +0300 Subject: [PATCH 0235/1109] closes #4434 --- public/src/client/recent.js | 4 +- public/src/client/tag.js | 4 +- public/src/client/unread.js | 4 +- src/controllers/recent.js | 41 +++++++++++++++++- src/controllers/tags.js | 36 ++++++++++++---- src/controllers/unread.js | 78 ++++++++++++++++++++++------------ src/socket.io/topics/unread.js | 2 +- src/topics/unread.js | 40 +++++++---------- 8 files changed, 141 insertions(+), 68 deletions(-) diff --git a/public/src/client/recent.js b/public/src/client/recent.js index 641beb5ca9..22777be4f6 100644 --- a/public/src/client/recent.js +++ b/public/src/client/recent.js @@ -23,7 +23,9 @@ define('forum/recent', ['forum/infinitescroll', 'components'], function(infinite $(this).addClass('hide'); }); - infinitescroll.init(Recent.loadMoreTopics); + if (!config.usePagination) { + infinitescroll.init(Recent.loadMoreTopics); + } }; Recent.watchForNewPosts = function () { diff --git a/public/src/client/tag.js b/public/src/client/tag.js index 1758539b61..b475c7406b 100644 --- a/public/src/client/tag.js +++ b/public/src/client/tag.js @@ -16,7 +16,9 @@ define('forum/tag', ['forum/recent', 'forum/infinitescroll'], function(recent, i loadMoreTopics(); }); - infinitescroll.init(loadMoreTopics); + if (!config.usePagination) { + infinitescroll.init(loadMoreTopics); + } function loadMoreTopics(direction) { if(direction < 0 || !$('[component="category"]').length) { diff --git a/public/src/client/unread.js b/public/src/client/unread.js index 9300377ce3..5a3ec3543c 100644 --- a/public/src/client/unread.js +++ b/public/src/client/unread.js @@ -78,7 +78,9 @@ define('forum/unread', ['forum/recent', 'topicSelect', 'forum/infinitescroll', ' loadMoreTopics(); }); - infinitescroll.init(loadMoreTopics); + if (!config.usePagination) { + infinitescroll.init(loadMoreTopics); + } function loadMoreTopics(direction) { if(direction < 0 || !$('[component="category"]').length) { diff --git a/src/controllers/recent.js b/src/controllers/recent.js index 6883929be4..fe9355c533 100644 --- a/src/controllers/recent.js +++ b/src/controllers/recent.js @@ -1,26 +1,63 @@ 'use strict'; +var async = require('async'); var nconf = require('nconf'); +var db = require('../database'); +var privileges = require('../privileges'); +var user = require('../user'); var topics = require('../topics'); var meta = require('../meta'); var helpers = require('./helpers'); +var pagination = require('../pagination'); var recentController = {}; recentController.get = function(req, res, next) { + var page = parseInt(req.query.page, 10) || 1; + var pageCount = 1; + var stop = 0; + var topicCount = 0; + var settings; - var stop = (parseInt(meta.config.topicsPerList, 10) || 20) - 1; + async.waterfall([ + function (next) { + async.parallel({ + settings: function(next) { + user.getSettings(req.uid, next); + }, + tids: function (next) { + db.getSortedSetRevRange('topics:recent', 0, 199, next); + } + }, next); + }, + function (results, next) { + settings = results.settings; + privileges.topics.filterTids('read', results.tids, req.uid, next); + }, + function (tids, next) { + var start = Math.max(0, (page - 1) * settings.topicsPerPage); + stop = start + settings.topicsPerPage - 1; - topics.getTopicsFromSet('topics:recent', req.uid, 0, stop, function(err, data) { + topicCount = tids.length; + pageCount = Math.max(1, Math.ceil(topicCount / settings.topicsPerPage)); + tids = tids.slice(start, stop + 1); + + topics.getTopicsByTids(tids, req.uid, next); + } + ], function(err, topics) { if (err) { return next(err); } + var data = {}; + data.topics = topics; + data.nextStart = stop + 1; data['feeds:disableRSS'] = parseInt(meta.config['feeds:disableRSS'], 10) === 1; data.rssFeedUrl = nconf.get('relative_path') + '/recent.rss'; data.title = '[[pages:recent]]'; + data.pagination = pagination.create(page, pageCount); if (req.path.startsWith('/api/recent') || req.path.startsWith('/recent')) { data.breadcrumbs = helpers.buildBreadcrumbs([{text: '[[recent:title]]'}]); } diff --git a/src/controllers/tags.js b/src/controllers/tags.js index af8f6058c0..45ab3424aa 100644 --- a/src/controllers/tags.js +++ b/src/controllers/tags.js @@ -5,15 +5,16 @@ var async = require('async'); var nconf = require('nconf'); var validator = require('validator'); -var meta = require('../meta'); +var user = require('../user'); var topics = require('../topics'); +var pagination = require('../pagination'); var helpers = require('./helpers'); var tagsController = {}; tagsController.getTag = function(req, res, next) { var tag = validator.escape(req.params.tag); - var stop = (parseInt(meta.config.topicsPerList, 10) || 20) - 1; + var page = parseInt(req.query.page, 10) || 1; var templateData = { topics: [], @@ -21,18 +22,33 @@ tagsController.getTag = function(req, res, next) { breadcrumbs: helpers.buildBreadcrumbs([{text: '[[tags:tags]]', url: '/tags'}, {text: tag}]), title: '[[pages:tag, ' + tag + ']]' }; - + var settings; + var topicCount = 0; async.waterfall([ function (next) { - topics.getTagTids(req.params.tag, 0, stop, next); + user.getSettings(req.uid, next); }, - function (tids, next) { - if (Array.isArray(tids) && !tids.length) { + function (_settings, next) { + settings = _settings; + var start = Math.max(0, (page - 1) * settings.topicsPerPage); + var stop = start + settings.topicsPerPage - 1; + templateData.nextStart = stop + 1; + async.parallel({ + topicCount: function(next) { + topics.getTagTopicCount(tag, next); + }, + tids: function(next) { + topics.getTagTids(req.params.tag, start, stop, next); + } + }, next); + }, + function (results, next) { + if (Array.isArray(results.tids) && !results.tids.length) { topics.deleteTag(req.params.tag); return res.render('tag', templateData); } - - topics.getTopics(tids, req.uid, next); + topicCount = results.topicCount; + topics.getTopics(results.tids, req.uid, next); } ], function(err, topics) { if (err) { @@ -54,7 +70,9 @@ tagsController.getTag = function(req, res, next) { } ]; templateData.topics = topics; - templateData.nextStart = stop + 1; + + var pageCount = Math.max(1, Math.ceil(topicCount / settings.topicsPerPage)); + templateData.pagination = pagination.create(page, pageCount); res.render('tag', templateData); }); diff --git a/src/controllers/unread.js b/src/controllers/unread.js index d72099e7c5..0fc32c390c 100644 --- a/src/controllers/unread.js +++ b/src/controllers/unread.js @@ -2,9 +2,10 @@ 'use strict'; var async = require('async'); -var meta = require('../meta'); + var categories = require('../categories'); var privileges = require('../privileges'); +var pagination = require('../pagination'); var user = require('../user'); var topics = require('../topics'); var helpers = require('./helpers'); @@ -14,7 +15,7 @@ var unreadController = {}; var validFilter = {'': true, 'new': true, 'watched': true}; unreadController.get = function(req, res, next) { - var stop = (parseInt(meta.config.topicsPerList, 10) || 20) - 1; + var page = parseInt(req.query.page, 10) || 1; var results; var cid = req.query.cid; var filter = req.params.filter || ''; @@ -22,45 +23,36 @@ unreadController.get = function(req, res, next) { if (!validFilter[filter]) { return next(); } - + var settings; async.waterfall([ function(next) { async.parallel({ watchedCategories: function(next) { - user.getWatchedCategories(req.uid, next); + getWatchedCategories(req.uid, cid, next); }, - unreadTopics: function(next) { - topics.getUnreadTopics(cid, req.uid, 0, stop, filter, next); + settings: function(next) { + user.getSettings(req.uid, next); } }, next); }, function(_results, next) { results = _results; - - privileges.categories.filterCids('read', results.watchedCategories, req.uid, next); - }, - function(cids, next) { - categories.getCategoriesFields(cids, ['cid', 'name', 'slug', 'icon', 'link', 'color', 'bgColor'], next); + settings = results.settings; + var start = Math.max(0, (page - 1) * settings.topicsPerPage); + var stop = start + settings.topicsPerPage - 1; + topics.getUnreadTopics(cid, req.uid, start, stop, filter, next); } - ], function(err, categories) { + ], function(err, data) { if (err) { return next(err); } - categories = categories.filter(function(category) { - return category && !category.link; - }); - categories.forEach(function(category) { - category.selected = parseInt(category.cid, 10) === parseInt(cid, 10); - if (category.selected) { - results.unreadTopics.selectedCategory = category; - } - }); - results.unreadTopics.categories = categories; + data.categories = results.watchedCategories.categories; + data.selectedCategory = results.watchedCategories.selectedCategory; - results.unreadTopics.breadcrumbs = helpers.buildBreadcrumbs([{text: '[[unread:title]]'}]); - results.unreadTopics.title = '[[pages:unread]]'; - results.unreadTopics.filters = [{ + data.breadcrumbs = helpers.buildBreadcrumbs([{text: '[[unread:title]]'}]); + data.title = '[[pages:unread]]'; + data.filters = [{ name: '[[unread:all-topics]]', url: 'unread', selected: filter === '', @@ -77,16 +69,46 @@ unreadController.get = function(req, res, next) { filter: 'watched' }]; - results.unreadTopics.selectedFilter = results.unreadTopics.filters.filter(function(filter) { + data.selectedFilter = data.filters.filter(function(filter) { return filter && filter.selected; })[0]; - results.unreadTopics.querystring = req.query.cid ? ('?cid=' + req.query.cid) : ''; + data.querystring = req.query.cid ? ('?cid=' + req.query.cid) : ''; - res.render('unread', results.unreadTopics); + data.pageCount = Math.max(1, Math.ceil(data.topicCount / settings.topicsPerPage)); + data.pagination = pagination.create(page, data.pageCount, req.query); + + res.render('unread', data); }); }; +function getWatchedCategories(uid, selectedCid, callback) { + async.waterfall([ + function (next) { + user.getWatchedCategories(uid, next); + }, + function (cids, next) { + privileges.categories.filterCids('read', cids, uid, next); + }, + function (cids, next) { + categories.getCategoriesFields(cids, ['cid', 'name', 'slug', 'icon', 'link', 'color', 'bgColor'], next); + }, + function (categoryData, next) { + categoryData = categoryData.filter(function(category) { + return category && !category.link; + }); + var selectedCategory; + categoryData.forEach(function(category) { + category.selected = parseInt(category.cid, 10) === parseInt(selectedCid, 10); + if (category.selected) { + selectedCategory = category; + } + }); + next(null, {categories: categoryData, selectedCategory: selectedCategory}); + } + ], callback); +} + unreadController.unreadTotal = function(req, res, next) { var filter = req.params.filter || ''; diff --git a/src/socket.io/topics/unread.js b/src/socket.io/topics/unread.js index 056b80b041..4a6153b397 100644 --- a/src/socket.io/topics/unread.js +++ b/src/socket.io/topics/unread.js @@ -46,7 +46,7 @@ module.exports = function(SocketTopics) { }; SocketTopics.markCategoryTopicsRead = function(socket, cid, callback) { - topics.getUnreadTids(cid, socket.uid, 0, -1, function(err, tids) { + topics.getUnreadTids(cid, socket.uid, function(err, tids) { if (err) { return callback(err); } diff --git a/src/topics/unread.js b/src/topics/unread.js index ac2e6d63a3..9dcfd8bdd9 100644 --- a/src/topics/unread.js +++ b/src/topics/unread.js @@ -19,17 +19,13 @@ module.exports = function(Topics) { callback = filter; filter = ''; } - - Topics.getUnreadTids(0, uid, 0, 99, filter, function(err, tids) { - callback(err, tids ? tids.length : 0); + Topics.getUnreadTids(0, uid, filter, function(err, tids) { + callback(err, Array.isArray(tids) ? tids.length : 0); }); }; + Topics.getUnreadTopics = function(cid, uid, start, stop, filter, callback) { - if (!callback) { - callback = filter; - filter = ''; - } var unreadTopics = { showSelect: true, @@ -39,12 +35,21 @@ module.exports = function(Topics) { async.waterfall([ function(next) { - Topics.getUnreadTids(cid, uid, start, stop, filter, next); + Topics.getUnreadTids(cid, uid, filter, next); }, function(tids, next) { + unreadTopics.topicCount = tids.length; + if (!tids.length) { return next(null, []); } + + if (stop === -1) { + tids = tids.slice(start); + } else { + tids = tids.slice(start, stop + 1); + } + Topics.getTopicsByTids(tids, uid, next); }, function(topicData, next) { @@ -63,12 +68,7 @@ module.exports = function(Topics) { return Date.now() - (parseInt(meta.config.unreadCutoff, 10) || 2) * 86400000; }; - Topics.getUnreadTids = function(cid, uid, start, stop, filter, callback) { - if (!callback) { - callback = filter; - filter = ''; - } - + Topics.getUnreadTids = function(cid, uid, filter, callback) { uid = parseInt(uid, 10); if (uid === 0) { return callback(null, []); @@ -136,19 +136,9 @@ module.exports = function(Topics) { }, function (tids, next) { - tids = tids.slice(0, 100); + tids = tids.slice(0, 200); filterTopics(uid, tids, cid, ignoredCids, next); - }, - function (tids, next) { - - if (stop === -1) { - tids = tids.slice(start); - } else { - tids = tids.slice(start, stop + 1); - } - - next(null, tids); } ], callback); }; From cfe5c0db59e1cc3510f18af59ea5bf49f03ca509 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 13 May 2016 14:13:51 +0300 Subject: [PATCH 0236/1109] up themes --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a93f3c92f0..7c07c1fc88 100644 --- a/package.json +++ b/package.json @@ -57,8 +57,8 @@ "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", "nodebb-theme-lavender": "3.0.10", - "nodebb-theme-persona": "4.0.137", - "nodebb-theme-vanilla": "5.0.74", + "nodebb-theme-persona": "4.0.138", + "nodebb-theme-vanilla": "5.0.75", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", "nodemailer-sendmail-transport": "1.0.0", From 55677332935f797d6723f6fc4f849c447f3d3d7a Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Fri, 13 May 2016 09:02:24 -0400 Subject: [PATCH 0237/1109] Latest translations and fallbacks --- public/language/fr/error.json | 2 +- public/language/zh_TW/error.json | 6 +-- public/language/zh_TW/login.json | 12 ++--- public/language/zh_TW/modules.json | 16 +++---- public/language/zh_TW/pages.json | 14 +++--- public/language/zh_TW/user.json | 76 +++++++++++++++--------------- 6 files changed, 63 insertions(+), 63 deletions(-) diff --git a/public/language/fr/error.json b/public/language/fr/error.json index 5588e0a2f0..e19debf3ad 100644 --- a/public/language/fr/error.json +++ b/public/language/fr/error.json @@ -22,7 +22,7 @@ "no-email-to-confirm": "Ce forum requiert une vérification de votre adresse email. Veuillez cliquer ici pour entrer une adresse.", "email-confirm-failed": "Votre adresse email n'a pas pu être vérifiée. Veuillez ré-essayer plus tard.", "confirm-email-already-sent": "L'email de confirmation a déjà été envoyé. Veuillez attendre %1 minute(s) avant de redemander un nouvel envoi.", - "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", + "sendmail-not-found": "L'application d'envoi de mail est introuvable, assurez-vous qu'elle est installée et que l'utilisateur servant à démarrer NodeBB ait des droits suffisants.", "username-too-short": "Nom d'utilisateur trop court", "username-too-long": "Nom d'utilisateur trop long", "password-too-long": "Mot de passe trop long", diff --git a/public/language/zh_TW/error.json b/public/language/zh_TW/error.json index d0e206c62e..b9489254f9 100644 --- a/public/language/zh_TW/error.json +++ b/public/language/zh_TW/error.json @@ -19,7 +19,7 @@ "email-taken": "該信箱已被使用", "email-not-confirmed": "您的電郵尚未得到確認,請點擊此處確認您的電子郵件。", "email-not-confirmed-chat": "You are unable to chat until your email is confirmed, please click here to confirm your email.", - "no-email-to-confirm": "This forum requires email confirmation, please click here to enter an email", + "no-email-to-confirm": "討論區要求電子郵件確認,請點擊這裡輸入一個電子郵件。", "email-confirm-failed": "我們無法確認你的Email,請之後再重試。", "confirm-email-already-sent": "Confirmation email already sent, please wait %1 minute(s) to send another one.", "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", @@ -47,8 +47,8 @@ "too-many-posts-newbie": "As a new user, you can only post once every %1 second(s) until you have earned %2 reputation - please wait before posting again", "tag-too-short": "Please enter a longer tag. Tags should contain at least %1 character(s)", "tag-too-long": "Please enter a shorter tag. Tags can't be longer than %1 character(s)", - "not-enough-tags": "Not enough tags. Topics must have at least %1 tag(s)", - "too-many-tags": "Too many tags. Topics can't have more than %1 tag(s)", + "not-enough-tags": "標籤數量不足夠。主題需要至少 %1 標籤。", + "too-many-tags": "過多標籤數量。主題無法擁有超過 %1 個標籤。", "still-uploading": "請等待上傳完成。", "file-too-big": "Maximum allowed file size is %1 kB - please upload a smaller file", "guest-upload-disabled": "訪客上傳是被禁止的", diff --git a/public/language/zh_TW/login.json b/public/language/zh_TW/login.json index 0381db2d4b..de5b637a5e 100644 --- a/public/language/zh_TW/login.json +++ b/public/language/zh_TW/login.json @@ -1,11 +1,11 @@ { - "username-email": "用戶名稱 / 電子郵件", - "username": "用戶名稱", + "username-email": "帳號 / 電子郵件", + "username": "帳號", "email": "電子郵件", "remember_me": "記住我?", "forgot_password": "忘記密碼?", - "alternative_logins": "其他登錄方式", - "failed_login_attempt": "Login Unsuccessful", - "login_successful": "你已成功登錄!", - "dont_have_account": "還沒有賬號?" + "alternative_logins": "其他登入方式", + "failed_login_attempt": "登入失敗", + "login_successful": "你已成功登入!", + "dont_have_account": "還沒有帳號?" } \ No newline at end of file diff --git a/public/language/zh_TW/modules.json b/public/language/zh_TW/modules.json index 9c7d72d98d..2c54a62a1e 100644 --- a/public/language/zh_TW/modules.json +++ b/public/language/zh_TW/modules.json @@ -29,14 +29,14 @@ "composer.submit_and_lock": "提交然後鎖定", "composer.toggle_dropdown": "切換下拉選單", "composer.uploading": "上傳中 %1", - "composer.formatting.bold": "Bold", - "composer.formatting.italic": "Italic", - "composer.formatting.list": "List", - "composer.formatting.strikethrough": "Strikethrough", - "composer.formatting.link": "Link", - "composer.formatting.picture": "Picture", - "composer.upload-picture": "Upload Image", - "composer.upload-file": "Upload File", + "composer.formatting.bold": "粗體", + "composer.formatting.italic": "斜體", + "composer.formatting.list": "列表項目", + "composer.formatting.strikethrough": "刪除線", + "composer.formatting.link": "連結", + "composer.formatting.picture": "圖片", + "composer.upload-picture": "上傳圖片", + "composer.upload-file": "上傳檔案", "bootbox.ok": "好", "bootbox.cancel": "取消", "bootbox.confirm": "確認", diff --git a/public/language/zh_TW/pages.json b/public/language/zh_TW/pages.json index 431b71a11d..90f561fb98 100644 --- a/public/language/zh_TW/pages.json +++ b/public/language/zh_TW/pages.json @@ -9,25 +9,25 @@ "flagged-posts": "標記的張貼", "users/online": "線上用戶", "users/latest": "最近用戶", - "users/sort-posts": "Users with the most posts", - "users/sort-reputation": "Users with the most reputation", + "users/sort-posts": "最多張貼的使用者", + "users/sort-reputation": "最多聲譽的使用者", "users/banned": "已封鎖用戶", "users/search": "用戶搜尋", "notifications": "新訊息通知", "tags": "標籤", - "tag": "Topics tagged under \"%1\"", + "tag": "有\"%1\"標籤的主題", "register": "註冊帳號", "login": "登入帳號", - "reset": "Reset your account password", + "reset": "重設你的帳號密碼", "categories": "類別", "groups": "群組", "group": "%1 群組", "chats": "聊天", "chat": "與 %1 聊天", "account/edit": "編輯 \"%1\"", - "account/edit/password": "Editing password of \"%1\"", - "account/edit/username": "Editing username of \"%1\"", - "account/edit/email": "Editing email of \"%1\"", + "account/edit/password": "編輯\"%1\"的密碼", + "account/edit/username": "編輯\"%1\"的帳號", + "account/edit/email": "編輯\"%1\"的電子郵件", "account/following": "People %1 follows", "account/followers": "People who follow %1", "account/posts": "Posts made by %1", diff --git a/public/language/zh_TW/user.json b/public/language/zh_TW/user.json index 1228565dff..d7011b0d6a 100644 --- a/public/language/zh_TW/user.json +++ b/public/language/zh_TW/user.json @@ -6,13 +6,13 @@ "postcount": "文章數量", "email": "電子郵件", "confirm_email": "確認電郵", - "ban_account": "Ban Account", - "ban_account_confirm": "Do you really want to ban this user?", - "unban_account": "Unban Account", + "ban_account": "禁用帳號", + "ban_account_confirm": "你確定要禁用這個使用者?", + "unban_account": "取消禁用帳號", "delete_account": "刪除帳戶", "delete_account_confirm": "你確定要刪除自己的帳戶?
      此操作不能復原,您將無法恢復任何數據

      輸入您的使用者名稱,以確認您希望刪除這個帳戶。", "delete_this_account_confirm": "Are you sure you want to delete this account?
      This action is irreversible and you will not be able to recover any data

      ", - "account-deleted": "Account deleted", + "account-deleted": "帳號已刪除", "fullname": "全名", "website": "網站", "location": "地址", @@ -22,25 +22,25 @@ "profile": "個人資料", "profile_views": "資料被查看", "reputation": "聲譽", - "favourites": "Bookmarks", + "favourites": "書籤", "watched": "觀看者", "followers": "跟隨者", "following": "正在關注", - "aboutme": "About me", + "aboutme": "關於我", "signature": "簽名", "birthday": "生日", "chat": "聊天", - "chat_with": "Chat with %1", + "chat_with": "與 %1 聊天", "follow": "跟隨", "unfollow": "取消跟隨", "more": "更多", "profile_update_success": "您的個人資料已更新成功!", "change_picture": "改變頭像", - "change_username": "Change Username", - "change_email": "Change Email", + "change_username": "更改帳號", + "change_email": "更改電子郵件", "edit": "編輯", - "edit-profile": "Edit Profile", - "default_picture": "Default Icon", + "edit-profile": "編輯個人資料", + "default_picture": "預設圖示", "uploaded_picture": "已有頭像", "upload_new_picture": "上傳新頭像", "upload_new_picture_from_url": "上傳新頭像(URL)", @@ -55,12 +55,12 @@ "confirm_password": "確認密碼", "password": "密碼", "username_taken_workaround": "您所註冊的使用者名稱已經被使用了,所以我們將它略微改變。你現在改稱 %1", - "password_same_as_username": "Your password is the same as your username, please select another password.", - "password_same_as_email": "Your password is the same as your email, please select another password.", + "password_same_as_username": "你的密碼和帳號是一樣的,請選擇另一組密碼。", + "password_same_as_email": "你的密碼和電子郵件是一樣的,請選擇另一組密碼。", "upload_picture": "上傳頭像", "upload_a_picture": "上傳一張照片", - "remove_uploaded_picture": "Remove Uploaded Picture", - "upload_cover_picture": "Upload cover picture", + "remove_uploaded_picture": "移除上傳的圖片", + "upload_cover_picture": "上傳封面圖片", "settings": "設定", "show_email": "顯示我的郵箱", "show_fullname": "顯示我的全名", @@ -73,39 +73,39 @@ "digest_monthly": "每月", "send_chat_notifications": "如果有新的聊天消息而我不在線,發送郵件給我", "send_post_notifications": "Send an email when replies are made to topics I am subscribed to", - "settings-require-reload": "Some setting changes require a reload. Click here to reload the page.", + "settings-require-reload": "有些設定的更動是需要重新整理。點擊這裡來重新整理頁面。", "has_no_follower": "該用戶還沒有被任何人關注。", "follows_no_one": "該用戶還沒有關注過任何人。", - "has_no_posts": "This user hasn't posted anything yet.", - "has_no_topics": "This user hasn't posted any topics yet.", - "has_no_watched_topics": "This user hasn't watched any topics yet.", - "has_no_upvoted_posts": "This user hasn't upvoted any posts yet.", - "has_no_downvoted_posts": "This user hasn't downvoted any posts yet.", - "has_no_voted_posts": "This user has no voted posts", + "has_no_posts": "使用者還沒有發表任何張貼", + "has_no_topics": "使用者還沒有發表任何主題", + "has_no_watched_topics": "使用者還沒有觀看任何主題", + "has_no_upvoted_posts": "使用者還沒有對任何主題投正向票", + "has_no_downvoted_posts": "使用者還沒有對任何主題投負向票", + "has_no_voted_posts": "這個使用者沒有投票的張貼", "email_hidden": "郵箱被隱藏", "hidden": "隱藏", - "paginate_description": "Paginate topics and posts instead of using infinite scroll", + "paginate_description": "將主題與張貼用分頁來顯示,取代使用無盡的捲動方式。", "topics_per_page": "每頁的主題數", "posts_per_page": "每頁的文章數", - "notification_sounds": "Play a sound when you receive a notification", + "notification_sounds": "當你接收到通知時撥放音效", "browsing": "瀏覽設定", - "open_links_in_new_tab": "Open outgoing links in new tab", - "enable_topic_searching": "Enable In-Topic Searching", + "open_links_in_new_tab": "在新的資料標籤裡打開外部的連結", + "enable_topic_searching": "啟用在主題中的搜尋", "topic_search_help": "If enabled, in-topic searching will override the browser's default page search behaviour and allow you to search through the entire topic, instead of what is only shown on screen", - "delay_image_loading": "Delay Image Loading", + "delay_image_loading": "延遲圖片載入", "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", - "scroll_to_my_post": "After posting a reply, show the new post", - "follow_topics_you_reply_to": "Follow topics that you reply to", - "follow_topics_you_create": "Follow topics you create", - "grouptitle": "Group Title", + "scroll_to_my_post": "在張貼回覆後,顯示新的張貼", + "follow_topics_you_reply_to": "跟隨你回覆的主題", + "follow_topics_you_create": "跟隨你建立的主題", + "grouptitle": "群組標題", "no-group-title": "無此群組標題", - "select-skin": "Select a Skin", - "select-homepage": "Select a Homepage", - "homepage": "Homepage", + "select-skin": "選擇外觀", + "select-homepage": "選擇首頁", + "homepage": "首頁", "homepage_description": "Select a page to use as the forum homepage or 'None' to use the default homepage.", - "custom_route": "Custom Homepage Route", + "custom_route": "自訂首頁路由", "custom_route_help": "Enter a route name here, without any preceding slash (e.g. \"recent\", or \"popular\")", - "sso.title": "Single Sign-on Services", - "sso.associated": "Associated with", - "sso.not-associated": "Click here to associate with" + "sso.title": "單一簽入(SSO)服務", + "sso.associated": "關連於", + "sso.not-associated": "點擊這裡進行關連於" } \ No newline at end of file From 6c09d3ca5f0bbcdbd62c7436f9614e53d38302df Mon Sep 17 00:00:00 2001 From: pichalite Date: Fri, 13 May 2016 09:40:42 -0700 Subject: [PATCH 0238/1109] fixes #4636 (#4639) --- src/privileges/topics.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/privileges/topics.js b/src/privileges/topics.js index 8bb1f313c2..8a02800544 100644 --- a/src/privileges/topics.js +++ b/src/privileges/topics.js @@ -23,7 +23,7 @@ module.exports = function(privileges) { 'topics:reply': async.apply(helpers.isUserAllowedTo, 'topics:reply', uid, [topic.cid]), read: async.apply(helpers.isUserAllowedTo, 'read', uid, [topic.cid]), isOwner: function(next) { - next(null, parseInt(uid, 10) === parseInt(topic.uid, 10)); + next(null, !!parseInt(uid, 10) && parseInt(uid, 10) === parseInt(topic.uid, 10)); }, isAdministrator: async.apply(user.isAdministrator, uid), isModerator: async.apply(user.isModerator, uid, topic.cid), From b2552cb5e0983b39de117403a0a2ec2c9468e1de Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Sat, 14 May 2016 09:02:57 -0400 Subject: [PATCH 0239/1109] Latest translations and fallbacks --- public/language/es/error.json | 2 +- public/language/es/global.json | 2 +- public/language/es/login.json | 4 +-- public/language/es/modules.json | 16 +++++----- public/language/es/recent.json | 4 +-- public/language/gl/email.json | 2 +- public/language/gl/error.json | 14 ++++----- public/language/gl/global.json | 8 ++--- public/language/gl/groups.json | 4 +-- public/language/gl/login.json | 2 +- public/language/gl/modules.json | 18 +++++------ public/language/gl/notifications.json | 8 ++--- public/language/gl/pages.json | 4 +-- public/language/gl/topic.json | 8 ++--- public/language/gl/unread.json | 6 ++-- public/language/gl/uploads.json | 8 ++--- public/language/gl/user.json | 16 +++++----- public/language/zh_TW/error.json | 40 ++++++++++++------------ public/language/zh_TW/notifications.json | 34 ++++++++++---------- public/language/zh_TW/pages.json | 20 ++++++------ public/language/zh_TW/user.json | 10 +++--- 21 files changed, 115 insertions(+), 115 deletions(-) diff --git a/public/language/es/error.json b/public/language/es/error.json index 5f1db4a740..eb6a1097a8 100644 --- a/public/language/es/error.json +++ b/public/language/es/error.json @@ -22,7 +22,7 @@ "no-email-to-confirm": "Este foro requiere confirmación de su email, por favor pulse aquí para introducir un email", "email-confirm-failed": "No se ha podido confirmar su email, por favor inténtelo de nuevo más tarde.", "confirm-email-already-sent": "El email de confirmación ya ha sido enviado, por favor espera %1 minuto(s) para enviar otro.", - "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", + "sendmail-not-found": "El ejecutable \"sendmail\" no ha sido encontrado, por favor asegúrate de que esta instalado en tu sistema y es accesible por el usuario que ejecuta NodeBB. ", "username-too-short": "Nombre de usuario es demasiado corto", "username-too-long": "Nombre de usuario demasiado largo", "password-too-long": "Contraseña muy corta", diff --git a/public/language/es/global.json b/public/language/es/global.json index d81c10ca88..f962a4fa80 100644 --- a/public/language/es/global.json +++ b/public/language/es/global.json @@ -36,7 +36,7 @@ "header.navigation": "Navegación", "notifications.loading": "Cargando notificaciones", "chats.loading": "Cargando chats", - "motd.welcome": "Bienvenido a NodeBB, la plataforma de debate del el futuro.", + "motd.welcome": "Bienvenido a NodeBB, la plataforma de debate del futuro.", "previouspage": "Página anterior", "nextpage": "Página siguiente", "alert.success": "¡Éxito!", diff --git a/public/language/es/login.json b/public/language/es/login.json index b3c5427cf2..d6e357016e 100644 --- a/public/language/es/login.json +++ b/public/language/es/login.json @@ -4,8 +4,8 @@ "email": "Correo Electrónico", "remember_me": "¿Recordarme?", "forgot_password": "¿Olvidaste tu contraseña?", - "alternative_logins": "Métodos alternativos", - "failed_login_attempt": "Login Unsuccessful", + "alternative_logins": "Accesos alternativos", + "failed_login_attempt": "Error al iniciar sesión", "login_successful": "¡Identificado satisfactoriamente!", "dont_have_account": "¿Aún no tienes cuenta?" } \ No newline at end of file diff --git a/public/language/es/modules.json b/public/language/es/modules.json index 5313f0735a..87cc59c2fb 100644 --- a/public/language/es/modules.json +++ b/public/language/es/modules.json @@ -29,14 +29,14 @@ "composer.submit_and_lock": "Enviar y Bloquear", "composer.toggle_dropdown": "Alternar desplegable", "composer.uploading": "Subiendo %1", - "composer.formatting.bold": "Bold", - "composer.formatting.italic": "Italic", - "composer.formatting.list": "List", - "composer.formatting.strikethrough": "Strikethrough", - "composer.formatting.link": "Link", - "composer.formatting.picture": "Picture", - "composer.upload-picture": "Upload Image", - "composer.upload-file": "Upload File", + "composer.formatting.bold": "Negrita", + "composer.formatting.italic": "Itálica", + "composer.formatting.list": "Lista", + "composer.formatting.strikethrough": "Tachado", + "composer.formatting.link": "Enlace", + "composer.formatting.picture": "Foto", + "composer.upload-picture": "Subir foto", + "composer.upload-file": "Subir archivo", "bootbox.ok": "OK", "bootbox.cancel": "Cancelar", "bootbox.confirm": "Confirmar", diff --git a/public/language/es/recent.json b/public/language/es/recent.json index fbfb6238c0..8c959ca0d5 100644 --- a/public/language/es/recent.json +++ b/public/language/es/recent.json @@ -6,7 +6,7 @@ "year": "Año", "alltime": "Siempre", "no_recent_topics": "No hay publicaciones recientes.", - "no_popular_topics": "No hay tópicos populares", + "no_popular_topics": "No hay publicaciones populares", "there-is-a-new-topic": "Hay una nueva publicación.", "there-is-a-new-topic-and-a-new-post": "hay una nueva publicación y un nuevo mensaje.", "there-is-a-new-topic-and-new-posts": "Hay una nueva publicación y %1 nuevos mensajes.", @@ -15,5 +15,5 @@ "there-are-new-topics-and-new-posts": "Hay %1 nuevas publicaciones y %2 nuevos mensajes.", "there-is-a-new-post": "Hay un nuevo mensaje.", "there-are-new-posts": "Hay %1 nuevos mensajes.", - "click-here-to-reload": "Cliquea aquí para recargar." + "click-here-to-reload": "Click para recargar." } \ No newline at end of file diff --git a/public/language/gl/email.json b/public/language/gl/email.json index 6f0be26023..9d13746d08 100644 --- a/public/language/gl/email.json +++ b/public/language/gl/email.json @@ -24,7 +24,7 @@ "digest.day": "día", "digest.week": "semana", "digest.month": "mes", - "digest.subject": "Digest for %1", + "digest.subject": "Resumo de 1%", "notif.chat.subject": "Nova charla recibida de %1", "notif.chat.cta": "Pica aquí para continuar a conversación", "notif.chat.unsub.info": "Esta notificación de charla foiche enviada polas túas opcións de subscrición.", diff --git a/public/language/gl/error.json b/public/language/gl/error.json index f5b4235c3d..1fd85fdab3 100644 --- a/public/language/gl/error.json +++ b/public/language/gl/error.json @@ -22,13 +22,13 @@ "no-email-to-confirm": "Este foro require confirmación de correo, por favor pica aquí para introducir un correo.", "email-confirm-failed": "Non podemos confirmar o teu correo, por favor téntao de novo máis tarde.", "confirm-email-already-sent": "O correo de confirmación foi enviado, agarda %1 minute(s) para enviar outro.", - "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", + "sendmail-not-found": "Non se atopa o executable \"sendmail\", por favor, asegúrate de que está instalado no teu sistema e que é accesible polo usuario que executa NodeBB. ", "username-too-short": "Nome de usuario demasiado curto", "username-too-long": "Nome de usuario demasiado longo.", "password-too-long": "Contrasinal moi longa", "user-banned": "Usuario expulsado", "user-too-new": "Desculpa, agarda %1 second(s) antes de facer a túa primeira publicación.", - "blacklisted-ip": "Sorry, your IP address has been banned from this community. If you feel this is in error, please contact an administrator.", + "blacklisted-ip": "Sentímolo, o teu enderezo IP foi baneado desta comunidade. Se crees que se debe a un erro, por favor, contacte cun administrador.", "no-category": "A categoría non existe", "no-topic": "O tema non existe", "no-post": "A publicación non existe", @@ -52,8 +52,8 @@ "still-uploading": "Por favor, agarda a que remate a subida.", "file-too-big": "O tamaño máximo permitido é %1 kB - por favor, sube un arquivo máis pequeno", "guest-upload-disabled": "As subidas están deshabilitadas para os convidados", - "already-favourited": "You have already bookmarked this post", - "already-unfavourited": "You have already unbookmarked this post", + "already-favourited": "Xa gardaras esta publicación.", + "already-unfavourited": "Xa desgardaras esta publicación.", "cant-ban-other-admins": "Non podes botar outros administradores!", "cant-remove-last-admin": "Eres o único administrador. Engade outros administradores antes de quitarte a ti mesmo como administrador.", "invalid-image-type": "Tipo de imaxe inválida. Tipos admitidos: %1", @@ -86,7 +86,7 @@ "cant-edit-chat-message": "Non tes permitido editar esta mensaxe.", "cant-remove-last-user": "Non podes quitar o último usuario", "cant-delete-chat-message": "Non tes permitido borrar esta mensaxe.", - "already-voting-for-this-post": "You have already voted for this post.", + "already-voting-for-this-post": "Xa votache esta mensaxe.", "reputation-system-disabled": "O sistema de reputación está deshabilitado", "downvoting-disabled": "Os votos negativos están deshabilitados", "not-enough-reputation-to-downvote": "Non tes reputación dabonda para esta acción", @@ -100,6 +100,6 @@ "invite-maximum-met": "Convidaches á cantidade máxima de persoas (%1 de %2).", "no-session-found": "Non se atopa ningún inicio de sesión!", "not-in-room": "O usuario non se encontra nesta sala", - "no-users-in-room": "No users in this room", - "cant-kick-self": "You can't kick yourself from the group" + "no-users-in-room": "Non hai usuarios nesta sala", + "cant-kick-self": "Non te podes expulsar a ti mesmo do grupo" } \ No newline at end of file diff --git a/public/language/gl/global.json b/public/language/gl/global.json index 6ff44536a7..f2398c524c 100644 --- a/public/language/gl/global.json +++ b/public/language/gl/global.json @@ -87,8 +87,8 @@ "map": "Mapa", "sessions": "Inicios de sesión", "ip_address": "Enderezo IP", - "enter_page_number": "Enter page number", - "upload_file": "Upload file", - "upload": "Upload", - "allowed-file-types": "Allowed file types are %1" + "enter_page_number": "Escribe o número da páxina", + "upload_file": "Subir arquivo ", + "upload": "Subir", + "allowed-file-types": "Os tipos de arquivos permitidos son: %1" } \ No newline at end of file diff --git a/public/language/gl/groups.json b/public/language/gl/groups.json index d9b33b659d..f0f16871e4 100644 --- a/public/language/gl/groups.json +++ b/public/language/gl/groups.json @@ -41,7 +41,7 @@ "details.hidden": "Oculto", "details.hidden_help": "Se está habilitado, este grupo non se poderá atopar na listaxe de grupos e os usuarios deberán ser convidados manualmente.", "details.delete_group": "Eliminar Grupo", - "details.private_system_help": "Private groups is disabled at system level, this option does not do anything", + "details.private_system_help": "Os grupos privados están desactivados ao nivel do sistema, esta opción non trocará nada.", "event.updated": "Os detalles do grupo foron actualizados", "event.deleted": "O grupo \"%1\" foi borrado.", "membership.accept-invitation": "Aceptar ", @@ -50,5 +50,5 @@ "membership.leave-group": "Marchar do grupo", "membership.reject": "Rexeitar", "new-group.group_name": "Nome do grupo:", - "upload-group-cover": "Upload group cover" + "upload-group-cover": "Cargar foto para o grupo" } \ No newline at end of file diff --git a/public/language/gl/login.json b/public/language/gl/login.json index 04e5fc39ed..d2fc82f95b 100644 --- a/public/language/gl/login.json +++ b/public/language/gl/login.json @@ -5,7 +5,7 @@ "remember_me": "Lembrarme?", "forgot_password": "Esqueciches o teu contrasinal?", "alternative_logins": "Métodos alternativos", - "failed_login_attempt": "Login Unsuccessful", + "failed_login_attempt": "Erro ao iniciar sesión", "login_successful": "Sesión iniciada con éxito!", "dont_have_account": "Aínda non tes conta?" } \ No newline at end of file diff --git a/public/language/gl/modules.json b/public/language/gl/modules.json index 762fad15a2..d097d97686 100644 --- a/public/language/gl/modules.json +++ b/public/language/gl/modules.json @@ -6,7 +6,7 @@ "chat.user_typing": "%1 está a escribir...", "chat.user_has_messaged_you": "%1 enviouche unha mensaxe.", "chat.see_all": "Ver tódalas chamadas", - "chat.mark_all_read": "Mark all chats read", + "chat.mark_all_read": "Marcar tódolos chats como lidos ", "chat.no-messages": "Por favor, seleccione un destinatario para ver o historial das mensaxes ", "chat.no-users-in-room": "Non hai usuarios nesta sala", "chat.recent-chats": "Charlas Recentes", @@ -29,14 +29,14 @@ "composer.submit_and_lock": "Enviar e bloquear", "composer.toggle_dropdown": "Alternar despregable", "composer.uploading": "Subindo %1", - "composer.formatting.bold": "Bold", - "composer.formatting.italic": "Italic", - "composer.formatting.list": "List", - "composer.formatting.strikethrough": "Strikethrough", - "composer.formatting.link": "Link", - "composer.formatting.picture": "Picture", - "composer.upload-picture": "Upload Image", - "composer.upload-file": "Upload File", + "composer.formatting.bold": "Negriña", + "composer.formatting.italic": "Itálica", + "composer.formatting.list": "Lista", + "composer.formatting.strikethrough": "Tachado", + "composer.formatting.link": "Ligazón", + "composer.formatting.picture": "Foto", + "composer.upload-picture": "Subir foto", + "composer.upload-file": "Subir arquivo", "bootbox.ok": "De acordo", "bootbox.cancel": "Cancelar", "bootbox.confirm": "Confirmar", diff --git a/public/language/gl/notifications.json b/public/language/gl/notifications.json index 2796d782a0..c13bca0593 100644 --- a/public/language/gl/notifications.json +++ b/public/language/gl/notifications.json @@ -16,9 +16,9 @@ "upvoted_your_post_in_multiple": "%1 e %2 máis votaron positivamente a túa mensaxe en %3.", "moved_your_post": "%1 moveu a túa publicación a%2", "moved_your_topic": "%1 foi movido %2", - "favourited_your_post_in": "%1 has bookmarked your post in %2.", - "favourited_your_post_in_dual": "%1 and %2 have bookmarked your post in %3.", - "favourited_your_post_in_multiple": "%1 and %2 others have bookmarked your post in %3.", + "favourited_your_post_in": "%1 gardouse a súa publicación en%2.", + "favourited_your_post_in_dual": "%1 y %2 gardaron a súa publicación en%3.", + "favourited_your_post_in_multiple": "%1 e outros %2 usuarios gardaron a súa publicación en %3.", "user_flagged_post_in": "%1 reportou unha mensaxe en %2", "user_flagged_post_in_dual": "%1 e %2 reportaron a túa mensaxe en %3", "user_flagged_post_in_multiple": "%1 e outras %2 persoas reportaron unha mensaxe en %3", @@ -30,7 +30,7 @@ "user_started_following_you_dual": "%1 e %2 comezaron a seguirte.", "user_started_following_you_multiple": "%1 e %2 máis comezaron a seguirte.", "new_register": "%1 enviou unha petición de rexistro.", - "new_register_multiple": "There are %1 registration requests awaiting review.", + "new_register_multiple": "Hai %1 peticións de rexistros pendentes de revisión", "email-confirmed": "Correo confirmado", "email-confirmed-message": "Grazas por validar o teu correo. A túa conta agora está activada.", "email-confirm-error-message": "Houbo un problema validando o teu correo. Poida que o código fose inválido ou expirase. ", diff --git a/public/language/gl/pages.json b/public/language/gl/pages.json index b0a97d55cd..1e79b68418 100644 --- a/public/language/gl/pages.json +++ b/public/language/gl/pages.json @@ -33,13 +33,13 @@ "account/posts": "Publicación de %1", "account/topics": "Temas de %1", "account/groups": "%1's Grupos", - "account/favourites": "%1's Bookmarked Posts", + "account/favourites": "Publicacións favoritas de %1 ", "account/settings": "Opcións de Usuario", "account/watched": "Temas vistos por %1", "account/upvoted": "Mensaxes votadas positivamente por %1", "account/downvoted": "Mensaxes votadas negativamente por %1", "account/best": "Mellores mensaxes escritas por %1", - "confirm": "Email Confirmed", + "confirm": "Enderezo electrónico confirmado", "maintenance.text": "%1 está baixo mantemento. Por favor, volve máis tarde.", "maintenance.messageIntro": "A máis, o administrador deixou esta mensaxe: ", "throttled.text": "&1 non está dispoñible debido a unha carga excesiva. Por favor, volva noutro momento" diff --git a/public/language/gl/topic.json b/public/language/gl/topic.json index 0e92d43b08..c1771dd834 100644 --- a/public/language/gl/topic.json +++ b/public/language/gl/topic.json @@ -26,7 +26,7 @@ "tools": "Ferramentas", "flag": "Reportar", "locked": "Pechado", - "bookmark_instructions": "Click here to return to the last read post in this thread.", + "bookmark_instructions": "Pica aquí para volver á última mensaxe lida neste tema ", "flag_title": "Reportar esta mensaxe", "flag_success": "Esta mensaxe foi reportada para moderación.", "deleted_message": "Este tema foi borrado. Só os usuarios con privilexios administrativos poden velo.", @@ -65,9 +65,9 @@ "disabled_categories_note": "As categorías deshabilitadas están en gris", "confirm_move": "Mover", "confirm_fork": "Dividir", - "favourite": "Bookmark", - "favourites": "Bookmarks", - "favourites.has_no_favourites": "You haven't bookmarked any posts yet.", + "favourite": "Marcador", + "favourites": "Marcadores", + "favourites.has_no_favourites": "Aínda non marcache ningún tema. ", "loading_more_posts": "Cargando máis publicacións", "move_topic": "Mover Tema", "move_topics": "Mover Temas", diff --git a/public/language/gl/unread.json b/public/language/gl/unread.json index 5581208821..bb0975ec26 100644 --- a/public/language/gl/unread.json +++ b/public/language/gl/unread.json @@ -7,7 +7,7 @@ "all": "Todos", "all_categories": "Tódalas categorías", "topics_marked_as_read.success": "Temas marcados como lidos", - "all-topics": "All Topics", - "new-topics": "New Topics", - "watched-topics": "Watched Topics" + "all-topics": "Tódolos Temas", + "new-topics": "Temas Novos", + "watched-topics": "Temas Suscritos" } \ No newline at end of file diff --git a/public/language/gl/uploads.json b/public/language/gl/uploads.json index 1622cb5693..223d022e87 100644 --- a/public/language/gl/uploads.json +++ b/public/language/gl/uploads.json @@ -1,6 +1,6 @@ { - "uploading-file": "Uploading the file...", - "select-file-to-upload": "Select a file to upload!", - "upload-success": "File uploaded successfully!", - "maximum-file-size": "Maximum %1 kb" + "uploading-file": "Subindo o arquivo...", + "select-file-to-upload": "Selecciona un arquivo para subir!", + "upload-success": "Arquivo subido correctamente!", + "maximum-file-size": "Máximo %1 kb" } \ No newline at end of file diff --git a/public/language/gl/user.json b/public/language/gl/user.json index ce8498bb1a..59e0d1a9c6 100644 --- a/public/language/gl/user.json +++ b/public/language/gl/user.json @@ -22,7 +22,7 @@ "profile": "Perfil", "profile_views": "Visitas ao perfil:", "reputation": "Reputación", - "favourites": "Bookmarks", + "favourites": "Marcadores", "watched": "Visto", "followers": "Seguidores", "following": "Seguindo", @@ -39,7 +39,7 @@ "change_username": "Cambia-lo nome de usuario", "change_email": "Cambia-lo correo", "edit": "Editar", - "edit-profile": "Edit Profile", + "edit-profile": "Editar Perfil", "default_picture": "Icona por defecto.", "uploaded_picture": "Foto subida", "upload_new_picture": "Subir unha nova foto", @@ -56,11 +56,11 @@ "password": "Contrasinal", "username_taken_workaround": "Ese nome de usuario xa estaba collido, así que o modificamos lixeiramente. Agora o teu nome é %1 ", "password_same_as_username": "O teu contrasinal e o teu nome de usuario son os mesmos, por favor, escolle outro contrasinal.", - "password_same_as_email": "Your password is the same as your email, please select another password.", + "password_same_as_email": "O teu contrasinal é igual que o teu enderezo electrónico, por favor, escolle outro contrasinal.", "upload_picture": "Subir foto", "upload_a_picture": "Subir unha foto", "remove_uploaded_picture": "Borrar unha foto subida", - "upload_cover_picture": "Upload cover picture", + "upload_cover_picture": "Subir imaxen de portada", "settings": "Opcións", "show_email": "Amosa-lo meu Email", "show_fullname": "Amosa-lo meu Nome Completo", @@ -92,12 +92,12 @@ "open_links_in_new_tab": "Abrir ligazóns externos nunca nova pestaña", "enable_topic_searching": "Permitir buscar dentro dun tema", "topic_search_help": "Se se activa, o buscador do NodeBB superporase ao propio do navegador dentro de cada tema, permitindo buscar en todo o tema e non só naquilo que se presenta na pantalla.", - "delay_image_loading": "Delay Image Loading", - "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", - "scroll_to_my_post": "After posting a reply, show the new post", + "delay_image_loading": "Retrasar a carga de imaxes", + "image_load_delay_help": "Se se habilita, as imaxes non cargarán hasta que sexan visibles na pantalla", + "scroll_to_my_post": "Logo de enviar unha resposta, mostrar a nova mensaxe", "follow_topics_you_reply_to": "Segui-los temas nos que respostas", "follow_topics_you_create": "Segui-los temas que ti fas", - "grouptitle": "Group Title", + "grouptitle": "Título do Grupo", "no-group-title": "Sen titulo de grupo", "select-skin": "Seleccionar apariencia", "select-homepage": "Escolla unha páxina de inicio", diff --git a/public/language/zh_TW/error.json b/public/language/zh_TW/error.json index b9489254f9..efbbce6214 100644 --- a/public/language/zh_TW/error.json +++ b/public/language/zh_TW/error.json @@ -18,17 +18,17 @@ "username-taken": "該使用者名稱已被使用", "email-taken": "該信箱已被使用", "email-not-confirmed": "您的電郵尚未得到確認,請點擊此處確認您的電子郵件。", - "email-not-confirmed-chat": "You are unable to chat until your email is confirmed, please click here to confirm your email.", + "email-not-confirmed-chat": "你需要先確認電子郵件後才能進行聊天,請點擊這裡來確認你的電子郵件。", "no-email-to-confirm": "討論區要求電子郵件確認,請點擊這裡輸入一個電子郵件。", "email-confirm-failed": "我們無法確認你的Email,請之後再重試。", - "confirm-email-already-sent": "Confirmation email already sent, please wait %1 minute(s) to send another one.", - "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", + "confirm-email-already-sent": "確認電子郵件已經寄送,請等待 %1 分鐘才能再寄送另一封。", + "sendmail-not-found": "沒有找到sendmail可執行程序,請確認它是不是已經被安裝與可讓執行NodeBB的使用者執行的", "username-too-short": "帳號太短", "username-too-long": "帳號太長", "password-too-long": "密碼太長", "user-banned": "該使用者已被停用", "user-too-new": "抱歉,發表您第一篇文章須要等待 %1 秒", - "blacklisted-ip": "Sorry, your IP address has been banned from this community. If you feel this is in error, please contact an administrator.", + "blacklisted-ip": "抱歉,你的IP位置已經被這個社群禁用了。如果你覺得這是一個失誤,請連絡管理員。", "no-category": "類別並不存在", "no-topic": "主題並不存在", "no-post": "文章並不存在", @@ -38,24 +38,24 @@ "no-privileges": "您似乎沒有執行這個行為的權限!", "category-disabled": "該類別已被關閉", "topic-locked": "該主題已被鎖定", - "post-edit-duration-expired": "You are only allowed to edit posts for %1 second(s) after posting", - "content-too-short": "Please enter a longer post. Posts should contain at least %1 character(s).", - "content-too-long": "Please enter a shorter post. Posts can't be longer than %1 character(s).", - "title-too-short": "Please enter a longer title. Titles should contain at least %1 character(s).", - "title-too-long": "Please enter a shorter title. Titles can't be longer than %1 character(s).", - "too-many-posts": "You can only post once every %1 second(s) - please wait before posting again", - "too-many-posts-newbie": "As a new user, you can only post once every %1 second(s) until you have earned %2 reputation - please wait before posting again", - "tag-too-short": "Please enter a longer tag. Tags should contain at least %1 character(s)", - "tag-too-long": "Please enter a shorter tag. Tags can't be longer than %1 character(s)", + "post-edit-duration-expired": "在張貼 %1 秒後,你才能編輯張貼文章", + "content-too-short": "請輸入一個長一點的張貼內容。張貼內容長度不能少於 %1 字元。", + "content-too-long": "請輸入一個短一點的張貼內容。張貼內容長度不能超過 %1 字元。", + "title-too-short": "請輸入一個長一點的標題。標題長度不能少於 %1 字元。", + "title-too-long": "請輸入一個短一點的標題。標題長度不能超過 %1 字元。", + "too-many-posts": "在張貼 %1 秒後,你才能再張貼文章 - 請在重新張貼前等待這個時間。", + "too-many-posts-newbie": "新使用者需要直到獲得 %2 聲譽後,才能在每 %1 秒後進行張貼一篇文章 - 請在重新張貼前等待這個時間。", + "tag-too-short": "請輸入一個長一點的標籤。標籤長度不能少於 %1 字元。", + "tag-too-long": "請輸入一個短一點的標籤。標籤長度不能超過 %1 字元。", "not-enough-tags": "標籤數量不足夠。主題需要至少 %1 標籤。", "too-many-tags": "過多標籤數量。主題無法擁有超過 %1 個標籤。", "still-uploading": "請等待上傳完成。", - "file-too-big": "Maximum allowed file size is %1 kB - please upload a smaller file", + "file-too-big": "最大允許的檔案大小是 %1 kB - 請上傳一個小於這個數值的檔案。", "guest-upload-disabled": "訪客上傳是被禁止的", "already-favourited": "你已經將這篇張貼加入書籤", "already-unfavourited": "你已經將這篇張貼移除書籤", "cant-ban-other-admins": "您無法禁止其他的管理員!", - "cant-remove-last-admin": "You are the only administrator. Add another user as an administrator before removing yourself as admin", + "cant-remove-last-admin": "你是唯一的管理員。在你移除自己為管理員前,需要新增另一個使用者為管理員。", "invalid-image-type": "無效的圖像類型。允許的類型:%1", "invalid-image-extension": "無效的圖像擴充元件", "invalid-file-type": "無效的檔案類型。允許的類型:%1", @@ -71,16 +71,16 @@ "post-already-restored": "此文章已還原", "topic-already-deleted": "此主題已經被刪除", "topic-already-restored": "此主題已還原", - "cant-purge-main-post": "You can't purge the main post, please delete the topic instead", + "cant-purge-main-post": "你無法清除主要的張貼文,請改為刪除這個張貼文。", "topic-thumbnails-are-disabled": "禁用主題縮圖", "invalid-file": "無效的檔案", "uploads-are-disabled": "上傳功能被停用", - "signature-too-long": "Sorry, your signature cannot be longer than %1 character(s).", - "about-me-too-long": "Sorry, your about me cannot be longer than %1 character(s).", + "signature-too-long": "抱歉,你的簽名長度不能超過 %1 字元。", + "about-me-too-long": "抱歉,關於我長度不能超過 %1 字元。", "cant-chat-with-yourself": "你不能與自己聊天!", "chat-restricted": "此用戶已限制了他的聊天功能。你要在他關注你之後,才能跟他聊天", "chat-disabled": "聊天系統被禁止", - "too-many-messages": "You have sent too many messages, please wait awhile.", + "too-many-messages": "你已經送出過多的訊息,請稍等一下。", "invalid-chat-message": "無效的聊天訊息", "chat-message-too-long": "聊天訊息太長", "cant-edit-chat-message": "你不被允許編輯這條訊息", @@ -97,7 +97,7 @@ "parse-error": "當剖析伺服器回應時發生了某個錯誤", "wrong-login-type-email": "請使用您的電子郵件進行登錄", "wrong-login-type-username": "請使用您的使用者名稱進行登錄", - "invite-maximum-met": "You have invited the maximum amount of people (%1 out of %2).", + "invite-maximum-met": "你已經邀請最多可邀請的人數限制 (%1 於 %2)。", "no-session-found": "沒有找到登入的連線階段!", "not-in-room": "使用者沒有在聊天室中", "no-users-in-room": "沒有使用者在聊天室中", diff --git a/public/language/zh_TW/notifications.json b/public/language/zh_TW/notifications.json index 3174feb38e..5f7ed6c29b 100644 --- a/public/language/zh_TW/notifications.json +++ b/public/language/zh_TW/notifications.json @@ -1,36 +1,36 @@ { "title": "通知", "no_notifs": "沒有新消息", - "see_all": "See all notifications", + "see_all": "觀看所有通知", "mark_all_read": "所有訊息設為已讀", "back_to_home": "返回%1", "outgoing_link": "站外連結", - "outgoing_link_message": "You are now leaving %1", + "outgoing_link_message": "你現在離開了 %1", "continue_to": "繼續前往 %1", "return_to": "返回%1", "new_notification": "新訊息通知", "you_have_unread_notifications": "您有未讀的訊息!", "new_message_from": "來自 %1 的新訊息", "upvoted_your_post_in": "%1 upvote了您在 %2的post。", - "upvoted_your_post_in_dual": "%1 and %2 have upvoted your post in %3.", - "upvoted_your_post_in_multiple": "%1 and %2 others have upvoted your post in %3.", - "moved_your_post": "%1 has moved your post to %2", - "moved_your_topic": "%1 has moved %2", - "favourited_your_post_in": "%1 has bookmarked your post in %2.", - "favourited_your_post_in_dual": "%1 and %2 have bookmarked your post in %3.", - "favourited_your_post_in_multiple": "%1 and %2 others have bookmarked your post in %3.", + "upvoted_your_post_in_dual": "%1%2 已經對你在%3的張貼作正向投票。", + "upvoted_your_post_in_multiple": "%1 與 %2 其他人已經對你在%3正向投票。", + "moved_your_post": "%1 已經移動你的張貼到 %2", + "moved_your_topic": "%1 已經移動到 %2", + "favourited_your_post_in": "%1 已經把你在 %2 的張貼加入書籤。", + "favourited_your_post_in_dual": "%1%2 已經把你在%3的張貼加入書籤。", + "favourited_your_post_in_multiple": "%1 與 %2 其他人已經把你在 %3 的張貼加入書籤。", "user_flagged_post_in": "%1 舉報了 %2裡的一個post。", - "user_flagged_post_in_dual": "%1 and %2 flagged a post in %3", - "user_flagged_post_in_multiple": "%1 and %2 others flagged a post in %3", + "user_flagged_post_in_dual": "%1%2 標記一個張貼在 %3", + "user_flagged_post_in_multiple": "%1 與 %2 其他人標記一個張貼在 %3", "user_posted_to": "%1 發布一個回覆給: %2", - "user_posted_to_dual": "%1 and %2 have posted replies to: %3", - "user_posted_to_multiple": "%1 and %2 others have posted replies to: %3", + "user_posted_to_dual": "%1%2 已經張貼回覆到: %3", + "user_posted_to_multiple": "%1 與 %2 其他人已經張貼回覆到: %3", "user_posted_topic": "%1 發布了一個新的主題: %2", "user_started_following_you": "%1 開始關注你。", - "user_started_following_you_dual": "%1 and %2 started following you.", - "user_started_following_you_multiple": "%1 and %2 others started following you.", - "new_register": "%1 sent a registration request.", - "new_register_multiple": "There are %1 registration requests awaiting review.", + "user_started_following_you_dual": "%1%2 開始跟隨你。", + "user_started_following_you_multiple": "%1 與 %2 其他的開始跟隨你。", + "new_register": "%1傳送了註冊要求。", + "new_register_multiple": "目前有 %1 個註冊要求等待審核中。", "email-confirmed": "已確認電郵", "email-confirmed-message": "感謝您驗證您的電郵。您的帳戶現已全面啟用。", "email-confirm-error-message": "驗證您的電郵地址時出現問題。也許啟動碼無效或已過期。", diff --git a/public/language/zh_TW/pages.json b/public/language/zh_TW/pages.json index 90f561fb98..08dabadd1b 100644 --- a/public/language/zh_TW/pages.json +++ b/public/language/zh_TW/pages.json @@ -28,19 +28,19 @@ "account/edit/password": "編輯\"%1\"的密碼", "account/edit/username": "編輯\"%1\"的帳號", "account/edit/email": "編輯\"%1\"的電子郵件", - "account/following": "People %1 follows", - "account/followers": "People who follow %1", - "account/posts": "Posts made by %1", - "account/topics": "Topics created by %1", + "account/following": "使用者 %1 跟隨", + "account/followers": "跟隨 %1 的使用者", + "account/posts": "由 %1 發表的張貼", + "account/topics": "由 %1 建立的主題", "account/groups": "%1 的群組", - "account/favourites": "%1's Bookmarked Posts", + "account/favourites": "%1 所加入書籤的張貼", "account/settings": "用戶設定", - "account/watched": "Topics watched by %1", - "account/upvoted": "Posts upvoted by %1", - "account/downvoted": "Posts downvoted by %1", - "account/best": "Best posts made by %1", + "account/watched": "%1 所觀看的主題", + "account/upvoted": "%1 所正向投票的張貼", + "account/downvoted": "%1 所負向投票的張貼", + "account/best": "由 %1 建立的最佳張貼文", "confirm": "已確認電子郵件", "maintenance.text": "目前 %1 正在進行維修。請稍後再來。", "maintenance.messageIntro": "此外,管理員有以下訊息:", - "throttled.text": "%1 is currently unavailable due to excessive load. Please come back another time." + "throttled.text": "%1 目前無法提供,是因為使用量過度。請之後再回來操作。" } \ No newline at end of file diff --git a/public/language/zh_TW/user.json b/public/language/zh_TW/user.json index d7011b0d6a..a536503ff7 100644 --- a/public/language/zh_TW/user.json +++ b/public/language/zh_TW/user.json @@ -11,7 +11,7 @@ "unban_account": "取消禁用帳號", "delete_account": "刪除帳戶", "delete_account_confirm": "你確定要刪除自己的帳戶?
      此操作不能復原,您將無法恢復任何數據

      輸入您的使用者名稱,以確認您希望刪除這個帳戶。", - "delete_this_account_confirm": "Are you sure you want to delete this account?
      This action is irreversible and you will not be able to recover any data

      ", + "delete_this_account_confirm": "你確定要刪除這個帳戶?
      此操作是不能還原的,你將無法回復任何資料
      ", "account-deleted": "帳號已刪除", "fullname": "全名", "website": "網站", @@ -91,9 +91,9 @@ "browsing": "瀏覽設定", "open_links_in_new_tab": "在新的資料標籤裡打開外部的連結", "enable_topic_searching": "啟用在主題中的搜尋", - "topic_search_help": "If enabled, in-topic searching will override the browser's default page search behaviour and allow you to search through the entire topic, instead of what is only shown on screen", + "topic_search_help": "如果啟用的話,在主題中搜尋將會覆蓋瀏覽器預設網頁搜尋的行為,這會允許你搜尋整篇的主題,而不只是顯示出來在畫面上的而已。", "delay_image_loading": "延遲圖片載入", - "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", + "image_load_delay_help": "如果啟用的話,在主題中的圖片直到它們被捲到到可視範圍時才會載入。", "scroll_to_my_post": "在張貼回覆後,顯示新的張貼", "follow_topics_you_reply_to": "跟隨你回覆的主題", "follow_topics_you_create": "跟隨你建立的主題", @@ -102,9 +102,9 @@ "select-skin": "選擇外觀", "select-homepage": "選擇首頁", "homepage": "首頁", - "homepage_description": "Select a page to use as the forum homepage or 'None' to use the default homepage.", + "homepage_description": "選擇一個要用來當作討論區的首頁的頁面,或是選'None'來使用預設的首頁。", "custom_route": "自訂首頁路由", - "custom_route_help": "Enter a route name here, without any preceding slash (e.g. \"recent\", or \"popular\")", + "custom_route_help": "在這裡輸入路由名稱,不需要在前面的斜線(例如\"recent\"或\"popular\")", "sso.title": "單一簽入(SSO)服務", "sso.associated": "關連於", "sso.not-associated": "點擊這裡進行關連於" From 825ecce0df54edead441f3f30be0fde6699a70c0 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sat, 14 May 2016 19:39:20 +0300 Subject: [PATCH 0240/1109] closes #4643 --- public/src/client/recent.js | 12 ++++++++---- src/socket.io/topics/unread.js | 2 +- src/topics/create.js | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/public/src/client/recent.js b/public/src/client/recent.js index 22777be4f6..938453894e 100644 --- a/public/src/client/recent.js +++ b/public/src/client/recent.js @@ -1,6 +1,6 @@ 'use strict'; -/* globals define, app, socket, utils */ +/* globals define, app, socket, utils, ajaxify, config */ define('forum/recent', ['forum/infinitescroll', 'components'], function(infinitescroll, components) { var Recent = {}; @@ -55,11 +55,15 @@ define('forum/recent', ['forum/infinitescroll', 'components'], function(infinite Recent.updateAlertText(); } - if (parseInt(data.topic.mainPid, 10) === parseInt(data.posts[0].pid, 10)) { + var post = data.posts[0]; + if (!post || !post.topic) { + return; + } + if (parseInt(post.topic.mainPid, 10) === parseInt(post.pid, 10)) { return; } - if (ajaxify.data.selectedCategory && parseInt(ajaxify.data.selectedCategory.cid, 10) !== parseInt(data.topic.cid, 10)) { + if (ajaxify.data.selectedCategory && parseInt(ajaxify.data.selectedCategory.cid, 10) !== parseInt(post.topic.cid, 10)) { return; } @@ -68,7 +72,7 @@ define('forum/recent', ['forum/infinitescroll', 'components'], function(infinite } if (ajaxify.data.selectedFilter && ajaxify.data.selectedFilter.url === 'unread/watched') { - socket.emit('topics.isFollowed', data.topic.tid, function(err, isFollowed) { + socket.emit('topics.isFollowed', post.tid, function(err, isFollowed) { if (err) { app.alertError(err.message); } diff --git a/src/socket.io/topics/unread.js b/src/socket.io/topics/unread.js index 4a6153b397..a5582d6892 100644 --- a/src/socket.io/topics/unread.js +++ b/src/socket.io/topics/unread.js @@ -46,7 +46,7 @@ module.exports = function(SocketTopics) { }; SocketTopics.markCategoryTopicsRead = function(socket, cid, callback) { - topics.getUnreadTids(cid, socket.uid, function(err, tids) { + topics.getUnreadTids(cid, socket.uid, '', function(err, tids) { if (err) { return callback(err); } diff --git a/src/topics/create.js b/src/topics/create.js index dea303709c..01a8ea5f5f 100644 --- a/src/topics/create.js +++ b/src/topics/create.js @@ -274,7 +274,7 @@ module.exports = function(Topics) { posts.getUserInfoForPosts([postData.uid], uid, next); }, topicInfo: function(next) { - Topics.getTopicFields(tid, ['tid', 'title', 'slug', 'cid', 'postcount'], next); + Topics.getTopicFields(tid, ['tid', 'title', 'slug', 'cid', 'postcount', 'mainPid'], next); }, parents: function(next) { Topics.addParentPosts([postData], next); From 6685fafe6bcc4808f3440dc6c53c19019c2cc387 Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Sun, 15 May 2016 09:02:26 -0400 Subject: [PATCH 0241/1109] Latest translations and fallbacks --- public/language/fr/login.json | 2 +- public/language/fr/modules.json | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/public/language/fr/login.json b/public/language/fr/login.json index f48fe914c8..41150728c6 100644 --- a/public/language/fr/login.json +++ b/public/language/fr/login.json @@ -5,7 +5,7 @@ "remember_me": "Se souvenir de moi ?", "forgot_password": "Mot de passe oublié ?", "alternative_logins": "Autres méthodes de connexion", - "failed_login_attempt": "Login Unsuccessful", + "failed_login_attempt": "Identification échouée", "login_successful": "Vous êtes maintenant connecté !", "dont_have_account": "Vous n'avez pas de compte ?" } \ No newline at end of file diff --git a/public/language/fr/modules.json b/public/language/fr/modules.json index 4cba60a328..bc05644724 100644 --- a/public/language/fr/modules.json +++ b/public/language/fr/modules.json @@ -29,14 +29,14 @@ "composer.submit_and_lock": "Envoyer et verrouiller", "composer.toggle_dropdown": "Afficher/masquer le menu", "composer.uploading": "Envoi en cours %1", - "composer.formatting.bold": "Bold", - "composer.formatting.italic": "Italic", - "composer.formatting.list": "List", - "composer.formatting.strikethrough": "Strikethrough", - "composer.formatting.link": "Link", - "composer.formatting.picture": "Picture", - "composer.upload-picture": "Upload Image", - "composer.upload-file": "Upload File", + "composer.formatting.bold": "Gras", + "composer.formatting.italic": "Italique", + "composer.formatting.list": "Liste", + "composer.formatting.strikethrough": "Barré", + "composer.formatting.link": "Lien", + "composer.formatting.picture": "Image", + "composer.upload-picture": "Envoyer une image", + "composer.upload-file": "Envoyer un fichier", "bootbox.ok": "OK", "bootbox.cancel": "Annuler", "bootbox.confirm": "Confirmer", From 2e0763b0a8303add4836e7bf741e72944a822b79 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sun, 15 May 2016 20:33:52 +0300 Subject: [PATCH 0242/1109] closes #1972 --- src/middleware/middleware.js | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/src/middleware/middleware.js b/src/middleware/middleware.js index 7d324e136e..926eeb2a06 100644 --- a/src/middleware/middleware.js +++ b/src/middleware/middleware.js @@ -194,19 +194,29 @@ middleware.isAdmin = function(req, res, next) { } if (isAdmin) { - var loginTime = req.session.meta ? req.session.meta.datetime : 0; - if (loginTime && parseInt(loginTime, 10) > Date.now() - 3600000) { - return next(); - } + user.hasPassword(req.uid, function(err, hasPassword) { + if (err) { + return next(err); + } - req.session.returnTo = nconf.get('relative_path') + req.path.replace(/^\/api/, ''); - req.session.forceLogin = 1; - if (res.locals.isAPI) { - res.status(401).json({}); - } else { - res.redirect('/login'); - } - return; + if (!hasPassword) { + return next(); + } + + var loginTime = req.session.meta ? req.session.meta.datetime : 0; + if (loginTime && parseInt(loginTime, 10) > Date.now() - 3600000) { + return next(); + } + + req.session.returnTo = nconf.get('relative_path') + req.path.replace(/^\/api/, ''); + req.session.forceLogin = 1; + if (res.locals.isAPI) { + res.status(401).json({}); + } else { + res.redirect('/login'); + } + return; + }); } if (res.locals.isAPI) { From 16ba7ee840d0fba72a85ab7535a2e9939d0e7d7c Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sun, 15 May 2016 20:35:37 +0300 Subject: [PATCH 0243/1109] fix #1972 --- src/middleware/middleware.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middleware/middleware.js b/src/middleware/middleware.js index 926eeb2a06..9068fdb9a9 100644 --- a/src/middleware/middleware.js +++ b/src/middleware/middleware.js @@ -215,8 +215,8 @@ middleware.isAdmin = function(req, res, next) { } else { res.redirect('/login'); } - return; }); + return; } if (res.locals.isAPI) { From 630dd66cf6a72929e6a75c7406a89b3019d5f0b3 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sun, 15 May 2016 21:18:05 +0300 Subject: [PATCH 0244/1109] closes #4645 --- src/controllers/uploads.js | 2 +- src/groups/cover.js | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/controllers/uploads.js b/src/controllers/uploads.js index 087889d340..16bc3b7c31 100644 --- a/src/controllers/uploads.js +++ b/src/controllers/uploads.js @@ -198,7 +198,7 @@ function uploadFile(uid, uploadedFile, callback) { function saveFileToLocal(uploadedFile, callback) { var extension = path.extname(uploadedFile.name); - if (!extension) { + if (!extension && uploadedFile.type) { extension = '.' + mime.extension(uploadedFile.type); } diff --git a/src/groups/cover.js b/src/groups/cover.js index 89ef97df94..99f2791a2e 100644 --- a/src/groups/cover.js +++ b/src/groups/cover.js @@ -6,6 +6,7 @@ var path = require('path'); var fs = require('fs'); var crypto = require('crypto'); var Jimp = require('jimp'); +var mime = require('mime'); var db = require('../database'); var file = require('../file'); @@ -29,6 +30,7 @@ module.exports = function(Groups) { var tempPath = data.file ? data.file : ''; var url; + var type = data.file ? mime.lookup(data.file) : 'image/png'; async.waterfall([ function (next) { @@ -41,7 +43,8 @@ module.exports = function(Groups) { tempPath = _tempPath; uploadsController.uploadGroupCover(uid, { name: 'groupCover', - path: tempPath + path: tempPath, + type: type }, next); }, function (uploadData, next) { @@ -54,7 +57,8 @@ module.exports = function(Groups) { function (next) { uploadsController.uploadGroupCover(uid, { name: 'groupCoverThumb', - path: tempPath + path: tempPath, + type: type }, next); }, function (uploadData, next) { @@ -104,7 +108,7 @@ module.exports = function(Groups) { md5sum = md5sum.digest('hex'); // Save image - var tempPath = path.join(nconf.get('base_dir'), nconf.get('upload_path'), md5sum); + var tempPath = path.join(nconf.get('base_dir'), nconf.get('upload_path'), md5sum) + '.png'; var buffer = new Buffer(imageData.slice(imageData.indexOf('base64') + 7), 'base64'); fs.writeFile(tempPath, buffer, { From b3fa5583f86ba20f5af34b0018cd769e75f2ad8d Mon Sep 17 00:00:00 2001 From: barisusakli Date: Mon, 16 May 2016 12:34:47 +0300 Subject: [PATCH 0245/1109] closes #4650 --- public/src/admin/settings/general.js | 3 +++ src/controllers/admin/uploads.js | 20 ++++++++++++-------- src/controllers/categories.js | 10 +++++----- src/controllers/topics.js | 4 +++- src/routes/admin.js | 1 + src/views/admin/settings/general.tpl | 12 ++++++++++++ 6 files changed, 36 insertions(+), 14 deletions(-) diff --git a/public/src/admin/settings/general.js b/public/src/admin/settings/general.js index 83ecff7907..0c36db401c 100644 --- a/public/src/admin/settings/general.js +++ b/public/src/admin/settings/general.js @@ -14,6 +14,9 @@ define('admin/settings/general', ['admin/settings'], function(Settings) { $('button[data-action="removeTouchIcon"]').on('click', function() { $('input[data-field="brand:touchIcon"]').val(''); }); + $('button[data-action="removeOgImage"]').on('click', function() { + $('input[data-field="removeOgImage"]').val(''); + }); }; return Module; diff --git a/src/controllers/admin/uploads.js b/src/controllers/admin/uploads.js index 0affec8f6b..90dae8a243 100644 --- a/src/controllers/admin/uploads.js +++ b/src/controllers/admin/uploads.js @@ -1,13 +1,13 @@ "use strict"; -var fs = require('fs'), - path = require('path'), - async = require('async'), - nconf = require('nconf'), - winston = require('winston'), - file = require('../../file'), - image = require('../../image'), - plugins = require('../../plugins'); +var fs = require('fs'); +var path = require('path'); +var async = require('async'); +var nconf = require('nconf'); +var winston = require('winston'); +var file = require('../../file'); +var image = require('../../image'); +var plugins = require('../../plugins'); var allowedImageTypes = ['image/png', 'image/jpeg', 'image/pjpeg', 'image/jpg', 'image/gif', 'image/svg+xml']; @@ -124,6 +124,10 @@ uploadsController.uploadDefaultAvatar = function(req, res, next) { upload('avatar-default', req, res, next); }; +uploadsController.uploadOgImage = function(req, res, next) { + upload('og:image', req, res, next); +}; + function upload(name, req, res, next) { var uploadedFile = req.files.files[0]; diff --git a/src/controllers/categories.js b/src/controllers/categories.js index 7e3e4b0efe..642467c6b0 100644 --- a/src/controllers/categories.js +++ b/src/controllers/categories.js @@ -25,14 +25,14 @@ categoriesController.list = function(req, res, next) { content: 'website' }]; - if (meta.config['brand:logo']) { - var brandLogo = meta.config['brand:logo']; - if (!brandLogo.startsWith('http')) { - brandLogo = nconf.get('url') + brandLogo; + var ogImage = meta.config['og:image'] || meta.config['brand:logo'] || ''; + if (ogImage) { + if (!ogImage.startsWith('http')) { + ogImage = nconf.get('url') + ogImage; } res.locals.metaTags.push({ property: 'og:image', - content: brandLogo + content: ogImage }); } diff --git a/src/controllers/topics.js b/src/controllers/topics.js index 02a9017b75..74604c0085 100644 --- a/src/controllers/topics.js +++ b/src/controllers/topics.js @@ -170,8 +170,10 @@ topicsController.get = function(req, res, callback) { var ogImageUrl = ''; if (topicData.thumb) { ogImageUrl = topicData.thumb; - } else if (postAtIndex && postAtIndex.user && postAtIndex.user.picture){ + } else if (postAtIndex && postAtIndex.user && postAtIndex.user.picture) { ogImageUrl = postAtIndex.user.picture; + } else if (meta.config['og:image']) { + ogImageUrl = meta.config['og:image']; } else if (meta.config['brand:logo']) { ogImageUrl = meta.config['brand:logo']; } else { diff --git a/src/routes/admin.js b/src/routes/admin.js index 6ce4fb5f48..66391053a7 100644 --- a/src/routes/admin.js +++ b/src/routes/admin.js @@ -15,6 +15,7 @@ function apiRoutes(router, middleware, controllers) { router.post('/uploadfavicon', middlewares, controllers.admin.uploads.uploadFavicon); router.post('/uploadTouchIcon', middlewares, controllers.admin.uploads.uploadTouchIcon); router.post('/uploadlogo', middlewares, controllers.admin.uploads.uploadLogo); + router.post('/uploadOgImage', middlewares, controllers.admin.uploads.uploadOgImage); router.post('/upload/sound', middlewares, controllers.admin.uploads.uploadSound); router.post('/uploadDefaultAvatar', middlewares, controllers.admin.uploads.uploadDefaultAvatar); } diff --git a/src/views/admin/settings/general.tpl b/src/views/admin/settings/general.tpl index fa41b38f61..79cba3caf7 100644 --- a/src/views/admin/settings/general.tpl +++ b/src/views/admin/settings/general.tpl @@ -50,6 +50,7 @@ +
      @@ -61,6 +62,17 @@
      + +
      + +
      + + + + + +
      +
      From a4031df9b2a2b22bf11e29430c6b55972a50d654 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Mon, 16 May 2016 14:22:07 +0300 Subject: [PATCH 0246/1109] dont show SSO logins if its a confirmation screen --- src/controllers/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/controllers/index.js b/src/controllers/index.js index 185f4f5249..09f156b19d 100644 --- a/src/controllers/index.js +++ b/src/controllers/index.js @@ -128,6 +128,7 @@ Controllers.login = function(req, res, next) { return next(err); } data.username = allowLoginWith === 'email' ? user.email : user.username; + data.alternate_logins = []; res.render('login', data); }); } else { From 81bbe93640fef46c69f64afa943afc9e0b1d4629 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 16 May 2016 08:22:23 -0400 Subject: [PATCH 0247/1109] fixes #4653 --- src/posts/parse.js | 32 +++++++++++++++++++++++++++++++- src/topics/follow.js | 2 +- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/src/posts/parse.js b/src/posts/parse.js index 1af374305d..6381e066ed 100644 --- a/src/posts/parse.js +++ b/src/posts/parse.js @@ -1,10 +1,14 @@ - 'use strict'; +var nconf = require('nconf'), + url = require('url'); + var cache = require('./cache'); var plugins = require('../plugins'); var translator = require('../../public/src/modules/translator'); +var urlRegex = /href="([^"]+)"/g; + module.exports = function(Posts) { Posts.parsePost = function(postData, callback) { @@ -26,6 +30,7 @@ module.exports = function(Posts) { } data.postData.content = translator.escape(data.postData.content); + data.postData.content = Posts.relativeToAbsolute(data.postData.content); if (global.env === 'production' && data.postData.pid) { cache.set(data.postData.pid, data.postData.content); @@ -40,4 +45,29 @@ module.exports = function(Posts) { plugins.fireHook('filter:parse.signature', {userData: userData, uid: uid}, callback); }; + + Posts.relativeToAbsolute = function(content) { + // Turns relative links in post body to absolute urls + var parsed, current, absolute; + + while ((current=urlRegex.exec(content)) !== null) { + if (current[1]) { + parsed = url.parse(current[1]); + + if (!parsed.protocol) { + if (current[1].startsWith('/')) { + // Internal link + absolute = nconf.get('url') + current[1]; + } else { + // External link + absolute = '//' + current[1]; + } + + content = content.slice(0, current.index + 6) + absolute + content.slice(current.index + 6 + current[1].length); + } + } + } + + return content; + }; }; diff --git a/src/topics/follow.js b/src/topics/follow.js index 90708ba50a..209151d8e5 100644 --- a/src/topics/follow.js +++ b/src/topics/follow.js @@ -171,7 +171,7 @@ module.exports = function(Topics) { pid: postData.pid, subject: '[' + (meta.config.title || 'NodeBB') + '] ' + title, intro: '[[notifications:user_posted_to, ' + postData.user.username + ', ' + titleEscaped + ']]', - postBody: postData.content.replace(/"\/\//g, '"http://'), + postBody: postData.content.replace(/"\/\//g, '"https://'), site_title: meta.config.title || 'NodeBB', username: data.userData.username, userslug: data.userData.userslug, From 437770538c988bede423b66ce9138ee9407be6de Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 16 May 2016 10:32:28 -0400 Subject: [PATCH 0248/1109] work-in-progress commit for #4655 --- src/languages.js | 42 +++++++++++++++++++++++++++++++- src/meta.js | 2 ++ src/middleware/middleware.js | 14 +++++++++++ src/plugins.js | 47 ++++++++++++++++++------------------ src/plugins/load.js | 15 +++++------- src/routes/index.js | 3 ++- src/webserver.js | 2 ++ 7 files changed, 91 insertions(+), 34 deletions(-) diff --git a/src/languages.js b/src/languages.js index de1d82bcff..2ad64fd588 100644 --- a/src/languages.js +++ b/src/languages.js @@ -3,8 +3,48 @@ var fs = require('fs'), path = require('path'), async = require('async'), + LRU = require('lru-cache'), + _ = require('underscore'); - Languages = {}; +var plugins = require('./plugins'); + +var Languages = {}; + +Languages.init = function(next) { + if (Languages.hasOwnProperty('_cache')) { + Languages._cache.reset(); + } else { + Languages._cache = LRU(100); + } + + next(); +}; + +Languages.get = function(code, key, callback) { + var combined = [code, key].join('/'); + + if (Languages._cache.has(combined)) { + return callback(null, Languages._cache.get(combined)); + } + + var languageData; + + fs.readFile(path.join(__dirname, '../public/language/', code, key), { encoding: 'utf-8' }, function(err, data) { + // If language file in core cannot be read, then no language file present + try { + languageData = JSON.parse(data) || {}; + } catch (e) { + languageData = {}; + } + + if (plugins.customLanguages.hasOwnProperty(combined)) { + _.extendOwn(languageData, plugins.customLanguages[combined]); + } + + Languages._cache.set(combined, languageData); + callback(null, languageData); + }); +}; Languages.list = function(callback) { var languagesPath = path.join(__dirname, '../public/language'), diff --git a/src/meta.js b/src/meta.js index ffc85c98bf..eb5816fdaf 100644 --- a/src/meta.js +++ b/src/meta.js @@ -8,6 +8,7 @@ var async = require('async'), user = require('./user'), groups = require('./groups'), + languages = require('./languages'), emitter = require('./emitter'), pubsub = require('./pubsub'), auth = require('./routes/authentication'), @@ -65,6 +66,7 @@ var async = require('async'), async.apply(Meta.js.minify, 'nodebb.min.js'), async.apply(Meta.js.minify, 'acp.min.js'), async.apply(Meta.sounds.init), + async.apply(languages.init), async.apply(Meta.templates.compile), async.apply(auth.reloadRoutes), function(next) { diff --git a/src/middleware/middleware.js b/src/middleware/middleware.js index 9068fdb9a9..342ecdc38f 100644 --- a/src/middleware/middleware.js +++ b/src/middleware/middleware.js @@ -16,6 +16,7 @@ var app, toobusy = require('toobusy-js'), plugins = require('../plugins'), + languages = require('../languages'), meta = require('../meta'), user = require('../user'), groups = require('../groups'), @@ -314,6 +315,19 @@ middleware.applyBlacklist = function(req, res, next) { }; middleware.processLanguages = function(req, res, next) { + var code = req.params.code; + var key = req.path.match(/[\w]+\.json/); + + if (code && key) { + languages.get(code, key[0], function(err, language) { + res.status(200).json(language); + }) + } else { + res.status(404).json('{}'); + } +}; + +middleware.processTimeagoLocales = function(req, res, next) { var fallback = req.path.indexOf('-short') === -1 ? 'jquery.timeago.en.js' : 'jquery.timeago.en-short.js', localPath = path.join(__dirname, '../../public/vendor/jquery/timeago/locales', req.path), exists; diff --git a/src/plugins.js b/src/plugins.js index 853c6f44f2..1045bab8c6 100644 --- a/src/plugins.js +++ b/src/plugins.js @@ -31,7 +31,7 @@ var middleware; Plugins.lessFiles = []; Plugins.clientScripts = []; Plugins.acpScripts = []; - Plugins.customLanguages = []; + Plugins.customLanguages = {}; Plugins.customLanguageFallbacks = {}; Plugins.libraryPaths = []; Plugins.versionWarning = []; @@ -85,10 +85,10 @@ var middleware; Plugins.acpScripts.length = 0; Plugins.libraryPaths.length = 0; - Plugins.registerHook('core', { - hook: 'static:app.load', - method: addLanguages - }); + // Plugins.registerHook('core', { + // hook: 'static:app.load', + // method: addLanguages + // }); async.waterfall([ function(next) { @@ -415,27 +415,28 @@ var middleware; ], next); }; - function addLanguages(params, callback) { - Plugins.customLanguages.forEach(function(lang) { - params.router.get('/language' + lang.route, function(req, res, next) { - res.json(lang.file); - }); + // function addLanguages(params, callback) { + // Plugins.customLanguages.forEach(function(lang) { + // console.log('route for', '/language/' + lang.route); + // params.router.get('/language' + lang.route, function(req, res, next) { + // res.json(lang.file); + // }); - var components = lang.route.split('/'), - language = components[1], - filename = components[2].replace('.json', ''); + // var components = lang.route.split('/'), + // language = components[1], + // filename = components[2].replace('.json', ''); - translator.addTranslation(language, filename, lang.file); - }); + // translator.addTranslation(language, filename, lang.file); + // }); - for(var resource in Plugins.customLanguageFallbacks) { - params.router.get('/language/:lang/' + resource + '.json', function(req, res, next) { - winston.verbose('[translator] No resource file found for ' + req.params.lang + '/' + path.basename(req.path, '.json') + ', using provided fallback language file'); - res.sendFile(Plugins.customLanguageFallbacks[path.basename(req.path, '.json')]); - }); - } + // for(var resource in Plugins.customLanguageFallbacks) { + // params.router.get('/language/:lang/' + resource + '.json', function(req, res, next) { + // winston.verbose('[translator] No resource file found for ' + req.params.lang + '/' + path.basename(req.path, '.json') + ', using provided fallback language file'); + // res.sendFile(Plugins.customLanguageFallbacks[path.basename(req.path, '.json')]); + // }); + // } - callback(null); - } + // callback(null); + // } }(exports)); diff --git a/src/plugins/load.js b/src/plugins/load.js index 48bbdb0390..58dc244fbd 100644 --- a/src/plugins/load.js +++ b/src/plugins/load.js @@ -219,26 +219,23 @@ module.exports = function(Plugins) { fallbackMap = {}; utils.walk(pathToFolder, function(err, languages) { - var arr = []; - async.each(languages, function(pathToLang, next) { fs.readFile(pathToLang, function(err, file) { if (err) { return next(err); } - var json; + var data; + var route = pathToLang.replace(pathToFolder + '/', ''); try { - json = JSON.parse(file.toString()); + data = JSON.parse(file.toString()); } catch (err) { winston.error('[plugins] Unable to parse custom language file: ' + pathToLang + '\r\n' + err.stack); return next(err); } - arr.push({ - file: json, - route: pathToLang.replace(pathToFolder, '') - }); + Plugins.customLanguages[route] = Plugins.customLanguages[route] || {}; + _.extendOwn(Plugins.customLanguages[route], data); if (pluginData.defaultLang && pathToLang.endsWith(pluginData.defaultLang + '/' + path.basename(pathToLang))) { fallbackMap[path.basename(pathToLang, '.json')] = path.join(pathToFolder, pluginData.defaultLang, path.basename(pathToLang)); @@ -251,7 +248,7 @@ module.exports = function(Plugins) { return callback(err); } - Plugins.customLanguages = Plugins.customLanguages.concat(arr); + // do I need this either? _.extendOwn(Plugins.customLanguageFallbacks, fallbackMap); callback(); diff --git a/src/routes/index.js b/src/routes/index.js index c5d2d25178..626b480db1 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -144,10 +144,11 @@ module.exports = function(app, middleware, hotswapIds) { } app.use(middleware.privateUploads); + app.use('/language/:code', middleware.processLanguages); app.use(relativePath, express.static(path.join(__dirname, '../../', 'public'), { maxAge: app.enabled('cache') ? 5184000000 : 0 })); - app.use('/vendor/jquery/timeago/locales', middleware.processLanguages); + app.use('/vendor/jquery/timeago/locales', middleware.processTimeagoLocales); app.use(controllers.handle404); app.use(controllers.handleErrors); diff --git a/src/webserver.js b/src/webserver.js index 78808d5371..48d8167d3b 100644 --- a/src/webserver.js +++ b/src/webserver.js @@ -12,6 +12,7 @@ var path = require('path'), emailer = require('./emailer'), meta = require('./meta'), + languages = require('./languages'), logger = require('./logger'), plugins = require('./plugins'), middleware = require('./middleware'), @@ -92,6 +93,7 @@ function initializeNodeBB(callback) { async.apply(!skipJS ? meta.js.minify : meta.js.getFromFile, 'acp.min.js'), async.apply(meta.css.minify), async.apply(meta.sounds.init), + async.apply(languages.init), async.apply(meta.blacklist.load) ], next); }, From ffa051e82804dd7f2aff0786f55d75cb34d3f478 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 16 May 2016 15:23:21 -0400 Subject: [PATCH 0249/1109] added defaultLang support, #4655 --- src/plugins.js | 10 ++++++++++ src/plugins/load.js | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/plugins.js b/src/plugins.js index 1045bab8c6..da7f25eefe 100644 --- a/src/plugins.js +++ b/src/plugins.js @@ -91,6 +91,16 @@ var middleware; // }); async.waterfall([ + function(next) { + // Build language code list + fs.readdir(path.join(__dirname, '../public/language'), function(err, directories) { + Plugins.languageCodes = directories.filter(function(code) { + return code !== 'TODO'; + }); + + next(); + }); + }, function(next) { db.getSortedSetRange('plugins:active', 0, -1, next); }, diff --git a/src/plugins/load.js b/src/plugins/load.js index 58dc244fbd..3b9a454e90 100644 --- a/src/plugins/load.js +++ b/src/plugins/load.js @@ -238,6 +238,16 @@ module.exports = function(Plugins) { _.extendOwn(Plugins.customLanguages[route], data); if (pluginData.defaultLang && pathToLang.endsWith(pluginData.defaultLang + '/' + path.basename(pathToLang))) { + console.log(Plugins.languageCodes); + Plugins.languageCodes.map(function(code) { + if (pluginData.defaultLang !== code) { + return code + '/' + path.basename(pathToLang); + } else { + return null; + } + }).filter(Boolean).forEach(function(key) { + Plugins.customLanguages[key] = _.defaults(Plugins.customLanguages[key] || {}, data); + }); fallbackMap[path.basename(pathToLang, '.json')] = path.join(pathToFolder, pluginData.defaultLang, path.basename(pathToLang)); } From 5d030dd8ab903d0a5a060081ba165327389be2cd Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 16 May 2016 15:24:30 -0400 Subject: [PATCH 0250/1109] removed console log --- src/plugins/load.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/plugins/load.js b/src/plugins/load.js index 3b9a454e90..a70fce41ab 100644 --- a/src/plugins/load.js +++ b/src/plugins/load.js @@ -238,7 +238,6 @@ module.exports = function(Plugins) { _.extendOwn(Plugins.customLanguages[route], data); if (pluginData.defaultLang && pathToLang.endsWith(pluginData.defaultLang + '/' + path.basename(pathToLang))) { - console.log(Plugins.languageCodes); Plugins.languageCodes.map(function(code) { if (pluginData.defaultLang !== code) { return code + '/' + path.basename(pathToLang); From cd5e5e809f2d2fbd55a60e7e0eb279dcb48b1274 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 16 May 2016 15:33:28 -0400 Subject: [PATCH 0251/1109] up mentions --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7c07c1fc88..611e97d7bc 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "nodebb-plugin-emoji-one": "1.1.3", "nodebb-plugin-emoji-extended": "1.1.0", "nodebb-plugin-markdown": "5.1.5", - "nodebb-plugin-mentions": "1.0.25", + "nodebb-plugin-mentions": "1.1.0", "nodebb-plugin-soundpack-default": "0.1.6", "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", From 951ac17a90f7b239f857d37d923033f734a3ba3f Mon Sep 17 00:00:00 2001 From: psychobunny Date: Tue, 17 May 2016 05:54:26 -0400 Subject: [PATCH 0252/1109] up persona --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 611e97d7bc..ba1b329b35 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", "nodebb-theme-lavender": "3.0.10", - "nodebb-theme-persona": "4.0.138", + "nodebb-theme-persona": "4.0.139", "nodebb-theme-vanilla": "5.0.75", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", From 11be93a4d86e6d40d5e276673d85fd8f6c3588a8 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 17 May 2016 15:45:42 +0300 Subject: [PATCH 0253/1109] closes #4648 --- src/controllers/accounts/settings.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/controllers/accounts/settings.js b/src/controllers/accounts/settings.js index af746a07b6..75d07a0846 100644 --- a/src/controllers/accounts/settings.js +++ b/src/controllers/accounts/settings.js @@ -104,6 +104,10 @@ settingsController.get = function(req, res, callback) { } }); + if (isCustom && userData.settings.homePageRoute === 'none') { + isCustom = false; + } + userData.homePageRoutes.push({ route: 'custom', name: 'Custom', @@ -125,7 +129,7 @@ settingsController.get = function(req, res, callback) { userData.disableCustomUserSkins = parseInt(meta.config.disableCustomUserSkins, 10) === 1; userData.allowUserHomePage = parseInt(meta.config.allowUserHomePage, 10) === 1; - + userData.inTopicSearchAvailable = plugins.hasListeners('filter:topic.search'); userData.title = '[[pages:account/settings]]'; From 917eb4bd79a86306a47edeba04a7078f47186a89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 17 May 2016 23:55:51 +0300 Subject: [PATCH 0254/1109] up composer default --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ba1b329b35..3a9a9fed1a 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "morgan": "^1.3.2", "mousetrap": "^1.5.3", "nconf": "~0.8.2", - "nodebb-plugin-composer-default": "3.0.30", + "nodebb-plugin-composer-default": "3.0.31", "nodebb-plugin-dbsearch": "1.0.1", "nodebb-plugin-emoji-one": "1.1.3", "nodebb-plugin-emoji-extended": "1.1.0", From ef4a94857d1a1a601c5c666d7e88749bdb2ba647 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 18 May 2016 11:05:25 -0400 Subject: [PATCH 0255/1109] fixed admin lockout timer for subfolder installs @barisusakli :trollface: --- src/middleware/middleware.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/middleware/middleware.js b/src/middleware/middleware.js index 342ecdc38f..9267289d3f 100644 --- a/src/middleware/middleware.js +++ b/src/middleware/middleware.js @@ -209,12 +209,12 @@ middleware.isAdmin = function(req, res, next) { return next(); } - req.session.returnTo = nconf.get('relative_path') + req.path.replace(/^\/api/, ''); + req.session.returnTo = req.path.replace(/^\/api/, ''); req.session.forceLogin = 1; if (res.locals.isAPI) { res.status(401).json({}); } else { - res.redirect('/login'); + res.redirect(nconf.get('relative_path') + '/login'); } }); return; From bf2133ed7c2d9e56eb1d8db110ec0f885ea60757 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 18 May 2016 19:02:43 +0300 Subject: [PATCH 0256/1109] topic watching --- public/language/en_GB/topic.json | 9 +- public/less/generics.less | 6 ++ public/src/client/topic/threadTools.js | 42 ++++++--- src/categories.js | 24 +++++ src/categories/delete.js | 1 + src/socket.io/helpers.js | 7 ++ src/socket.io/topics.js | 11 ++- src/topics.js | 9 +- src/topics/delete.js | 1 + src/topics/follow.js | 115 ++++++++++++++++++++++-- src/topics/unread.js | 6 ++ src/user.js | 13 +-- src/user/categories.js | 6 ++ src/user/delete.js | 8 +- src/user/posts.js | 15 +--- src/user/topics.js | 19 ++++ tests/topics.js | 119 +++++++++++++++++++++++-- 17 files changed, 362 insertions(+), 49 deletions(-) create mode 100644 src/user/topics.js diff --git a/public/language/en_GB/topic.json b/public/language/en_GB/topic.json index 6299b8aac1..a64bd15ca7 100644 --- a/public/language/en_GB/topic.json +++ b/public/language/en_GB/topic.json @@ -38,6 +38,7 @@ "following_topic.message": "You will now be receiving notifications when somebody posts to this topic.", "not_following_topic.message": "You will no longer receive notifications from this topic.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Please register or log in in order to subscribe to this topic.", @@ -50,6 +51,12 @@ "watch.title": "Be notified of new replies in this topic", "unwatch.title": "Stop watching this topic", "share_this_post": "Share this Post", + "following": "Following", + "reading": "Reading", + "ignoring": "Ignoring", + "following.description": "Notify me of new replies", + "reading.description": "Show topic in unread list", + "ignoring.description": "Do not show topic in unread list", "thread_tools.title": "Topic Tools", "thread_tools.markAsUnreadForAll": "Mark Unread", @@ -125,7 +132,7 @@ "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", "stale.create": "Create a new topic", "stale.reply_anyway": "Reply to this topic anyway", - + "link_back": "Re: [%1](%2)\n\n", "spam": "Spam", diff --git a/public/less/generics.less b/public/less/generics.less index 265007af55..33af3bfa11 100644 --- a/public/less/generics.less +++ b/public/less/generics.less @@ -21,6 +21,12 @@ overflow-x: hidden; } +.topic-watch-dropdown { + .help-text { + margin-left: 20px; + } +} + .category-list { padding: 0; diff --git a/public/src/client/topic/threadTools.js b/public/src/client/topic/threadTools.js index 433c12e575..adc110e8a6 100644 --- a/public/src/client/topic/threadTools.js +++ b/public/src/client/topic/threadTools.js @@ -83,12 +83,18 @@ define('forum/topic/threadTools', [ deletePosts.init(); fork.init(); - components.get('topic').on('click', '[component="topic/follow"], [component="topic/unfollow"]', follow); - components.get('topic/follow').off('click').on('click', follow); - components.get('topic/unfollow').off('click').on('click', follow); + $('.topic').on('click', '[component="topic/following"]', function() { + setFollow('follow'); + }); + $('.topic').on('click', '[component="topic/reading"]', function() { + setFollow('unfollow'); + }); + $('.topic').on('click', '[component="topic/ignoring"]', function() { + setFollow('ignore'); + }); - function follow() { - socket.emit('topics.toggleFollow', tid, function(err, state) { + function setFollow(type) { + socket.emit('topics.changeWatching', {tid: tid, type: type}, function(err) { if (err) { return app.alert({ type: 'danger', @@ -98,12 +104,19 @@ define('forum/topic/threadTools', [ timeout: 5000 }); } - - setFollowState(state); + var message = ''; + if (type === 'follow') { + message = '[[topic:following_topic.message]]'; + } else if (type === 'unfollow') { + message = '[[topic:not_following_topic.message]]'; + } else if (type === 'ignore') { + message = '[[topic:ignoring_topic.message]]'; + } + setFollowState(type); app.alert({ alert_id: 'follow_thread', - message: state ? '[[topic:following_topic.message]]' : '[[topic:not_following_topic.message]]', + message: message, type: 'success', timeout: 5000 }); @@ -195,8 +208,17 @@ define('forum/topic/threadTools', [ }; function setFollowState(state) { - components.get('topic/follow').toggleClass('hidden', state); - components.get('topic/unfollow').toggleClass('hidden', !state); + var menu = components.get('topic/following/menu'); + menu.toggleClass('hidden', state !== 'follow'); + components.get('topic/following/check').toggleClass('fa-check', state === 'follow'); + + menu = components.get('topic/reading/menu'); + menu.toggleClass('hidden', state !== 'unfollow'); + components.get('topic/reading/check').toggleClass('fa-check', state === 'unfollow'); + + menu = components.get('topic/ignoring/menu'); + menu.toggleClass('hidden', state !== 'ignore' ); + components.get('topic/ignoring/check').toggleClass('fa-check', state === 'ignore'); } diff --git a/src/categories.js b/src/categories.js index cd2b18a787..a000eff251 100644 --- a/src/categories.js +++ b/src/categories.js @@ -305,4 +305,28 @@ var privileges = require('./privileges'); return tree; }; + Categories.getIgnorers = function(cid, start, stop, callback) { + db.getSortedSetRevRange('cid:' + cid + ':ignorers', start, stop, callback); + }; + + Categories.filterIgnoringUids = function(cid, uids, callback) { + async.waterfall([ + function (next){ + Categories.getIgnorers(cid, 0, -1, next); + }, + function (ignorerUids, next){ + if (!ignorerUids.length) { + return next(null, uids); + } + + var readingUids = uids.filter(function(uid) { + return ignorerUids.indexOf(uid.toString()) === -1; + }); + + next(null, readingUids); + } + ], callback); + }; + + }(exports)); diff --git a/src/categories/delete.js b/src/categories/delete.js index 8d99bb60d1..c8a383037e 100644 --- a/src/categories/delete.js +++ b/src/categories/delete.js @@ -38,6 +38,7 @@ module.exports = function(Categories) { 'cid:' + cid + ':tids:posts', 'cid:' + cid + ':pids', 'cid:' + cid + ':read_by_uid', + 'cid:' + cid + ':ignorers', 'cid:' + cid + ':children', 'category:' + cid ], next); diff --git a/src/socket.io/helpers.js b/src/socket.io/helpers.js index 69a4a26b54..148420dfb9 100644 --- a/src/socket.io/helpers.js +++ b/src/socket.io/helpers.js @@ -8,6 +8,7 @@ var websockets = require('./index'); var user = require('../user'); var posts = require('../posts'); var topics = require('../topics'); +var categories = require('../categories'); var privileges = require('../privileges'); var notifications = require('../notifications'); var plugins = require('../plugins'); @@ -27,6 +28,12 @@ SocketHelpers.notifyNew = function(uid, type, result) { function(uids, next) { privileges.topics.filterUids('read', result.posts[0].topic.tid, uids, next); }, + function(uids, next) { + topics.filterIgnoringUids(result.posts[0].topic.tid, uids, next); + }, + function(uids, next) { + categories.filterIgnoringUids(result.posts[0].topic.cid, uids, next); + }, function(uids, next) { plugins.fireHook('filter:sockets.sendNewPostToUids', {uidsTo: uids, uidFrom: uid, type: type}, next); } diff --git a/src/socket.io/topics.js b/src/socket.io/topics.js index 18cad2d980..451a1d0dce 100644 --- a/src/socket.io/topics.js +++ b/src/socket.io/topics.js @@ -72,8 +72,15 @@ SocketTopics.createTopicFromPosts = function(socket, data, callback) { topics.createTopicFromPosts(socket.uid, data.title, data.pids, data.fromTid, callback); }; -SocketTopics.toggleFollow = function(socket, tid, callback) { - followCommand(topics.toggleFollow, socket, tid, callback); +SocketTopics.changeWatching = function(socket, data, callback) { + if (!data.tid || !data.type) { + return callback(new Error('[[error:invalid-data]]')); + } + var commands = ['follow', 'unfollow', 'ignore']; + if (commands.indexOf(data.type) === -1) { + return callback(new Error('[[error:invalid-command]]')); + } + followCommand(topics[data.type], socket, data.tid, callback); }; SocketTopics.follow = function(socket, tid, callback) { diff --git a/src/topics.js b/src/topics.js index fbdd507d9a..8c09238e18 100644 --- a/src/topics.js +++ b/src/topics.js @@ -131,6 +131,9 @@ var social = require('./social'); hasRead: function(next) { Topics.hasReadTopics(tids, uid, next); }, + isIgnored: function(next) { + Topics.isIgnoring(tids, uid, next); + }, bookmarks: function(next) { Topics.getUserBookmarks(tids, uid, next); }, @@ -157,7 +160,8 @@ var social = require('./social'); topics[i].pinned = parseInt(topics[i].pinned, 10) === 1; topics[i].locked = parseInt(topics[i].locked, 10) === 1; topics[i].deleted = parseInt(topics[i].deleted, 10) === 1; - topics[i].unread = !results.hasRead[i]; + topics[i].ignored = results.isIgnored[i]; + topics[i].unread = !results.hasRead[i] && !results.isIgnored[i]; topics[i].bookmark = results.bookmarks[i]; topics[i].unreplied = !topics[i].teaser; } @@ -184,6 +188,7 @@ var social = require('./social'); threadTools: async.apply(plugins.fireHook, 'filter:topic.thread_tools', {topic: topicData, uid: uid, tools: []}), tags: async.apply(Topics.getTopicTagsObjects, topicData.tid), isFollowing: async.apply(Topics.isFollowing, [topicData.tid], uid), + isIgnoring: async.apply(Topics.isIgnoring, [topicData.tid], uid), bookmark: async.apply(Topics.getUserBookmark, topicData.tid, uid), postSharing: async.apply(social.getActivePostSharing) }, next); @@ -194,6 +199,8 @@ var social = require('./social'); topicData.thread_tools = results.threadTools.tools; topicData.tags = results.tags; topicData.isFollowing = results.isFollowing[0]; + topicData.isReading = !results.isFollowing[0] && !results.isIgnoring[0]; + topicData.isIgnoring = results.isIgnoring[0]; topicData.bookmark = results.bookmark; topicData.postSharing = results.postSharing; diff --git a/src/topics/delete.js b/src/topics/delete.js index f979d3083a..a960ff0421 100644 --- a/src/topics/delete.js +++ b/src/topics/delete.js @@ -113,6 +113,7 @@ module.exports = function(Topics) { function(next) { db.deleteAll([ 'tid:' + tid + ':followers', + 'tid:' + tid + ':ignorers', 'tid:' + tid + ':posts', 'tid:' + tid + ':posts:votes', 'tid:' + tid + ':bookmarks', diff --git a/src/topics/follow.js b/src/topics/follow.js index 209151d8e5..7b4054ac03 100644 --- a/src/topics/follow.js +++ b/src/topics/follow.js @@ -56,12 +56,12 @@ module.exports = function(Topics) { if (!exists) { return next(new Error('[[error:no-topic]]')); } - db.setAdd('tid:' + tid + ':followers', uid, next); + follow(tid, uid, next); }, - async.apply(plugins.fireHook, 'action:topic.follow', { uid: uid, tid: tid }), - function(next) { - db.sortedSetAdd('uid:' + uid + ':followed_tids', Date.now(), tid, next); - } + function (next) { + unignore(tid, uid, next); + }, + async.apply(plugins.fireHook, 'action:topic.follow', {uid: uid, tid: tid}) ], callback); }; @@ -75,14 +75,77 @@ module.exports = function(Topics) { if (!exists) { return next(new Error('[[error:no-topic]]')); } + unfollow(tid, uid, next); + }, + function (next) { + unignore(tid, uid, next); + }, + async.apply(plugins.fireHook, 'action:topic.unfollow', {uid: uid, tid: tid}), + ], callback); + }; + + Topics.ignore = function(tid, uid, callback) { + callback = callback || function() {}; + async.waterfall([ + function (next) { + Topics.exists(tid, next); + }, + function (exists, next) { + if (!exists) { + return next(new Error('[[error:no-topic]]')); + } + ignore(tid, uid, next); + }, + function (next) { + unfollow(tid, uid, next); + }, + async.apply(plugins.fireHook, 'action:topic.ignore', {uid: uid, tid: tid}) + ], callback); + }; + + function follow(tid, uid, callback) { + async.waterfall([ + function (next) { + db.setAdd('tid:' + tid + ':followers', uid, next); + }, + function (next) { + db.sortedSetAdd('uid:' + uid + ':followed_tids', Date.now(), tid, next); + } + ], callback); + } + + function unfollow(tid, uid, callback) { + async.waterfall([ + function (next) { db.setRemove('tid:' + tid + ':followers', uid, next); }, - async.apply(plugins.fireHook, 'action:topic.unfollow', { uid: uid, tid: tid }), - function(next) { + function (next) { db.sortedSetRemove('uid:' + uid + ':followed_tids', tid, next); } ], callback); - }; + } + + function ignore(tid, uid, callback) { + async.waterfall([ + function (next) { + db.setAdd('tid:' + tid + ':ignorers', uid, next); + }, + function(next) { + db.sortedSetAdd('uid:' + uid + ':ignored_tids', Date.now(), tid, next); + } + ], callback); + } + + function unignore(tid, uid, callback) { + async.waterfall([ + function (next) { + db.setRemove('tid:' + tid + ':ignorers', uid, next); + }, + function(next) { + db.sortedSetRemove('uid:' + uid + ':ignored_tids', tid, next); + } + ], callback); + } Topics.isFollowing = function(tids, uid, callback) { if (!Array.isArray(tids)) { @@ -97,10 +160,46 @@ module.exports = function(Topics) { db.isMemberOfSets(keys, uid, callback); }; + Topics.isIgnoring = function(tids, uid, callback) { + if (!Array.isArray(tids)) { + return callback(); + } + if (!parseInt(uid, 10)) { + return callback(null, tids.map(function() { return false; })); + } + var keys = tids.map(function(tid) { + return 'tid:' + tid + ':ignorers'; + }); + db.isMemberOfSets(keys, uid, callback); + }; + Topics.getFollowers = function(tid, callback) { db.getSetMembers('tid:' + tid + ':followers', callback); }; + Topics.getIgnorers = function(tid, callback) { + db.getSetMembers('tid:' + tid + ':ignorers', callback); + }; + + Topics.filterIgnoringUids = function(tid, uids, callback){ + async.waterfall([ + function (next){ + Topics.getIgnorers(tid, next); + }, + function (ignorerUids, next){ + if (!ignorerUids.length) { + return next(null, uids); + } + + var readingUids = uids.filter(function(uid) { + return ignorerUids.indexOf(uid.toString()) === -1; + }); + + next(null, readingUids); + } + ], callback); + }; + Topics.notifyFollowers = function(postData, exceptUid, callback) { callback = callback || function() {}; var followers; diff --git a/src/topics/unread.js b/src/topics/unread.js index 9dcfd8bdd9..c62ae5ac3a 100644 --- a/src/topics/unread.js +++ b/src/topics/unread.js @@ -87,6 +87,9 @@ module.exports = function(Topics) { } user.getIgnoredCategories(uid, next); }, + ignoredTids: function(next) { + user.getIgnoredTids(uid, 0, -1, next); + }, recentTids: function(next) { db.getSortedSetRevRangeByScoreWithScores('topics:recent', 0, -1, '+inf', cutoff, next); }, @@ -116,6 +119,9 @@ module.exports = function(Topics) { }); var tids = results.recentTids.filter(function(recentTopic) { + if (results.ignoredTids.indexOf(recentTopic.value.toString()) !== -1) { + return false; + } switch (filter) { case 'new': return !userRead[recentTopic.value]; diff --git a/src/user.js b/src/user.js index 19c60fc1fd..c7fb18e4fc 100644 --- a/src/user.js +++ b/src/user.js @@ -1,12 +1,12 @@ 'use strict'; -var async = require('async'), +var async = require('async'); - plugins = require('./plugins'), - db = require('./database'), - topics = require('./topics'), - privileges = require('./privileges'), - utils = require('../public/src/utils'); +var plugins = require('./plugins'); +var db = require('./database'); +var topics = require('./topics'); +var privileges = require('./privileges'); +var utils = require('../public/src/utils'); (function(User) { @@ -19,6 +19,7 @@ var async = require('async'), require('./user/auth')(User); require('./user/create')(User); require('./user/posts')(User); + require('./user/topics')(User); require('./user/categories')(User); require('./user/follow')(User); require('./user/profile')(User); diff --git a/src/user/categories.js b/src/user/categories.js index 612b5ec14e..7a87f5e441 100644 --- a/src/user/categories.js +++ b/src/user/categories.js @@ -45,6 +45,9 @@ module.exports = function(User) { return next(new Error('[[error:no-category]]')); } db.sortedSetAdd('uid:' + uid + ':ignored:cids', Date.now(), cid, next); + }, + function (next) { + db.sortedSetAdd('cid:' + cid + ':ignorers', Date.now(), uid, next); } ], callback); }; @@ -63,6 +66,9 @@ module.exports = function(User) { return next(new Error('[[error:no-category]]')); } db.sortedSetRemove('uid:' + uid + ':ignored:cids', cid, next); + }, + function (next) { + db.sortedSetRemove('cid:' + cid + ':ignorers', uid, next); } ], callback); }; diff --git a/src/user/delete.js b/src/user/delete.js index 99119c7ffb..6c5a92e225 100644 --- a/src/user/delete.js +++ b/src/user/delete.js @@ -102,8 +102,12 @@ module.exports = function(User) { }, function(next) { var keys = [ - 'uid:' + uid + ':notifications:read', 'uid:' + uid + ':notifications:unread', - 'uid:' + uid + ':favourites', 'uid:' + uid + ':followed_tids', 'user:' + uid + ':settings', + 'uid:' + uid + ':notifications:read', + 'uid:' + uid + ':notifications:unread', + 'uid:' + uid + ':favourites', + 'uid:' + uid + ':followed_tids', + 'uid:' + uid + ':ignored_tids', + 'user:' + uid + ':settings', 'uid:' + uid + ':topics', 'uid:' + uid + ':posts', 'uid:' + uid + ':chats', 'uid:' + uid + ':chats:unread', 'uid:' + uid + ':chat:rooms', 'uid:' + uid + ':chat:rooms:unread', diff --git a/src/user/posts.js b/src/user/posts.js index 78a2db0923..c5d8cfba1a 100644 --- a/src/user/posts.js +++ b/src/user/posts.js @@ -1,9 +1,9 @@ 'use strict'; -var async = require('async'), - db = require('../database'), - meta = require('../meta'), - privileges = require('../privileges'); +var async = require('async'); +var db = require('../database'); +var meta = require('../meta'); +var privileges = require('../privileges'); module.exports = function(User) { @@ -83,13 +83,6 @@ module.exports = function(User) { db.sortedSetAdd('uid:' + uid + ':posts', timestamp, pid, callback); }; - User.addTopicIdToUser = function(uid, tid, timestamp, callback) { - async.parallel([ - async.apply(db.sortedSetAdd, 'uid:' + uid + ':topics', timestamp, tid), - async.apply(User.incrementUserFieldBy, uid, 'topiccount', 1) - ], callback); - }; - User.incrementUserPostCountBy = function(uid, value, callback) { callback = callback || function() {}; User.incrementUserFieldBy(uid, 'postcount', value, function(err, newpostcount) { diff --git a/src/user/topics.js b/src/user/topics.js new file mode 100644 index 0000000000..2df535a1ce --- /dev/null +++ b/src/user/topics.js @@ -0,0 +1,19 @@ +'use strict'; + +var async = require('async'); +var db = require('../database'); + +module.exports = function(User) { + + User.getIgnoredTids = function(uid, start, stop, callback) { + db.getSortedSetRevRange('uid:' + uid + ':ignored_tids', start, stop, callback); + }; + + User.addTopicIdToUser = function(uid, tid, timestamp, callback) { + async.parallel([ + async.apply(db.sortedSetAdd, 'uid:' + uid + ':topics', timestamp, tid), + async.apply(User.incrementUserFieldBy, uid, 'topiccount', 1) + ], callback); + }; + +}; \ No newline at end of file diff --git a/tests/topics.js b/tests/topics.js index 60c71960cd..ebf97f17b6 100644 --- a/tests/topics.js +++ b/tests/topics.js @@ -57,28 +57,28 @@ describe('Topic\'s', function() { }); it('should fail to create new topic with invalid user id', function(done) { - topics.post({uid: null, title: topic.title, content: topic.content, cid: topic.categoryId}, function(err, result) { + topics.post({uid: null, title: topic.title, content: topic.content, cid: topic.categoryId}, function(err) { assert.equal(err.message, '[[error:no-privileges]]'); done(); }); }); it('should fail to create new topic with empty title', function(done) { - topics.post({uid: topic.userId, title: '', content: topic.content, cid: topic.categoryId}, function(err, result) { + topics.post({uid: topic.userId, title: '', content: topic.content, cid: topic.categoryId}, function(err) { assert.ok(err); done(); }); }); it('should fail to create new topic with empty content', function(done) { - topics.post({uid: topic.userId, title: topic.title, content: '', cid: topic.categoryId}, function(err, result) { + topics.post({uid: topic.userId, title: topic.title, content: '', cid: topic.categoryId}, function(err) { assert.ok(err); done(); }); }); it('should fail to create new topic with non-existant category id', function(done) { - topics.post({uid: topic.userId, title: topic.title, content: topic.content, cid: 99}, function(err, result) { + topics.post({uid: topic.userId, title: topic.title, content: topic.content, cid: 99}, function(err) { assert.equal(err.message, '[[error:no-category]]', 'received no error'); done(); }); @@ -107,21 +107,21 @@ describe('Topic\'s', function() { }); it('should fail to create new reply with invalid user id', function(done) { - topics.reply({uid: null, content: 'test post', tid: newTopic.tid}, function(err, result) { + topics.reply({uid: null, content: 'test post', tid: newTopic.tid}, function(err) { assert.equal(err.message, '[[error:no-privileges]]'); done(); }); }); it('should fail to create new reply with empty content', function(done) { - topics.reply({uid: topic.userId, content: '', tid: newTopic.tid}, function(err, result) { + topics.reply({uid: topic.userId, content: '', tid: newTopic.tid}, function(err) { assert.ok(err); done(); }); }); it('should fail to create new reply with invalid topic id', function(done) { - topics.reply({uid: null, content: 'test post', tid: 99}, function(err, result) { + topics.reply({uid: null, content: 'test post', tid: 99}, function(err) { assert.equal(err.message, '[[error:no-topic]]'); done(); }); @@ -189,10 +189,113 @@ describe('Topic\'s', function() { }); }); + describe('.ignore', function(){ + var newTid; + var uid; + var newTopic; + before(function(done){ + uid = topic.userId; + async.waterfall([ + function(done){ + topics.post({uid: topic.userId, title: 'Topic to be ignored', content: 'Just ignore me, please!', cid: topic.categoryId}, function(err, result) { + newTopic = result.topicData; + newTid = newTopic.tid; + done(); + }); + }, + function(done){ + topics.markUnread( newTid, uid, done ); + } + ],done); + }); + + it('should not appear in the unread list', function(done){ + async.waterfall([ + function(done){ + topics.ignore( newTid, uid, done ); + }, + function(done){ + topics.getUnreadTopics(0, uid, 0, -1, done ); + }, + function(results, done){ + var topics = results.topics; + var tids = topics.map( function(topic){ return topic.tid; } ); + assert.equal(tids.indexOf(newTid), -1, 'The topic appeared in the unread list.'); + done(); + } + ], done); + }); + + it('should not appear as unread in the recent list', function(done){ + async.waterfall([ + function(done){ + topics.ignore( newTid, uid, done ); + }, + function(done){ + topics.getLatestTopics( uid, 0, -1, 'year', done ); + }, + function(results, done){ + var topics = results.topics; + var topic; + var i; + for(i = 0; i < topics.length; ++i){ + if( topics[i].tid == newTid ){ + assert.equal(false, topics[i].unread, 'ignored topic was marked as unread in recent list'); + return done(); + } + } + assert.ok(topic, 'topic didn\'t appear in the recent list'); + done(); + } + ], done); + }); + + it('should appear as unread again when marked as reading', function(done){ + async.waterfall([ + function(done){ + topics.ignore( newTid, uid, done ); + }, + function(done){ + topics.follow( newTid, uid, done ); + }, + function(done){ + topics.getUnreadTopics(0, uid, 0, -1, done ); + }, + function(results, done){ + var topics = results.topics; + var tids = topics.map( function(topic){ return topic.tid; } ); + assert.notEqual(tids.indexOf(newTid), -1, 'The topic did not appear in the unread list.'); + done(); + } + ], done); + }); + + it('should appear as unread again when marked as following', function(done){ + async.waterfall([ + function(done){ + topics.ignore( newTid, uid, done ); + }, + function(done){ + topics.follow( newTid, uid, done ); + }, + function(done){ + topics.getUnreadTopics(0, uid, 0, -1, done ); + }, + function(results, done){ + var topics = results.topics; + var tids = topics.map( function(topic){ return topic.tid; } ); + assert.notEqual(tids.indexOf(newTid), -1, 'The topic did not appear in the unread list.'); + done(); + } + ], done); + }); + }); + + describe('.fork', function(){ var newTopic; - var replies = new Array(); + var replies = []; var topicPids; var originalBookmark = 5; function postReply( next ){ From 5d2e5377c5e570f3987980f83288666dfe7108ce Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 18 May 2016 19:22:26 +0300 Subject: [PATCH 0257/1109] fix tests --- tests/topics.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/topics.js b/tests/topics.js index ebf97f17b6..0c04d875bf 100644 --- a/tests/topics.js +++ b/tests/topics.js @@ -215,7 +215,7 @@ describe('Topic\'s', function() { topics.ignore( newTid, uid, done ); }, function(done){ - topics.getUnreadTopics(0, uid, 0, -1, done ); + topics.getUnreadTopics(0, uid, 0, -1, '', done ); }, function(results, done){ var topics = results.topics; @@ -259,7 +259,7 @@ describe('Topic\'s', function() { topics.follow( newTid, uid, done ); }, function(done){ - topics.getUnreadTopics(0, uid, 0, -1, done ); + topics.getUnreadTopics(0, uid, 0, -1, '', done ); }, function(results, done){ var topics = results.topics; @@ -279,7 +279,7 @@ describe('Topic\'s', function() { topics.follow( newTid, uid, done ); }, function(done){ - topics.getUnreadTopics(0, uid, 0, -1, done ); + topics.getUnreadTopics(0, uid, 0, -1, '', done ); }, function(results, done){ var topics = results.topics; From 2fd6391081d88dad13cd877f1066c847f37fa513 Mon Sep 17 00:00:00 2001 From: Dravere Date: Wed, 18 May 2016 18:43:46 +0200 Subject: [PATCH 0258/1109] Made the session cookie aware of the possible relative path (#4663) --- src/middleware/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/middleware/index.js b/src/middleware/index.js index f7e41b8f9b..2e39bb6d70 100644 --- a/src/middleware/index.js +++ b/src/middleware/index.js @@ -62,6 +62,10 @@ module.exports = function(app) { if (nconf.get('secure')) { cookie.secure = true; } + + if (relativePath !== '') { + cookie.path = relativePath; + } app.use(session({ store: db.sessionStore, From a141f6f7ec2a736addc2e61151b125259880fc51 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 18 May 2016 20:02:34 +0300 Subject: [PATCH 0259/1109] updated category watch control --- public/language/en_GB/category.json | 4 ++++ public/src/client/category.js | 11 +++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/public/language/en_GB/category.json b/public/language/en_GB/category.json index f8b02f32f8..d4da76f356 100644 --- a/public/language/en_GB/category.json +++ b/public/language/en_GB/category.json @@ -13,6 +13,10 @@ "share_this_category": "Share this category", "watch": "Watch", "ignore": "Ignore", + "watching": "Watching", + "ignoring": "Ignoring", + "watching.description": "Show topics in unread", + "ignoring.description": "Do not show topics in unread", "watch.message": "You are now watching updates from this category", "ignore.message": "You are now ignoring updates from this category", diff --git a/public/src/client/category.js b/public/src/client/category.js index a441ff5d08..5f44197a6c 100644 --- a/public/src/client/category.js +++ b/public/src/client/category.js @@ -62,17 +62,20 @@ define('forum/category', [ }; function handleIgnoreWatch(cid) { - $('.watch, .ignore').on('click', function() { + $('[component="category/watching"], [component="category/ignoring"]').on('click', function() { var $this = $(this); - var command = $this.hasClass('watch') ? 'watch' : 'ignore'; + var command = $this.attr('component') === 'category/watching' ? 'watch' : 'ignore'; socket.emit('categories.' + command, cid, function(err) { if (err) { return app.alertError(err.message); } - $('.watch').toggleClass('hidden', command === 'watch'); - $('.ignore').toggleClass('hidden', command === 'ignore'); + $('[component="category/watching/menu"]').toggleClass('hidden', command !== 'watch'); + $('[component="category/watching/check"]').toggleClass('fa-check', command === 'watch'); + + $('[component="category/ignoring/menu"]').toggleClass('hidden', command !== 'ignore'); + $('[component="category/ignoring/check"]').toggleClass('fa-check', command === 'ignore'); app.alertSuccess('[[category:' + command + '.message]]'); }); From 7a044b4978f6a0836762617e23d9ddf37d95fa51 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 19 May 2016 11:06:17 +0300 Subject: [PATCH 0260/1109] better filterIgnoringUids --- src/categories.js | 13 ++++--------- src/topics/follow.js | 15 +++++---------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/src/categories.js b/src/categories.js index a000eff251..539a643f80 100644 --- a/src/categories.js +++ b/src/categories.js @@ -312,17 +312,12 @@ var privileges = require('./privileges'); Categories.filterIgnoringUids = function(cid, uids, callback) { async.waterfall([ function (next){ - Categories.getIgnorers(cid, 0, -1, next); + db.sortedSetScores('cid:' + cid + ':ignorers', uids, next); }, - function (ignorerUids, next){ - if (!ignorerUids.length) { - return next(null, uids); - } - - var readingUids = uids.filter(function(uid) { - return ignorerUids.indexOf(uid.toString()) === -1; + function (scores, next) { + var readingUids = uids.filter(function(uid, index) { + return uid && !!scores[index]; }); - next(null, readingUids); } ], callback); diff --git a/src/topics/follow.js b/src/topics/follow.js index 7b4054ac03..42143b5641 100644 --- a/src/topics/follow.js +++ b/src/topics/follow.js @@ -181,20 +181,15 @@ module.exports = function(Topics) { db.getSetMembers('tid:' + tid + ':ignorers', callback); }; - Topics.filterIgnoringUids = function(tid, uids, callback){ + Topics.filterIgnoringUids = function(tid, uids, callback) { async.waterfall([ function (next){ - Topics.getIgnorers(tid, next); + db.isSetMembers('tid:' + tid + ':ignorers', uids, next); }, - function (ignorerUids, next){ - if (!ignorerUids.length) { - return next(null, uids); - } - - var readingUids = uids.filter(function(uid) { - return ignorerUids.indexOf(uid.toString()) === -1; + function (isMembers, next){ + var readingUids = uids.filter(function(uid, index) { + return uid && isMembers[index]; }); - next(null, readingUids); } ], callback); From 11d3834eb90b680cc6525fe81903dd5e9341b70b Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 19 May 2016 13:11:42 +0300 Subject: [PATCH 0261/1109] better filtering if topic is followed but category ignored show it in unread --- public/language/en_GB/topic.json | 4 ++-- src/socket.io/helpers.js | 32 +++++++++++++++++++++++++++----- src/topics/unread.js | 25 +++++++++++++++++++------ 3 files changed, 48 insertions(+), 13 deletions(-) diff --git a/public/language/en_GB/topic.json b/public/language/en_GB/topic.json index a64bd15ca7..176e9daa52 100644 --- a/public/language/en_GB/topic.json +++ b/public/language/en_GB/topic.json @@ -55,8 +55,8 @@ "reading": "Reading", "ignoring": "Ignoring", "following.description": "Notify me of new replies", - "reading.description": "Show topic in unread list", - "ignoring.description": "Do not show topic in unread list", + "reading.description": "Show topic in unread", + "ignoring.description": "Do not show topic in unread", "thread_tools.title": "Topic Tools", "thread_tools.markAsUnreadForAll": "Mark Unread", diff --git a/src/socket.io/helpers.js b/src/socket.io/helpers.js index 148420dfb9..68182293f4 100644 --- a/src/socket.io/helpers.js +++ b/src/socket.io/helpers.js @@ -4,11 +4,11 @@ var async = require('async'); var winston = require('winston'); var S = require('string'); +var db = require('../database'); var websockets = require('./index'); var user = require('../user'); var posts = require('../posts'); var topics = require('../topics'); -var categories = require('../categories'); var privileges = require('../privileges'); var notifications = require('../notifications'); var plugins = require('../plugins'); @@ -29,10 +29,7 @@ SocketHelpers.notifyNew = function(uid, type, result) { privileges.topics.filterUids('read', result.posts[0].topic.tid, uids, next); }, function(uids, next) { - topics.filterIgnoringUids(result.posts[0].topic.tid, uids, next); - }, - function(uids, next) { - categories.filterIgnoringUids(result.posts[0].topic.cid, uids, next); + filterTidCidIgnorers(uids, result.posts[0].topic.tid, result.posts[0].topic.cid, next); }, function(uids, next) { plugins.fireHook('filter:sockets.sendNewPostToUids', {uidsTo: uids, uidFrom: uid, type: type}, next); @@ -55,6 +52,31 @@ SocketHelpers.notifyNew = function(uid, type, result) { }); }; +function filterTidCidIgnorers(uids, tid, cid, callback) { + async.waterfall([ + function (next) { + async.parallel({ + topicFollowed: function(next) { + db.isSetMembers('tid:' + tid + ':followers', uids, next); + }, + topicIgnored: function(next) { + db.isSetMembers('tid:' + tid + ':ignorers', uids, next); + }, + categoryIgnored: function(next) { + db.sortedSetScores('cid:' + cid + ':ignorers', uids, next); + } + }, next); + }, + function (results, next) { + uids = uids.filter(function(uid, index) { + return results.topicFollowed[index] || + (!results.topicFollowed[index] && !results.topicIgnored[index] && !results.categoryIgnored[index]); + }); + next(null, uids); + } + ], callback); +} + SocketHelpers.sendNotificationToPostOwner = function(pid, fromuid, notification) { if (!pid || !fromuid || !notification) { return; diff --git a/src/topics/unread.js b/src/topics/unread.js index c62ae5ac3a..b4900be3a1 100644 --- a/src/topics/unread.js +++ b/src/topics/unread.js @@ -144,7 +144,7 @@ module.exports = function(Topics) { tids = tids.slice(0, 200); - filterTopics(uid, tids, cid, ignoredCids, next); + filterTopics(uid, tids, cid, ignoredCids, filter, next); } ], callback); }; @@ -161,7 +161,7 @@ module.exports = function(Topics) { }); } - function filterTopics(uid, tids, cid, ignoredCids, callback) { + function filterTopics(uid, tids, cid, ignoredCids, filter, callback) { if (!Array.isArray(ignoredCids) || !tids.length) { return callback(null, tids); } @@ -171,11 +171,24 @@ module.exports = function(Topics) { privileges.topics.filterTids('read', tids, uid, next); }, function(tids, next) { - Topics.getTopicsFields(tids, ['tid', 'cid'], next); + async.parallel({ + topics: function(next) { + Topics.getTopicsFields(tids, ['tid', 'cid'], next); + }, + isTopicsFollowed: function(next) { + if (filter === 'watched' || filter === 'new') { + return next(null, []); + } + db.sortedSetScores('uid:' + uid + ':followed_tids', tids, next); + } + }, next); }, - function(topics, next) { - tids = topics.filter(function(topic) { - return topic && topic.cid && ignoredCids.indexOf(topic.cid.toString()) === -1 && (!cid || parseInt(cid, 10) === parseInt(topic.cid, 10)); + function(results, next) { + var topics = results.topics; + tids = topics.filter(function(topic, index) { + return topic && topic.cid && + (!!results.isTopicsFollowed[index] || ignoredCids.indexOf(topic.cid.toString()) === -1) && + (!cid || parseInt(cid, 10) === parseInt(topic.cid, 10)); }).map(function(topic) { return topic.tid; }); From b02869b0f8d58e3ce81e46dac4dffefe2ded780c Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 19 May 2016 14:20:34 +0300 Subject: [PATCH 0262/1109] renamed reading to not-following added more description text --- public/language/en_GB/topic.json | 10 +++++----- public/src/client/topic/threadTools.js | 14 +++++++------- src/topics.js | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/public/language/en_GB/topic.json b/public/language/en_GB/topic.json index 176e9daa52..11b835981b 100644 --- a/public/language/en_GB/topic.json +++ b/public/language/en_GB/topic.json @@ -51,12 +51,12 @@ "watch.title": "Be notified of new replies in this topic", "unwatch.title": "Stop watching this topic", "share_this_post": "Share this Post", - "following": "Following", - "reading": "Reading", + "watching": "Watching", + "not-watching": "Not Watching", "ignoring": "Ignoring", - "following.description": "Notify me of new replies", - "reading.description": "Show topic in unread", - "ignoring.description": "Do not show topic in unread", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Topic Tools", "thread_tools.markAsUnreadForAll": "Mark Unread", diff --git a/public/src/client/topic/threadTools.js b/public/src/client/topic/threadTools.js index adc110e8a6..605981f484 100644 --- a/public/src/client/topic/threadTools.js +++ b/public/src/client/topic/threadTools.js @@ -84,16 +84,16 @@ define('forum/topic/threadTools', [ fork.init(); $('.topic').on('click', '[component="topic/following"]', function() { - setFollow('follow'); + changeWatching('follow'); }); - $('.topic').on('click', '[component="topic/reading"]', function() { - setFollow('unfollow'); + $('.topic').on('click', '[component="topic/not-following"]', function() { + changeWatching('unfollow'); }); $('.topic').on('click', '[component="topic/ignoring"]', function() { - setFollow('ignore'); + changeWatching('ignore'); }); - function setFollow(type) { + function changeWatching(type) { socket.emit('topics.changeWatching', {tid: tid, type: type}, function(err) { if (err) { return app.alert({ @@ -212,9 +212,9 @@ define('forum/topic/threadTools', [ menu.toggleClass('hidden', state !== 'follow'); components.get('topic/following/check').toggleClass('fa-check', state === 'follow'); - menu = components.get('topic/reading/menu'); + menu = components.get('topic/not-following/menu'); menu.toggleClass('hidden', state !== 'unfollow'); - components.get('topic/reading/check').toggleClass('fa-check', state === 'unfollow'); + components.get('topic/not-following/check').toggleClass('fa-check', state === 'unfollow'); menu = components.get('topic/ignoring/menu'); menu.toggleClass('hidden', state !== 'ignore' ); diff --git a/src/topics.js b/src/topics.js index 8c09238e18..45f87ebfec 100644 --- a/src/topics.js +++ b/src/topics.js @@ -199,7 +199,7 @@ var social = require('./social'); topicData.thread_tools = results.threadTools.tools; topicData.tags = results.tags; topicData.isFollowing = results.isFollowing[0]; - topicData.isReading = !results.isFollowing[0] && !results.isIgnoring[0]; + topicData.isNotFollowing = !results.isFollowing[0] && !results.isIgnoring[0]; topicData.isIgnoring = results.isIgnoring[0]; topicData.bookmark = results.bookmark; topicData.postSharing = results.postSharing; From 9497459784bc7be633378abbaf3c479111d19c4f Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 19 May 2016 14:42:24 +0300 Subject: [PATCH 0263/1109] up themes --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 3a9a9fed1a..ff7ef34f33 100644 --- a/package.json +++ b/package.json @@ -56,9 +56,9 @@ "nodebb-plugin-soundpack-default": "0.1.6", "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", - "nodebb-theme-lavender": "3.0.10", - "nodebb-theme-persona": "4.0.139", - "nodebb-theme-vanilla": "5.0.75", + "nodebb-theme-lavender": "3.0.11", + "nodebb-theme-persona": "4.0.140", + "nodebb-theme-vanilla": "5.0.76", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", "nodemailer-sendmail-transport": "1.0.0", From 23d134ba6ccf8671b94398593e9b6b3c0bf753f2 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 19 May 2016 14:55:24 +0300 Subject: [PATCH 0264/1109] update text --- public/language/en_GB/user.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/language/en_GB/user.json b/public/language/en_GB/user.json index cb0f3d27e0..a0ef56e0e7 100644 --- a/public/language/en_GB/user.json +++ b/public/language/en_GB/user.json @@ -109,8 +109,8 @@ "scroll_to_my_post": "After posting a reply, show the new post", - "follow_topics_you_reply_to": "Follow topics that you reply to", - "follow_topics_you_create": "Follow topics you create", + "follow_topics_you_reply_to": "Watch topics that you reply to", + "follow_topics_you_create": "Watch topics you create", "grouptitle": "Group Title", "no-group-title": "No group title", From b56baf2530daa9bcc9bb3415f826b28d7763c288 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 19 May 2016 15:02:54 +0300 Subject: [PATCH 0265/1109] up themes --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ff7ef34f33..2805948150 100644 --- a/package.json +++ b/package.json @@ -57,8 +57,8 @@ "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", "nodebb-theme-lavender": "3.0.11", - "nodebb-theme-persona": "4.0.140", - "nodebb-theme-vanilla": "5.0.76", + "nodebb-theme-persona": "4.0.141", + "nodebb-theme-vanilla": "5.0.77", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", "nodemailer-sendmail-transport": "1.0.0", From 3f0ca3139306dbfd9aa2aba0c4ddda2903194af2 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 19 May 2016 16:07:19 +0300 Subject: [PATCH 0266/1109] style changes --- src/topics.js | 143 +++++++++++++++++++++------------------------ src/topics/fork.js | 2 +- 2 files changed, 68 insertions(+), 77 deletions(-) diff --git a/src/topics.js b/src/topics.js index 45f87ebfec..0470fe621c 100644 --- a/src/topics.js +++ b/src/topics.js @@ -339,84 +339,75 @@ var social = require('./social'); db.getSortedSetRangeWithScores(['tid:' + tid + ':bookmarks'], 0, -1, callback ); }; - Topics.updateTopicBookmarks = function( tid, pids, callback ){ + Topics.updateTopicBookmarks = function(tid, pids, callback) { var maxIndex; - var Posts = posts; - async.waterfall([ - function(next){ - Topics.getPostCount( tid, next ); - }, - function(postcount, next){ - maxIndex = postcount; - Topics.getTopicBookmarks( tid, next ); - }, - function(bookmarks, next){ - var uids = bookmarks.map( function( bookmark ){return bookmark.value}); - var forkedPosts = pids.map( function( pid ){ return { pid: pid, tid: tid }; } ); - var uidBookmark = new Object(); - var uidData = bookmarks.map( - function( bookmark ){ - var u = new Object(); - u.uid = bookmark.value; - u.bookmark = bookmark.score; - return u; - } ); - async.map( - uidData, - function( data, mapCallback ){ - Posts.getPostIndices( - forkedPosts, - data.uid, - function( err, indices ){ - if( err ){ - callback( err ); - } - data.postIndices = indices; - mapCallback( null, data ); - } ) - }, - function( err, results ){ - if( err ){ - return callback(); - } - async.map( - results, - function( data, mapCallback ){ - var uid = data.uid; - var bookmark = data.bookmark; - bookmark = bookmark < maxIndex ? bookmark : maxIndex; - var postIndices = data.postIndices; - var i; - for( i = 0; i < postIndices.length && postIndices[i] < data.bookmark; ++i ){ - --bookmark; - } - if( bookmark != data.bookmark ){ - mapCallback( null, { uid: uid, bookmark: bookmark } ); - } - else{ - mapCallback( null, null ); - } - }, - function( err, results ){ - async.map( results, - function(ui, cb ){ - if( ui && ui.bookmark){ - Topics.setUserBookmark( tid, ui.uid, ui.bookmark, cb ); - } - else{ - return cb( null, null ); - } - }, - function( err, results ){ - next(); - } - ); - } - ); + async.waterfall([ + function(next) { + Topics.getPostCount(tid, next); + }, + function(postcount, next) { + maxIndex = postcount; + Topics.getTopicBookmarks(tid, next); + }, + function(bookmarks, next) { + var forkedPosts = pids.map(function(pid) { + return {pid: pid, tid: tid}; + }); + + var uidData = bookmarks.map(function(bookmark) { + return { + uid: bookmark.value, + bookmark: bookmark.score + }; + }); + + async.map(uidData, function(data, mapCallback) { + posts.getPostIndices(forkedPosts, data.uid, function(err, indices) { + if (err) { + return callback(err); + } + data.postIndices = indices; + mapCallback(null, data); + }); + }, function(err, results) { + if (err) { + return callback(err); } - ); - }], - function( err, result ){ callback();} ); + async.map(results, function(data, mapCallback) { + var uid = data.uid; + var bookmark = data.bookmark; + bookmark = bookmark < maxIndex ? bookmark : maxIndex; + var postIndices = data.postIndices; + + for (var i = 0; i < postIndices.length && postIndices[i] < data.bookmark; ++i ){ + --bookmark; + } + + if (parseInt(bookmark, 10) !== parseInt(data.bookmark, 10)) { + mapCallback( null, { uid: uid, bookmark: bookmark } ); + } else { + mapCallback( null, null ); + } + }, function(err, results) { + if (err) { + return callback(err); + } + + async.map(results, function(ui, cb) { + if( ui && ui.bookmark) { + Topics.setUserBookmark(tid, ui.uid, ui.bookmark, cb); + } else { + return cb(null, null); + } + }, function(err) { + next(err); + }); + }); + }); + } + ], function(err){ + callback(err); + }); }; }(exports)); diff --git a/src/topics/fork.js b/src/topics/fork.js index 768b656d2a..dc8d66ab83 100644 --- a/src/topics/fork.js +++ b/src/topics/fork.js @@ -55,7 +55,7 @@ module.exports = function(Topics) { } Topics.create({uid: results.postData.uid, title: title, cid: cid}, next); }, - function( results, next) { + function(results, next) { Topics.updateTopicBookmarks(fromTid, pids, function(){ next( null, results );} ); }, function(_tid, next) { From 46d799409392a7317dd2dd73652c332e24a703bd Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 19 May 2016 16:32:29 +0300 Subject: [PATCH 0267/1109] removed some dupe code --- src/topics/follow.js | 113 +++++++++++++++---------------------------- 1 file changed, 38 insertions(+), 75 deletions(-) diff --git a/src/topics/follow.js b/src/topics/follow.js index 42143b5641..1efa4cdc44 100644 --- a/src/topics/follow.js +++ b/src/topics/follow.js @@ -44,6 +44,18 @@ module.exports = function(Topics) { }; Topics.follow = function(tid, uid, callback) { + setWatching(follow, unignore, 'action:topic.follow', tid, uid, callback); + }; + + Topics.unfollow = function(tid, uid, callback) { + setWatching(unfollow, unignore, 'action:topic.unfollow', tid, uid, callback); + }; + + Topics.ignore = function(tid, uid, callback) { + setWatching(ignore, unfollow, 'action:topic.ignore', tid, uid, callback); + }; + + function setWatching(method1, method2, hook, tid, uid, callback) { callback = callback || function() {}; if (!parseInt(uid, 10)) { return callback(); @@ -56,111 +68,62 @@ module.exports = function(Topics) { if (!exists) { return next(new Error('[[error:no-topic]]')); } - follow(tid, uid, next); + method1(tid, uid, next); }, function (next) { - unignore(tid, uid, next); + method2(tid, uid, next); }, - async.apply(plugins.fireHook, 'action:topic.follow', {uid: uid, tid: tid}) + async.apply(plugins.fireHook, hook, {uid: uid, tid: tid}) ], callback); - }; - - Topics.unfollow = function(tid, uid, callback) { - callback = callback || function() {}; - async.waterfall([ - function (next) { - Topics.exists(tid, next); - }, - function (exists, next) { - if (!exists) { - return next(new Error('[[error:no-topic]]')); - } - unfollow(tid, uid, next); - }, - function (next) { - unignore(tid, uid, next); - }, - async.apply(plugins.fireHook, 'action:topic.unfollow', {uid: uid, tid: tid}), - ], callback); - }; - - Topics.ignore = function(tid, uid, callback) { - callback = callback || function() {}; - async.waterfall([ - function (next) { - Topics.exists(tid, next); - }, - function (exists, next) { - if (!exists) { - return next(new Error('[[error:no-topic]]')); - } - ignore(tid, uid, next); - }, - function (next) { - unfollow(tid, uid, next); - }, - async.apply(plugins.fireHook, 'action:topic.ignore', {uid: uid, tid: tid}) - ], callback); - }; + } function follow(tid, uid, callback) { - async.waterfall([ - function (next) { - db.setAdd('tid:' + tid + ':followers', uid, next); - }, - function (next) { - db.sortedSetAdd('uid:' + uid + ':followed_tids', Date.now(), tid, next); - } - ], callback); + addToSets('tid:' + tid + ':followers', 'uid:' + uid + ':followed_tids', tid, uid, callback); } function unfollow(tid, uid, callback) { - async.waterfall([ - function (next) { - db.setRemove('tid:' + tid + ':followers', uid, next); - }, - function (next) { - db.sortedSetRemove('uid:' + uid + ':followed_tids', tid, next); - } - ], callback); + removeFromSets('tid:'+ tid + ':followers', 'uid:' + uid + ':followed_tids', tid, uid, callback); } function ignore(tid, uid, callback) { + addToSets('tid:' + tid + ':ignorers', 'uid:' + uid + ':ignored_tids', tid, uid, callback); + } + + function unignore(tid, uid, callback) { + removeFromSets('tid:'+ tid + ':ignorers', 'uid:' + uid + ':ignored_tids', tid, uid, callback); + } + + function addToSets(set1, set2, tid, uid, callback) { async.waterfall([ function (next) { - db.setAdd('tid:' + tid + ':ignorers', uid, next); + db.setAdd(set1, uid, next); }, function(next) { - db.sortedSetAdd('uid:' + uid + ':ignored_tids', Date.now(), tid, next); + db.sortedSetAdd(set2, Date.now(), tid, next); } ], callback); } - function unignore(tid, uid, callback) { + function removeFromSets(set1, set2, tid, uid, callback) { async.waterfall([ function (next) { - db.setRemove('tid:' + tid + ':ignorers', uid, next); + db.setRemove(set1, uid, next); }, function(next) { - db.sortedSetRemove('uid:' + uid + ':ignored_tids', tid, next); + db.sortedSetRemove(set2, tid, next); } ], callback); } Topics.isFollowing = function(tids, uid, callback) { - if (!Array.isArray(tids)) { - return callback(); - } - if (!parseInt(uid, 10)) { - return callback(null, tids.map(function() { return false; })); - } - var keys = tids.map(function(tid) { - return 'tid:' + tid + ':followers'; - }); - db.isMemberOfSets(keys, uid, callback); + isIgnoringOrFollowing('followers', tids, uid, callback); }; Topics.isIgnoring = function(tids, uid, callback) { + isIgnoringOrFollowing('ignorers', tids, uid, callback); + }; + + function isIgnoringOrFollowing(set, tids, uid, callback) { if (!Array.isArray(tids)) { return callback(); } @@ -168,10 +131,10 @@ module.exports = function(Topics) { return callback(null, tids.map(function() { return false; })); } var keys = tids.map(function(tid) { - return 'tid:' + tid + ':ignorers'; + return 'tid:' + tid + ':' + set; }); db.isMemberOfSets(keys, uid, callback); - }; + } Topics.getFollowers = function(tid, callback) { db.getSetMembers('tid:' + tid + ':followers', callback); From 192998c5c386e9c4b82316f4c634cc6a93a24211 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 19 May 2016 10:02:45 -0400 Subject: [PATCH 0268/1109] Revert "fixed link to documentation, @akhoury" This reverts commit bc0359475c8f897c2133ffe1658599a194da6195. --- src/plugins/hooks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/hooks.js b/src/plugins/hooks.js index 1b186857f4..35eed900c3 100644 --- a/src/plugins/hooks.js +++ b/src/plugins/hooks.js @@ -63,7 +63,7 @@ module.exports = function(Plugins) { if (Plugins.deprecatedHooksParams[_hook]) { winston.warn('[plugins/' + id + '] Hook `' + _hook + '` parameters: `' + Plugins.deprecatedHooksParams[_hook] + '`, are being deprecated, ' + 'all plugins should now use the `middleware/cls` module instead of hook\'s arguments to get a reference to the `req`, `res` and/or `socket` object(s) (from which you can get the current `uid` if you need to.) ' - + '- for more info, visit https://docs.nodebb.org/en/latest/plugins/create.html#getting-a-reference-to-req-res-socket-and-uid-within-any-plugin-hook'); + + '- for more info, visit https://docs.nodebb.org/en/latest/plugins/create.html#getting-a-reference-to-each-request-from-within-any-plugin-hook'); delete Plugins.deprecatedHooksParams[_hook]; } } From cfc4deb83ac1dc2c5fa95a0f6749473b92a8d42d Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 19 May 2016 17:09:00 +0300 Subject: [PATCH 0269/1109] up themes --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2805948150..b9db5de3b4 100644 --- a/package.json +++ b/package.json @@ -56,9 +56,9 @@ "nodebb-plugin-soundpack-default": "0.1.6", "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", - "nodebb-theme-lavender": "3.0.11", - "nodebb-theme-persona": "4.0.141", - "nodebb-theme-vanilla": "5.0.77", + "nodebb-theme-lavender": "3.0.12", + "nodebb-theme-persona": "4.0.142", + "nodebb-theme-vanilla": "5.0.78", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", "nodemailer-sendmail-transport": "1.0.0", From eac2c44e5a091678714201a5040fe3792366508c Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 19 May 2016 18:31:36 +0300 Subject: [PATCH 0270/1109] update not following message --- public/language/en_GB/topic.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/language/en_GB/topic.json b/public/language/en_GB/topic.json index 11b835981b..d0137b82d7 100644 --- a/public/language/en_GB/topic.json +++ b/public/language/en_GB/topic.json @@ -37,7 +37,7 @@ "deleted_message": "This topic has been deleted. Only users with topic management privileges can see it.", "following_topic.message": "You will now be receiving notifications when somebody posts to this topic.", - "not_following_topic.message": "You will no longer receive notifications from this topic.", + "not_following_topic.message": "You will see this topic in the unread topics list, but you will not receive notifications when somebody posts to this topic.", "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Please register or log in in order to subscribe to this topic.", From 492a5ff730009f83ce3f66cebcb906456b6721db Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 19 May 2016 12:26:34 -0400 Subject: [PATCH 0271/1109] proper year in copyright footer --- install/data/footer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/data/footer.json b/install/data/footer.json index 7c71cad648..12528110c6 100644 --- a/install/data/footer.json +++ b/install/data/footer.json @@ -2,7 +2,7 @@ { "widget": "html", "data" : { - "html": "", + "html": "", "title":"", "container":"" } From 95e757ea425464ba1db8eb3c2248834af8804708 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 19 May 2016 15:39:17 -0400 Subject: [PATCH 0272/1109] up mentions --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b9db5de3b4..96a5c0eaaa 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "nodebb-plugin-emoji-one": "1.1.3", "nodebb-plugin-emoji-extended": "1.1.0", "nodebb-plugin-markdown": "5.1.5", - "nodebb-plugin-mentions": "1.1.0", + "nodebb-plugin-mentions": "1.1.1", "nodebb-plugin-soundpack-default": "0.1.6", "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", From fac5856cc02d07536f77055c2bcbd314a5552542 Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Fri, 20 May 2016 09:02:28 -0400 Subject: [PATCH 0273/1109] Latest translations and fallbacks --- public/language/ar/topic.json | 7 +++++++ public/language/bg/topic.json | 7 +++++++ public/language/bn/topic.json | 7 +++++++ public/language/cs/topic.json | 7 +++++++ public/language/da/topic.json | 7 +++++++ public/language/de/topic.json | 7 +++++++ public/language/el/topic.json | 7 +++++++ public/language/en@pirate/topic.json | 7 +++++++ public/language/en_US/topic.json | 7 +++++++ public/language/es/topic.json | 7 +++++++ public/language/et/topic.json | 7 +++++++ public/language/fa_IR/topic.json | 7 +++++++ public/language/fi/topic.json | 7 +++++++ public/language/fr/topic.json | 7 +++++++ public/language/gl/topic.json | 7 +++++++ public/language/he/topic.json | 7 +++++++ public/language/hu/topic.json | 7 +++++++ public/language/id/topic.json | 7 +++++++ public/language/it/topic.json | 7 +++++++ public/language/ja/topic.json | 7 +++++++ public/language/ko/topic.json | 7 +++++++ public/language/lt/topic.json | 7 +++++++ public/language/ms/topic.json | 7 +++++++ public/language/nb/topic.json | 7 +++++++ public/language/nl/topic.json | 7 +++++++ public/language/pl/topic.json | 7 +++++++ public/language/pt_BR/topic.json | 7 +++++++ public/language/ro/topic.json | 7 +++++++ public/language/ru/topic.json | 7 +++++++ public/language/rw/topic.json | 7 +++++++ public/language/sc/topic.json | 7 +++++++ public/language/sk/topic.json | 7 +++++++ public/language/sl/topic.json | 7 +++++++ public/language/sr/topic.json | 7 +++++++ public/language/sv/topic.json | 7 +++++++ public/language/th/topic.json | 7 +++++++ public/language/tr/topic.json | 7 +++++++ public/language/vi/topic.json | 7 +++++++ public/language/zh_CN/topic.json | 7 +++++++ public/language/zh_TW/topic.json | 7 +++++++ 40 files changed, 280 insertions(+) diff --git a/public/language/ar/topic.json b/public/language/ar/topic.json index 81cf19d677..3cb68415e1 100644 --- a/public/language/ar/topic.json +++ b/public/language/ar/topic.json @@ -32,6 +32,7 @@ "deleted_message": "هذه المشاركة محذوفة. فقط من لهم صلاحية الإشراف على ا لمشاركات يمكنهم معاينتها.", "following_topic.message": "ستستلم تنبيها عند كل مشاركة جديدة في هذا الموضوع.", "not_following_topic.message": "لن تستلم أي تنبيه بخصوص عذا الموضوع بعد الآن.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "المرجو إنشاء حساب أو تسجيل الدخول حتى يمكنك متابعة هذا الموضوع.", "markAsUnreadForAll.success": "تم تحديد الموضوع على أنه غير مقروء.", "mark_unread": "Mark unread", @@ -41,6 +42,12 @@ "watch.title": "استلم تنبيها بالردود الجديدة في هذا الموضوع", "unwatch.title": "ألغ مراقبة هذا الموضوع", "share_this_post": "انشر هذا الموضوع", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "أدوات الموضوع", "thread_tools.markAsUnreadForAll": "علم غير مقروء", "thread_tools.pin": "علق الموضوع", diff --git a/public/language/bg/topic.json b/public/language/bg/topic.json index 53a0f49d56..640b8a4eaa 100644 --- a/public/language/bg/topic.json +++ b/public/language/bg/topic.json @@ -32,6 +32,7 @@ "deleted_message": "Тази тема е била изтрита. Само потребители с права за управление на темите могат да я видят.", "following_topic.message": "Вече ще получавате известия когато някой публикува коментар в тази тема.", "not_following_topic.message": "Вече няма да получавате известия за тази тема.", + "ignoring_topic.message": "Вече няма да виждате тази тема в списъка с непрочетени теми. Ще получите известие, когато някой Ви спомене или гласува положително за Ваша публикация.", "login_to_subscribe": "Моля, регистрирайте се или влезте, за да се абонирате за тази тема.", "markAsUnreadForAll.success": "Темата е отбелязана като непрочетена за всички.", "mark_unread": "Отбелязване като непрочетена", @@ -41,6 +42,12 @@ "watch.title": "Получавайте известия за новите отговори в тази тема", "unwatch.title": "Спрете да наблюдавате тази тема", "share_this_post": "Споделете тази публикация", + "watching": "Наблюдавате", + "not-watching": "Не наблюдавате", + "ignoring": "Пренебрегвате", + "watching.description": "Ще получавате известия за новите отговори.
      Темата ще се показва в списъка с непрочетени.", + "not-watching.description": "Няма да получавате известия за новите отговори.
      Темата ще се показва в списъка с непрочетени, само ако категорията не се пренебрегва.", + "ignoring.description": "Няма да получавате известия за новите отговори.
      Темата няма да се показва в списъка с непрочетени.", "thread_tools.title": "Инструменти за темата", "thread_tools.markAsUnreadForAll": "Отбелязване като непрочетена", "thread_tools.pin": "Закачане на темата", diff --git a/public/language/bn/topic.json b/public/language/bn/topic.json index 053cff1d7e..29cb9dec7a 100644 --- a/public/language/bn/topic.json +++ b/public/language/bn/topic.json @@ -32,6 +32,7 @@ "deleted_message": "এই টপিকটি মুছে ফেলা হয়েছে। শুধুমাত্র টপিক ব্যবস্থাপনার ক্ষমতাপ্রাপ্ত সদস্যগণ এটি দেখতে পারবেন।", "following_topic.message": "এখন থেকে এই টপিকে অন্যকেউ পোস্ট করলে আপনি নোটিফিকেশন পাবেন।", "not_following_topic.message": "এই টপিক থেকে আপনি আর নোটিফিকেশন পাবেন না।", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "এই টপিকে সাবস্ক্রাইব করতে চাইলে অনুগ্রহ করে নিবন্ধণ করুন অথবা প্রবেশ করুন।", "markAsUnreadForAll.success": "টপিকটি সবার জন্য অপঠিত হিসাবে মার্ক করুন।", "mark_unread": "Mark unread", @@ -41,6 +42,12 @@ "watch.title": "এই টপিকে নতুন উত্তর এলে বিজ্ঞাপণের মাধ্যমে জানুন।", "unwatch.title": "এই টপিক দেখা বন্ধ করুন", "share_this_post": "এই পোষ্টটি শেয়ার করুন", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "টপিক সম্পর্কিত টুলস", "thread_tools.markAsUnreadForAll": "\"অপঠিত\" হিসেবে চিহ্নিত করুন", "thread_tools.pin": "টপিক পিন করুন", diff --git a/public/language/cs/topic.json b/public/language/cs/topic.json index 2525cff40a..1f62f62a3f 100644 --- a/public/language/cs/topic.json +++ b/public/language/cs/topic.json @@ -32,6 +32,7 @@ "deleted_message": "This topic has been deleted. Only users with topic management privileges can see it.", "following_topic.message": "You will now be receiving notifications when somebody posts to this topic.", "not_following_topic.message": "You will no longer receive notifications from this topic.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Please register or log in in order to subscribe to this topic.", "markAsUnreadForAll.success": "Topic marked as unread for all.", "mark_unread": "Mark unread", @@ -41,6 +42,12 @@ "watch.title": "Be notified of new replies in this topic", "unwatch.title": "Stop watching this topic", "share_this_post": "Sdílet toto téma", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Topic Tools", "thread_tools.markAsUnreadForAll": "Označit jako nepřečtené", "thread_tools.pin": "Pin Topic", diff --git a/public/language/da/topic.json b/public/language/da/topic.json index 67ab4e6174..afa21d92a2 100644 --- a/public/language/da/topic.json +++ b/public/language/da/topic.json @@ -32,6 +32,7 @@ "deleted_message": "Denne tråd er blevet slettet. Kun brugere med emne behandlings privilegier kan se den.", "following_topic.message": "Du vil nu modtage notifikationer når nogle skriver et indlæg i dette emne.", "not_following_topic.message": "Du vil ikke længere modtage notifikationer fra dette emne.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Venligt registrer eller login for at abbonere på dette emne.", "markAsUnreadForAll.success": "Emnet er market ulæst for alle.", "mark_unread": "Marker ulæste", @@ -41,6 +42,12 @@ "watch.title": "Bliv notificeret ved nye indlæg i dette emne", "unwatch.title": "Fjern overvågning af dette emne", "share_this_post": "Del dette indlæg", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Emne værktøjer", "thread_tools.markAsUnreadForAll": "Marker som ulæst", "thread_tools.pin": "Fastgør tråd", diff --git a/public/language/de/topic.json b/public/language/de/topic.json index 2269c91ae5..3a9fd8ebc9 100644 --- a/public/language/de/topic.json +++ b/public/language/de/topic.json @@ -32,6 +32,7 @@ "deleted_message": "Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.", "following_topic.message": "Du erhälst nun eine Benachrichtigung, wenn jemand einen Beitrag zu diesem Thema verfasst.", "not_following_topic.message": "Du erhälst keine weiteren Benachrichtigungen zu diesem Thema mehr.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Bitte registrieren oder einloggen um dieses Thema zu abonnieren", "markAsUnreadForAll.success": "Thema für Alle als ungelesen markiert.", "mark_unread": "Als ungelesen markieren", @@ -41,6 +42,12 @@ "watch.title": "Bei neuen Antworten benachrichtigen", "unwatch.title": "Dieses Thema nicht mehr beobachten", "share_this_post": "Diesen Beitrag teilen", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Themen-Werkzeuge", "thread_tools.markAsUnreadForAll": "Als ungelesen markieren", "thread_tools.pin": "Thema anheften", diff --git a/public/language/el/topic.json b/public/language/el/topic.json index 67ac6e5ef7..868cb0f650 100644 --- a/public/language/el/topic.json +++ b/public/language/el/topic.json @@ -32,6 +32,7 @@ "deleted_message": "Το θέμα αυτό έχει διαγραφεί. Μόνο οι χρήστες με δικαιώματα διαχειριστή θεμάτων μπορούν να το δουν.", "following_topic.message": "Θα λαμβάνεις ειδοποιήσεις όποτε κάποιος δημοσιεύει κάτι σε αυτό το θέμα.", "not_following_topic.message": "Δεν θα λαμβάνεις άλλες ειδοποιήσεις από αυτό το θέμα.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Παρακαλώ εγγράψου ή συνδέσου για για γραφτείς σε αυτό το θέμα.", "markAsUnreadForAll.success": "Το θέμα σημειώθηκε ως μη αναγνωσμένο για όλους.", "mark_unread": "Mark unread", @@ -41,6 +42,12 @@ "watch.title": "Να ειδοποιούμαι για νέες απαντήσεις σε αυτό το θέμα", "unwatch.title": "Να μην παρακολουθώ αυτό το θέμα", "share_this_post": "Μοιράσου αυτή την Δημοσίευση", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Εργαλεία Θέματος", "thread_tools.markAsUnreadForAll": "Σημείωση ως μη αναγνωσμέν", "thread_tools.pin": "Καρφίτσωμα Θέματος", diff --git a/public/language/en@pirate/topic.json b/public/language/en@pirate/topic.json index bdf6d77f91..ab97715c5b 100644 --- a/public/language/en@pirate/topic.json +++ b/public/language/en@pirate/topic.json @@ -32,6 +32,7 @@ "deleted_message": "This topic has been deleted. Only users with topic management privileges can see it.", "following_topic.message": "You will now be receiving notifications when somebody posts to this topic.", "not_following_topic.message": "You will no longer receive notifications from this topic.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Please register or log in in order to subscribe to this topic.", "markAsUnreadForAll.success": "Topic marked as unread for all.", "mark_unread": "Mark unread", @@ -41,6 +42,12 @@ "watch.title": "Be notified of new replies in this topic", "unwatch.title": "Stop watching this topic", "share_this_post": "Share this Post", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Topic Tools", "thread_tools.markAsUnreadForAll": "Mark Unread", "thread_tools.pin": "Pin Topic", diff --git a/public/language/en_US/topic.json b/public/language/en_US/topic.json index bdf6d77f91..ab97715c5b 100644 --- a/public/language/en_US/topic.json +++ b/public/language/en_US/topic.json @@ -32,6 +32,7 @@ "deleted_message": "This topic has been deleted. Only users with topic management privileges can see it.", "following_topic.message": "You will now be receiving notifications when somebody posts to this topic.", "not_following_topic.message": "You will no longer receive notifications from this topic.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Please register or log in in order to subscribe to this topic.", "markAsUnreadForAll.success": "Topic marked as unread for all.", "mark_unread": "Mark unread", @@ -41,6 +42,12 @@ "watch.title": "Be notified of new replies in this topic", "unwatch.title": "Stop watching this topic", "share_this_post": "Share this Post", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Topic Tools", "thread_tools.markAsUnreadForAll": "Mark Unread", "thread_tools.pin": "Pin Topic", diff --git a/public/language/es/topic.json b/public/language/es/topic.json index c9e5849f41..26308aae76 100644 --- a/public/language/es/topic.json +++ b/public/language/es/topic.json @@ -32,6 +32,7 @@ "deleted_message": "Este tema ha sido borrado. Solo los usuarios que tengan privilegios de administración de temas pueden verlo.", "following_topic.message": "Ahora recibiras notificaciones cuando alguien publique en este tema.", "not_following_topic.message": "No recibiras notificaciones de este tema.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Por favor, conéctate para subscribirte a este tema.", "markAsUnreadForAll.success": "Publicación marcada como no leída para todos.", "mark_unread": "Marcar no leído", @@ -41,6 +42,12 @@ "watch.title": "Serás notificado cuando haya nuevas respuestas en este tema", "unwatch.title": "Dejar de seguir este tema", "share_this_post": "Compartir este post", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Herramientas", "thread_tools.markAsUnreadForAll": "Marcar no leído", "thread_tools.pin": "Adherir tema", diff --git a/public/language/et/topic.json b/public/language/et/topic.json index e8fd5f3249..dd6b25ca24 100644 --- a/public/language/et/topic.json +++ b/public/language/et/topic.json @@ -32,6 +32,7 @@ "deleted_message": "See teema on kustutatud. Ainult kasutajad kellel on piisavalt õigusi saavad seda näha.", "following_topic.message": "Sulle ei edastata enam teateid uutest postitustest kui keegi postitab siia teemasse.", "not_following_topic.message": "Sulle ei edastata enam teateid uutest postitustest siin teemas.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Palun registreeru kasutajaks või logi sisse, et tellida teateid selle postituse kohta.", "markAsUnreadForAll.success": "Teema märgitud mitte-loetuks kõikidele.", "mark_unread": "Märgi lugematuks", @@ -41,6 +42,12 @@ "watch.title": "Saa teateid uutest postitustest siin teemas", "unwatch.title": "Ära järgi enam seda teemat", "share_this_post": "Jaga seda postitust", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Teema tööriistad", "thread_tools.markAsUnreadForAll": "Märgi mitte-loetuks", "thread_tools.pin": "Tõsta esile teema", diff --git a/public/language/fa_IR/topic.json b/public/language/fa_IR/topic.json index 335bef6af9..3da49da432 100644 --- a/public/language/fa_IR/topic.json +++ b/public/language/fa_IR/topic.json @@ -32,6 +32,7 @@ "deleted_message": "این موضوع پاک شده است. تنها کاربرانِ با حق مدیریت موضوع می‌توانند آن را ببینند.", "following_topic.message": "از این پس اگر کسی در این موضوع پست بگذارد، شما آگاه خواهید شد.", "not_following_topic.message": "شما دیگر اطلاعیه های این موضوع را دریافت نخواهید کرد.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "برای دنبال کردن این موضوع، لطفا ثبت نام کنید و یا با نام کاربری خود وارد شوید", "markAsUnreadForAll.success": "موضوع برای همگان نخوانده در نظر گرفته شد.", "mark_unread": "Mark unread", @@ -41,6 +42,12 @@ "watch.title": "از پاسخ‌های تازه به این موضوع آگاه شوید.", "unwatch.title": "توقف پیگیری این موضوع", "share_this_post": "به اشتراک‌گذاری این موضوع", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "ابزارهای موضوع", "thread_tools.markAsUnreadForAll": "نخوانده بگیر", "thread_tools.pin": "سنجاق زدن موضوع", diff --git a/public/language/fi/topic.json b/public/language/fi/topic.json index ce37bb1954..9136073cab 100644 --- a/public/language/fi/topic.json +++ b/public/language/fi/topic.json @@ -32,6 +32,7 @@ "deleted_message": "Tämä aihe on poistettu. Vain käyttäjät, joilla on aiheen hallintaoikeudet, voivat nähdä sen.", "following_topic.message": "Saat nyt ilmoituksen, kun joku kirjoittaa tähän aiheeseen.", "not_following_topic.message": "Et saa enää ilmoituksia tästä aiheesta.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Ole hyvä ja rekisteröidy tai kirjaudu sisään tilataksesi tämän aiheen.", "markAsUnreadForAll.success": "Aihe merkitty lukemattomaksi kaikille.", "mark_unread": "Mark unread", @@ -41,6 +42,12 @@ "watch.title": "Ilmoita, kun tähän keskusteluun tulee uusia viestejä", "unwatch.title": "Lopeta tämän aiheen seuraaminen", "share_this_post": "Jaa tämä viesti", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Aiheen työkalut", "thread_tools.markAsUnreadForAll": "Merkitse lukemattomaksi", "thread_tools.pin": "Kiinnitä aihe", diff --git a/public/language/fr/topic.json b/public/language/fr/topic.json index fa172c1cfd..cf74ed31cb 100644 --- a/public/language/fr/topic.json +++ b/public/language/fr/topic.json @@ -32,6 +32,7 @@ "deleted_message": "Ce sujet a été supprimé. Seuls les utilisateurs avec les droits d'administration peuvent le voir.", "following_topic.message": "Vous recevrez désormais des notifications lorsque quelqu'un postera dans ce sujet.", "not_following_topic.message": "Vous ne recevrez plus de notifications pour ce sujet.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Veuillez vous enregistrer ou vous connecter afin de vous abonner à ce sujet.", "markAsUnreadForAll.success": "Sujet marqué comme non lu pour tout le monde.", "mark_unread": "Marquer comme non-lu", @@ -41,6 +42,12 @@ "watch.title": "Être notifié des nouvelles réponses dans ce sujet", "unwatch.title": "Arrêter de surveiller ce sujet", "share_this_post": "Partager ce message", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Outils pour sujets", "thread_tools.markAsUnreadForAll": "Marquer comme non lu", "thread_tools.pin": "Épingler le sujet", diff --git a/public/language/gl/topic.json b/public/language/gl/topic.json index c1771dd834..f83cc7ee34 100644 --- a/public/language/gl/topic.json +++ b/public/language/gl/topic.json @@ -32,6 +32,7 @@ "deleted_message": "Este tema foi borrado. Só os usuarios con privilexios administrativos poden velo.", "following_topic.message": "Agora recibirás notificacións cando alguén publique neste tema.", "not_following_topic.message": "Non recibirás notificacións deste tema.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Por favor, identifícate para subscribirte a este tema.", "markAsUnreadForAll.success": "Publicación marcada como non lida para todos.", "mark_unread": "Marcar coma non lido", @@ -41,6 +42,12 @@ "watch.title": "Serás notificado canto haxa novas respostas neste tema", "unwatch.title": "Deixar de vixiar este tema", "share_this_post": "Compartir esta publicación", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Ferramentas do tema", "thread_tools.markAsUnreadForAll": "Marcar como non lido", "thread_tools.pin": "Fixar Tema", diff --git a/public/language/he/topic.json b/public/language/he/topic.json index 49191ba202..d1b892a460 100644 --- a/public/language/he/topic.json +++ b/public/language/he/topic.json @@ -32,6 +32,7 @@ "deleted_message": "נושא זה נמחק. רק משתמשים עם ההרשאות המתאימות יכולים לצפות בו.", "following_topic.message": "מעתה, תקבל הודעות כאשר מישהו יעלה פוסט לנושא זה.", "not_following_topic.message": "לא תקבל הודעות נוספות בנושא זה.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "אנא הרשם או התחבר על-מנת לעקוב אחר נושא זה.", "markAsUnreadForAll.success": "נושא זה סומן כלא נקרא לכולם.", "mark_unread": "סמן כלא נקרא", @@ -41,6 +42,12 @@ "watch.title": "קבל התראה כאשר יש תגובות חדשות בנושא זה", "unwatch.title": "הפסק לעקוב אחר נושא זה", "share_this_post": "שתף פוסט זה", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "כלי נושא", "thread_tools.markAsUnreadForAll": "סמן כלא נקרא", "thread_tools.pin": "נעץ נושא", diff --git a/public/language/hu/topic.json b/public/language/hu/topic.json index be4895f558..d96b4b61a8 100644 --- a/public/language/hu/topic.json +++ b/public/language/hu/topic.json @@ -32,6 +32,7 @@ "deleted_message": "This topic has been deleted. Only users with topic management privileges can see it.", "following_topic.message": "You will now be receiving notifications when somebody posts to this topic.", "not_following_topic.message": "You will no longer receive notifications from this topic.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Please register or log in in order to subscribe to this topic.", "markAsUnreadForAll.success": "Topic marked as unread for all.", "mark_unread": "Mark unread", @@ -41,6 +42,12 @@ "watch.title": "Be notified of new replies in this topic", "unwatch.title": "Stop watching this topic", "share_this_post": "Hozzászólás megosztása", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Topic Tools", "thread_tools.markAsUnreadForAll": "Olvasatlannak jelölés", "thread_tools.pin": "Kiemel", diff --git a/public/language/id/topic.json b/public/language/id/topic.json index 07a4b79bcd..b1cf656bcc 100644 --- a/public/language/id/topic.json +++ b/public/language/id/topic.json @@ -32,6 +32,7 @@ "deleted_message": "Topik ini telah dihapus. Hanya pengguna dengan hak manajemen topik yang dapat melihatnya.", "following_topic.message": "Saat ini kamu akan menerima pemberitahuan saat seseorang membuat posting di dalam topik ini.", "not_following_topic.message": "Kamu tidak lagi menerima notiifikasi dari topik ini.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Daftar atau login untuk berlangganan topik ini.", "markAsUnreadForAll.success": "Topik ditandai Belum Dibaca seluruhnya", "mark_unread": "Mark unread", @@ -41,6 +42,12 @@ "watch.title": "Beritahukan balasan baru untuk topik ini", "unwatch.title": "Berhenti memantau topik ini", "share_this_post": "Bagikan Posting ini", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Perangkat Topik", "thread_tools.markAsUnreadForAll": "Tandai Belum Dibaca", "thread_tools.pin": "Tempel Topik", diff --git a/public/language/it/topic.json b/public/language/it/topic.json index 11809f9697..c8ec24ade8 100644 --- a/public/language/it/topic.json +++ b/public/language/it/topic.json @@ -32,6 +32,7 @@ "deleted_message": "Questa discussione è stata cancellata. Solo gli utenti con diritti di gestione possono vederla.", "following_topic.message": "Da ora riceverai notifiche quando qualcuno posterà in questa discussione.", "not_following_topic.message": "Non riceverai più notifiche da questa discussione.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Si prega di accedere o registrarsi per potersi iscrivere a questa discussione.", "markAsUnreadForAll.success": "Discussione segnata come non letta per tutti.", "mark_unread": "Segna come non letto", @@ -41,6 +42,12 @@ "watch.title": "Ricevi notifiche di nuove risposte in questa discussione", "unwatch.title": "Smetti di osservare questa discussione", "share_this_post": "Condividi questo Post", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Strumenti per la Discussione", "thread_tools.markAsUnreadForAll": "Segna come non letto", "thread_tools.pin": "Fissa Discussione", diff --git a/public/language/ja/topic.json b/public/language/ja/topic.json index 3bb4bfe0a7..2428021556 100644 --- a/public/language/ja/topic.json +++ b/public/language/ja/topic.json @@ -32,6 +32,7 @@ "deleted_message": "このトピックが削除されました。トピック管理権を持っているユーザーにしか読めません。", "following_topic.message": "このスレッドが更新された際に通知を受け取ります。", "not_following_topic.message": "このスレッドの更新通知を停止しました。", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "このスレッドを購読するためにログインが必要です。", "markAsUnreadForAll.success": "すべてのスレッドを未読にしました。", "mark_unread": "未読として示す", @@ -41,6 +42,12 @@ "watch.title": "新しいポストの通知を受ける", "unwatch.title": "このトピックの通知を停止します", "share_this_post": "ポストを共有", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "トピックのツール", "thread_tools.markAsUnreadForAll": "未読にする", "thread_tools.pin": "スレッドを最上部に固定", diff --git a/public/language/ko/topic.json b/public/language/ko/topic.json index daea5fa614..cc156f3114 100644 --- a/public/language/ko/topic.json +++ b/public/language/ko/topic.json @@ -32,6 +32,7 @@ "deleted_message": "이 주제는 삭제되었습니다. 주제 관리 권한이 있는 사용자만 볼 수 있습니다.", "following_topic.message": "이제 이 주제에 새 답글이 달리면 알림을 받습니다.", "not_following_topic.message": "더 이상 이 주제의 새 답글을 알리지 않습니다.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "이 주제의 알림을 받기 위해서는 로그인해야 합니다.", "markAsUnreadForAll.success": "모든 사용자에 대해 읽지 않음으로 표시했습니다.", "mark_unread": "읽지 않음으로 표시", @@ -41,6 +42,12 @@ "watch.title": "이 주제의 새 답글 알리기", "unwatch.title": "이 주제에 대한 관심을 해제합니다.", "share_this_post": "이 게시물 공유", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "주제 관리", "thread_tools.markAsUnreadForAll": "모두에게 읽지 않음으로 표시", "thread_tools.pin": "상단 고정", diff --git a/public/language/lt/topic.json b/public/language/lt/topic.json index d6094a6e83..e2e85315f5 100644 --- a/public/language/lt/topic.json +++ b/public/language/lt/topic.json @@ -32,6 +32,7 @@ "deleted_message": "Ši tema buvo ištrinta. Tik Vartotojai su temos redagavimo privilegijomis gali matyti ja", "following_topic.message": "Dabar jūs gausite pranešimus kai kas nors atrašys šioje temoje.", "not_following_topic.message": "Jūs daugiau negausite pranešimų iš šios temos.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Norėdami prenumeruoti šią temą, prašome prisiregistruoti arba prisijungti.", "markAsUnreadForAll.success": "Tema visiems vartotojams pažymėta kaip neskaityta.", "mark_unread": "Mark unread", @@ -41,6 +42,12 @@ "watch.title": "Gauti pranešimą apie naujus įrašus šioje temoje", "unwatch.title": "Baigti šios temos stebėjimą", "share_this_post": "Dalintis šiuo įrašu", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Temos priemonės", "thread_tools.markAsUnreadForAll": "Pažymėti kaip neskaitytą", "thread_tools.pin": "Prisegti temą", diff --git a/public/language/ms/topic.json b/public/language/ms/topic.json index c568eb5fc0..cb75bb32bc 100644 --- a/public/language/ms/topic.json +++ b/public/language/ms/topic.json @@ -32,6 +32,7 @@ "deleted_message": "Topik ini telah dipadam. Hanya pengguna dengan kuasa pengurusan boleh melihatnya.", "following_topic.message": "Anda akan menerima makluman apabila ada kiriman ke dalam topik ini", "not_following_topic.message": "Anda tidak lagi akan menerima makluman daripada topik ini", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Sila daftar atau log masuk untuk melanggani topik ini", "markAsUnreadForAll.success": "Topik ditanda sebagai belum dibaca untuk semua", "mark_unread": "Mark unread", @@ -41,6 +42,12 @@ "watch.title": "Akan dimaklumkan sekiranya ada balasan dalam topik ini", "unwatch.title": "Berhenti melihat topik ini", "share_this_post": "Kongsi kiriman ini", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Perkakas Topik", "thread_tools.markAsUnreadForAll": "Tanda sebagai belum dibaca", "thread_tools.pin": "Pinkan topik", diff --git a/public/language/nb/topic.json b/public/language/nb/topic.json index c5171e064f..f214fd1bd7 100644 --- a/public/language/nb/topic.json +++ b/public/language/nb/topic.json @@ -32,6 +32,7 @@ "deleted_message": "Dette emnet har blitt slettet. Bare brukere med emnehåndterings-privilegier kan se den.", "following_topic.message": "Du vil nå motta varsler når noen skriver i denne tråden.", "not_following_topic.message": "Du vil ikke lenger motta varsler fra denne tråden.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Vennligst registrer deg eller logg inn for å abonnere på denne tråden.", "markAsUnreadForAll.success": "Tråd markert som ulest for alle.", "mark_unread": "Mark unread", @@ -41,6 +42,12 @@ "watch.title": "Bli varslet om nye svar i dette emnet", "unwatch.title": "Slutt å overvåke dette emnet", "share_this_post": "Del ditt innlegg", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Emneverktøy", "thread_tools.markAsUnreadForAll": "Marker som ulest", "thread_tools.pin": "Fest tråd", diff --git a/public/language/nl/topic.json b/public/language/nl/topic.json index 99eb3edb16..bab7e4a94f 100644 --- a/public/language/nl/topic.json +++ b/public/language/nl/topic.json @@ -32,6 +32,7 @@ "deleted_message": "Dit onderwerp is verwijderd. Alleen gebruikers met beheerrechten op onderwerpniveau kunnen dit inzien.", "following_topic.message": "Vanaf nu worden meldingen ontvangen zodra iemand een reactie op dit onderwerp geeft.", "not_following_topic.message": "Je ontvangt geen notificaties meer over dit onderwerp.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Log in or registreer om dit onderwerp te volgen.", "markAsUnreadForAll.success": "Onderwerp is voor iedereen als ongelezen gemarkeerd.", "mark_unread": "Ongelezen markeren", @@ -41,6 +42,12 @@ "watch.title": "Krijg meldingen van nieuwe reacties op dit onderwerp", "unwatch.title": "Dit onderwerp niet langer volgen", "share_this_post": "Deel dit bericht", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Acties", "thread_tools.markAsUnreadForAll": "Ongelezen markeren", "thread_tools.pin": "Onderwerp vastpinnen", diff --git a/public/language/pl/topic.json b/public/language/pl/topic.json index 31184759de..a9cdd21460 100644 --- a/public/language/pl/topic.json +++ b/public/language/pl/topic.json @@ -32,6 +32,7 @@ "deleted_message": "Ten temat został skasowany. Tylko użytkownicy z uprawnieniami do zarządzania mogą go zobaczyć.", "following_topic.message": "Będziesz od teraz otrzymywał powiadomienia, gdy ktoś odpowie w tym temacie.", "not_following_topic.message": "Nie będziesz już otrzymywał powiadomień z tego tematu.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Zaloguj się, aby subskrybować ten temat.", "markAsUnreadForAll.success": "Temat oznaczony jako nieprzeczytany dla wszystkich.", "mark_unread": "Oznacz jako nieprzeczytany", @@ -41,6 +42,12 @@ "watch.title": "Otrzymuj powiadomienia o nowych odpowiedziach w tym temacie", "unwatch.title": "Przestań obserwować ten temat", "share_this_post": "Udostępnij", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Narzędzia Tematu", "thread_tools.markAsUnreadForAll": "Oznacz jako nieprzeczytany", "thread_tools.pin": "Przypnij Temat", diff --git a/public/language/pt_BR/topic.json b/public/language/pt_BR/topic.json index cc4e420d83..e1dc6bffd7 100644 --- a/public/language/pt_BR/topic.json +++ b/public/language/pt_BR/topic.json @@ -32,6 +32,7 @@ "deleted_message": "Este tópico foi deletado. Apenas usuários com privilégios de moderação de tópico podem vê-lo.", "following_topic.message": "Agora você receberá notificações quando alguém responder este tópico.", "not_following_topic.message": "Você não receberá mais notificações sobre este tópico.", + "ignoring_topic.message": "Você não verá mais este tópico na lista de tópicos não lidos. Você será notificado quando você for mencionado ou sua postagem for votada positivamente.", "login_to_subscribe": "Por favor se cadastre ou entre para assinar à este tópico.", "markAsUnreadForAll.success": "Tópico marcado como não lido para todos.", "mark_unread": "Marcar como não lidas", @@ -41,6 +42,12 @@ "watch.title": "Seja notificado sobre novas respostas neste tópico", "unwatch.title": "Parar de acompanhar este tópico", "share_this_post": "Compartilhar este Post", + "watching": "Seguindo", + "not-watching": "Não Seguindo", + "ignoring": "Ignorando", + "watching.description": "Me notificar de novas respostas.
      Mostrar tópico em não-lidos.", + "not-watching.description": "Não me notificar de novas respostas.
      Mostrar tópico em não-lido se a categoria não estiver sendo ignorada.", + "ignoring.description": "Não me notificar de novas respostas.
      Não mostrar tópico em não-lido.", "thread_tools.title": "Ferramentas de Tópico", "thread_tools.markAsUnreadForAll": "Marcar Não Lido", "thread_tools.pin": "Fixar Tópico", diff --git a/public/language/ro/topic.json b/public/language/ro/topic.json index e67e9d7cbf..83340e2e4b 100644 --- a/public/language/ro/topic.json +++ b/public/language/ro/topic.json @@ -32,6 +32,7 @@ "deleted_message": "Acest subiect a fost șters. Doar utilizatorii cu privilegii pentru moderarea subiectelor îl poate vedea.", "following_topic.message": "Vei primi notificări când cineva va posta un nou mesaj in acest subiect.", "not_following_topic.message": "Nu vei mai primi notificări legate de acest subiect.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Te rugăm să te înregistrezi sau să te autentifici ca să te poți abona la acest subiect.", "markAsUnreadForAll.success": "Subiect marcat ca citit pentru toți.", "mark_unread": "Mark unread", @@ -41,6 +42,12 @@ "watch.title": "Abonează-te la notificări legate de acest subiect", "unwatch.title": "Oprește urmărirea acestui subiect", "share_this_post": "Distribuie acest mesaj", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Unelte pentru subiecte", "thread_tools.markAsUnreadForAll": "Marchează Necitit", "thread_tools.pin": "Pin Subiect", diff --git a/public/language/ru/topic.json b/public/language/ru/topic.json index 3cd2ddbdb7..151c8503d1 100644 --- a/public/language/ru/topic.json +++ b/public/language/ru/topic.json @@ -32,6 +32,7 @@ "deleted_message": "Эта тема была удалена. Только пользователи с правами управления темами могут ее видеть.", "following_topic.message": "Теперь вы будете получать уведомления при обновлении этой темы.", "not_following_topic.message": "Вы больше не будете получать уведомления из этой темы.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Пожалуйста зарегистрируйтесь, или войдите под своим аккаунтом, чтобы подписаться на эту тему.", "markAsUnreadForAll.success": "Тема помечена как непрочитанная для всех.", "mark_unread": "Отметить как непрочитанное", @@ -41,6 +42,12 @@ "watch.title": "Сообщать мне об ответах в этой теме", "unwatch.title": "Не сообщать мне об ответах в этой теме", "share_this_post": "Поделиться этим Сообщением", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Опции темы", "thread_tools.markAsUnreadForAll": "Отметить как непрочитанные", "thread_tools.pin": "Прикрепить тему", diff --git a/public/language/rw/topic.json b/public/language/rw/topic.json index 1ad35cdaf0..261758b052 100644 --- a/public/language/rw/topic.json +++ b/public/language/rw/topic.json @@ -32,6 +32,7 @@ "deleted_message": "Iki kiganiro cyamaze gukurwaho. Abantu babifitiye uburenganzira ni bo bonyine bashobora kukibona. ", "following_topic.message": "Ntabwo uzongera kubimenyeshwa nihagira umuntu ugira icyo yandika kuri iki kiganiro. ", "not_following_topic.message": "Ntabwo uzongera kujya umenyeshwa ku bibera muri iki kiganiro. ", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Ba umunyamuryango cyangwa winjiremo niba ushaka kwiyandikisha kuri iki kiganiro. ", "markAsUnreadForAll.success": "Ikiganiro kigizwe nk'icyasomwe na bose", "mark_unread": "Garagaza nk'ibyasomwe", @@ -41,6 +42,12 @@ "watch.title": "Ujye umenyeshwa ibyongerwaho bishya kuri iki kiganiro", "unwatch.title": "Rekera aho gucunga iki kiganiro", "share_this_post": "Sangiza Ibi", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Ibikoresho by'Ikiganiro", "thread_tools.markAsUnreadForAll": "Bigaragaze nk'Ibyasomwe", "thread_tools.pin": "Zamura Ikiganiro", diff --git a/public/language/sc/topic.json b/public/language/sc/topic.json index 074062ecb6..cae1e2843e 100644 --- a/public/language/sc/topic.json +++ b/public/language/sc/topic.json @@ -32,6 +32,7 @@ "deleted_message": "This topic has been deleted. Only users with topic management privileges can see it.", "following_topic.message": "As a retzire notìficas si calincunu pùblica in custa arresonada.", "not_following_topic.message": "No as a retzire prus notìficas pro custa arresonada.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Pro praghere registra·ti o intra pro sutascrìere custa arresonada.", "markAsUnreadForAll.success": "Arresonada marcada comente de lèghere pro totus.", "mark_unread": "Mark unread", @@ -41,6 +42,12 @@ "watch.title": "Be notified of new replies in this topic", "unwatch.title": "Stop watching this topic", "share_this_post": "Cumpartzi custu Arresonu", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Topic Tools", "thread_tools.markAsUnreadForAll": "Signa comente De Lèghere", "thread_tools.pin": "Pone in evidèntzia s'Arresonda", diff --git a/public/language/sk/topic.json b/public/language/sk/topic.json index df1ecdd198..8db00e4e56 100644 --- a/public/language/sk/topic.json +++ b/public/language/sk/topic.json @@ -32,6 +32,7 @@ "deleted_message": "This topic has been deleted. Only users with topic management privileges can see it.", "following_topic.message": "Budete teraz príjimať notifikácie, ked niekto prispeje do témy.", "not_following_topic.message": "Nebudete už dostávať notifikácie z tejto Témy", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Prosím Zaregistrujte sa alebo sa Prihláste, aby ste mohli odoberať túto Tému", "markAsUnreadForAll.success": "Téma označená ako neprečítaná pre všetkých.", "mark_unread": "Mark unread", @@ -41,6 +42,12 @@ "watch.title": "Buďte informovaní o nových odpovediach k tejto téme", "unwatch.title": "Stop watching this topic", "share_this_post": "Zdielaj tento príspevok", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Topic Tools", "thread_tools.markAsUnreadForAll": "Označ ako neprečítané", "thread_tools.pin": "Zviditeľniť tému", diff --git a/public/language/sl/topic.json b/public/language/sl/topic.json index 705f9564ec..00eadc76e0 100644 --- a/public/language/sl/topic.json +++ b/public/language/sl/topic.json @@ -32,6 +32,7 @@ "deleted_message": "Ta tema je bila izbrisana. Le uporabniki s pravicami teme jo lahko vidijo.", "following_topic.message": "Sedaj boste dobili obvestila, ko bo nekdo objavil v to temo.", "not_following_topic.message": "Ne boste več prejemali obvestil s te teme.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Prosimo prijavite ali registrirajte se za naročanje o tej temi.", "markAsUnreadForAll.success": "Tema označena kot neprebrana za vse.", "mark_unread": "Mark unread", @@ -41,6 +42,12 @@ "watch.title": "Bodi obveščen o novih odgovorih v tej temi", "unwatch.title": "Prenehaj spremljati to temo", "share_this_post": "Deli to objavo", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Orodja teme", "thread_tools.markAsUnreadForAll": "Označi kot neprebrano", "thread_tools.pin": "Prilepi temo", diff --git a/public/language/sr/topic.json b/public/language/sr/topic.json index a5ae516c6f..18b2227b96 100644 --- a/public/language/sr/topic.json +++ b/public/language/sr/topic.json @@ -32,6 +32,7 @@ "deleted_message": "This topic has been deleted. Only users with topic management privileges can see it.", "following_topic.message": "You will now be receiving notifications when somebody posts to this topic.", "not_following_topic.message": "You will no longer receive notifications from this topic.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Please register or log in in order to subscribe to this topic.", "markAsUnreadForAll.success": "Topic marked as unread for all.", "mark_unread": "Mark unread", @@ -41,6 +42,12 @@ "watch.title": "Be notified of new replies in this topic", "unwatch.title": "Stop watching this topic", "share_this_post": "Share this Post", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Алатке теме", "thread_tools.markAsUnreadForAll": "Означи као непрочитано", "thread_tools.pin": "Pin Topic", diff --git a/public/language/sv/topic.json b/public/language/sv/topic.json index 603390ac0e..373d60492c 100644 --- a/public/language/sv/topic.json +++ b/public/language/sv/topic.json @@ -32,6 +32,7 @@ "deleted_message": "Det här ämnet har raderats. Endast användare med ämneshanterings-privilegier kan se det.", "following_topic.message": "Du kommer nu få notiser när någon gör inlägg i detta ämne.", "not_following_topic.message": "Du kommer inte längre få notiser från detta ämne.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Var god registrera eller logga in för att kunna prenumerera på detta ämne.", "markAsUnreadForAll.success": "Ämne markerat som oläst av alla.", "mark_unread": "Markera som oläst", @@ -41,6 +42,12 @@ "watch.title": "Få notis om nya svar till det här ämnet", "unwatch.title": "Sluta bevaka detta ämne", "share_this_post": "Dela detta inlägg", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Ämnesverktyg", "thread_tools.markAsUnreadForAll": "Markera som oläst", "thread_tools.pin": "Nåla fast ämne", diff --git a/public/language/th/topic.json b/public/language/th/topic.json index 7ad792070d..ee282402b0 100644 --- a/public/language/th/topic.json +++ b/public/language/th/topic.json @@ -32,6 +32,7 @@ "deleted_message": "Topic นี้ถูกลบไปแล้ว เฉพาะผู้ใช้งานที่มีสิทธิ์ในการจัดการ Topic เท่านั้นที่จะมีสิทธิ์ในการเข้าชม", "following_topic.message": "คุณจะได้รับการแจ้งเตือนเมื่อมีคนโพสต์ในกระทู้นี้", "not_following_topic.message": "คุณจะไม่รับการแจ้งเตือนจากกระทู้นี้", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "กรุณาลงทะเบียนหรือเข้าสู่ระบบเพื่อที่จะติดตามกระทู้นี้", "markAsUnreadForAll.success": "ทำเครื่องหมายว่ายังไม่ได้อ่านทั้งหมด", "mark_unread": "Mark unread", @@ -41,6 +42,12 @@ "watch.title": "ให้แจ้งเตือนเมื่อมีการตอบกลับ Topic นี้", "unwatch.title": "ยกเลิกการติดตาม Topic นี้", "share_this_post": "แชร์โพสต์นี้", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "เครื่องมือช่วยจัดการ Topic", "thread_tools.markAsUnreadForAll": "ทำหมายว่ายังไม่ได้อ่าน", "thread_tools.pin": "ปักหมุดกระทู้", diff --git a/public/language/tr/topic.json b/public/language/tr/topic.json index 13ccc1cc66..ab96d25288 100644 --- a/public/language/tr/topic.json +++ b/public/language/tr/topic.json @@ -32,6 +32,7 @@ "deleted_message": "Bu başlık silindi. Sadece başlık düzenleme yetkisi olan kullanıcılar görebilir.", "following_topic.message": "Artık bir kullanıcı bu başlığa ileti gönderdiğinde bildirim alacaksınız.", "not_following_topic.message": "Artık bu başlık için bildirim almayacaksınız.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Lütfen bu iletiyi başlığa üye olmak için giriş yapın.", "markAsUnreadForAll.success": "Başlık herkes için okunmadı olarak işaretlendi.", "mark_unread": "Okunmadı olarak işaretle", @@ -41,6 +42,12 @@ "watch.title": "Bu başlığa gelen yeni iletilerden haberdar ol", "unwatch.title": "Bu konuyu izleme", "share_this_post": "Bu iletiyi paylaş", + "watching": "Takip Et", + "not-watching": "Takip etme", + "ignoring": "Sustur", + "watching.description": "Yeni bir ileti geldiğinde beni bildir.
      Okunmamış olarak göster.", + "not-watching.description": "Yeni bir ileti geldiğinde bildirme.
      Kategori susturulmamışsa okunmamış olarak göster.", + "ignoring.description": "Yeni bir ileti geldiğinde bildirme.
      Okunmamış olarak gösterme.", "thread_tools.title": "Konu Ayaları", "thread_tools.markAsUnreadForAll": "Okunmadı Olarak İşaretle", "thread_tools.pin": "Başlığı İğnele", diff --git a/public/language/vi/topic.json b/public/language/vi/topic.json index c4dc23759f..f2c053ec13 100644 --- a/public/language/vi/topic.json +++ b/public/language/vi/topic.json @@ -32,6 +32,7 @@ "deleted_message": "Chủ đề này đã bị xóa. Chỉ ban quản trị mới xem được.", "following_topic.message": "Từ giờ bạn sẽ nhận được thông báo khi có ai đó gửi bài viết trong chủ đề này", "not_following_topic.message": "Bạn sẽ không còn nhận được thông báo từ chủ đề này", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "Xin hãy đăng ký hoặc đăng nhập để theo dõi topic này", "markAsUnreadForAll.success": "Chủ đề đã được đánh dấu là chưa đọc toàn bộ", "mark_unread": "Đánh dấu chưa đọc", @@ -41,6 +42,12 @@ "watch.title": "Được thông báo khi có trả lời mới trong chủ đề này", "unwatch.title": "Ngừng theo dõi chủ đề này", "share_this_post": "Chia sẻ bài viết này", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "Công cụ", "thread_tools.markAsUnreadForAll": "Đánh dấu chưa đọc", "thread_tools.pin": "Pin chủ đề", diff --git a/public/language/zh_CN/topic.json b/public/language/zh_CN/topic.json index f23e8e1417..cad170a7aa 100644 --- a/public/language/zh_CN/topic.json +++ b/public/language/zh_CN/topic.json @@ -32,6 +32,7 @@ "deleted_message": "此主题已被删除。只有拥有主题管理权限的用户可以查看。", "following_topic.message": "当有人回复此主题时,您会收到通知。", "not_following_topic.message": "您已停止接收此主题的通知。", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "请注册或登录后,再订阅此主题。", "markAsUnreadForAll.success": "将全部主题标为未读。", "mark_unread": "标记为未读", @@ -41,6 +42,12 @@ "watch.title": "当此主题有新回复时,通知我", "unwatch.title": "取消关注此主题", "share_this_post": "分享", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "主题工具", "thread_tools.markAsUnreadForAll": "标记为未读", "thread_tools.pin": "置顶主题", diff --git a/public/language/zh_TW/topic.json b/public/language/zh_TW/topic.json index e5718a0040..e0efc6b3fc 100644 --- a/public/language/zh_TW/topic.json +++ b/public/language/zh_TW/topic.json @@ -32,6 +32,7 @@ "deleted_message": "此主題已被刪除。只有具有主題管理權限的用戶才能看到它。", "following_topic.message": "有人貼文回覆主題時, 你將會收到新通知.", "not_following_topic.message": "有人貼文回覆主題時, 你將不會收到通知.", + "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", "login_to_subscribe": "請先註冊或登錄, 才可訂閱此主題.", "markAsUnreadForAll.success": "將全部的主題設為未讀.", "mark_unread": "標為未讀", @@ -41,6 +42,12 @@ "watch.title": "當主題有新回覆時將收到通知", "unwatch.title": "停止關注這個主題", "share_this_post": "分享這篇文章", + "watching": "Watching", + "not-watching": "Not Watching", + "ignoring": "Ignoring", + "watching.description": "Notify me of new replies.
      Show topic in unread.", + "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", + "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", "thread_tools.title": "主題工具箱", "thread_tools.markAsUnreadForAll": "設為未讀", "thread_tools.pin": "釘選主題", From d34af3a796be4b6a05091c3f401195c276582a58 Mon Sep 17 00:00:00 2001 From: Aziz Khoury Date: Fri, 20 May 2016 13:27:29 -0400 Subject: [PATCH 0274/1109] CLS must be required first to avoid issues. see https://gist.github.com/akhoury/acb852798e319b5ede93431e5910d3ef --- app.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app.js b/app.js index fa8964fb35..9d706f9389 100644 --- a/app.js +++ b/app.js @@ -22,6 +22,7 @@ var nconf = require('nconf'); nconf.argv().env('__'); +require('continuation-local-storage'); var url = require('url'), async = require('async'), From ecf9359fb368b5dada42b0f2daaa700b119f18bc Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Sat, 21 May 2016 09:02:58 -0400 Subject: [PATCH 0275/1109] Latest translations and fallbacks --- public/language/ru/email.json | 2 +- public/language/ru/error.json | 6 +++--- public/language/ru/modules.json | 18 +++++++++--------- public/language/ru/topic.json | 2 +- public/language/ru/uploads.json | 8 ++++---- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/public/language/ru/email.json b/public/language/ru/email.json index ac5902b0dd..f76b43d120 100644 --- a/public/language/ru/email.json +++ b/public/language/ru/email.json @@ -24,7 +24,7 @@ "digest.day": "день", "digest.week": "неделя", "digest.month": "месяц", - "digest.subject": "Digest for %1", + "digest.subject": "Дайджест для %1", "notif.chat.subject": "Новое сообщение от %1", "notif.chat.cta": "Нажмите для продолжения диалога", "notif.chat.unsub.info": "Вы получили это уведомление в соответствии с настройками подписок.", diff --git a/public/language/ru/error.json b/public/language/ru/error.json index 319bea7abe..4353291dc2 100644 --- a/public/language/ru/error.json +++ b/public/language/ru/error.json @@ -28,7 +28,7 @@ "password-too-long": "Пароль слишком длинный", "user-banned": "Пользователь заблокирован", "user-too-new": "Вы можете написать свое первой сообщение через %1 сек.", - "blacklisted-ip": "Sorry, your IP address has been banned from this community. If you feel this is in error, please contact an administrator.", + "blacklisted-ip": "Извините, ваш IP адрес был забанен этим сообществом. Если вы считаете что это ошибка, пожалуйста, свяжитесь с администратором.", "no-category": "Категория не существует", "no-topic": "Тема не существует", "no-post": "Сообщение не существует", @@ -86,7 +86,7 @@ "cant-edit-chat-message": "У вас нет доступа для редактирования этого сообщения", "cant-remove-last-user": "Вы не можете убрать последнего пользователя", "cant-delete-chat-message": "У вас нет доступа на удаление этого сообщения", - "already-voting-for-this-post": "You have already voted for this post.", + "already-voting-for-this-post": "Вы уже голосовали за это сообщение.", "reputation-system-disabled": "Система репутации отключена.", "downvoting-disabled": "Понижение оценки отключено", "not-enough-reputation-to-downvote": "У Вас недостаточно репутации для понижения оценки сообщения", @@ -101,5 +101,5 @@ "no-session-found": "Сессия входа не найдена!", "not-in-room": "Пользователь не в комнате", "no-users-in-room": "В этой комнате нет пользователей", - "cant-kick-self": "You can't kick yourself from the group" + "cant-kick-self": "Вы не можете удалить себя сами из группы." } \ No newline at end of file diff --git a/public/language/ru/modules.json b/public/language/ru/modules.json index ef7ef72724..a4dfd79293 100644 --- a/public/language/ru/modules.json +++ b/public/language/ru/modules.json @@ -6,7 +6,7 @@ "chat.user_typing": "%1 печатает ...", "chat.user_has_messaged_you": "%1 отправил вам сообщение.", "chat.see_all": "Посмотреть все чаты", - "chat.mark_all_read": "Mark all chats read", + "chat.mark_all_read": "Отметить все чаты как прочитанные", "chat.no-messages": "Пожалуйста, выберите собеседника для просмотра истории сообщений", "chat.no-users-in-room": "В этой комнате нет пользователей", "chat.recent-chats": "Последние переписки", @@ -29,14 +29,14 @@ "composer.submit_and_lock": "Отправить и закрыть", "composer.toggle_dropdown": "Показать выпадающий список", "composer.uploading": "Загрузка %1", - "composer.formatting.bold": "Bold", - "composer.formatting.italic": "Italic", - "composer.formatting.list": "List", - "composer.formatting.strikethrough": "Strikethrough", - "composer.formatting.link": "Link", - "composer.formatting.picture": "Picture", - "composer.upload-picture": "Upload Image", - "composer.upload-file": "Upload File", + "composer.formatting.bold": "Жирность", + "composer.formatting.italic": "Курсив", + "composer.formatting.list": "Список", + "composer.formatting.strikethrough": "Перечеркивание", + "composer.formatting.link": "Ссылка", + "composer.formatting.picture": "Изображение", + "composer.upload-picture": "Загрузить изображение", + "composer.upload-file": "Загрузить файл", "bootbox.ok": "ОК", "bootbox.cancel": "Отмена", "bootbox.confirm": "Подтвердить", diff --git a/public/language/ru/topic.json b/public/language/ru/topic.json index 151c8503d1..e9ba3b041c 100644 --- a/public/language/ru/topic.json +++ b/public/language/ru/topic.json @@ -44,7 +44,7 @@ "share_this_post": "Поделиться этим Сообщением", "watching": "Watching", "not-watching": "Not Watching", - "ignoring": "Ignoring", + "ignoring": "Игнорирование", "watching.description": "Notify me of new replies.
      Show topic in unread.", "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", diff --git a/public/language/ru/uploads.json b/public/language/ru/uploads.json index 1622cb5693..dedc27456d 100644 --- a/public/language/ru/uploads.json +++ b/public/language/ru/uploads.json @@ -1,6 +1,6 @@ { - "uploading-file": "Uploading the file...", - "select-file-to-upload": "Select a file to upload!", - "upload-success": "File uploaded successfully!", - "maximum-file-size": "Maximum %1 kb" + "uploading-file": "Загрузка файла...", + "select-file-to-upload": "Укажите файл для загрузки!", + "upload-success": "Файл успешно загружен!", + "maximum-file-size": "Максимум %1 kb" } \ No newline at end of file From 86cab0787afd0577e57ce225bcb7307d94b17a26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Sat, 21 May 2016 19:26:06 +0300 Subject: [PATCH 0276/1109] closes #4668 --- public/language/en_GB/error.json | 7 +++++++ public/src/client/topic/postTools.js | 31 ++++++++++++++++++++++++++++ src/controllers/topics.js | 1 + src/views/partials/data/topic.tpl | 2 +- 4 files changed, 40 insertions(+), 1 deletion(-) diff --git a/public/language/en_GB/error.json b/public/language/en_GB/error.json index a159a0e42c..cfbebc4c0a 100644 --- a/public/language/en_GB/error.json +++ b/public/language/en_GB/error.json @@ -50,6 +50,13 @@ "topic-locked": "Topic Locked", "post-edit-duration-expired": "You are only allowed to edit posts for %1 second(s) after posting", + "post-edit-duration-expired-minutes": "You are only allowed to edit posts for %1 minute(s) after posting", + "post-edit-duration-expired-minutes-seconds": "You are only allowed to edit posts for %1 minute(s) %2 second(s) after posting", + "post-edit-duration-expired-hours": "You are only allowed to edit posts for %1 hour(s) after posting", + "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-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", + "content-too-short": "Please enter a longer post. Posts should contain at least %1 character(s).", "content-too-long": "Please enter a shorter post. Posts can't be longer than %1 character(s).", diff --git a/public/src/client/topic/postTools.js b/public/src/client/topic/postTools.js index d1961a29a6..98b6ef1470 100644 --- a/public/src/client/topic/postTools.js +++ b/public/src/client/topic/postTools.js @@ -168,6 +168,37 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translator postContainer.on('click', '[component="post/edit"]', function() { var btn = $(this); + + var timestamp = parseInt(getData(btn, 'data-timestamp'), 10); + var postEditDuration = parseInt(ajaxify.data.postEditDuration, 10); + if (postEditDuration && Date.now() - timestamp > postEditDuration * 1000) { + var numDays = Math.floor(postEditDuration / 86400); + var numHours = Math.floor((postEditDuration % 86400) / 3600); + var numMinutes = Math.floor(((postEditDuration % 86400) % 3600) / 60); + var numSeconds = ((postEditDuration % 86400) % 3600) % 60; + var msg = '[[error:post-edit-duration-expired, ' + postEditDuration + ']]'; + if (numDays) { + if (numHours) { + msg = '[[error:post-edit-duration-expired-days-hours, ' + numDays + ', ' + numHours + ']]'; + } else { + msg = '[[error:post-edit-duration-expired-days, ' + numDays + ']]'; + } + } else if (numHours) { + if (numMinutes) { + msg = '[[error:post-edit-duration-expired-hours-minutes, ' + numHours + ', ' + numMinutes + ']]'; + } else { + msg = '[[error:post-edit-duration-expired-hours, ' + numHours + ']]'; + } + } else if (numMinutes) { + if (numSeconds) { + msg = '[[error:post-edit-duration-expired-minutes-seconds, ' + numMinutes + ', ' + numSeconds + ']]'; + } else { + msg = '[[error:post-edit-duration-expired-minutes, ' + numMinutes + ']]'; + } + } + return app.alertError(msg); + } + $(window).trigger('action:composer.post.edit', { pid: getData(btn, 'data-pid') }); diff --git a/src/controllers/topics.js b/src/controllers/topics.js index 74604c0085..750622b4b4 100644 --- a/src/controllers/topics.js +++ b/src/controllers/topics.js @@ -264,6 +264,7 @@ topicsController.get = function(req, res, callback) { data['downvote:disabled'] = parseInt(meta.config['downvote:disabled'], 10) === 1; data['feeds:disableRSS'] = parseInt(meta.config['feeds:disableRSS'], 10) === 1; data.bookmarkThreshold = parseInt(meta.config.bookmarkThreshold, 10) || 5; + data.postEditDuration = parseInt(meta.config.postEditDuration, 10); data.scrollToMyPost = settings.scrollToMyPost; data.rssFeedUrl = nconf.get('relative_path') + '/topic/' + data.tid + '.rss'; data.pagination = pagination.create(currentPage, pageCount); diff --git a/src/views/partials/data/topic.tpl b/src/views/partials/data/topic.tpl index d7fd1deb50..ea6fea2a3c 100644 --- a/src/views/partials/data/topic.tpl +++ b/src/views/partials/data/topic.tpl @@ -1 +1 @@ -data-index="{posts.index}" data-pid="{posts.pid}" data-uid="{posts.uid}" data-username="{posts.user.username}" data-userslug="{posts.user.userslug}" itemscope itemtype="http://schema.org/Comment" \ No newline at end of file +data-index="{posts.index}" data-pid="{posts.pid}" data-uid="{posts.uid}" data-timestamp="{posts.timestamp}" data-username="{posts.user.username}" data-userslug="{posts.user.userslug}" itemscope itemtype="http://schema.org/Comment" \ No newline at end of file From 6f544aba7987a245bf773e683f644ed38eeb7771 Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Sun, 22 May 2016 09:03:09 -0400 Subject: [PATCH 0277/1109] Latest translations and fallbacks --- public/language/ar/error.json | 1 + public/language/bg/error.json | 1 + public/language/bn/error.json | 1 + public/language/cs/error.json | 1 + public/language/da/error.json | 1 + public/language/de/error.json | 1 + public/language/el/error.json | 1 + public/language/en@pirate/error.json | 1 + public/language/en_US/error.json | 1 + public/language/es/error.json | 1 + public/language/et/error.json | 1 + public/language/fa_IR/error.json | 1 + public/language/fi/error.json | 1 + public/language/fr/error.json | 1 + public/language/gl/error.json | 1 + public/language/he/error.json | 1 + public/language/hu/error.json | 1 + public/language/id/error.json | 1 + public/language/it/error.json | 1 + public/language/ja/error.json | 1 + public/language/ko/error.json | 1 + public/language/lt/error.json | 1 + public/language/ms/error.json | 1 + public/language/nb/error.json | 1 + public/language/nl/error.json | 1 + public/language/pl/error.json | 1 + public/language/pt_BR/error.json | 1 + public/language/ro/error.json | 1 + public/language/ru/error.json | 1 + public/language/rw/error.json | 1 + public/language/sc/error.json | 1 + public/language/sk/error.json | 1 + public/language/sl/error.json | 1 + public/language/sr/error.json | 1 + public/language/sv/email.json | 8 ++++---- public/language/sv/error.json | 15 ++++++++------- public/language/sv/global.json | 2 +- public/language/sv/login.json | 2 +- public/language/sv/modules.json | 16 ++++++++-------- public/language/sv/topic.json | 14 +++++++------- public/language/th/error.json | 1 + public/language/tr/error.json | 1 + public/language/vi/error.json | 1 + public/language/zh_CN/error.json | 1 + public/language/zh_TW/error.json | 1 + 45 files changed, 68 insertions(+), 28 deletions(-) diff --git a/public/language/ar/error.json b/public/language/ar/error.json index a7812cddb0..3bf837409e 100644 --- a/public/language/ar/error.json +++ b/public/language/ar/error.json @@ -14,6 +14,7 @@ "invalid-password": "كلمة السر غير مقبولة", "invalid-username-or-password": "المرجود تحديد اسم مستخدم و كلمة مرور", "invalid-search-term": "كلمة البحث غير صحيحة", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", "username-taken": "اسم المستخدم مأخوذ", "email-taken": "البريد الالكتروني مأخوذ", diff --git a/public/language/bg/error.json b/public/language/bg/error.json index 3086ffa309..e802137ceb 100644 --- a/public/language/bg/error.json +++ b/public/language/bg/error.json @@ -14,6 +14,7 @@ "invalid-password": "Грешна парола", "invalid-username-or-password": "Моля, посочете потребителско име и парола", "invalid-search-term": "Грешен текст за търсене", + "csrf-invalid": "Не успяхме да Ви впишем, най-вероятно защото сесията Ви е изтекла. Моля, опитайте отново", "invalid-pagination-value": "Грешен номер на страница, трябва да бъде между %1 и %2", "username-taken": "Потребителското име е заето", "email-taken": "Е-пощата е заета", diff --git a/public/language/bn/error.json b/public/language/bn/error.json index 76929fd53b..9ab8ec0dda 100644 --- a/public/language/bn/error.json +++ b/public/language/bn/error.json @@ -14,6 +14,7 @@ "invalid-password": "ভুল পাসওয়ার্ড", "invalid-username-or-password": "অনুগ্রহ পূর্বক ইউজারনেম এবং পাসওয়ার্ড উভয়ই প্রদান করুন", "invalid-search-term": "অগ্রহনযোগ্য সার্চ টার্ম", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", "username-taken": "ইউজারনেম আগেই ব্যবহৃত", "email-taken": "ইমেইল আগেই ব্যবহৃত", diff --git a/public/language/cs/error.json b/public/language/cs/error.json index 001ed0998f..dff0f5465c 100644 --- a/public/language/cs/error.json +++ b/public/language/cs/error.json @@ -14,6 +14,7 @@ "invalid-password": "Neplatné heslo", "invalid-username-or-password": "Stanovte, prosím, oboje, jak uživatelské jméno, tak heslo", "invalid-search-term": "Neplatný výraz pro vyhledávání", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", "username-taken": "Uživatelské jméno je již použito", "email-taken": "Email je již použit", diff --git a/public/language/da/error.json b/public/language/da/error.json index 6f59d6352c..ae1c3278db 100644 --- a/public/language/da/error.json +++ b/public/language/da/error.json @@ -14,6 +14,7 @@ "invalid-password": "Ugyldig Adgangskode", "invalid-username-or-password": "Venligst angiv både brugernavn og adgangskode", "invalid-search-term": "Ugyldig søgeterm", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Ugyldig side værdi, skal mindst være %1 og maks. %2", "username-taken": "Brugernavn optaget", "email-taken": "Emailadresse allerede i brug", diff --git a/public/language/de/error.json b/public/language/de/error.json index 9e8b5f46e1..fe69b748a6 100644 --- a/public/language/de/error.json +++ b/public/language/de/error.json @@ -14,6 +14,7 @@ "invalid-password": "Ungültiges Passwort", "invalid-username-or-password": "Bitte gebe einen Benutzernamen und ein Passwort an", "invalid-search-term": "Ungültige Suchanfrage", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Ungültige Seitennummerierung, muss mindestens %1 und maximal %2 sein", "username-taken": "Der Benutzername ist bereits vergeben", "email-taken": "Die E-Mail-Adresse ist bereits vergeben", diff --git a/public/language/el/error.json b/public/language/el/error.json index a6ae7a4c8d..568829bb63 100644 --- a/public/language/el/error.json +++ b/public/language/el/error.json @@ -14,6 +14,7 @@ "invalid-password": "Άκυρος Κωδικός", "invalid-username-or-password": "Παρακαλώ γράψε το όνομα χρήστη και τον κωδικό", "invalid-search-term": "Άκυρος όρος αναζήτησης", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", "username-taken": "Το όνομα χρήστη είναι πιασμένο", "email-taken": "Το email είναι πιασμένο", diff --git a/public/language/en@pirate/error.json b/public/language/en@pirate/error.json index 08c7c49be2..66eb9b04ba 100644 --- a/public/language/en@pirate/error.json +++ b/public/language/en@pirate/error.json @@ -14,6 +14,7 @@ "invalid-password": "Invalid Password", "invalid-username-or-password": "Please specify both a username and password", "invalid-search-term": "Invalid search term", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", "username-taken": "Username taken", "email-taken": "Email taken", diff --git a/public/language/en_US/error.json b/public/language/en_US/error.json index 08c7c49be2..66eb9b04ba 100644 --- a/public/language/en_US/error.json +++ b/public/language/en_US/error.json @@ -14,6 +14,7 @@ "invalid-password": "Invalid Password", "invalid-username-or-password": "Please specify both a username and password", "invalid-search-term": "Invalid search term", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", "username-taken": "Username taken", "email-taken": "Email taken", diff --git a/public/language/es/error.json b/public/language/es/error.json index eb6a1097a8..56bac12bea 100644 --- a/public/language/es/error.json +++ b/public/language/es/error.json @@ -14,6 +14,7 @@ "invalid-password": "Contraseña no válida", "invalid-username-or-password": "Por favor especifica tanto un usuario como contraseña", "invalid-search-term": "Término de búsqueda inválido", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Número de página inválido, debe estar entre %1 y %2", "username-taken": "Nombre de usuario ocupado", "email-taken": "Correo electrónico ocupado", diff --git a/public/language/et/error.json b/public/language/et/error.json index 334979ae0d..6f7f2f54c4 100644 --- a/public/language/et/error.json +++ b/public/language/et/error.json @@ -14,6 +14,7 @@ "invalid-password": "Vigane parool", "invalid-username-or-password": "Palun täpsusta kasutajanime ja parooli", "invalid-search-term": "Vigane otsingusõna", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Väär lehekülje numeratsioon, peab olema vähemalt %1 ja kõige rohkem %2", "username-taken": "Kasutajanimi on juba võetud", "email-taken": "Email on võetud", diff --git a/public/language/fa_IR/error.json b/public/language/fa_IR/error.json index 4b4a8095e9..7ee878ae8f 100644 --- a/public/language/fa_IR/error.json +++ b/public/language/fa_IR/error.json @@ -14,6 +14,7 @@ "invalid-password": "کلمه عبور نامعتبر است.", "invalid-username-or-password": "لطفا هم نام کاربری و هم کلمه عبور را مشخص کنید", "invalid-search-term": "کلمه جستجو نامعتبر است", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", "username-taken": "این نام کاربری گرفته شده است.", "email-taken": "این ایمیل گرفته شده است.", diff --git a/public/language/fi/error.json b/public/language/fi/error.json index 35296e7776..21a027b171 100644 --- a/public/language/fi/error.json +++ b/public/language/fi/error.json @@ -14,6 +14,7 @@ "invalid-password": "Virheellinen salasana", "invalid-username-or-password": "Ole hyvä ja anna sekä käyttäjänimi että salasana", "invalid-search-term": "Virheellinen hakutermi", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", "username-taken": "Käyttäjänimi varattu", "email-taken": "Sähköpostiosoite varattu", diff --git a/public/language/fr/error.json b/public/language/fr/error.json index e19debf3ad..4772cba4c9 100644 --- a/public/language/fr/error.json +++ b/public/language/fr/error.json @@ -14,6 +14,7 @@ "invalid-password": "Mot de passe invalide", "invalid-username-or-password": "Veuillez entrer un nom d'utilisateur et un mot de passe", "invalid-search-term": "Données de recherche invalides", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Valeur de pagination invalide. Celle-ci doit être comprise entre %1 et %2.", "username-taken": "Nom d’utilisateur déjà utilisé", "email-taken": "Email déjà utilisé", diff --git a/public/language/gl/error.json b/public/language/gl/error.json index 1fd85fdab3..7f5c47fee7 100644 --- a/public/language/gl/error.json +++ b/public/language/gl/error.json @@ -14,6 +14,7 @@ "invalid-password": "Contrasinal Inválido", "invalid-username-or-password": "Especifica ámbolos dous por favor, nome de usuario e contrasinal", "invalid-search-term": "Termo de búsqueda inválido", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Valor de paxinación incorreto, ten que estar entre %1 e %2", "username-taken": "Nome de usuario en uso", "email-taken": "Correo en uso", diff --git a/public/language/he/error.json b/public/language/he/error.json index 5592b1d9cb..28c0d099fe 100644 --- a/public/language/he/error.json +++ b/public/language/he/error.json @@ -14,6 +14,7 @@ "invalid-password": "סיסמא שגויה", "invalid-username-or-password": "אנא הגדר שם משתמש וסיסמה", "invalid-search-term": "מילת חיפוש לא תקינה", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "ערך דף לא חוקי, חייב להיות לפחות %1 ולא מעל %2", "username-taken": "שם משתמש תפוס", "email-taken": "כתובת אימייל תפוסה", diff --git a/public/language/hu/error.json b/public/language/hu/error.json index fc1fbd3fed..b629bd7e64 100644 --- a/public/language/hu/error.json +++ b/public/language/hu/error.json @@ -14,6 +14,7 @@ "invalid-password": "Érvénytelen jelszó", "invalid-username-or-password": "Kérlek adj meg egy felhasználónevet és egy jelszót", "invalid-search-term": "Érvénytelen keresési feltétel", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", "username-taken": "Foglalt felhasználónév", "email-taken": "Foglalt e-mail", diff --git a/public/language/id/error.json b/public/language/id/error.json index d308c417b5..a178804439 100644 --- a/public/language/id/error.json +++ b/public/language/id/error.json @@ -14,6 +14,7 @@ "invalid-password": "Password Salah", "invalid-username-or-password": "Mohon spesifikasikan username dan password", "invalid-search-term": "Kata pencarian salah", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", "username-taken": "Username sudah terdaftar", "email-taken": "Email sudah terdaftar", diff --git a/public/language/it/error.json b/public/language/it/error.json index d0ddddf45a..4f8a110bc4 100644 --- a/public/language/it/error.json +++ b/public/language/it/error.json @@ -14,6 +14,7 @@ "invalid-password": "Password non valida", "invalid-username-or-password": "Si prega di specificare sia un nome utente che una password", "invalid-search-term": "Termine di ricerca non valido", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", "username-taken": "Nome utente già preso", "email-taken": "Email già esistente", diff --git a/public/language/ja/error.json b/public/language/ja/error.json index c84f8c161e..c8e0d84b9b 100644 --- a/public/language/ja/error.json +++ b/public/language/ja/error.json @@ -14,6 +14,7 @@ "invalid-password": "無効なパスワード", "invalid-username-or-password": "ユーザー名とパスワードの両方を指定してください", "invalid-search-term": "無効な検索ワード", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", "username-taken": "ユーザー名は既に使われています", "email-taken": "メールアドレスは既に使われています", diff --git a/public/language/ko/error.json b/public/language/ko/error.json index fb0eedc042..cf8c9346e9 100644 --- a/public/language/ko/error.json +++ b/public/language/ko/error.json @@ -14,6 +14,7 @@ "invalid-password": "올바르지 않은 비밀번호입니다.", "invalid-username-or-password": "사용자 이름과 패스워드를 모두 설정해주세요.", "invalid-search-term": "올바르지 않은 검색어입니다.", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "올바르지 않은 값입니다. 최소 1%에서 최대 2%까지 설정해야 합니다.", "username-taken": "이미 사용 중인 사용자 이름입니다.", "email-taken": "이미 사용 중인 이메일입니다.", diff --git a/public/language/lt/error.json b/public/language/lt/error.json index 7e087906d9..735aedea42 100644 --- a/public/language/lt/error.json +++ b/public/language/lt/error.json @@ -14,6 +14,7 @@ "invalid-password": "Klaidingas slaptažodis", "invalid-username-or-password": "Prašome nurodyti tiek vartotojo vardą, tiek ir slaptažodį", "invalid-search-term": "Neteisingas paieškos terminas", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", "username-taken": "Vartotojo vardas jau užimtas", "email-taken": "El. pašto adresas jau užimtas", diff --git a/public/language/ms/error.json b/public/language/ms/error.json index 3930f53059..790970710b 100644 --- a/public/language/ms/error.json +++ b/public/language/ms/error.json @@ -14,6 +14,7 @@ "invalid-password": "Kata laluan salah!", "invalid-username-or-password": "Sila tentukan kedua-dua nama pengguna dan kata laluan", "invalid-search-term": "Terma pencarian tak sah", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Nombor halaman tidak sah, mesti tidak kurang dari %1 dan tidak lebih dari %2", "username-taken": "Nama pengguna telah digunakan", "email-taken": "Emel telah digunakan", diff --git a/public/language/nb/error.json b/public/language/nb/error.json index ff6dbda377..5ebe7f9b86 100644 --- a/public/language/nb/error.json +++ b/public/language/nb/error.json @@ -14,6 +14,7 @@ "invalid-password": "Ugyldig passord", "invalid-username-or-password": "Vennligst spesifiser både et brukernavn og passord", "invalid-search-term": "Ugyldig søkeord", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", "username-taken": "Brukernavn opptatt", "email-taken": "E-post opptatt", diff --git a/public/language/nl/error.json b/public/language/nl/error.json index 02030890f9..261915a135 100644 --- a/public/language/nl/error.json +++ b/public/language/nl/error.json @@ -14,6 +14,7 @@ "invalid-password": "Ongeldig wachtwoord", "invalid-username-or-password": "Geef zowel een gebruikersnaam als wachtwoord op", "invalid-search-term": "Ongeldig zoekterm", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Invalide paginering waarde. De waarde moet op z'n minst %1 zijn en niet hoger dan %2 zijn.", "username-taken": "Gebruikersnaam is al in gebruik ", "email-taken": "E-mailadres is al in gebruik", diff --git a/public/language/pl/error.json b/public/language/pl/error.json index 24516197a6..46bee2204a 100644 --- a/public/language/pl/error.json +++ b/public/language/pl/error.json @@ -14,6 +14,7 @@ "invalid-password": "Błędne Hasło", "invalid-username-or-password": "Proszę podać nazwę użytkownika i hasło", "invalid-search-term": "Błędne wyszukiwane wyrażenie", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", "username-taken": "Login zajęty", "email-taken": "Email zajęty", diff --git a/public/language/pt_BR/error.json b/public/language/pt_BR/error.json index d7e9f197c5..06dc8588cd 100644 --- a/public/language/pt_BR/error.json +++ b/public/language/pt_BR/error.json @@ -14,6 +14,7 @@ "invalid-password": "Senha Inválida", "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.", "invalid-pagination-value": "Valor de paginação inválido, precisa ser entre no mínimo %1 e no máximo %2", "username-taken": "Nome de usuário já existe", "email-taken": "Email já cadastrado", diff --git a/public/language/ro/error.json b/public/language/ro/error.json index d185a27d6f..986fbb8f19 100644 --- a/public/language/ro/error.json +++ b/public/language/ro/error.json @@ -14,6 +14,7 @@ "invalid-password": "Parolă Invalidă", "invalid-username-or-password": "Te rugăm să specifici atât un nume de utilizator cât si o parolă", "invalid-search-term": "Cuvânt de căutare invalid", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", "username-taken": "Numele de utilizator este deja folosit", "email-taken": "Adresa de email este deja folostă", diff --git a/public/language/ru/error.json b/public/language/ru/error.json index 4353291dc2..00b8d29a13 100644 --- a/public/language/ru/error.json +++ b/public/language/ru/error.json @@ -14,6 +14,7 @@ "invalid-password": "Неверный пароль", "invalid-username-or-password": "Пожалуйста, укажите и имя пользователя и пароль", "invalid-search-term": "Неверный поисковой запрос", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", "username-taken": "Имя пользователя занято", "email-taken": "Email занят", diff --git a/public/language/rw/error.json b/public/language/rw/error.json index edf874c96d..5abd13e7b7 100644 --- a/public/language/rw/error.json +++ b/public/language/rw/error.json @@ -14,6 +14,7 @@ "invalid-password": "Ijambobanga Ntiryemewe", "invalid-username-or-password": "Tanga izina ukoresha n'ijambobanga", "invalid-search-term": "Icyashatswe nticyemewe", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", "username-taken": "Izina ryarafashwe mbere", "email-taken": "Email yarafashwe mbere", diff --git a/public/language/sc/error.json b/public/language/sc/error.json index 08c7c49be2..66eb9b04ba 100644 --- a/public/language/sc/error.json +++ b/public/language/sc/error.json @@ -14,6 +14,7 @@ "invalid-password": "Invalid Password", "invalid-username-or-password": "Please specify both a username and password", "invalid-search-term": "Invalid search term", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", "username-taken": "Username taken", "email-taken": "Email taken", diff --git a/public/language/sk/error.json b/public/language/sk/error.json index bdd340532b..90a82087f1 100644 --- a/public/language/sk/error.json +++ b/public/language/sk/error.json @@ -14,6 +14,7 @@ "invalid-password": "Nesprávne heslo", "invalid-username-or-password": "Please specify both a username and password", "invalid-search-term": "Invalid search term", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", "username-taken": "Užívateľske meno je obsadené", "email-taken": "Email je obsadený", diff --git a/public/language/sl/error.json b/public/language/sl/error.json index 33d0da5f79..37a42a71fa 100644 --- a/public/language/sl/error.json +++ b/public/language/sl/error.json @@ -14,6 +14,7 @@ "invalid-password": "Napačno geslo", "invalid-username-or-password": "Prosimo vpišite uporabniško ime in geslo", "invalid-search-term": "Napačna iskalna poizvedba", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", "username-taken": "Uporabniško ime je že zasedeno", "email-taken": "E-mail naslov je že zaseden", diff --git a/public/language/sr/error.json b/public/language/sr/error.json index 2a22dd111e..3b6c56c969 100644 --- a/public/language/sr/error.json +++ b/public/language/sr/error.json @@ -14,6 +14,7 @@ "invalid-password": "Неисправна лозинка", "invalid-username-or-password": "Молимо наведите и корисничко име и лозинку", "invalid-search-term": "Неисправан упит за претрагу", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Неважећа вредност при обележавању страна, мора бити најмање %1 и највише %2 ", "username-taken": "Корисничко име је заузето", "email-taken": "Адреса е-поште је заусета", diff --git a/public/language/sv/email.json b/public/language/sv/email.json index e51dfda9e5..6780dc6f92 100644 --- a/public/language/sv/email.json +++ b/public/language/sv/email.json @@ -14,7 +14,7 @@ "reset.text2": "För att fortsätta med återställning av lösenordet så kan du klicka på följande länk:", "reset.cta": "Klicka här för att återställa ditt lösenord", "reset.notify.subject": "Lösenordet ändrat", - "reset.notify.text1": "Vi vill uppmärksamma dig på att ditt lösenord ändrades den %1", + "reset.notify.text1": "Vi vill uppmärksamma dig på att ditt lösenord ändrades den %1.", "reset.notify.text2": "Om du inte godkänt det här så vänligen kontakta en administratör snarast. ", "digest.notifications": "Du har olästa notiser från %1:", "digest.latest_topics": "Senaste ämnen från %1", @@ -25,12 +25,12 @@ "digest.week": "vecka", "digest.month": "månad", "digest.subject": "Sammanställt flöde för %1", - "notif.chat.subject": "Nytt chatt-meddelande från %1", + "notif.chat.subject": "Nytt meddelande från %1", "notif.chat.cta": "Klicka här för att fortsätta konversationen", - "notif.chat.unsub.info": "Denna chatt-notifikation skickades till dig på grund av dina inställningar för prenumerationer.", + "notif.chat.unsub.info": "Denna notifikation skickades till dig på grund av dina inställningar för prenumerationer.", "notif.post.cta": "Klicka här för att läsa hela ämnet", "notif.post.unsub.info": "Det här meddelandet fick du på grund av dina inställningar för prenumeration. ", "test.text1": "\nDet här är ett testmeddelande som verifierar att e-posten är korrekt installerad för din NodeBB. ", - "unsub.cta": "Klicka här för att ändra de inställningarna", + "unsub.cta": "Klicka här för att ändra inställningarna", "closing": "Tack!" } \ No newline at end of file diff --git a/public/language/sv/error.json b/public/language/sv/error.json index 84e3bfa3a3..28432eb55a 100644 --- a/public/language/sv/error.json +++ b/public/language/sv/error.json @@ -14,6 +14,7 @@ "invalid-password": "Ogiltigt lösenord", "invalid-username-or-password": "Specificera både användarnamn och lösenord", "invalid-search-term": "Ogiltig sökterm", + "csrf-invalid": "Det gick inte att logga in dig, sannolikt på grund av en utgången session. Var god försök igen", "invalid-pagination-value": "Ogiltigt värde för siduppdelning. Värdet måste vara mellan %1 och %2", "username-taken": "Användarnamn upptaget", "email-taken": "Epostadress upptagen", @@ -22,7 +23,7 @@ "no-email-to-confirm": "Detta forum kräver bekräftning av epostadresser, var god klicka här för att fylla i en epostadress", "email-confirm-failed": "Vi kunde ej bekräfta din epostadress, var god försök igen senare.", "confirm-email-already-sent": "Bekräftningsbrev redan skickat, var god vänta %1 minut(er) innan du skickar ett nytt.", - "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", + "sendmail-not-found": "Kunde inte hitta Sendmail, vänligen se till att den är installerad och får köras av den användare som kör NodeBB.", "username-too-short": "Användarnamnet är för kort", "username-too-long": "Användarnamnet är för långt", "password-too-long": "Lösenordet är för långt", @@ -54,7 +55,7 @@ "guest-upload-disabled": "Uppladdningar av oregistrerade användare har inaktiverats", "already-favourited": "Du har redan lagt till bokmärke för det här inlägget", "already-unfavourited": "Du har redan tagit bort bokmärket för det här inlägget", - "cant-ban-other-admins": "Du kan inte bannlysa andra administratörer.", + "cant-ban-other-admins": "Du kan inte bannlysa andra administratörer!", "cant-remove-last-admin": "Du är den enda administratören. Lägg till en annan användare som administratör innan du tar bort dig själv.", "invalid-image-type": "Ogiltig bildtyp. Tillåtna typer är: % 1", "invalid-image-extension": "Ogiltigt bildformat", @@ -77,9 +78,9 @@ "uploads-are-disabled": "Uppladdningar är inaktiverat", "signature-too-long": "Din signatur kan inte vara längre än %1 tecken.", "about-me-too-long": "Din text om dig själv kan inte vara längre än %1 tecken.", - "cant-chat-with-yourself": "Du kan inte chatta med dig själv.", - "chat-restricted": "Denna användaren har begränsat sina chatt-meddelanden. Användaren måste följa dig innan ni kan chatta med varandra", - "chat-disabled": "Chatt är inaktiverat", + "cant-chat-with-yourself": "Du kan inte chatta med dig själv!", + "chat-restricted": "Denna användaren har begränsat sina meddelanden. Användaren måste följa dig innan ni kan chatta med varandra", + "chat-disabled": "Chatten är inaktiverad", "too-many-messages": "Du har skickat för många meddelanden, var god vänta", "invalid-chat-message": "Ogiltigt chattmeddelande", "chat-message-too-long": "Chattmeddelande är för långt", @@ -92,7 +93,7 @@ "not-enough-reputation-to-downvote": "Du har inte tillräckligt förtroende för att rösta ner det här meddelandet", "not-enough-reputation-to-flag": "Du har inte tillräckligt förtroende för att flagga det här inlägget.", "already-flagged": "Du har redan flaggat det här inlägget", - "reload-failed": "NodeBB stötte på problem med att ladda om: \"%1\". NodeBB kommer fortsätta servera den befintliga resurser till klienten, men du borde återställa det du gjorde alldeles innan du försökte ladda om.", + "reload-failed": "NodeBB stötte på problem med att ladda om: \"%1\". NodeBB kommer fortsätta servera befintliga resurser till klienten, men du borde återställa det du gjorde innan du försökte ladda om.", "registration-error": "Registreringsfel", "parse-error": "Något gick fel vid tolkning av svar från servern", "wrong-login-type-email": "Använd din e-postadress för att logga in", @@ -101,5 +102,5 @@ "no-session-found": "Ingen login-session hittades!", "not-in-room": "Användaren finns inte i rummet", "no-users-in-room": "Inga användare i det här rummet", - "cant-kick-self": "Du kan inte sparka ut dig själv ifrån gruppen" + "cant-kick-self": "Du kan inte sparka ut dig själv från gruppen" } \ No newline at end of file diff --git a/public/language/sv/global.json b/public/language/sv/global.json index d9c105b855..d6f66b4dab 100644 --- a/public/language/sv/global.json +++ b/public/language/sv/global.json @@ -8,7 +8,7 @@ "404.title": "Sidan saknas", "404.message": "Du verkar ha ramlat in på en sida som inte finns. Återgå till första sidan.", "500.title": "Internt fel.", - "500.message": "Hoppsan! Något verkar ha gått snett!", + "500.message": "Hoppsan! Något verkar ha gått fel!", "register": "Registrera", "login": "Logga in", "please_log_in": "Var god logga in", diff --git a/public/language/sv/login.json b/public/language/sv/login.json index a3d66ea4bc..4b08e7209e 100644 --- a/public/language/sv/login.json +++ b/public/language/sv/login.json @@ -5,7 +5,7 @@ "remember_me": "Kom ihåg mig?", "forgot_password": "Glömt lösenord?", "alternative_logins": "Alternativa inloggningssätt", - "failed_login_attempt": "Login Unsuccessful", + "failed_login_attempt": "Misslyckad inloggning", "login_successful": "Du är nu inloggad!", "dont_have_account": "Har du inget konto?" } \ No newline at end of file diff --git a/public/language/sv/modules.json b/public/language/sv/modules.json index 61938266dc..3d69a7aab8 100644 --- a/public/language/sv/modules.json +++ b/public/language/sv/modules.json @@ -29,14 +29,14 @@ "composer.submit_and_lock": "Skicka och lås", "composer.toggle_dropdown": "Visa/Dölj dropdown", "composer.uploading": "Laddar upp %1", - "composer.formatting.bold": "Bold", - "composer.formatting.italic": "Italic", - "composer.formatting.list": "List", - "composer.formatting.strikethrough": "Strikethrough", - "composer.formatting.link": "Link", - "composer.formatting.picture": "Picture", - "composer.upload-picture": "Upload Image", - "composer.upload-file": "Upload File", + "composer.formatting.bold": "Fet", + "composer.formatting.italic": "Kursiv", + "composer.formatting.list": "Lista", + "composer.formatting.strikethrough": "Genomstrykning", + "composer.formatting.link": "Länk", + "composer.formatting.picture": "Bild", + "composer.upload-picture": "Ladda upp bild", + "composer.upload-file": "Ladda upp fil", "bootbox.ok": "OK", "bootbox.cancel": "Avbryt", "bootbox.confirm": "Bekräfta", diff --git a/public/language/sv/topic.json b/public/language/sv/topic.json index 373d60492c..6cb0d01710 100644 --- a/public/language/sv/topic.json +++ b/public/language/sv/topic.json @@ -32,7 +32,7 @@ "deleted_message": "Det här ämnet har raderats. Endast användare med ämneshanterings-privilegier kan se det.", "following_topic.message": "Du kommer nu få notiser när någon gör inlägg i detta ämne.", "not_following_topic.message": "Du kommer inte längre få notiser från detta ämne.", - "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", + "ignoring_topic.message": "Du kommer inte längre se detta ämne i listan olästa ämnen. Du kommer att meddelas när du nämns eller ditt inlägg är upp röstat.", "login_to_subscribe": "Var god registrera eller logga in för att kunna prenumerera på detta ämne.", "markAsUnreadForAll.success": "Ämne markerat som oläst av alla.", "mark_unread": "Markera som oläst", @@ -42,12 +42,12 @@ "watch.title": "Få notis om nya svar till det här ämnet", "unwatch.title": "Sluta bevaka detta ämne", "share_this_post": "Dela detta inlägg", - "watching": "Watching", - "not-watching": "Not Watching", - "ignoring": "Ignoring", - "watching.description": "Notify me of new replies.
      Show topic in unread.", - "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", - "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", + "watching": "Bevakar", + "not-watching": "Bevakar inte", + "ignoring": "Ignorerar", + "watching.description": "Meddela mig om nya svar.
      Visa ämne i oläst.", + "not-watching.description": "Meddela mig inte om nya svar.
      Visa ämne i oläst ifall kategorin är ignorerad.", + "ignoring.description": "Meddela mig inte om nya svar.
      Visa inte ämne i oläst.", "thread_tools.title": "Ämnesverktyg", "thread_tools.markAsUnreadForAll": "Markera som oläst", "thread_tools.pin": "Nåla fast ämne", diff --git a/public/language/th/error.json b/public/language/th/error.json index 033d5d50d3..9bf0093c6b 100644 --- a/public/language/th/error.json +++ b/public/language/th/error.json @@ -14,6 +14,7 @@ "invalid-password": "รหัสผ่านไม่ถูกต้อง", "invalid-username-or-password": "กรุณาระบุชื่อผู้ใช้และรหัสผ่าน", "invalid-search-term": "ข้อความค้นหาไม่ถูกต้อง", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", "username-taken": "ชื่อผู้ใช้นี้มีการใช้แล้ว", "email-taken": "อีเมลนี้มีการใช้แล้ว", diff --git a/public/language/tr/error.json b/public/language/tr/error.json index 61a8cf34dd..776523067a 100644 --- a/public/language/tr/error.json +++ b/public/language/tr/error.json @@ -14,6 +14,7 @@ "invalid-password": "Geçersiz Şifre", "invalid-username-or-password": "Lütfen kullanıcı ismi ve parola girin.", "invalid-search-term": "Geçersiz arama", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Geçersiz sayfalama değeri, en az %1 ve en fazla %2 olabilir", "username-taken": "Kullanıcı İsmi Alınmış", "email-taken": "E-posta Alınmış", diff --git a/public/language/vi/error.json b/public/language/vi/error.json index 69c9b989bd..31c13565e9 100644 --- a/public/language/vi/error.json +++ b/public/language/vi/error.json @@ -14,6 +14,7 @@ "invalid-password": "Mật khẩu không hợp lệ", "invalid-username-or-password": "Xin hãy nhập cả tên đăng nhập và mật khẩu", "invalid-search-term": "Từ khóa không hợp lệ", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "Giá trị trang không hợp lệ, tối thiểu phải là %1 và tối đa là %2", "username-taken": "Tên đăng nhập đã tồn tại", "email-taken": "Email đã được đăng kí", diff --git a/public/language/zh_CN/error.json b/public/language/zh_CN/error.json index c5d4846358..c380e56f0a 100644 --- a/public/language/zh_CN/error.json +++ b/public/language/zh_CN/error.json @@ -14,6 +14,7 @@ "invalid-password": "无效密码", "invalid-username-or-password": "请确认用户名和密码", "invalid-search-term": "无效的搜索关键字", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "无效的分页数值,必须介于 %1 和 %2 之间", "username-taken": "此用户名已被占用", "email-taken": "此电子邮箱已被占用", diff --git a/public/language/zh_TW/error.json b/public/language/zh_TW/error.json index efbbce6214..15f250d0c2 100644 --- a/public/language/zh_TW/error.json +++ b/public/language/zh_TW/error.json @@ -14,6 +14,7 @@ "invalid-password": "無效的密碼", "invalid-username-or-password": "請指定用戶名和密碼", "invalid-search-term": "無效的搜索字詞", + "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", "invalid-pagination-value": "無效的分頁數值, 必需是至少 %1 與最多 %2", "username-taken": "該使用者名稱已被使用", "email-taken": "該信箱已被使用", From 38d1bde895559e6c14a1f96a50e74f7a9ebcafe6 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Mon, 23 May 2016 11:39:35 +0300 Subject: [PATCH 0278/1109] closes #4669 --- src/categories/recentreplies.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/categories/recentreplies.js b/src/categories/recentreplies.js index f03f65e256..29703ed76f 100644 --- a/src/categories/recentreplies.js +++ b/src/categories/recentreplies.js @@ -108,6 +108,11 @@ module.exports = function(Categories) { }, function(_topicData, next) { topicData = _topicData; + topicData.forEach(function(topic) { + if (topic) { + topic.teaserPid = topic.teaserPid || topic.mainPid; + } + }); topics.getTeasers(_topicData, next); }, function (teasers, next) { From 54ccdf526255ad12bdbfd378e1129cef00722005 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Mon, 23 May 2016 12:59:33 +0300 Subject: [PATCH 0279/1109] closes #4651 --- public/src/admin/manage/category.js | 96 +++++++++++-------- src/socket.io/admin/categories.js | 4 + .../admin/partials/categories/privileges.tpl | 1 + 3 files changed, 61 insertions(+), 40 deletions(-) diff --git a/public/src/admin/manage/category.js b/public/src/admin/manage/category.js index ced83105a3..57dc7be563 100644 --- a/public/src/admin/manage/category.js +++ b/public/src/admin/manage/category.js @@ -5,9 +5,8 @@ define('admin/manage/category', [ 'uploader', 'iconSelect', 'admin/modules/colorpicker', - 'autocomplete', - 'Chart' -], function(uploader, iconSelect, colorpicker, autocomplete, Chart) { + 'autocomplete' +], function(uploader, iconSelect, colorpicker, autocomplete) { var Category = {}; Category.init = function() { @@ -100,46 +99,17 @@ define('admin/manage/category', [ }); }); - $('.copy-settings').on('click', function(e) { - e.preventDefault(); - socket.emit('admin.categories.getNames', function(err, categories) { - if (err) { - return app.alertError(err.message); - } - - templates.parse('admin/partials/categories/select-category', { - categories: categories - }, function(html) { - function submit() { - var formData = modal.find('form').serializeObject(); - - socket.emit('admin.categories.copySettingsFrom', {fromCid: formData['select-cid'], toCid: ajaxify.data.category.cid}, function(err) { - if (err) { - return app.alertError(err.message); - } - app.alertSuccess('Settings Copied!'); - ajaxify.refresh(); - }); - - modal.modal('hide'); - return false; + $('.copy-settings').on('click', function() { + selectCategoryModal(function(cid) { + socket.emit('admin.categories.copySettingsFrom', {fromCid: cid, toCid: ajaxify.data.category.cid}, function(err) { + if (err) { + return app.alertError(err.message); } - - var modal = bootbox.dialog({ - title: 'Select a Category', - message: html, - buttons: { - save: { - label: 'Copy', - className: 'btn-primary', - callback: submit - } - } - }); - - modal.find('form').on('submit', submit); + app.alertSuccess('Settings Copied!'); + ajaxify.refresh(); }); }); + return false; }); $('.upload-button').on('click', function() { @@ -229,6 +199,7 @@ define('admin/manage/category', [ $('.privilege-table-container').on('click', '[data-action="search.user"]', Category.addUserToPrivilegeTable); $('.privilege-table-container').on('click', '[data-action="search.group"]', Category.addGroupToPrivilegeTable); $('.privilege-table-container').on('click', '[data-action="copyToChildren"]', Category.copyPrivilegesToChildren); + $('.privilege-table-container').on('click', '[data-action="copyPrivilegesFrom"]', Category.copyPrivilegesFromCategory); Category.exposeAssumedPrivileges(); }; @@ -397,5 +368,50 @@ define('admin/manage/category', [ }); }; + Category.copyPrivilegesFromCategory = function() { + selectCategoryModal(function(cid) { + socket.emit('admin.categories.copyPrivilegesFrom', {toCid: ajaxify.data.category.cid, fromCid: cid}, function(err) { + if (err) { + return app.alertError(err.message); + } + ajaxify.refresh(); + }); + }); + }; + + function selectCategoryModal(callback) { + socket.emit('admin.categories.getNames', function(err, categories) { + if (err) { + return app.alertError(err.message); + } + + templates.parse('admin/partials/categories/select-category', { + categories: categories + }, function(html) { + function submit() { + var formData = modal.find('form').serializeObject(); + callback(formData['select-cid']); + modal.modal('hide'); + return false; + } + + var modal = bootbox.dialog({ + title: 'Select a Category', + message: html, + buttons: { + save: { + label: 'Copy', + className: 'btn-primary', + callback: submit + } + } + }); + + modal.find('form').on('submit', submit); + }); + }); + } + + return Category; }); \ No newline at end of file diff --git a/src/socket.io/admin/categories.js b/src/socket.io/admin/categories.js index 3b35847366..4061bb001a 100644 --- a/src/socket.io/admin/categories.js +++ b/src/socket.io/admin/categories.js @@ -112,4 +112,8 @@ Categories.copySettingsFrom = function(socket, data, callback) { categories.copySettingsFrom(data.fromCid, data.toCid, callback); }; +Categories.copyPrivilegesFrom = function(socket, data, callback) { + categories.copyPrivilegesFrom(data.fromCid, data.toCid, callback); +}; + module.exports = Categories; \ No newline at end of file diff --git a/src/views/admin/partials/categories/privileges.tpl b/src/views/admin/partials/categories/privileges.tpl index b5605c0935..497fa71ac0 100644 --- a/src/views/admin/partials/categories/privileges.tpl +++ b/src/views/admin/partials/categories/privileges.tpl @@ -58,6 +58,7 @@
      +
      From 5720dac80375d256af8191b5aa7565ba0101dc82 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Mon, 23 May 2016 13:03:31 +0300 Subject: [PATCH 0280/1109] #4175, #4298 --- public/src/admin/admin.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/public/src/admin/admin.js b/public/src/admin/admin.js index d5a5e1f8d3..fc54067d3a 100644 --- a/public/src/admin/admin.js +++ b/public/src/admin/admin.js @@ -2,13 +2,20 @@ /*global config, translator, componentHandler, define, socket, app, ajaxify, utils, bootbox, Slideout, RELATIVE_PATH*/ (function() { - $(document).ready(function() { - setupKeybindings(); - // on page reload show correct tab if url has # + $(window).on('action:ajaxify.end', function() { + showCorrectNavTab(); + }); + + function showCorrectNavTab() { + // show correct tab if url has # if (window.location.hash) { $('.nav-pills a[href=' + window.location.hash + ']').tab('show'); } + } + + $(document).ready(function() { + setupKeybindings(); if(!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { require(['admin/modules/search'], function(search) { From 6878466404d56ee43cee6898ee7964edb41c4256 Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Tue, 24 May 2016 09:04:33 -0400 Subject: [PATCH 0281/1109] Latest translations and fallbacks --- public/language/et/email.json | 2 +- public/language/et/error.json | 16 +++--- public/language/et/global.json | 8 +-- public/language/et/groups.json | 4 +- public/language/et/login.json | 2 +- public/language/et/modules.json | 16 +++--- public/language/et/notifications.json | 8 +-- public/language/et/pages.json | 4 +- public/language/et/topic.json | 16 +++--- public/language/et/unread.json | 6 +-- public/language/et/uploads.json | 8 +-- public/language/et/user.json | 16 +++--- public/language/ro/category.json | 16 +++--- public/language/ro/email.json | 14 ++--- public/language/ro/global.json | 20 +++---- public/language/ro/groups.json | 74 +++++++++++++------------- public/language/ro/modules.json | 4 +- public/language/ro/notifications.json | 4 +- public/language/ro/pages.json | 12 ++--- public/language/ro/recent.json | 12 ++--- public/language/ro/reset_password.json | 2 +- public/language/ro/topic.json | 4 +- public/language/ro/unread.json | 6 +-- public/language/ro/uploads.json | 2 +- public/language/ro/user.json | 2 +- public/language/ro/users.json | 2 +- 26 files changed, 140 insertions(+), 140 deletions(-) diff --git a/public/language/et/email.json b/public/language/et/email.json index e87b35e247..03fa17fc9f 100644 --- a/public/language/et/email.json +++ b/public/language/et/email.json @@ -24,7 +24,7 @@ "digest.day": "päev", "digest.week": "nädal", "digest.month": "kuu", - "digest.subject": "Digest for %1", + "digest.subject": "Ima 1% jaoks", "notif.chat.subject": "Sulle on saabunud uus sõnum kasutajalt %1", "notif.chat.cta": "Vajuta siia, et jätkata vestlusega", "notif.chat.unsub.info": "See chat teavitus on saadetud teile tellimuse seadistuse tõttu.", diff --git a/public/language/et/error.json b/public/language/et/error.json index 6f7f2f54c4..62e3902f8a 100644 --- a/public/language/et/error.json +++ b/public/language/et/error.json @@ -14,7 +14,7 @@ "invalid-password": "Vigane parool", "invalid-username-or-password": "Palun täpsusta kasutajanime ja parooli", "invalid-search-term": "Vigane otsingusõna", - "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", + "csrf-invalid": "Me ei saanud Sind sisse logida, võimalik, et tänu aegunud sessioonile, palun proovi uuesti", "invalid-pagination-value": "Väär lehekülje numeratsioon, peab olema vähemalt %1 ja kõige rohkem %2", "username-taken": "Kasutajanimi on juba võetud", "email-taken": "Email on võetud", @@ -23,13 +23,13 @@ "no-email-to-confirm": "See foorum nõuab emaili kinnitust, palun vajuta siia, et sisestada email", "email-confirm-failed": "Meil ei õnnestunud sinu emaili kinnitada, proovi hiljem uuesti.", "confirm-email-already-sent": "Kinnituskiri on juba saadetud, palun oota %1 minut(it) uue kirja saatmiseks.", - "sendmail-not-found": "The sendmail executable could not be found, please ensure it is installed and executable by the user running NodeBB.", + "sendmail-not-found": "Sendmail'i käivitatavat ei leitud, palun tee kindlaks, et see on installeeritud ja on käivitatav kasutaja poolt, kes käitab NodeBB't.", "username-too-short": "Kasutajanimi on liiga lühike", "username-too-long": "Kasutajanimi on liiga pikk", "password-too-long": "Parool liiga pikk", "user-banned": "Kasutaja bannitud", "user-too-new": "Vabandust, te peate ootama %1 sekund(it) enne esimese postituse loomist.", - "blacklisted-ip": "Sorry, your IP address has been banned from this community. If you feel this is in error, please contact an administrator.", + "blacklisted-ip": "Vabandust! Sinu IP-aadress on siin kogukonnas keelatud. Kui arvad, et see on eksitus, palun leia kontakti administraatoriga.", "no-category": "Kategooriat ei eksisteeri", "no-topic": "Teemat ei eksisteeri", "no-post": "Postitust ei eksisteeri", @@ -53,8 +53,8 @@ "still-uploading": "Palun oota, kuni üleslaadimised on laetud.", "file-too-big": "Maksimaalne üleslaetava faili suurus on %1 kB - valige väiksema mahuga fail.", "guest-upload-disabled": "Külaliste üleslaadimine on keelatud.", - "already-favourited": "You have already bookmarked this post", - "already-unfavourited": "You have already unbookmarked this post", + "already-favourited": "Sa oled juba selle postituse järjehoidjatesse pannud.", + "already-unfavourited": "Sa oled juba selle postituse järjehoidjatest ära võtnud.", "cant-ban-other-admins": "Sa ei saa bannida teisi administraatoreid!", "cant-remove-last-admin": "Te olete ainus administraator. Lisage keegi teine administraatoriks, enne kui eemaldate endalt administraatori.", "invalid-image-type": "Vigane pildi formaat. Lubatud formaadid on: %1", @@ -87,7 +87,7 @@ "cant-edit-chat-message": "Sul ei ole lubatud antud sõnumit muuta", "cant-remove-last-user": "Sa ei saa viimast kasutajat eemaldada", "cant-delete-chat-message": "Sul ei ole lubatud antud sõnumit kustutada", - "already-voting-for-this-post": "You have already voted for this post.", + "already-voting-for-this-post": "Sa oled juba hääletanud sellel postitusel.", "reputation-system-disabled": "Reputatsiooni süsteem ei ole aktiveeritud", "downvoting-disabled": "Negatiivsete häälte andmine ei ole võimaldatud", "not-enough-reputation-to-downvote": "Sul ei ole piisavalt reputatsiooni, et anda negatiivset hinnangut sellele postitusele.", @@ -101,6 +101,6 @@ "invite-maximum-met": "Sa oled kutsunud maksimaalse lubatud inimeste arvu (%1 %2 'st).", "no-session-found": "Sisse logimis sessiooni ei leitud!", "not-in-room": "Kasutaja pole ruumis", - "no-users-in-room": "No users in this room", - "cant-kick-self": "You can't kick yourself from the group" + "no-users-in-room": "Ühtegi kasutajat ei leidu siit ruumist", + "cant-kick-self": "Sa ei saa ennast ära visata gruppist" } \ No newline at end of file diff --git a/public/language/et/global.json b/public/language/et/global.json index f43dd9007a..93fdfd9a16 100644 --- a/public/language/et/global.json +++ b/public/language/et/global.json @@ -87,8 +87,8 @@ "map": "Kaart", "sessions": "Logitud Sessioonid", "ip_address": "IP Aadress", - "enter_page_number": "Enter page number", - "upload_file": "Upload file", - "upload": "Upload", - "allowed-file-types": "Allowed file types are %1" + "enter_page_number": "Sisesta lehekülje number", + "upload_file": "Lae fail üles", + "upload": "Lae üles", + "allowed-file-types": "Lubatud faili formaadid on %1" } \ No newline at end of file diff --git a/public/language/et/groups.json b/public/language/et/groups.json index db8dfce3d1..a78fc57db4 100644 --- a/public/language/et/groups.json +++ b/public/language/et/groups.json @@ -41,7 +41,7 @@ "details.hidden": "Peidetud", "details.hidden_help": "Kui sisse lülitatud, siis seda gruppi ei kuvata gruppide nimekirjas ning liikmed tuleb lisada manuaalselt", "details.delete_group": "Kustuta grupp", - "details.private_system_help": "Private groups is disabled at system level, this option does not do anything", + "details.private_system_help": "Privaatset gruppid on keelatud sellel süsteemi tasemel, see sätte ei tee midagi", "event.updated": "Grupi lisainformatsiooni on uuendatud", "event.deleted": "Grupp \"%1\" on kustutatud", "membership.accept-invitation": "Võta kutse vastu", @@ -50,5 +50,5 @@ "membership.leave-group": "Lahku grupist", "membership.reject": "Lükka tagasi", "new-group.group_name": "Grupi nimi:", - "upload-group-cover": "Upload group cover" + "upload-group-cover": "Lae gruppi pilt üles" } \ No newline at end of file diff --git a/public/language/et/login.json b/public/language/et/login.json index 09a875ef4a..1ee4c2d703 100644 --- a/public/language/et/login.json +++ b/public/language/et/login.json @@ -5,7 +5,7 @@ "remember_me": "Mäleta mind?", "forgot_password": "Unustasid parooli?", "alternative_logins": "Alternatiivsed sisse logimise võimalused", - "failed_login_attempt": "Login Unsuccessful", + "failed_login_attempt": "Sisselogimine ebaõnnestus", "login_successful": "Edukalt sisse logitud!", "dont_have_account": "Pole veel kasutajat?" } \ No newline at end of file diff --git a/public/language/et/modules.json b/public/language/et/modules.json index 0df09f3b63..c4a2434ec1 100644 --- a/public/language/et/modules.json +++ b/public/language/et/modules.json @@ -6,7 +6,7 @@ "chat.user_typing": "%1 kirjutab sõnumit...", "chat.user_has_messaged_you": "%1 saatis sulle sõnumi.", "chat.see_all": "Vaata kõiki vestluseid", - "chat.mark_all_read": "Mark all chats read", + "chat.mark_all_read": "Märgi kõik jutud loetuks", "chat.no-messages": "Vali sõnumisaaja, et vaadata sõnumite ajalugu.", "chat.no-users-in-room": "Ühtki kasutajat selles ruumis", "chat.recent-chats": "Hiljutised vestlused", @@ -29,14 +29,14 @@ "composer.submit_and_lock": "Kinnita ja Lukusta", "composer.toggle_dropdown": "Aktiveeri rippmenüü", "composer.uploading": "%1 Üleslaadimine", - "composer.formatting.bold": "Bold", - "composer.formatting.italic": "Italic", - "composer.formatting.list": "List", - "composer.formatting.strikethrough": "Strikethrough", + "composer.formatting.bold": "Paksult", + "composer.formatting.italic": "Kaldkiri", + "composer.formatting.list": "Nimekiri", + "composer.formatting.strikethrough": "Läbitõmmatud", "composer.formatting.link": "Link", - "composer.formatting.picture": "Picture", - "composer.upload-picture": "Upload Image", - "composer.upload-file": "Upload File", + "composer.formatting.picture": "Pilt", + "composer.upload-picture": "Lae pilt üles", + "composer.upload-file": "Lae fail üles", "bootbox.ok": "Olgu", "bootbox.cancel": "Katkesta", "bootbox.confirm": "Kinnita", diff --git a/public/language/et/notifications.json b/public/language/et/notifications.json index 11e2823a75..52319818af 100644 --- a/public/language/et/notifications.json +++ b/public/language/et/notifications.json @@ -16,9 +16,9 @@ "upvoted_your_post_in_multiple": "%1 ja %2 teist on kiitnud sinu postituse heaks: %3.", "moved_your_post": "%1 liigutas sinu postituse %2 'sse", "moved_your_topic": "%1 liigutas %2", - "favourited_your_post_in": "%1 has bookmarked your post in %2.", - "favourited_your_post_in_dual": "%1 and %2 have bookmarked your post in %3.", - "favourited_your_post_in_multiple": "%1 and %2 others have bookmarked your post in %3.", + "favourited_your_post_in": "%1 pani Sinu postituse %2 järjehoidjatesse.", + "favourited_your_post_in_dual": "%1 ja %2 panid Sinu postituse %3 enda järjehoidjatesse.", + "favourited_your_post_in_multiple": "%1 ja %2 teist on Sinu postitust %3 järjehoidjasse lisanud.", "user_flagged_post_in": "%1 raporteeris postitust %2", "user_flagged_post_in_dual": "%1 ja %2 märgistasid postituse: %3", "user_flagged_post_in_multiple": "%1 ja %2 teist märgistasid postituse: %3", @@ -30,7 +30,7 @@ "user_started_following_you_dual": "%1 ja %2 hakkasid sind jälgima.", "user_started_following_you_multiple": "%1 ja %2 hakkasid sind jälgima.", "new_register": "%1 saatis registreerimistaotluse.", - "new_register_multiple": "There are %1 registration requests awaiting review.", + "new_register_multiple": "%1 registreerimistaotlust ootavad ülevaadet.", "email-confirmed": "Emaili aadress kinnitatud", "email-confirmed-message": "Täname, et kinnitasite oma emaili aadressi. Teie kasutaja on nüüd täielikult aktiveeritud.", "email-confirm-error-message": "Emaili aadressi kinnitamisel tekkis viga. Võibolla kinnituskood oli vale või aegunud.", diff --git a/public/language/et/pages.json b/public/language/et/pages.json index f85b28ead0..24515767df 100644 --- a/public/language/et/pages.json +++ b/public/language/et/pages.json @@ -33,13 +33,13 @@ "account/posts": "Postitused, mis on tehtud kasutaja %1 poolt", "account/topics": "Teemad on kirjutanud %1", "account/groups": "Kasutaja %1 grupid", - "account/favourites": "%1's Bookmarked Posts", + "account/favourites": "%1 järjehoidjad", "account/settings": "Kasutaja sätted", "account/watched": "Teemasid jälgib %1 kasutajat", "account/upvoted": "Postitused %1 poolt heaks kiidetud", "account/downvoted": "Postitused %1 poolt vastu hääletatud", "account/best": "Parimad postitused %1 poolt", - "confirm": "Email Confirmed", + "confirm": "Emaili aadress kinnitatud", "maintenance.text": "%1 foorumil on käimas hooldustööd. Palun külastage meid mõne aja pärast uuesti.", "maintenance.messageIntro": "Administraator on jätnud ka omaltpoolt sõnumi:", "throttled.text": "%1 ei ole hetkel kättesaadav liigse koormuse tõttu. Palun tulge tagasi mõni teine kord." diff --git a/public/language/et/topic.json b/public/language/et/topic.json index dd6b25ca24..a9024f4db7 100644 --- a/public/language/et/topic.json +++ b/public/language/et/topic.json @@ -26,13 +26,13 @@ "tools": "Tööriistad", "flag": "Märgista", "locked": "Lukustatud", - "bookmark_instructions": "Click here to return to the last read post in this thread.", + "bookmark_instructions": "Vajuta siia, et tagasi minna viimati loetud postituse juurde siin teemas.", "flag_title": "Märgista see postitus modereerimiseks", "flag_success": "See postitus on nüüd märgistatud modereerimiseks.", "deleted_message": "See teema on kustutatud. Ainult kasutajad kellel on piisavalt õigusi saavad seda näha.", "following_topic.message": "Sulle ei edastata enam teateid uutest postitustest kui keegi postitab siia teemasse.", "not_following_topic.message": "Sulle ei edastata enam teateid uutest postitustest siin teemas.", - "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", + "ignoring_topic.message": "Sa ei näe seda teemat enam lugemata teemade nimekirjas. Sind teavitatakse, kui Sind mainitakse või Sinu postitust kiidetakse heaks.", "login_to_subscribe": "Palun registreeru kasutajaks või logi sisse, et tellida teateid selle postituse kohta.", "markAsUnreadForAll.success": "Teema märgitud mitte-loetuks kõikidele.", "mark_unread": "Märgi lugematuks", @@ -42,9 +42,9 @@ "watch.title": "Saa teateid uutest postitustest siin teemas", "unwatch.title": "Ära järgi enam seda teemat", "share_this_post": "Jaga seda postitust", - "watching": "Watching", - "not-watching": "Not Watching", - "ignoring": "Ignoring", + "watching": "Vaatan", + "not-watching": "Ei vaata", + "ignoring": "Ignoreerin", "watching.description": "Notify me of new replies.
      Show topic in unread.", "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", @@ -72,9 +72,9 @@ "disabled_categories_note": "Kinnised kategooriad on hallid", "confirm_move": "Liiguta", "confirm_fork": "Fork", - "favourite": "Bookmark", - "favourites": "Bookmarks", - "favourites.has_no_favourites": "You haven't bookmarked any posts yet.", + "favourite": "Järjehoidja", + "favourites": "Järjehoidjad", + "favourites.has_no_favourites": "Sa ei ole ühtegi postitust pannud järjehoidjatesse veel.", "loading_more_posts": "Laen postitusi", "move_topic": "Liiguta teemat", "move_topics": "Liiguta teemasi", diff --git a/public/language/et/unread.json b/public/language/et/unread.json index 832d169fd4..169806bdb0 100644 --- a/public/language/et/unread.json +++ b/public/language/et/unread.json @@ -7,7 +7,7 @@ "all": "Kõik", "all_categories": "Kõik kategooriad", "topics_marked_as_read.success": "Teemad märgitud loetuks!", - "all-topics": "All Topics", - "new-topics": "New Topics", - "watched-topics": "Watched Topics" + "all-topics": "Kõik teemad", + "new-topics": "Uued teemad", + "watched-topics": "Vaadatud teemad" } \ No newline at end of file diff --git a/public/language/et/uploads.json b/public/language/et/uploads.json index 1622cb5693..feee146ab8 100644 --- a/public/language/et/uploads.json +++ b/public/language/et/uploads.json @@ -1,6 +1,6 @@ { - "uploading-file": "Uploading the file...", - "select-file-to-upload": "Select a file to upload!", - "upload-success": "File uploaded successfully!", - "maximum-file-size": "Maximum %1 kb" + "uploading-file": "Laen faili üles...", + "select-file-to-upload": "Vali fail mida üles laadida!", + "upload-success": "Fail üles laetud edukalt!", + "maximum-file-size": "Maksimaalselt %1 kb" } \ No newline at end of file diff --git a/public/language/et/user.json b/public/language/et/user.json index ee556ae4e1..88809cc8a7 100644 --- a/public/language/et/user.json +++ b/public/language/et/user.json @@ -22,7 +22,7 @@ "profile": "Profiil", "profile_views": "Vaatamisi", "reputation": "Reputatsioon", - "favourites": "Bookmarks", + "favourites": "Järjehoidjad", "watched": "Vaadatud", "followers": "Jälgijad", "following": "Jälgimised", @@ -39,7 +39,7 @@ "change_username": "Vaheta kasutajanime", "change_email": "Vaheta emaili", "edit": "Muuda", - "edit-profile": "Edit Profile", + "edit-profile": "Redigeeri profiili", "default_picture": "Algne ikoon", "uploaded_picture": "Üleslaetud pilt", "upload_new_picture": "Laadi uus pilt", @@ -56,11 +56,11 @@ "password": "Parool", "username_taken_workaround": "Kasutajanimi mida soovisid, ei olnud saadaval, seeg muutsime seda natukene. Sinu uus kasutajanimi on nüüd: %1", "password_same_as_username": "Su parool kattub su kasutajanimega, palun vali mõni muu parool.", - "password_same_as_email": "Your password is the same as your email, please select another password.", + "password_same_as_email": "Su parool kattub su e-mailiga, palun vali mõni muu parool.", "upload_picture": "Laadi pilt", "upload_a_picture": "Lae pilt üles", "remove_uploaded_picture": "Eemalda üleslaetud pilt", - "upload_cover_picture": "Upload cover picture", + "upload_cover_picture": "Lae üles katte pilt", "settings": "Seaded", "show_email": "Näita minu emaili", "show_fullname": "Näita minu täisnime", @@ -92,12 +92,12 @@ "open_links_in_new_tab": "Ava väljaminevad lingid uues aknas", "enable_topic_searching": "Võimalda teemasisene otsing", "topic_search_help": "Kui see on sisse lükatud, siis teemasisene otsing võtab üle brauseri tavapärase otsingu ning võimaldab otsida ainult ekraanile mahtuva teema asemel terve teema ulatuses.", - "delay_image_loading": "Delay Image Loading", - "image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", - "scroll_to_my_post": "After posting a reply, show the new post", + "delay_image_loading": "Viivita pildi laadimisega", + "image_load_delay_help": "Kui lubatud, pildid teemades ei lae kuni nad on nähtavuses", + "scroll_to_my_post": "Pärast vastuse postitamist, näita uut postitust", "follow_topics_you_reply_to": "Järgi teemasid, millele olete vastanud.", "follow_topics_you_create": "Järgi teemasi, mis on teie loodud.", - "grouptitle": "Group Title", + "grouptitle": "Grupi tiitel", "no-group-title": "Grupi tiitel puudub", "select-skin": "Vali välimus", "select-homepage": "Vali avaleht", diff --git a/public/language/ro/category.json b/public/language/ro/category.json index e525ac8878..1c3fe61fec 100644 --- a/public/language/ro/category.json +++ b/public/language/ro/category.json @@ -1,16 +1,16 @@ { - "category": "Category", - "subcategories": "Subcategories", + "category": "Categorie", + "subcategories": "Subcategorii", "new_topic_button": "Subiect Nou", - "guest-login-post": "Log in to post", + "guest-login-post": "Conecteaza-te pentru a posta", "no_topics": "Nu există nici un subiect de discuție în această categorie.
      De ce nu încerci să postezi tu unul?", "browsing": "navighează", "no_replies": "Nu a răspuns nimeni", - "no_new_posts": "No new posts.", + "no_new_posts": "Nici o postare nouă", "share_this_category": "Distribuie această categorie", - "watch": "Watch", + "watch": "Urmărește", "ignore": "Ignoră", - "watch.message": "You are now watching updates from this category", - "ignore.message": "You are now ignoring updates from this category", - "watched-categories": "Watched categories" + "watch.message": "Urmăriți acum actualizări din această categorie", + "ignore.message": "Ignorați acum actualizări din această categorie", + "watched-categories": "Categorii urmărite" } \ No newline at end of file diff --git a/public/language/ro/email.json b/public/language/ro/email.json index b1a1f41d2f..e07033fd97 100644 --- a/public/language/ro/email.json +++ b/public/language/ro/email.json @@ -1,19 +1,19 @@ { "password-reset-requested": "Cererea de resetare a parolei a fost efectuată - %1!", "welcome-to": "Salutare lui %1", - "invite": "Invitation from %1", + "invite": "Invitație de la %1", "greeting_no_name": "Salut", "greeting_with_name": "Salut %1", "welcome.text1": "îți mulțumim că te-ai Înregistrat cu %1!", "welcome.text2": "Pentru a-ți activa cu success contul trebuie să verificăm adresa de email pe care ai folosit-o la înregistrare.", "welcome.text3": "An administrator has accepted your registration application. You can login with your username/password now.", "welcome.cta": "Apasă aici pentru a confirma adresa ta de email", - "invitation.text1": "%1 has invited you to join %2", + "invitation.text1": "%1 te-a invitat să te alături %2", "invitation.ctr": "Click here to create your account.", "reset.text1": "We received a request to reset your password, possibly because you have forgotten it. If this is not the case, please ignore this email.", "reset.text2": "Pentru a continua cu resetarea parolei, te rugăm sa apeși pe următorul link:", "reset.cta": "Apasă aici pentru a-ți reseta parola", - "reset.notify.subject": "Password successfully changed", + "reset.notify.subject": "Parola a fost schimbată cu succes", "reset.notify.text1": "We are notifying you that on %1, your password was changed successfully.", "reset.notify.text2": "If you did not authorise this, please notify an administrator immediately.", "digest.notifications": "You have unread notifications from %1:", @@ -21,10 +21,10 @@ "digest.cta": "Apasă aici pentru a vizita %1", "digest.unsub.info": "This digest was sent to you due to your subscription settings.", "digest.no_topics": "There have been no active topics in the past %1", - "digest.day": "day", - "digest.week": "week", - "digest.month": "month", - "digest.subject": "Digest for %1", + "digest.day": "zi", + "digest.week": "saptămână", + "digest.month": "lună", + "digest.subject": "Rezumat pentru %1", "notif.chat.subject": "Ai primit un mesaj de la %1", "notif.chat.cta": "Apasă aici pentru a continua conversația", "notif.chat.unsub.info": "This chat notification was sent to you due to your subscription settings.", diff --git a/public/language/ro/global.json b/public/language/ro/global.json index 501638ec86..b79039789b 100644 --- a/public/language/ro/global.json +++ b/public/language/ro/global.json @@ -3,8 +3,8 @@ "search": "Căutare", "buttons.close": "Închide", "403.title": "Acces Interzis", - "403.message": "You seem to have stumbled upon a page that you do not have access to.", - "403.login": "Perhaps you should try logging in?", + "403.message": "Se pare că ai ajuns pe o pagină la care nu ai acces", + "403.login": "Poate ar trebui să te autentifici?", "404.title": "Nu a fost găsit", "404.message": "You seem to have stumbled upon a page that does not exist. Return to the home page.", "500.title": "Eroare internă.", @@ -49,7 +49,7 @@ "users": "Utilizatori", "topics": "Subiecte", "posts": "Mesaje", - "best": "Best", + "best": "Cel mai bun", "upvoted": "Upvoted", "downvoted": "Downvoted", "views": "Vizualizări", @@ -65,7 +65,7 @@ "posted_in_ago_by": "postat în %1 %2 de %3", "user_posted_ago": "%1 a postat %2", "guest_posted_ago": "Vizitator a postat %1", - "last_edited_by": "last edited by %1", + "last_edited_by": "ultima editare de %1", "norecentposts": "Nici un mesaj recent", "norecenttopics": "Nici un subiect recent", "recentposts": "Mesaje Recente", @@ -85,10 +85,10 @@ "unfollow": "Nu mai urmări", "delete_all": "Şterge Tot", "map": "Hartă", - "sessions": "Login Sessions", - "ip_address": "IP Address", - "enter_page_number": "Enter page number", - "upload_file": "Upload file", - "upload": "Upload", - "allowed-file-types": "Allowed file types are %1" + "sessions": "Ședința de login", + "ip_address": "Adresa IP", + "enter_page_number": "Introdu numărul paginei", + "upload_file": "Încărcați fișierul", + "upload": "Încărcați", + "allowed-file-types": "Tipuri de fișiere permise sunt %1" } \ No newline at end of file diff --git a/public/language/ro/groups.json b/public/language/ro/groups.json index 60719c2bf9..b116606f87 100644 --- a/public/language/ro/groups.json +++ b/public/language/ro/groups.json @@ -1,54 +1,54 @@ { "groups": "Grupuri", "view_group": "Vezi Grup", - "owner": "Group Owner", - "new_group": "Create New Group", - "no_groups_found": "There are no groups to see", - "pending.accept": "Accept", - "pending.reject": "Reject", - "pending.accept_all": "Accept All", - "pending.reject_all": "Reject All", - "pending.none": "There are no pending members at this time", - "invited.none": "There are no invited members at this time", - "invited.uninvite": "Rescind Invitation", + "owner": "Propietar de group", + "new_group": "Crează un grup nou", + "no_groups_found": "Nu sunt grupuri de văzut", + "pending.accept": "Acceptă", + "pending.reject": "Respinge", + "pending.accept_all": "Acceptă toate", + "pending.reject_all": "Respinge toate", + "pending.none": "Momentan nu există membrii în așteptare", + "invited.none": "Momentan nu există membrii invitați", + "invited.uninvite": "Anulează invitația", "invited.search": "Search for a user to invite to this group", - "invited.notification_title": "You have been invited to join %1", + "invited.notification_title": "Ai fost invitat să te alături %1", "request.notification_title": "Group Membership Request from %1", "request.notification_text": "%1 has requested to become a member of %2", - "cover-save": "Save", - "cover-saving": "Saving", + "cover-save": "Salvează", + "cover-saving": "Salvez", "details.title": "Detalii Grup", "details.members": "Listă Membrii", - "details.pending": "Pending Members", - "details.invited": "Invited Members", + "details.pending": "Membrii în așteptare", + "details.invited": "Membrii invitați", "details.has_no_posts": "Membrii acestui grup nu au facut nici o postare.", "details.latest_posts": "Ultimele Mesaje", - "details.private": "Private", + "details.private": "Privat", "details.disableJoinRequests": "Disable join requests", "details.grant": "Grant/Rescind Ownership", "details.kick": "Kick", - "details.owner_options": "Group Administration", - "details.group_name": "Group Name", - "details.member_count": "Member Count", - "details.creation_date": "Creation Date", - "details.description": "Description", - "details.badge_preview": "Badge Preview", - "details.change_icon": "Change Icon", - "details.change_colour": "Change Colour", - "details.badge_text": "Badge Text", - "details.userTitleEnabled": "Show Badge", + "details.owner_options": "Administrarea grupului", + "details.group_name": "Numele grupului", + "details.member_count": "Număr de membrii", + "details.creation_date": "Data creării", + "details.description": "Descriere", + "details.badge_preview": "Previzualizarea insignei", + "details.change_icon": "Schimbă icoana", + "details.change_colour": "Schimbă culoarea", + "details.badge_text": "Textul insignei", + "details.userTitleEnabled": "Arată insigna", "details.private_help": "If enabled, joining of groups requires approval from a group owner", - "details.hidden": "Hidden", + "details.hidden": "Ascuns", "details.hidden_help": "If enabled, this group will not be found in the groups listing, and users will have to be invited manually", - "details.delete_group": "Delete Group", + "details.delete_group": "Șterge grupul", "details.private_system_help": "Private groups is disabled at system level, this option does not do anything", - "event.updated": "Group details have been updated", - "event.deleted": "The group \"%1\" has been deleted", - "membership.accept-invitation": "Accept Invitation", - "membership.invitation-pending": "Invitation Pending", - "membership.join-group": "Join Group", - "membership.leave-group": "Leave Group", - "membership.reject": "Reject", - "new-group.group_name": "Group Name:", - "upload-group-cover": "Upload group cover" + "event.updated": "Detaliile grupului au fost actualizate", + "event.deleted": "Grupul %1\" a fost șters", + "membership.accept-invitation": "Acceptă invitația", + "membership.invitation-pending": "Invitație in așteptare", + "membership.join-group": "Alăture-te grupului", + "membership.leave-group": "Părăsește grupul", + "membership.reject": "Respinge", + "new-group.group_name": "Numele grupului:", + "upload-group-cover": "Încarcă coperta de grup" } \ No newline at end of file diff --git a/public/language/ro/modules.json b/public/language/ro/modules.json index 7382e34154..fa79140b83 100644 --- a/public/language/ro/modules.json +++ b/public/language/ro/modules.json @@ -5,7 +5,7 @@ "chat.no_active": "Nu ai nici o conversație activă", "chat.user_typing": "%1 scrie ...", "chat.user_has_messaged_you": "%1 ți-a trimis un mesaj.", - "chat.see_all": "See all chats", + "chat.see_all": "Vezi toate conversațiile", "chat.mark_all_read": "Mark all chats read", "chat.no-messages": "Selectează un recipient pentru a vedea istoria mesajelor chat", "chat.no-users-in-room": "No users in this room", @@ -20,7 +20,7 @@ "chat.delete_message_confirm": "Are you sure you wish to delete this message?", "chat.roomname": "Chat Room %1", "chat.add-users-to-room": "Add users to room", - "composer.compose": "Compose", + "composer.compose": "Scrie", "composer.show_preview": "Show Preview", "composer.hide_preview": "Hide Preview", "composer.user_said_in": "%1 a spus în %2:", diff --git a/public/language/ro/notifications.json b/public/language/ro/notifications.json index 9684a7d9cc..79abb3f15c 100644 --- a/public/language/ro/notifications.json +++ b/public/language/ro/notifications.json @@ -1,11 +1,11 @@ { "title": "Notificări", "no_notifs": "Nu ai nici o notificare recentă", - "see_all": "See all notifications", + "see_all": "Vezi toate notificările", "mark_all_read": "Mark all notifications read", "back_to_home": "Înapoi la %1", "outgoing_link": "Link Extern", - "outgoing_link_message": "You are now leaving %1", + "outgoing_link_message": "Părăsești acuma %1", "continue_to": "Continuă la %1", "return_to": "Întoarce-te la %1", "new_notification": "Notificare Nouă", diff --git a/public/language/ro/pages.json b/public/language/ro/pages.json index b90accee42..3b57e3d986 100644 --- a/public/language/ro/pages.json +++ b/public/language/ro/pages.json @@ -1,24 +1,24 @@ { "home": "Acasă", "unread": "Subiecte Necitite", - "popular-day": "Popular topics today", + "popular-day": "Subiecte populare azi", "popular-week": "Popular topics this week", "popular-month": "Popular topics this month", "popular-alltime": "All time popular topics", "recent": "Subiecte Noi", "flagged-posts": "Flagged Posts", - "users/online": "Online Users", - "users/latest": "Latest Users", - "users/sort-posts": "Users with the most posts", + "users/online": "Utilizatori online", + "users/latest": "Ultimii membrii", + "users/sort-posts": "Membrii cu cele mai multe postări", "users/sort-reputation": "Users with the most reputation", "users/banned": "Banned Users", "users/search": "User Search", "notifications": "Notificări", "tags": "Taguri", "tag": "Topics tagged under \"%1\"", - "register": "Register an account", + "register": "Înregistrează un cont nou", "login": "Login to your account", - "reset": "Reset your account password", + "reset": "Resetează parola contului tău", "categories": "Categorii", "groups": "Grupuri", "group": "%1 group", diff --git a/public/language/ro/recent.json b/public/language/ro/recent.json index 5b657f39b1..7d6adfcb12 100644 --- a/public/language/ro/recent.json +++ b/public/language/ro/recent.json @@ -6,14 +6,14 @@ "year": "An", "alltime": "Tot Timpul", "no_recent_topics": "Nu există subiecte recente.", - "no_popular_topics": "There are no popular topics.", - "there-is-a-new-topic": "There is a new topic.", + "no_popular_topics": "Nu sunt subiecte populare.", + "there-is-a-new-topic": "Există un subiect nou.", "there-is-a-new-topic-and-a-new-post": "There is a new topic and a new post.", "there-is-a-new-topic-and-new-posts": "There is a new topic and %1 new posts.", "there-are-new-topics": "There are %1 new topics.", - "there-are-new-topics-and-a-new-post": "There are %1 new topics and a new post.", - "there-are-new-topics-and-new-posts": "There are %1 new topics and %2 new posts.", - "there-is-a-new-post": "There is a new post.", - "there-are-new-posts": "There are %1 new posts.", + "there-are-new-topics-and-a-new-post": "Exista %1 subiect nou și o postare nouă", + "there-are-new-topics-and-new-posts": "Exista %1 subiecte noi și %2 postări noi", + "there-is-a-new-post": "Exista o postare nouă", + "there-are-new-posts": "Există %1 postări noi", "click-here-to-reload": "Click here to reload." } \ No newline at end of file diff --git a/public/language/ro/reset_password.json b/public/language/ro/reset_password.json index 15800e2b55..02afb16f0c 100644 --- a/public/language/ro/reset_password.json +++ b/public/language/ro/reset_password.json @@ -13,5 +13,5 @@ "invalid_email": "Adresă de email invalidă / Adresa de email nu există!", "password_too_short": "The password entered is too short, please pick a different password.", "passwords_do_not_match": "The two passwords you've entered do not match.", - "password_expired": "Your password has expired, please choose a new password" + "password_expired": "Parola ta a expirat, te rugăm alege altă parolă" } \ No newline at end of file diff --git a/public/language/ro/topic.json b/public/language/ro/topic.json index 83340e2e4b..37ca2d64c0 100644 --- a/public/language/ro/topic.json +++ b/public/language/ro/topic.json @@ -5,7 +5,7 @@ "no_topics_found": "Nu a fost găsit nici un subiect!", "no_posts_found": "Nu a fost găsit nici un mesaj!", "post_is_deleted": "Acest mesaj a fost șters!", - "topic_is_deleted": "This topic is deleted!", + "topic_is_deleted": "Acest subiect este șters!", "profile": "Profil", "posted_by": "Postat de %1", "posted_by_guest": "Postat de Vizitator", @@ -13,7 +13,7 @@ "notify_me": "Notică-mă de noi răspunsuri în acest subiect", "quote": "Citează", "reply": "Răspunde", - "reply-as-topic": "Reply as topic", + "reply-as-topic": "Răspunde ca subiect", "guest-login-reply": "Log in to reply", "edit": "Editează", "delete": "Șterge", diff --git a/public/language/ro/unread.json b/public/language/ro/unread.json index c82e736759..7f77537dc6 100644 --- a/public/language/ro/unread.json +++ b/public/language/ro/unread.json @@ -5,9 +5,9 @@ "mark_as_read": "Marchează ca citit", "selected": "Selectate", "all": "Toate", - "all_categories": "All categories", + "all_categories": "Toate categoriile", "topics_marked_as_read.success": "Subiectele au fost marcate ca citite!", - "all-topics": "All Topics", - "new-topics": "New Topics", + "all-topics": "Toate subiectele", + "new-topics": "Subiecte noi", "watched-topics": "Watched Topics" } \ No newline at end of file diff --git a/public/language/ro/uploads.json b/public/language/ro/uploads.json index 1622cb5693..c104a65f68 100644 --- a/public/language/ro/uploads.json +++ b/public/language/ro/uploads.json @@ -2,5 +2,5 @@ "uploading-file": "Uploading the file...", "select-file-to-upload": "Select a file to upload!", "upload-success": "File uploaded successfully!", - "maximum-file-size": "Maximum %1 kb" + "maximum-file-size": "Maxim %1 kB" } \ No newline at end of file diff --git a/public/language/ro/user.json b/public/language/ro/user.json index 2a65e98896..5f310d1a75 100644 --- a/public/language/ro/user.json +++ b/public/language/ro/user.json @@ -12,7 +12,7 @@ "delete_account": "Șterge Cont", "delete_account_confirm": "Ești sigur ca vrei să îți ștergi contul?
      Această acțiune este ireversibilă și nu o să mai fie posibil să îți recuperezi datele

      Introdu numele tău de utilizator pentru a confirma că dorești să ștergi acest cont.", "delete_this_account_confirm": "Are you sure you want to delete this account?
      This action is irreversible and you will not be able to recover any data

      ", - "account-deleted": "Account deleted", + "account-deleted": "Cont șters", "fullname": "Nume Întreg", "website": "Pagină Web", "location": "Locație", diff --git a/public/language/ro/users.json b/public/language/ro/users.json index 8f2cf6914c..6f05227dd0 100644 --- a/public/language/ro/users.json +++ b/public/language/ro/users.json @@ -7,7 +7,7 @@ "load_more": "Încarcă mai multe", "users-found-search-took": "%1 user(s) found! Search took %2 seconds.", "filter-by": "Filter By", - "online-only": "Online only", + "online-only": "Numai online", "invite": "Invită", "invitation-email-sent": "An invitation email has been sent to %1", "user_list": "Listă utilizatori", From 92ab2699ba28e8c223b838e00fd2999d81ec7f7e Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 24 May 2016 09:55:14 -0400 Subject: [PATCH 0282/1109] added some styling to allow mdl buttons to be stacked in ACP --- public/less/admin/admin.less | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/public/less/admin/admin.less b/public/less/admin/admin.less index e733d8d9bd..3af3ded05d 100644 --- a/public/less/admin/admin.less +++ b/public/less/admin/admin.less @@ -50,12 +50,30 @@ color: @link-color; } + // .floating-button can either be a container or the button itself .floating-button { - background: @brand-primary !important; position: fixed; right: 30px; bottom: 30px; z-index: 1; + max-width: 56px; + + button { + &.primary { + background: @brand-primary !important; + } + + &.success { + background: @brand-success !important; + } + + &:not(:last-child) { + margin-bottom: 2rem; + } + } + } + button.floating-button { + background: @brand-primary !important; } .user-img { From afb0312f51d03c07edaae0cc49cf9afd509b5b84 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 24 May 2016 10:37:45 -0400 Subject: [PATCH 0283/1109] closes #4672 --- src/controllers/users.js | 9 +++++++-- src/user.js | 4 ++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/controllers/users.js b/src/controllers/users.js index 476766e7ba..c3dc8b0550 100644 --- a/src/controllers/users.js +++ b/src/controllers/users.js @@ -171,12 +171,17 @@ function render(req, res, data, next) { data.adminInviteOnly = registrationType === 'admin-invite-only'; data['reputation:disabled'] = parseInt(meta.config['reputation:disabled'], 10) === 1; - user.getInvitesNumber(req.uid, function(err, num) { + async.parallel({ + numInvites: async.apply(user.getInvitesNumber, req.uid), + numUsers: async.apply(user.getUserCount) + }, function(err, meta) { if (err) { return next(err); } - data.invites = num; + res.append('X-Total-Count', meta.numUsers); + data.invites = meta.numInvites; + res.render('users', data); }); } diff --git a/src/user.js b/src/user.js index c7fb18e4fc..b222ae4a2b 100644 --- a/src/user.js +++ b/src/user.js @@ -33,6 +33,10 @@ var utils = require('../public/src/utils'); require('./user/invite')(User); require('./user/password')(User); + User.getUserCount = function(callback) { + db.sortedSetCount('username:uid', '-inf', '+inf', callback); + }; + User.updateLastOnlineTime = function(uid, callback) { callback = callback || function() {}; User.getUserFields(uid, ['status', 'lastonline'], function(err, userData) { From 79bcb9be109af9c0c2713c8b7e8ca5b43880a752 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 24 May 2016 10:42:56 -0400 Subject: [PATCH 0284/1109] fixes #4675 --- loader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loader.js b/loader.js index b78abdc4a1..e853fa562c 100644 --- a/loader.js +++ b/loader.js @@ -171,7 +171,7 @@ function forkWorker(index, isPrimary) { } process.env.isPrimary = isPrimary; - process.env.isCluster = true; + process.env.isCluster = ports.length > 1 ? true : false; process.env.port = ports[index]; var worker = fork('app.js', [], { From dcb73f9647bd73acce0d0907d04d060e7fe05eb7 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 24 May 2016 17:52:24 +0300 Subject: [PATCH 0285/1109] use userCount --- src/controllers/users.js | 10 ++++------ src/user.js | 4 ---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/controllers/users.js b/src/controllers/users.js index c3dc8b0550..c84de75b5b 100644 --- a/src/controllers/users.js +++ b/src/controllers/users.js @@ -126,6 +126,7 @@ usersController.getUsers = function(set, uid, page, callback) { loadmore_display: results.usersData.count > (stop - start + 1) ? 'block' : 'hide', users: results.usersData.users, pagination: pagination.create(page, pageCount), + userCount: results.usersData.count, title: setToTitles[set] || '[[pages:users/latest]]', breadcrumbs: helpers.buildBreadcrumbs(breadcrumbs), setName: set, @@ -171,16 +172,13 @@ function render(req, res, data, next) { data.adminInviteOnly = registrationType === 'admin-invite-only'; data['reputation:disabled'] = parseInt(meta.config['reputation:disabled'], 10) === 1; - async.parallel({ - numInvites: async.apply(user.getInvitesNumber, req.uid), - numUsers: async.apply(user.getUserCount) - }, function(err, meta) { + user.getInvitesNumber(req.uid, function(err, numInvites) { if (err) { return next(err); } - res.append('X-Total-Count', meta.numUsers); - data.invites = meta.numInvites; + res.append('X-Total-Count', data.userCount); + data.invites = numInvites; res.render('users', data); }); diff --git a/src/user.js b/src/user.js index b222ae4a2b..c7fb18e4fc 100644 --- a/src/user.js +++ b/src/user.js @@ -33,10 +33,6 @@ var utils = require('../public/src/utils'); require('./user/invite')(User); require('./user/password')(User); - User.getUserCount = function(callback) { - db.sortedSetCount('username:uid', '-inf', '+inf', callback); - }; - User.updateLastOnlineTime = function(uid, callback) { callback = callback || function() {}; User.getUserFields(uid, ['status', 'lastonline'], function(err, userData) { From 07c59ae174e8a995fb09f934460b2b96ecc06ad9 Mon Sep 17 00:00:00 2001 From: Nate Lee Date: Tue, 24 May 2016 10:02:27 -0700 Subject: [PATCH 0286/1109] changed cls.getItem to equal cls.get from cls.set based off of naming schema --- src/middleware/cls.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middleware/cls.js b/src/middleware/cls.js index 0118fa998f..8cf0062d30 100644 --- a/src/middleware/cls.js +++ b/src/middleware/cls.js @@ -29,7 +29,7 @@ var namespace = continuationLocalStorage.createNamespace(APP_NAMESPACE); }; cls.setItem = cls.set; - cls.getItem = cls.set; + cls.getItem = cls.get; cls.namespace = namespace; cls.continuationLocalStorage = continuationLocalStorage; From 60af3b9b7746557cf72a4c2d07cc97e2bd070305 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 24 May 2016 21:14:14 -0400 Subject: [PATCH 0287/1109] removed extra comma in object definition --- public/src/admin/manage/category-analytics.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/admin/manage/category-analytics.js b/public/src/admin/manage/category-analytics.js index 52a24ecfeb..d9f38ed259 100644 --- a/public/src/admin/manage/category-analytics.js +++ b/public/src/admin/manage/category-analytics.js @@ -80,7 +80,7 @@ define('admin/manage/category-analytics', [], function() { data: ajaxify.data.analytics['posts:daily'] } ] - }, + } }; hourlyCanvas.width = $(hourlyCanvas).parent().width(); From 149565169bc2fd9f92389c61c65da2528b4fcd70 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 24 May 2016 22:01:46 -0400 Subject: [PATCH 0288/1109] closes #4658 --- public/src/admin/advanced/errors.js | 64 +++++++++++++++++++ public/src/admin/manage/category-analytics.js | 4 +- src/analytics.js | 7 ++ src/controllers/admin.js | 1 + src/controllers/admin/errors.js | 20 ++++++ src/controllers/index.js | 2 + src/meta.js | 1 + src/meta/errors.js | 36 +++++++++++ src/middleware/middleware.js | 1 + src/routes/admin.js | 1 + src/views/admin/advanced/errors.tpl | 61 ++++++++++++++++++ src/views/admin/partials/menu.tpl | 2 + 12 files changed, 198 insertions(+), 2 deletions(-) create mode 100644 public/src/admin/advanced/errors.js create mode 100644 src/controllers/admin/errors.js create mode 100644 src/meta/errors.js create mode 100644 src/views/admin/advanced/errors.tpl diff --git a/public/src/admin/advanced/errors.js b/public/src/admin/advanced/errors.js new file mode 100644 index 0000000000..1713311eb7 --- /dev/null +++ b/public/src/admin/advanced/errors.js @@ -0,0 +1,64 @@ +"use strict"; +/*global config, define, app, socket, ajaxify, bootbox, templates, Chart, utils */ + +define('admin/advanced/errors', ['Chart'], function(Chart) { + var Errors = {}; + + Errors.init = function() { + var notFoundCanvas = document.getElementById('not-found'), + tooBusyCanvas = document.getElementById('toobusy'), + dailyLabels = utils.getDaysArray(); + + dailyLabels.length = 7; + + if (utils.isMobile()) { + Chart.defaults.global.showTooltips = false; + } + + var data = { + 'not-found': { + labels: dailyLabels, + datasets: [ + { + label: "", + fillColor: "rgba(186,139,175,0.2)", + strokeColor: "rgba(186,139,175,1)", + pointColor: "rgba(186,139,175,1)", + pointStrokeColor: "#fff", + pointHighlightFill: "#fff", + pointHighlightStroke: "rgba(186,139,175,1)", + data: ajaxify.data.analytics['not-found'] + } + ] + }, + 'toobusy': { + labels: dailyLabels, + datasets: [ + { + label: "", + fillColor: "rgba(151,187,205,0.2)", + strokeColor: "rgba(151,187,205,1)", + pointColor: "rgba(151,187,205,1)", + pointStrokeColor: "#fff", + pointHighlightFill: "#fff", + pointHighlightStroke: "rgba(151,187,205,1)", + data: ajaxify.data.analytics['toobusy'] + } + ] + } + }; + + notFoundCanvas.width = $(notFoundCanvas).parent().width(); + tooBusyCanvas.width = $(tooBusyCanvas).parent().width(); + new Chart(notFoundCanvas.getContext('2d')).Line(data['not-found'], { + responsive: true, + animation: false + }); + new Chart(tooBusyCanvas.getContext('2d')).Line(data['toobusy'], { + responsive: true, + animation: false + }); + }; + + return Errors; +}); \ No newline at end of file diff --git a/public/src/admin/manage/category-analytics.js b/public/src/admin/manage/category-analytics.js index d9f38ed259..cf78cfa5e3 100644 --- a/public/src/admin/manage/category-analytics.js +++ b/public/src/admin/manage/category-analytics.js @@ -1,7 +1,7 @@ "use strict"; -/*global config, define, app, socket, ajaxify, bootbox, templates, Chart, utils */ +/*global config, define, app, socket, ajaxify, bootbox, templates, utils */ -define('admin/manage/category-analytics', [], function() { +define('admin/manage/category-analytics', ['Chart'], function(Chart) { var CategoryAnalytics = {}; CategoryAnalytics.init = function() { diff --git a/src/analytics.js b/src/analytics.js index c1ede42eba..bbb1c06794 100644 --- a/src/analytics.js +++ b/src/analytics.js @@ -187,4 +187,11 @@ var db = require('./database'); }, callback); }; + Analytics.getErrorAnalytics = function(callback) { + async.parallel({ + 'not-found': async.apply(Analytics.getDailyStatsForSet, 'analytics:errors:404', Date.now(), 7), + 'toobusy': async.apply(Analytics.getDailyStatsForSet, 'analytics:errors:503', Date.now(), 7) + }, callback); + }; + }(exports)); \ No newline at end of file diff --git a/src/controllers/admin.js b/src/controllers/admin.js index 2bba60cae6..c3ce96d205 100644 --- a/src/controllers/admin.js +++ b/src/controllers/admin.js @@ -14,6 +14,7 @@ var adminController = { }, events: require('./admin/events'), logs: require('./admin/logs'), + errors: require('./admin/errors'), database: require('./admin/database'), postCache: require('./admin/postCache'), plugins: require('./admin/plugins'), diff --git a/src/controllers/admin/errors.js b/src/controllers/admin/errors.js new file mode 100644 index 0000000000..d5ce5a1b76 --- /dev/null +++ b/src/controllers/admin/errors.js @@ -0,0 +1,20 @@ +'use strict'; + +var async = require('async'); + +var meta = require('../../meta'), + analytics = require('../../analytics'); + +var errorsController = {}; + +errorsController.get = function(req, res) { + async.parallel({ + 'not-found': async.apply(meta.errors.get), + analytics: async.apply(analytics.getErrorAnalytics) + }, function(err, data) { + res.render('admin/advanced/errors', data); + }); +}; + + +module.exports = errorsController; \ No newline at end of file diff --git a/src/controllers/index.js b/src/controllers/index.js index 09f156b19d..26b7527ce9 100644 --- a/src/controllers/index.js +++ b/src/controllers/index.js @@ -373,12 +373,14 @@ Controllers.handle404 = function(req, res) { } else if (isLanguage.test(req.url)) { res.status(200).json({}); } else if (req.path.startsWith(relativePath + '/uploads') || (req.get('accept') && req.get('accept').indexOf('text/html') === -1) || req.path === '/favicon.ico') { + meta.errors.log404(req.path || ''); res.sendStatus(404); } else if (req.accepts('html')) { if (process.env.NODE_ENV === 'development') { winston.warn('Route requested but not found: ' + req.url); } + meta.errors.log404(req.path.replace(/^\/api/, '') || ''); res.status(404); if (res.locals.isAPI) { diff --git a/src/meta.js b/src/meta.js index eb5816fdaf..3806c69556 100644 --- a/src/meta.js +++ b/src/meta.js @@ -24,6 +24,7 @@ var async = require('async'), require('./meta/sounds')(Meta); require('./meta/settings')(Meta); require('./meta/logs')(Meta); + require('./meta/errors')(Meta); require('./meta/tags')(Meta); require('./meta/dependencies')(Meta); Meta.templates = require('./meta/templates'); diff --git a/src/meta/errors.js b/src/meta/errors.js new file mode 100644 index 0000000000..5582d537b8 --- /dev/null +++ b/src/meta/errors.js @@ -0,0 +1,36 @@ +'use strict'; + +var async = require('async'), + winston = require('winston'), + validator = require('validator'); + +var db = require('../database'), + analytics = require('../analytics'); + +module.exports = function(Meta) { + + Meta.errors = {}; + + Meta.errors.log404 = function(route, callback) { + callback = callback || function() {}; + route = route.replace(/\/$/, ''); // remove trailing slashes + analytics.increment('errors:404'); + db.sortedSetIncrBy('errors:404', 1, route, callback); + }; + + Meta.errors.get = function(callback) { + db.getSortedSetRevRangeByScoreWithScores('errors:404', 0, -1, '+inf', '-inf', function(err, data) { + data = data.map(function(nfObject) { + nfObject.value = validator.escape(nfObject.value); + return nfObject; + }); + + callback(null, data); + }); + }; + + Meta.errors.clear = function(callback) { + console.log('clear errors'); + callback(); + }; +}; diff --git a/src/middleware/middleware.js b/src/middleware/middleware.js index 9267289d3f..7409bd1577 100644 --- a/src/middleware/middleware.js +++ b/src/middleware/middleware.js @@ -302,6 +302,7 @@ middleware.privateUploads = function(req, res, next) { middleware.busyCheck = function(req, res, next) { if (global.env === 'production' && (!meta.config.hasOwnProperty('eventLoopCheckEnabled') || parseInt(meta.config.eventLoopCheckEnabled, 10) === 1) && toobusy()) { + analytics.increment('errors:503'); res.status(503).type('text/html').sendFile(path.join(__dirname, '../../public/503.html')); } else { next(); diff --git a/src/routes/admin.js b/src/routes/admin.js index 66391053a7..9767c26e9d 100644 --- a/src/routes/admin.js +++ b/src/routes/admin.js @@ -82,6 +82,7 @@ function addRoutes(router, middleware, controllers) { router.get('/advanced/database', middlewares, controllers.admin.database.get); router.get('/advanced/events', middlewares, controllers.admin.events.get); router.get('/advanced/logs', middlewares, controllers.admin.logs.get); + router.get('/advanced/errors', middlewares, controllers.admin.errors.get); router.get('/advanced/post-cache', middlewares, controllers.admin.postCache.get); router.get('/development/logger', middlewares, controllers.admin.logger.get); diff --git a/src/views/admin/advanced/errors.tpl b/src/views/admin/advanced/errors.tpl new file mode 100644 index 0000000000..996f71f818 --- /dev/null +++ b/src/views/admin/advanced/errors.tpl @@ -0,0 +1,61 @@ +
      +
      +
      +
      +
      +
      +
      +
      + +
      +
      +
      +
      +
      +
      +
      + +
      +
      +
      +
      +
      404 Not Found
      +
      + + + + + + + + + + + + + + + + + + +
      RouteCount
      {../value}{../score}
      +
      + Hooray! There are no routes that were not found. +
      +
      +
      +
      +
      +
      +
      +
      Manage Error Log
      +
      +
      + + +
      +
      +
      +
      +
      diff --git a/src/views/admin/partials/menu.tpl b/src/views/admin/partials/menu.tpl index 8d0f0f853d..c68a470d4f 100644 --- a/src/views/admin/partials/menu.tpl +++ b/src/views/admin/partials/menu.tpl @@ -95,6 +95,7 @@
    • Database
    • Events
    • Logs
    • +
    • Errors
    • Post Cache
    • Logger
    • @@ -247,6 +248,7 @@
    • Database
    • Events
    • Logs
    • +
    • Errors
    • Post Cache
    • Logger
    • From ba412f4a56853b2d3c418a317626bcd21d439059 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 24 May 2016 23:04:57 -0400 Subject: [PATCH 0289/1109] fully completed #4658 --- package.json | 3 ++- public/src/admin/advanced/errors.js | 17 +++++++++++++++++ src/controllers/admin/errors.js | 14 ++++++++++++-- src/meta/errors.js | 7 +++---- src/routes/admin.js | 1 + src/socket.io/admin.js | 8 +++++++- src/views/admin/advanced/errors.tpl | 2 +- 7 files changed, 43 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 96a5c0eaaa..ce3674ef2f 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "html-to-text": "2.0.0", "ip": "1.1.2", "jimp": "0.2.21", + "json-2-csv": "^2.0.22", "less": "^2.0.0", "logrotate-stream": "^0.2.3", "lru-cache": "4.0.0", @@ -49,8 +50,8 @@ "nconf": "~0.8.2", "nodebb-plugin-composer-default": "3.0.31", "nodebb-plugin-dbsearch": "1.0.1", - "nodebb-plugin-emoji-one": "1.1.3", "nodebb-plugin-emoji-extended": "1.1.0", + "nodebb-plugin-emoji-one": "1.1.3", "nodebb-plugin-markdown": "5.1.5", "nodebb-plugin-mentions": "1.1.1", "nodebb-plugin-soundpack-default": "0.1.6", diff --git a/public/src/admin/advanced/errors.js b/public/src/admin/advanced/errors.js index 1713311eb7..96b17fbe40 100644 --- a/public/src/admin/advanced/errors.js +++ b/public/src/admin/advanced/errors.js @@ -5,6 +5,23 @@ define('admin/advanced/errors', ['Chart'], function(Chart) { var Errors = {}; Errors.init = function() { + Errors.setupCharts(); + + $('[data-action="clear"]').on('click', Errors.clear404); + }; + + Errors.clear404 = function() { + bootbox.confirm('Are you sure you wish to clear the 404 error logs?', function(ok) { + if (ok) { + socket.emit('admin.errors.clear', {}, function(err) { + ajaxify.refresh(); + app.alertSuccess('"404 Not Found" errors cleared'); + }); + } + }); + }; + + Errors.setupCharts = function() { var notFoundCanvas = document.getElementById('not-found'), tooBusyCanvas = document.getElementById('toobusy'), dailyLabels = utils.getDaysArray(); diff --git a/src/controllers/admin/errors.js b/src/controllers/admin/errors.js index d5ce5a1b76..4b59932965 100644 --- a/src/controllers/admin/errors.js +++ b/src/controllers/admin/errors.js @@ -1,6 +1,7 @@ 'use strict'; -var async = require('async'); +var async = require('async'), + json2csv = require('json-2-csv').json2csv; var meta = require('../../meta'), analytics = require('../../analytics'); @@ -9,12 +10,21 @@ var errorsController = {}; errorsController.get = function(req, res) { async.parallel({ - 'not-found': async.apply(meta.errors.get), + 'not-found': async.apply(meta.errors.get, true), analytics: async.apply(analytics.getErrorAnalytics) }, function(err, data) { res.render('admin/advanced/errors', data); }); }; +errorsController.export = function(req, res) { + async.waterfall([ + async.apply(meta.errors.get, false), + async.apply(json2csv) + ], function(err, csv) { + res.set('Content-Type', 'text/csv').set('Content-Disposition', 'attachment; filename="404.csv"').send(csv); + }); +}; + module.exports = errorsController; \ No newline at end of file diff --git a/src/meta/errors.js b/src/meta/errors.js index 5582d537b8..4449a55f57 100644 --- a/src/meta/errors.js +++ b/src/meta/errors.js @@ -18,10 +18,10 @@ module.exports = function(Meta) { db.sortedSetIncrBy('errors:404', 1, route, callback); }; - Meta.errors.get = function(callback) { + Meta.errors.get = function(escape, callback) { db.getSortedSetRevRangeByScoreWithScores('errors:404', 0, -1, '+inf', '-inf', function(err, data) { data = data.map(function(nfObject) { - nfObject.value = validator.escape(nfObject.value); + nfObject.value = escape ? validator.escape(nfObject.value) : nfObject.value; return nfObject; }); @@ -30,7 +30,6 @@ module.exports = function(Meta) { }; Meta.errors.clear = function(callback) { - console.log('clear errors'); - callback(); + db.delete('errors:404', callback); }; }; diff --git a/src/routes/admin.js b/src/routes/admin.js index 9767c26e9d..521f0194bf 100644 --- a/src/routes/admin.js +++ b/src/routes/admin.js @@ -83,6 +83,7 @@ function addRoutes(router, middleware, controllers) { router.get('/advanced/events', middlewares, controllers.admin.events.get); router.get('/advanced/logs', middlewares, controllers.admin.logs.get); router.get('/advanced/errors', middlewares, controllers.admin.errors.get); + router.get('/advanced/errors/export', middlewares, controllers.admin.errors.export); router.get('/advanced/post-cache', middlewares, controllers.admin.postCache.get); router.get('/development/logger', middlewares, controllers.admin.logger.get); diff --git a/src/socket.io/admin.js b/src/socket.io/admin.js index 6dd22134ba..8a1df2931e 100644 --- a/src/socket.io/admin.js +++ b/src/socket.io/admin.js @@ -33,7 +33,8 @@ var async = require('async'), settings: {}, email: {}, analytics: {}, - logs: {} + logs: {}, + errors: {} }; SocketAdmin.before = function(socket, method, data, next) { @@ -255,6 +256,11 @@ SocketAdmin.logs.clear = function(socket, data, callback) { meta.logs.clear(callback); }; +SocketAdmin.errors.clear = function(socket, data, callback) { + console.log('clearing errors?'); + meta.errors.clear(callback); +}; + SocketAdmin.getMoreEvents = function(socket, next, callback) { var start = parseInt(next, 10); if (start < 0) { diff --git a/src/views/admin/advanced/errors.tpl b/src/views/admin/advanced/errors.tpl index 996f71f818..67eea3084e 100644 --- a/src/views/admin/advanced/errors.tpl +++ b/src/views/admin/advanced/errors.tpl @@ -52,7 +52,7 @@
      Manage Error Log
      - + Export Error Log (CSV)
      From 2c5464760d3f62ac63d8747760995e5ef47ac4fa Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 25 May 2016 15:48:53 +0300 Subject: [PATCH 0290/1109] #4668 allow admins/mods to edit even after postEditDuration has expired --- public/src/client/topic/postTools.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/public/src/client/topic/postTools.js b/public/src/client/topic/postTools.js index 98b6ef1470..fa2a72e617 100644 --- a/public/src/client/topic/postTools.js +++ b/public/src/client/topic/postTools.js @@ -168,33 +168,33 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translator postContainer.on('click', '[component="post/edit"]', function() { var btn = $(this); - + var timestamp = parseInt(getData(btn, 'data-timestamp'), 10); var postEditDuration = parseInt(ajaxify.data.postEditDuration, 10); - if (postEditDuration && Date.now() - timestamp > postEditDuration * 1000) { - var numDays = Math.floor(postEditDuration / 86400); + if (!ajaxify.data.privileges.isAdminOrMod && postEditDuration && Date.now() - timestamp > postEditDuration * 1000) { + var numDays = Math.floor(postEditDuration / 86400); var numHours = Math.floor((postEditDuration % 86400) / 3600); var numMinutes = Math.floor(((postEditDuration % 86400) % 3600) / 60); var numSeconds = ((postEditDuration % 86400) % 3600) % 60; var msg = '[[error:post-edit-duration-expired, ' + postEditDuration + ']]'; if (numDays) { if (numHours) { - msg = '[[error:post-edit-duration-expired-days-hours, ' + numDays + ', ' + numHours + ']]'; + msg = '[[error:post-edit-duration-expired-days-hours, ' + numDays + ', ' + numHours + ']]'; } else { msg = '[[error:post-edit-duration-expired-days, ' + numDays + ']]'; - } + } } else if (numHours) { if (numMinutes) { - msg = '[[error:post-edit-duration-expired-hours-minutes, ' + numHours + ', ' + numMinutes + ']]'; + msg = '[[error:post-edit-duration-expired-hours-minutes, ' + numHours + ', ' + numMinutes + ']]'; } else { msg = '[[error:post-edit-duration-expired-hours, ' + numHours + ']]'; - } + } } else if (numMinutes) { if (numSeconds) { - msg = '[[error:post-edit-duration-expired-minutes-seconds, ' + numMinutes + ', ' + numSeconds + ']]'; + msg = '[[error:post-edit-duration-expired-minutes-seconds, ' + numMinutes + ', ' + numSeconds + ']]'; } else { msg = '[[error:post-edit-duration-expired-minutes, ' + numMinutes + ']]'; - } + } } return app.alertError(msg); } From e8906fd9f68daab23f8f96d53216021f90ea6464 Mon Sep 17 00:00:00 2001 From: NodeBB Misty Date: Wed, 25 May 2016 09:03:22 -0400 Subject: [PATCH 0291/1109] Latest translations and fallbacks --- public/language/fr/error.json | 2 +- public/language/gl/error.json | 2 +- public/language/gl/topic.json | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/public/language/fr/error.json b/public/language/fr/error.json index 4772cba4c9..d2489a9094 100644 --- a/public/language/fr/error.json +++ b/public/language/fr/error.json @@ -14,7 +14,7 @@ "invalid-password": "Mot de passe invalide", "invalid-username-or-password": "Veuillez entrer un nom d'utilisateur et un mot de passe", "invalid-search-term": "Données de recherche invalides", - "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", + "csrf-invalid": "Nous ne pouvons pas vous connectez, possiblement car votre session a expiré. Merci de réessayer.", "invalid-pagination-value": "Valeur de pagination invalide. Celle-ci doit être comprise entre %1 et %2.", "username-taken": "Nom d’utilisateur déjà utilisé", "email-taken": "Email déjà utilisé", diff --git a/public/language/gl/error.json b/public/language/gl/error.json index 7f5c47fee7..910ae77dfd 100644 --- a/public/language/gl/error.json +++ b/public/language/gl/error.json @@ -14,7 +14,7 @@ "invalid-password": "Contrasinal Inválido", "invalid-username-or-password": "Especifica ámbolos dous por favor, nome de usuario e contrasinal", "invalid-search-term": "Termo de búsqueda inválido", - "csrf-invalid": "We were unable to log you in, likely due to an expired session. Please try again", + "csrf-invalid": "Non fomos capaces de entrar, probablemente debido a que a sesión expirou. Por favor, téntao de novo", "invalid-pagination-value": "Valor de paxinación incorreto, ten que estar entre %1 e %2", "username-taken": "Nome de usuario en uso", "email-taken": "Correo en uso", diff --git a/public/language/gl/topic.json b/public/language/gl/topic.json index f83cc7ee34..24004ac1fd 100644 --- a/public/language/gl/topic.json +++ b/public/language/gl/topic.json @@ -32,7 +32,7 @@ "deleted_message": "Este tema foi borrado. Só os usuarios con privilexios administrativos poden velo.", "following_topic.message": "Agora recibirás notificacións cando alguén publique neste tema.", "not_following_topic.message": "Non recibirás notificacións deste tema.", - "ignoring_topic.message": "You will no longer see this topic in the unread topics list. You will be notified when you are mentioned or your post is up voted.", + "ignoring_topic.message": "Xa non verás este fío na lista de fíos non lidos. Serás notificado cando sexas mencionado ou a túa publicación sexa votada.", "login_to_subscribe": "Por favor, identifícate para subscribirte a este tema.", "markAsUnreadForAll.success": "Publicación marcada como non lida para todos.", "mark_unread": "Marcar coma non lido", @@ -42,12 +42,12 @@ "watch.title": "Serás notificado canto haxa novas respostas neste tema", "unwatch.title": "Deixar de vixiar este tema", "share_this_post": "Compartir esta publicación", - "watching": "Watching", - "not-watching": "Not Watching", - "ignoring": "Ignoring", - "watching.description": "Notify me of new replies.
      Show topic in unread.", - "not-watching.description": "Do not notify me of new replies.
      Show topic in unread if category is not ignored.", - "ignoring.description": "Do not notify me of new replies.
      Do not show topic in unread.", + "watching": "Vendo", + "not-watching": "Non Vendo", + "ignoring": "Ignorar", + "watching.description": "Notificádeme das novas repostas.
      Amosa-lo fío nos non lidos.", + "not-watching.description": "Non me notifiquedes as novas respostas.
      Amosa-lo fío en non lidos se a categoría non está ignorada.", + "ignoring.description": "Non me notifiquedes as novas respostas.
      Non amosa-lo fío en non lidos.", "thread_tools.title": "Ferramentas do tema", "thread_tools.markAsUnreadForAll": "Marcar como non lido", "thread_tools.pin": "Fixar Tema", From 8ddcc237a71af34408386e0593f9b6c07e077a69 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 25 May 2016 19:33:46 +0300 Subject: [PATCH 0292/1109] removed submit and lock --- src/socket.io/posts.js | 4 ---- src/socket.io/topics.js | 4 ---- 2 files changed, 8 deletions(-) diff --git a/src/socket.io/posts.js b/src/socket.io/posts.js index 90163c532c..90d7a79284 100644 --- a/src/socket.io/posts.js +++ b/src/socket.io/posts.js @@ -52,10 +52,6 @@ SocketPosts.reply = function(socket, data, callback) { user.updateOnlineUsers(socket.uid); socketHelpers.notifyNew(socket.uid, 'newPost', result); - - if (data.lock) { - socketTopics.doTopicAction('lock', 'event:topic_locked', socket, {tids: [postData.topic.tid], cid: postData.topic.cid}); - } }); }; diff --git a/src/socket.io/topics.js b/src/socket.io/topics.js index 451a1d0dce..0b8c170d8e 100644 --- a/src/socket.io/topics.js +++ b/src/socket.io/topics.js @@ -36,10 +36,6 @@ SocketTopics.post = function(socket, data, callback) { return callback(err); } - if (data.lock) { - SocketTopics.doTopicAction('lock', 'event:topic_locked', socket, {tids: [result.topicData.tid], cid: result.topicData.cid}); - } - callback(null, result.topicData); socket.emit('event:new_post', {posts: [result.postData]}); From 6c5cc5a513921758cbb912471a2f38853e0d72b6 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 25 May 2016 19:36:38 +0300 Subject: [PATCH 0293/1109] up composer --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ce3674ef2f..8ae4b4261f 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "morgan": "^1.3.2", "mousetrap": "^1.5.3", "nconf": "~0.8.2", - "nodebb-plugin-composer-default": "3.0.31", + "nodebb-plugin-composer-default": "3.0.32", "nodebb-plugin-dbsearch": "1.0.1", "nodebb-plugin-emoji-extended": "1.1.0", "nodebb-plugin-emoji-one": "1.1.3", From bdc23b4a8d42b19126858d6d6256e54b1711ba73 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 25 May 2016 20:17:02 +0300 Subject: [PATCH 0294/1109] add reputation to app.user --- src/middleware/header.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/middleware/header.js b/src/middleware/header.js index c1ed6d60c2..dccefcddf7 100644 --- a/src/middleware/header.js +++ b/src/middleware/header.js @@ -77,17 +77,21 @@ module.exports = function(app, middleware) { user.isGlobalModerator(req.uid, next); }, user: function(next) { + var userData = { + uid: 0, + username: '[[global:guest]]', + userslug: '', + email: '', + picture: meta.config.defaultAvatar, + status: 'offline', + banned: false, + reputation: 0, + 'email:confirmed': false + }; if (req.uid) { - user.getUserFields(req.uid, ['username', 'userslug', 'email', 'picture', 'status', 'email:confirmed', 'banned'], next); + user.getUserFields(req.uid, Object.keys(userData), next); } else { - next(null, { - username: '[[global:guest]]', - userslug: '', - picture: meta.config.defaultAvatar, - status: 'offline', - banned: false, - uid: 0 - }); + next(null, userData); } }, navigation: async.apply(navigation.get), From 7c47f555be79de5cfb62e0e20dfb4581cf5cf51e Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 25 May 2016 20:20:36 +0300 Subject: [PATCH 0295/1109] up persona --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8ae4b4261f..2838c78696 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", "nodebb-theme-lavender": "3.0.12", - "nodebb-theme-persona": "4.0.142", + "nodebb-theme-persona": "4.0.143", "nodebb-theme-vanilla": "5.0.78", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", From 920bc213d30ee100d92ccfa629fa24ae44d5f38b Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 25 May 2016 14:01:58 -0400 Subject: [PATCH 0296/1109] updated acp advanced/errors table to span the entire page --- src/views/admin/advanced/errors.tpl | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/src/views/admin/advanced/errors.tpl b/src/views/admin/advanced/errors.tpl index 67eea3084e..d3c23e78b7 100644 --- a/src/views/admin/advanced/errors.tpl +++ b/src/views/admin/advanced/errors.tpl @@ -18,6 +18,22 @@ + +
      +
      +
      Manage Error Log
      +
      +
      + Export Error Log (CSV) + +
      +
      +
      +
      + + +
      +
      404 Not Found
      @@ -47,15 +63,4 @@
      -
      -
      -
      Manage Error Log
      -
      -
      - Export Error Log (CSV) - -
      -
      -
      -
      -
      + \ No newline at end of file From 17b4dd85e7d35b343134483265a9a6aa93639942 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 25 May 2016 21:18:14 +0300 Subject: [PATCH 0297/1109] use valueToString in sortedSetIncrBy --- src/database/mongo/sorted.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/database/mongo/sorted.js b/src/database/mongo/sorted.js index d8a9205ce0..9e9f72969e 100644 --- a/src/database/mongo/sorted.js +++ b/src/database/mongo/sorted.js @@ -520,7 +520,7 @@ module.exports = function(db, module) { return callback(); } var data = {}; - value = helpers.fieldToString(value); + value = helpers.valueToString(value); data.score = parseInt(increment, 10); db.collection('objects').findAndModify({_key: key, value: value}, {}, {$inc: data}, {new: true, upsert: true}, function(err, result) { From b5ced1db0fdfcbd4c362bd0d0634fd5de6ac4fe1 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 25 May 2016 14:57:31 -0400 Subject: [PATCH 0298/1109] upped composer version to MIT version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2838c78696..b0e00bb2b0 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "morgan": "^1.3.2", "mousetrap": "^1.5.3", "nconf": "~0.8.2", - "nodebb-plugin-composer-default": "3.0.32", + "nodebb-plugin-composer-default": "4.0.0", "nodebb-plugin-dbsearch": "1.0.1", "nodebb-plugin-emoji-extended": "1.1.0", "nodebb-plugin-emoji-one": "1.1.3", From a8f5000247857d7204ef98005695153b002e58cf Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 25 May 2016 15:25:01 -0400 Subject: [PATCH 0299/1109] advising restart instead of reload on plugin toggle @pichalite --- public/src/admin/extend/plugins.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/src/admin/extend/plugins.js b/public/src/admin/extend/plugins.js index 0cca29bef8..b4e8767184 100644 --- a/public/src/admin/extend/plugins.js +++ b/public/src/admin/extend/plugins.js @@ -31,12 +31,12 @@ define('admin/extend/plugins', function() { app.alert({ alert_id: 'plugin_toggled', title: 'Plugin ' + (status.active ? 'Enabled' : 'Disabled'), - message: status.active ? 'Please reload your NodeBB to fully activate this plugin' : 'Plugin successfully deactivated', + message: status.active ? 'Please restart your NodeBB to fully activate this plugin' : 'Plugin successfully deactivated', type: status.active ? 'warning' : 'success', timeout: 5000, clickfn: function() { require(['admin/modules/instance'], function(instance) { - instance.reload(); + instance.restart(); }); } }); From b4d14ef3661b4a6a17ba5e95e14972c47f248c62 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 25 May 2016 15:28:37 -0400 Subject: [PATCH 0300/1109] fixes #4687 --- public/src/admin/advanced/errors.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/admin/advanced/errors.js b/public/src/admin/advanced/errors.js index 96b17fbe40..2e72bcceb5 100644 --- a/public/src/admin/advanced/errors.js +++ b/public/src/admin/advanced/errors.js @@ -26,7 +26,7 @@ define('admin/advanced/errors', ['Chart'], function(Chart) { tooBusyCanvas = document.getElementById('toobusy'), dailyLabels = utils.getDaysArray(); - dailyLabels.length = 7; + dailyLabels = dailyLabels.slice(-7); if (utils.isMobile()) { Chart.defaults.global.showTooltips = false; From 8f665b65d1b62ff8f464a33f1fc2f1ccece1c85f Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 25 May 2016 15:39:07 -0400 Subject: [PATCH 0301/1109] up persona, #4661 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b0e00bb2b0..ce7447adbe 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", "nodebb-theme-lavender": "3.0.12", - "nodebb-theme-persona": "4.0.143", + "nodebb-theme-persona": "4.0.144", "nodebb-theme-vanilla": "5.0.78", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", From 2a5efd1a6000389f52964fa6391f358f197f3e7d Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 25 May 2016 15:57:43 -0400 Subject: [PATCH 0302/1109] up persona, closes #4646 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ce7447adbe..0fbe789426 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "nodebb-plugin-spam-be-gone": "0.4.6", "nodebb-rewards-essentials": "0.0.8", "nodebb-theme-lavender": "3.0.12", - "nodebb-theme-persona": "4.0.144", + "nodebb-theme-persona": "4.0.145", "nodebb-theme-vanilla": "5.0.78", "nodebb-widget-essentials": "2.0.9", "nodemailer": "2.0.0", From 6a4754efca61953fcb2c9279af09c62add084039 Mon Sep 17 00:00:00 2001 From: Timothy Fike Date: Wed, 25 May 2016 15:59:49 -0400 Subject: [PATCH 0303/1109] Set switches appropriately on plugin settings pages. (#4521) --- public/src/modules/settings/checkbox.js | 1 + 1 file changed, 1 insertion(+) diff --git a/public/src/modules/settings/checkbox.js b/public/src/modules/settings/checkbox.js index d091d0226d..865e89c0f3 100644 --- a/public/src/modules/settings/checkbox.js +++ b/public/src/modules/settings/checkbox.js @@ -15,6 +15,7 @@ define('settings/checkbox', function () { }, set: function (element, value) { element.prop('checked', value); + element.closest('.mdl-switch').toggleClass('is-checked', element.is(':checked')); }, get: function (element, trim, empty) { var value = element.prop('checked'); From efbc5f729d73f842af4d572d73848993bbcf636a Mon Sep 17 00:00:00 2001 From: Jan Date: Wed, 25 May 2016 22:00:44 +0200 Subject: [PATCH 0304/1109] update fontawesome.tpl to FA 4.6.2 (#4607) remove newline sort icons --- src/views/partials/fontawesome.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/partials/fontawesome.tpl b/src/views/partials/fontawesome.tpl index a179bfdd49..4ac0f1e01f 100644 --- a/src/views/partials/fontawesome.tpl +++ b/src/views/partials/fontawesome.tpl @@ -4,7 +4,7 @@
      - +

      For a full list of icons, please consult: From c5ec83a6ca62143b6d98479f35d342e008f15419 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 25 May 2016 23:12:52 -0400 Subject: [PATCH 0305/1109] up composer --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0fbe789426..69b71672da 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "morgan": "^1.3.2", "mousetrap": "^1.5.3", "nconf": "~0.8.2", - "nodebb-plugin-composer-default": "4.0.0", + "nodebb-plugin-composer-default": "4.0.1", "nodebb-plugin-dbsearch": "1.0.1", "nodebb-plugin-emoji-extended": "1.1.0", "nodebb-plugin-emoji-one": "1.1.3", From bdfad2beda273c7ff6a791af4d95019417b28104 Mon Sep 17 00:00:00 2001 From: pichalite Date: Thu, 26 May 2016 05:44:28 +0000 Subject: [PATCH 0306/1109] fixes #4660 --- public/less/admin/mobile.less | 4 ++-- src/views/admin/partials/menu.tpl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/less/admin/mobile.less b/public/less/admin/mobile.less index a324072679..e0e8ddb1dc 100644 --- a/public/less/admin/mobile.less +++ b/public/less/admin/mobile.less @@ -37,12 +37,12 @@ } #mobile-menu { - width: 31px; + width: 22px; background: none; border: none; vertical-align: 10%; margin-right: 10px; - margin-left: -15px; + margin-left: -5px; outline: none !important; display: block; diff --git a/src/views/admin/partials/menu.tpl b/src/views/admin/partials/menu.tpl index c68a470d4f..1dd67956b6 100644 --- a/src/views/admin/partials/menu.tpl +++ b/src/views/admin/partials/menu.tpl @@ -107,11 +107,11 @@