Extract list of supported languages in separate file
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
committed by
David Mehren
parent
cf87499e38
commit
0d943d1284
5
app.js
5
app.js
@@ -28,6 +28,8 @@ const models = require('./lib/models')
|
||||
const csp = require('./lib/csp')
|
||||
const metrics = require('./lib/prometheus')
|
||||
|
||||
const supportedLocalesList = Object.keys(require('./locales/_supported.json'))
|
||||
|
||||
// server setup
|
||||
const app = express()
|
||||
let server = null
|
||||
@@ -126,8 +128,7 @@ if (config.csp.enable) {
|
||||
}
|
||||
|
||||
i18n.configure({
|
||||
locales: ['en', 'zh-CN', 'zh-TW', 'fr', 'de', 'ja', 'es', 'ca', 'el', 'pt', 'it', 'tr', 'ru', 'nl', 'hr', 'pl',
|
||||
'uk', 'hi', 'sv', 'eo', 'da', 'ko', 'id', 'sr', 'vi', 'ar', 'cs', 'sk', 'ml', 'bg', 'fa', 'gl', 'he', 'hu', 'oc', 'pt-br'],
|
||||
locales: supportedLocalesList,
|
||||
cookie: 'locale',
|
||||
indent: ' ', // this is the style poeditor.com exports it, this creates less churn
|
||||
directory: path.join(__dirname, '/locales'),
|
||||
|
||||
Reference in New Issue
Block a user