mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 10:35:55 +01:00
refactored translator system to be a require.js module, and not a global
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"use strict";
|
||||
/* global define, app, ajaxify, socket, templates, bootbox, translator */
|
||||
/* global define, app, ajaxify, socket, templates, bootbox */
|
||||
|
||||
define('admin/general/navigation', function() {
|
||||
define('admin/general/navigation', ['translator'], function(translator) {
|
||||
var navigation = {},
|
||||
available;
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
"use strict";
|
||||
/*global define, templates, socket, ajaxify, app, admin, bootbox, utils, config, translator */
|
||||
/*global define, templates, socket, ajaxify, app, admin, bootbox, utils, config */
|
||||
|
||||
define('admin/manage/groups', [
|
||||
'iconSelect',
|
||||
'admin/modules/colorpicker'
|
||||
], function(iconSelect, colorpicker) {
|
||||
'admin/modules/colorpicker',
|
||||
'translator'
|
||||
], function(iconSelect, colorpicker, translator) {
|
||||
var Groups = {};
|
||||
|
||||
Groups.init = function() {
|
||||
|
||||
@@ -4,11 +4,19 @@ var ajaxify = ajaxify || {};
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
/*global app, templates, utils, socket, translator, config, RELATIVE_PATH*/
|
||||
/*global app, templates, utils, socket, config, RELATIVE_PATH*/
|
||||
|
||||
var location = document.location || window.location,
|
||||
rootUrl = location.protocol + '//' + (location.hostname || location.host) + (location.port ? ':' + location.port : ''),
|
||||
apiXHR = null;
|
||||
apiXHR = null,
|
||||
|
||||
translator;
|
||||
|
||||
// Dumb hack to fool ajaxify into thinking translator is still a global
|
||||
// When ajaxify is migrated to a require.js module, then this can be merged into the "define" call
|
||||
require(['translator'], function(_translator) {
|
||||
translator = _translator;
|
||||
});
|
||||
|
||||
$(window).on('popstate', function (ev) {
|
||||
ev = ev.originalEvent;
|
||||
@@ -49,11 +57,9 @@ $(document).ready(function() {
|
||||
|
||||
app.template = data.template.name;
|
||||
|
||||
translator.load(config.defaultLang, data.template.name);
|
||||
|
||||
renderTemplate(url, data.template.name, data, callback);
|
||||
|
||||
require(['search'], function(search) {
|
||||
require(['translator', 'search'], function(translator, search) {
|
||||
translator.load(config.defaultLang, data.template.name);
|
||||
renderTemplate(url, data.template.name, data, callback);
|
||||
search.topicDOM.end();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"use strict";
|
||||
/*global io, templates, translator, ajaxify, utils, bootbox, RELATIVE_PATH, config, Visibility*/
|
||||
/*global io, templates, ajaxify, utils, bootbox, RELATIVE_PATH, config, Visibility*/
|
||||
|
||||
var socket,
|
||||
app = app || {};
|
||||
@@ -310,18 +310,20 @@ app.cacheBuster = null;
|
||||
titleObj.titles[0] = window.document.title;
|
||||
}
|
||||
|
||||
translator.translate(title, function(translated) {
|
||||
titleObj.titles[1] = translated;
|
||||
if (titleObj.interval) {
|
||||
clearInterval(titleObj.interval);
|
||||
}
|
||||
|
||||
titleObj.interval = setInterval(function() {
|
||||
var title = titleObj.titles[titleObj.titles.indexOf(window.document.title) ^ 1];
|
||||
if (title) {
|
||||
window.document.title = $('<div/>').html(title).text();
|
||||
require(['translator'], function(translator) {
|
||||
translator.translate(title, function(translated) {
|
||||
titleObj.titles[1] = translated;
|
||||
if (titleObj.interval) {
|
||||
clearInterval(titleObj.interval);
|
||||
}
|
||||
}, 2000);
|
||||
|
||||
titleObj.interval = setInterval(function() {
|
||||
var title = titleObj.titles[titleObj.titles.indexOf(window.document.title) ^ 1];
|
||||
if (title) {
|
||||
window.document.title = $('<div/>').html(title).text();
|
||||
}
|
||||
}, 2000);
|
||||
});
|
||||
});
|
||||
} else {
|
||||
if (titleObj.interval) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
/* globals define, ajaxify, socket, app, config, utils, translator, bootbox */
|
||||
/* globals define, ajaxify, socket, app, config, utils, bootbox */
|
||||
|
||||
define('forum/account/edit', ['forum/account/header', 'uploader'], function(header, uploader) {
|
||||
define('forum/account/edit', ['forum/account/header', 'uploader', 'translator'], function(header, uploader, translator) {
|
||||
var AccountEdit = {},
|
||||
gravatarPicture = '',
|
||||
uploadedPicture = '',
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
/* globals define, ajaxify, app, utils, socket, translator*/
|
||||
/* globals define, ajaxify, app, utils, socket */
|
||||
|
||||
define('forum/account/profile', ['forum/account/header', 'forum/infinitescroll'], function(header, infinitescroll) {
|
||||
define('forum/account/profile', ['forum/account/header', 'forum/infinitescroll', 'translator'], function(header, infinitescroll, translator) {
|
||||
var Account = {},
|
||||
yourid,
|
||||
theirid,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
/* globals define, socket, app, templates, translator, ajaxify*/
|
||||
/* globals define, socket, app, templates, ajaxify*/
|
||||
|
||||
define('forum/categories', ['components'], function(components) {
|
||||
define('forum/categories', ['components', 'translator'], function(components, translator) {
|
||||
var categories = {};
|
||||
|
||||
$(window).on('action:ajaxify.start', function(ev, data) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"use strict";
|
||||
/* global define, config, templates, app, utils, ajaxify, socket, translator */
|
||||
/* global define, config, templates, app, utils, ajaxify, socket */
|
||||
|
||||
define('forum/category', [
|
||||
'composer',
|
||||
@@ -9,8 +9,9 @@ define('forum/category', [
|
||||
'navigator',
|
||||
'forum/categoryTools',
|
||||
'sort',
|
||||
'components'
|
||||
], function(composer, pagination, infinitescroll, share, navigator, categoryTools, sort, components) {
|
||||
'components',
|
||||
'translator'
|
||||
], function(composer, pagination, infinitescroll, share, navigator, categoryTools, sort, components, translator) {
|
||||
var Category = {};
|
||||
|
||||
$(window).on('action:ajaxify.start', function(ev, data) {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/* globals define, app, translator, socket, bootbox, ajaxify */
|
||||
/* globals define, app, socket, bootbox, ajaxify */
|
||||
|
||||
|
||||
define('forum/categoryTools', ['forum/topic/move', 'topicSelect', 'components'], function(move, topicSelect, components) {
|
||||
define('forum/categoryTools', ['forum/topic/move', 'topicSelect', 'components', 'translator'], function(move, topicSelect, components, translator) {
|
||||
|
||||
var CategoryTools = {};
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
/* globals define, app, ajaxify, utils, socket, templates, translator */
|
||||
/* globals define, app, ajaxify, utils, socket, templates */
|
||||
|
||||
define('forum/chats', ['string', 'sounds', 'forum/infinitescroll'], function(S, sounds, infinitescroll) {
|
||||
define('forum/chats', ['string', 'sounds', 'forum/infinitescroll', 'translator'], function(S, sounds, infinitescroll, translator) {
|
||||
var Chats = {
|
||||
initialised: false
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use strict";
|
||||
/*globals define, app, translator, socket*/
|
||||
/*globals define, app, socket*/
|
||||
|
||||
define('forum/footer', ['notifications', 'chat', 'components'], function(Notifications, Chat, components) {
|
||||
define('forum/footer', ['notifications', 'chat', 'components', 'translator'], function(Notifications, Chat, components, translator) {
|
||||
|
||||
Notifications.prepareDOM();
|
||||
Chat.prepareDOM();
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
/* globals define, socket, ajaxify, translator, templates, app */
|
||||
/* globals define, socket, ajaxify, templates, app */
|
||||
|
||||
define('forum/infinitescroll', function() {
|
||||
define('forum/infinitescroll', ['translator'], function(translator) {
|
||||
|
||||
var scroll = {};
|
||||
var callback;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use strict";
|
||||
/* global define, app, translator, config, RELATIVE_PATH */
|
||||
/* global define, app, config, RELATIVE_PATH */
|
||||
|
||||
define('forum/login', ['csrf'], function(csrf) {
|
||||
define('forum/login', ['csrf', 'translator'], function(csrf, translator) {
|
||||
var Login = {};
|
||||
|
||||
Login.init = function() {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
'use strict';
|
||||
|
||||
/* globals define, app, utils, socket, config, translator */
|
||||
/* globals define, app, utils, socket, config */
|
||||
|
||||
|
||||
define('forum/register', ['csrf'], function(csrf) {
|
||||
define('forum/register', ['csrf', 'translator'], function(csrf, translator) {
|
||||
var Register = {},
|
||||
validationError = false,
|
||||
successIcon = '<i class="fa fa-check"></i>';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
|
||||
/* globals define, app, templates, translator, socket, bootbox, config, ajaxify, RELATIVE_PATH, utils */
|
||||
/* globals define, app, templates, socket, bootbox, config, ajaxify, RELATIVE_PATH, utils */
|
||||
|
||||
define('forum/topic', [
|
||||
'forum/pagination',
|
||||
@@ -13,8 +13,9 @@ define('forum/topic', [
|
||||
'forum/topic/posts',
|
||||
'navigator',
|
||||
'sort',
|
||||
'components'
|
||||
], function(pagination, infinitescroll, threadTools, postTools, events, browsing, posts, navigator, sort, components) {
|
||||
'components',
|
||||
'translator'
|
||||
], function(pagination, infinitescroll, threadTools, postTools, events, browsing, posts, navigator, sort, components, translator) {
|
||||
var Topic = {},
|
||||
currentUrl = '';
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/* globals define, app, translator, config, socket, ajaxify */
|
||||
/* globals define, app, config, socket, ajaxify */
|
||||
|
||||
define('forum/topic/browsing', function() {
|
||||
define('forum/topic/browsing', ['translator'], function(translator) {
|
||||
|
||||
var Browsing = {};
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/* globals app, ajaxify, define, socket, translator, templates */
|
||||
/* globals app, ajaxify, define, socket, templates */
|
||||
|
||||
define('forum/topic/events', [
|
||||
'forum/topic/browsing',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
/* globals define, app, ajaxify, translator, socket */
|
||||
/* globals define, app, ajaxify, socket */
|
||||
|
||||
define('forum/topic/fork', ['components'], function(components) {
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
/* globals define, app, ajaxify, bootbox, socket, templates, translator, utils */
|
||||
/* globals define, app, ajaxify, bootbox, socket, templates, utils */
|
||||
|
||||
define('forum/topic/postTools', ['composer', 'share', 'navigator', 'components'], function(composer, share, navigator, components) {
|
||||
define('forum/topic/postTools', ['composer', 'share', 'navigator', 'components', 'translator'], function(composer, share, navigator, components, translator) {
|
||||
|
||||
var PostTools = {},
|
||||
topicName;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
/* globals define, app, translator, ajaxify, socket, bootbox */
|
||||
/* globals define, app, ajaxify, socket, bootbox */
|
||||
|
||||
define('forum/topic/threadTools', ['forum/topic/fork', 'forum/topic/move', 'components'], function(fork, move, components) {
|
||||
define('forum/topic/threadTools', ['forum/topic/fork', 'forum/topic/move', 'components', 'translator'], function(fork, move, components, translator) {
|
||||
|
||||
var ThreadTools = {};
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
/* globals define, socket, app, ajaxify, templates, translator*/
|
||||
/* globals define, socket, app, ajaxify, templates */
|
||||
|
||||
define('forum/users', function() {
|
||||
define('forum/users', ['translator'], function(translator) {
|
||||
var Users = {};
|
||||
|
||||
var loadingMoreUsers = false;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
/* globals define, translator, templates */
|
||||
/* globals define, templates */
|
||||
|
||||
define('alerts', function() {
|
||||
define('alerts', ['translator'], function(translator) {
|
||||
var module = {};
|
||||
|
||||
module.alert = function (params) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use strict";
|
||||
/* globals app, config, define, socket, translator, templates, utils, ajaxify */
|
||||
/* globals app, config, define, socket, templates, utils, ajaxify */
|
||||
|
||||
define('chat', ['taskbar', 'string', 'sounds', 'forum/chats'], function(taskbar, S, sounds, Chats) {
|
||||
define('chat', ['taskbar', 'string', 'sounds', 'forum/chats', 'translator'], function(taskbar, S, sounds, Chats, translator) {
|
||||
|
||||
var module = {};
|
||||
var newMessage = false;
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
/* globals define, socket, app, config, ajaxify, utils, translator, templates, bootbox */
|
||||
/* globals define, socket, app, config, ajaxify, utils, templates, bootbox */
|
||||
|
||||
define('composer', [
|
||||
'taskbar',
|
||||
'translator',
|
||||
'composer/controls',
|
||||
'composer/uploads',
|
||||
'composer/formatting',
|
||||
@@ -12,7 +13,7 @@ define('composer', [
|
||||
'composer/categoryList',
|
||||
'composer/preview',
|
||||
'composer/resize'
|
||||
], function(taskbar, controls, uploads, formatting, drafts, tags, categoryList, preview, resize) {
|
||||
], function(taskbar, translator, controls, uploads, formatting, drafts, tags, categoryList, preview, resize) {
|
||||
var composer = {
|
||||
active: undefined,
|
||||
posts: {},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/* globals app, define, ajaxify, utils, translator, config */
|
||||
/* globals app, define, ajaxify, utils, config */
|
||||
|
||||
|
||||
define('navigator', ['forum/pagination', 'components'], function(pagination, components) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
/* globals define, socket, translator, utils, config, app, ajaxify, templates, Tinycon*/
|
||||
/* globals define, socket, utils, config, app, ajaxify, templates, Tinycon*/
|
||||
|
||||
define('notifications', ['sounds'], function(sound) {
|
||||
define('notifications', ['sounds', 'translator'], function(sound, translator) {
|
||||
var Notifications = {};
|
||||
|
||||
Notifications.prepareDOM = function() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use strict";
|
||||
/* globals socket, ajaxify, translator, app, define */
|
||||
/* globals socket, ajaxify, app, define */
|
||||
|
||||
define('search', ['navigator'], function(nav) {
|
||||
define('search', ['navigator', 'translator'], function(nav, translator) {
|
||||
|
||||
var Search = {
|
||||
current: {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
/* globals define, config, socket, app, ajaxify, translator, templates */
|
||||
/* globals define, config, socket, app, ajaxify, templates */
|
||||
|
||||
define('sort', function() {
|
||||
var module = {};
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
(function (module) {
|
||||
;(function(translator) {
|
||||
"use strict";
|
||||
/*global RELATIVE_PATH, config*/
|
||||
/* globals RELATIVE_PATH, config, define */
|
||||
|
||||
// export the class if we are in a Node-like system.
|
||||
if (typeof module === 'object' && module.exports === translator) {
|
||||
exports = module.exports = translator;
|
||||
}
|
||||
|
||||
var translator = {},
|
||||
languages = {};
|
||||
|
||||
var regexes = {
|
||||
match: /\[\[.*?\]\]/g,
|
||||
split: /[,][\s]*/,
|
||||
replace: /\]+$/
|
||||
};
|
||||
|
||||
module.exports = translator;
|
||||
var languages = {},
|
||||
regexes = {
|
||||
match: /\[\[.*?\]\]/g,
|
||||
split: /[,][\s]*/,
|
||||
replace: /\]+$/
|
||||
};
|
||||
|
||||
translator.addTranslation = function(language, filename, translations) {
|
||||
languages[language] = languages[language] || {};
|
||||
@@ -127,7 +127,7 @@
|
||||
if ('undefined' !== typeof window && config) {
|
||||
language = config.userLang || 'en_GB';
|
||||
} else {
|
||||
var meta = require('../../src/meta');
|
||||
var meta = require('../../../src/meta');
|
||||
language = meta.config.defaultLang || 'en_GB';
|
||||
}
|
||||
}
|
||||
@@ -267,16 +267,16 @@
|
||||
var fs = require('fs'),
|
||||
path = require('path'),
|
||||
winston = require('winston'),
|
||||
meta = require('../../src/meta');
|
||||
meta = require('../../../src/meta');
|
||||
|
||||
language = language || meta.config.defaultLang || 'en_GB';
|
||||
|
||||
if (!fs.existsSync(path.join(__dirname, '../language', language))) {
|
||||
if (!fs.existsSync(path.join(__dirname, '../../language', language))) {
|
||||
winston.warn('[translator] Language \'' + meta.config.defaultLang + '\' not found. Defaulting to \'en_GB\'');
|
||||
language = 'en_GB';
|
||||
}
|
||||
|
||||
fs.readFile(path.join(__dirname, '../language', language, filename + '.json'), function(err, data) {
|
||||
fs.readFile(path.join(__dirname, '../../language', language, filename + '.json'), function(err, data) {
|
||||
if (err) {
|
||||
winston.error('Could not load `' + filename + '`: ' + err.message + '. Skipping...');
|
||||
return callback({});
|
||||
@@ -291,12 +291,20 @@
|
||||
});
|
||||
}
|
||||
|
||||
if ('undefined' !== typeof window) {
|
||||
window.translator = module.exports;
|
||||
}
|
||||
// Use the define() function if we're in AMD land
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('translator', translator);
|
||||
|
||||
})('undefined' === typeof module ? {
|
||||
module: {
|
||||
exports: {}
|
||||
// Expose a global `translator` object for backwards compatibility
|
||||
window.translator = {
|
||||
translate: function() {
|
||||
console.warn('[translator] Global invocation of the translator is now deprecated, please `require` the module instead.');
|
||||
translator.translate.apply(translator, arguments);
|
||||
}
|
||||
}
|
||||
}
|
||||
} : module);
|
||||
})(
|
||||
typeof exports === 'object' ? exports :
|
||||
typeof define === 'function' && define.amd ? {} :
|
||||
translator = {}
|
||||
);
|
||||
@@ -1,11 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
/*globals translator*/
|
||||
|
||||
|
||||
if ('undefined' !== typeof window) {
|
||||
|
||||
(function ($, undefined) {
|
||||
var translator;
|
||||
require(['translator'], function(_translator) {
|
||||
translator = _translator;
|
||||
});
|
||||
|
||||
$.fn.getCursorPosition = function() {
|
||||
var el = $(this).get(0);
|
||||
var pos = 0;
|
||||
|
||||
@@ -4,7 +4,7 @@ var nconf = require('nconf'),
|
||||
async = require('async'),
|
||||
validator = require('validator'),
|
||||
|
||||
translator = require('../../public/src/translator'),
|
||||
translator = require('../../public/src/modules/translator'),
|
||||
categories = require('../categories'),
|
||||
plugins = require('../plugins'),
|
||||
meta = require('../meta');
|
||||
|
||||
@@ -9,7 +9,7 @@ var fs = require('fs'),
|
||||
User = require('./user'),
|
||||
Plugins = require('./plugins'),
|
||||
meta = require('./meta'),
|
||||
translator = require('../public/src/translator'),
|
||||
translator = require('../public/src/modules/translator'),
|
||||
|
||||
app;
|
||||
|
||||
|
||||
@@ -44,9 +44,7 @@ module.exports = function(Meta) {
|
||||
'public/src/utils.js',
|
||||
'public/src/app.js',
|
||||
'public/src/ajaxify.js',
|
||||
'public/src/components.js',
|
||||
'public/src/overrides.js',
|
||||
'public/src/translator.js',
|
||||
'public/src/variables.js',
|
||||
'public/src/widgets.js'
|
||||
],
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
var winston = require('winston'),
|
||||
validator = require('validator'),
|
||||
user = require('../user'),
|
||||
translator = require('../../public/src/translator');
|
||||
translator = require('../../public/src/modules/translator');
|
||||
|
||||
module.exports = function(Meta) {
|
||||
Meta.title = {};
|
||||
|
||||
@@ -14,7 +14,7 @@ var app,
|
||||
plugins = require('./../plugins'),
|
||||
navigation = require('./../navigation'),
|
||||
meta = require('./../meta'),
|
||||
translator = require('./../../public/src/translator'),
|
||||
translator = require('./../../public/src/modules/translator'),
|
||||
user = require('./../user'),
|
||||
groups = require('./../groups'),
|
||||
db = require('./../database'),
|
||||
|
||||
@@ -5,7 +5,7 @@ var admin = {},
|
||||
async = require('async'),
|
||||
plugins = require('../plugins'),
|
||||
db = require('../database'),
|
||||
translator = require('../../public/src/translator');
|
||||
translator = require('../../public/src/modules/translator');
|
||||
|
||||
|
||||
admin.save = function(data, callback) {
|
||||
|
||||
@@ -5,7 +5,7 @@ var navigation = {},
|
||||
plugins = require('../plugins'),
|
||||
db = require('../database'),
|
||||
admin = require('./admin'),
|
||||
translator = require('../../public/src/translator');
|
||||
translator = require('../../public/src/modules/translator');
|
||||
|
||||
|
||||
navigation.get = function(callback) {
|
||||
|
||||
@@ -11,7 +11,7 @@ var fs = require('fs'),
|
||||
db = require('./database'),
|
||||
emitter = require('./emitter'),
|
||||
meta = require('./meta'),
|
||||
translator = require('../public/src/translator'),
|
||||
translator = require('../public/src/modules/translator'),
|
||||
utils = require('../public/src/utils'),
|
||||
hotswap = require('./hotswap'),
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ var async = require('async'),
|
||||
groups = require('../groups'),
|
||||
meta = require('../meta'),
|
||||
notifications = require('../notifications'),
|
||||
translator = require('../../public/src/translator');
|
||||
translator = require('../../public/src/modules/translator');
|
||||
|
||||
module.exports = function(User) {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ var async = require('async'),
|
||||
|
||||
user = require('../user'),
|
||||
utils = require('../../public/src/utils'),
|
||||
translator = require('../../public/src/translator'),
|
||||
translator = require('../../public/src/modules/translator'),
|
||||
plugins = require('../plugins'),
|
||||
db = require('../database'),
|
||||
meta = require('../meta'),
|
||||
|
||||
@@ -6,7 +6,7 @@ var async = require('async'),
|
||||
|
||||
user = require('../user'),
|
||||
utils = require('../../public/src/utils'),
|
||||
translator = require('../../public/src/translator'),
|
||||
translator = require('../../public/src/modules/translator'),
|
||||
|
||||
db = require('../database'),
|
||||
meta = require('../meta'),
|
||||
|
||||
Reference in New Issue
Block a user