|
|
@@ -20,10 +20,6 @@ module.exports = function(crowi, app) {
|
|
|
const expressSession = require('express-session');
|
|
|
const flash = require('connect-flash');
|
|
|
const mongoSanitize = require('express-mongo-sanitize');
|
|
|
- // const i18next = require('i18next');
|
|
|
- // const i18nFsBackend = require('i18next-node-fs-backend');
|
|
|
- // const i18nSprintf = require('i18next-sprintf-postprocessor');
|
|
|
- // const i18nMiddleware = require('i18next-express-middleware');
|
|
|
|
|
|
const promster = require('../middlewares/promster')(crowi, app);
|
|
|
const registerSafeRedirect = require('../middlewares/safe-redirect')();
|
|
|
@@ -31,33 +27,9 @@ module.exports = function(crowi, app) {
|
|
|
const autoReconnectToS2sMsgServer = require('../middlewares/auto-reconnect-to-s2s-msg-server')(crowi);
|
|
|
|
|
|
const avoidSessionRoutes = require('../routes/avoid-session-routes');
|
|
|
- // const i18nUserSettingDetector = require('../util/i18nUserSettingDetector');
|
|
|
|
|
|
const env = crowi.node_env;
|
|
|
|
|
|
- // const lngDetector = new i18nMiddleware.LanguageDetector();
|
|
|
- // lngDetector.addDetector(i18nUserSettingDetector);
|
|
|
-
|
|
|
- // i18next
|
|
|
- // .use(lngDetector)
|
|
|
- // .use(i18nFsBackend)
|
|
|
- // .use(i18nSprintf)
|
|
|
- // .init({
|
|
|
- // // debug: true,
|
|
|
- // fallbackLng: ['en_US'],
|
|
|
- // whitelist: i18n.locales,
|
|
|
- // backend: {
|
|
|
- // loadPath: `${localePath}/{{lng}}/translation.json`,
|
|
|
- // },
|
|
|
- // detection: {
|
|
|
- // order: ['userSettingDetector', 'header', 'navigator'],
|
|
|
- // },
|
|
|
- // overloadTranslationOptionHandler: i18nSprintf.overloadTranslationOptionHandler,
|
|
|
-
|
|
|
- // // change nsSeparator from ':' to '::' because ':' is used in config keys and these are used in i18n keys
|
|
|
- // nsSeparator: '::',
|
|
|
- // });
|
|
|
-
|
|
|
app.use(compression());
|
|
|
|
|
|
|
|
|
@@ -165,7 +137,6 @@ module.exports = function(crowi, app) {
|
|
|
app.use(injectCurrentuserToLocalvars);
|
|
|
app.use(autoReconnectToS2sMsgServer);
|
|
|
|
|
|
- // app.use(i18nMiddleware.handle(i18next));
|
|
|
// TODO: Remove this workaround implementation when i18n works correctly.
|
|
|
// For now, req.t returns string given to req.t(string)
|
|
|
app.use((req, res, next) => {
|