summaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
authorSheogorath2018-06-05 01:29:27 +0200
committerSheogorath2018-06-05 01:40:50 +0200
commit634b3c9cea24f07810229221a149827fb43f2239 (patch)
treef6a4e7c6e1a863747c9a550a7da0a17f1181e8eb /app.js
parent551840ad57125fa168247c21613f9d6de6cd5d99 (diff)
Fix i18n writing locale files in production
This commit should prevent the i18n module from adding missing translations to the local files in setups that are not for development. This way we keep the directory clean and idempotent. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
Diffstat (limited to 'app.js')
-rw-r--r--app.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/app.js b/app.js
index 8f9300f2..e42e2d97 100644
--- a/app.js
+++ b/app.js
@@ -131,7 +131,8 @@ if (config.csp.enable) {
i18n.configure({
locales: ['en', 'zh', 'zh-CN', 'zh-TW', 'fr', 'de', 'ja', 'es', 'ca', 'el', 'pt', 'it', 'tr', 'ru', 'nl', 'hr', 'pl', 'uk', 'hi', 'sv', 'eo', 'da'],
cookie: 'locale',
- directory: path.join(__dirname, '/locales')
+ directory: path.join(__dirname, '/locales'),
+ updateFiles: config.updateI18nFiles
})
app.use(cookieParser())