summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSheogorath2018-06-05 01:29:27 +0200
committerSheogorath2018-06-05 01:40:50 +0200
commit634b3c9cea24f07810229221a149827fb43f2239 (patch)
treef6a4e7c6e1a863747c9a550a7da0a17f1181e8eb /lib
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 '')
-rw-r--r--lib/config/index.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/config/index.js b/lib/config/index.js
index 484301c4..7853dbad 100644
--- a/lib/config/index.js
+++ b/lib/config/index.js
@@ -102,6 +102,9 @@ config.isSAMLEnable = config.saml.idpSsoUrl
config.isOAuth2Enable = config.oauth2.clientID && config.oauth2.clientSecret
config.isPDFExportEnable = config.allowPDFExport
+// Only update i18n files in development setups
+config.updateI18nFiles = (env === Environment.development)
+
// merge legacy values
let keys = Object.keys(config)
const uppercase = /[A-Z]/