From 8d316d1859af6fdca95dc158c3009d99873484d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 25 Oct 2021 13:59:43 -0400 Subject: [PATCH] fix: #9934, fix translator test --- public/src/modules/translator.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public/src/modules/translator.js b/public/src/modules/translator.js index 142d360b68..00572536d5 100644 --- a/public/src/modules/translator.js +++ b/public/src/modules/translator.js @@ -27,8 +27,6 @@ } else if (typeof module === 'object' && module.exports) { // Node (function () { - const languages = require('../../../src/languages'); - if (global.env === 'development') { const winston = require('winston'); warn = function (a) { @@ -36,7 +34,10 @@ }; } - module.exports = factory(require('../utils'), languages.get, warn); + module.exports = factory(require('../utils'), function (lang, namespace) { + const languages = require('../../../src/languages'); + return languages.get(lang, namespace); + }, warn); }()); } }(function (utils, load, warn) {