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>
This commit is contained in:
Sheogorath
2018-06-05 01:29:27 +02:00
parent 551840ad57
commit 634b3c9cea
2 changed files with 5 additions and 1 deletions

3
app.js
View File

@@ -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())